/* =====================================================
   Wokiee Attribute Image Style
   Style 1 = A 紧凑小色卡
   Style 2 = B 悬停显示名称
   Style 3 = C 高级按钮
   ===================================================== */

/* 隐藏 radio 圆点 */
.wt-attr-radio,
input.wt-attr-radio {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* 清理 Zen Cart 原版图片属性外框 */
.attribImg {
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
}

/* 通用卡片 */
.wt-attr-card {
    display: inline-flex !important;
    box-sizing: border-box !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    border: 1px solid #ddd;
    transition: all .18s ease;
    text-decoration: none;
}

.wt-attr-card img {
    display: block;
    object-fit: contain;
}

.wt-attr-name {
    color: #333;
    text-align: center;
}

/* =========================
   Style 1 小方块 hover名称
   ========================= */

.wt-attr-style-1{
    width:56px;
    height:56px;

    display:inline-flex !important;

    align-items:center;
    justify-content:center;

    padding:4px;
    margin:4px;

    border:none !important;
    background:transparent !important;

    border-radius:10px;

    position:relative;
}

.wt-attr-style-1 img{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:contain;

    transition:all .15s ease;
}

/* hover 图片放大 */
.wt-attr-style-1:hover img{
    transform:scale(1.12);
}

/* 名称默认隐藏 */
.wt-attr-style-1 .wt-attr-name{
    display:none;

    position:absolute;
    left:50%;
    bottom:-28px;

    transform:translateX(-50%);

    background:#111;
    color:#fff;

    font-size:11px;
    line-height:1;

    padding:6px 8px;
    border-radius:5px;

    white-space:nowrap;

    z-index:999;
}

/* hover显示名称 */
.wt-attr-style-1:hover .wt-attr-name{
    display:block;
}

/* 选中状态 */
.wt-attr-radio:checked + .wt-attr-style-1 img{
    box-shadow:0 0 0 2px #111;
    transform:scale(1.08);
}

/* =========================
   Style 2 = B 图片悬停名称
   ========================= */
.wt-attr-style-2 {
    width: 58px;
    height: 58px;
    padding: 6px;
    margin: 4px;
    border-radius: 50%;
    position: relative;
    overflow: visible !important;
}

.wt-attr-style-2 img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.wt-attr-style-2 .wt-attr-name {
    display: none;
    position: absolute;
    left: 50%;
    bottom: -32px;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 999;
}

.wt-attr-style-2:hover .wt-attr-name {
    display: block;
}

.wt-attr-radio:checked + .wt-attr-style-2,
.wt-attr-radio:checked + label.wt-attr-style-2 {
    border: 2px solid #111;
}

/* =========================
   Style 3 = C 高级按钮
   ========================= */
.wt-attr-style-3 {
    min-width: 64px;
    min-height: 36px;
    padding: 8px 16px;
    margin: 4px;
    border-radius: 999px;
    flex-direction: row;
}

.wt-attr-style-3 .wt-attr-img-wrap {
    display: none;
}

.wt-attr-style-3 .wt-attr-name {
    font-size: 13px;
    line-height: 1;
}

.wt-attr-style-3:hover {
    border-color: #111;
}

.wt-attr-radio:checked + .wt-attr-style-3,
.wt-attr-radio:checked + label.wt-attr-style-3 {
    background: #111;
    border-color: #111;
}

.wt-attr-radio:checked + .wt-attr-style-3 .wt-attr-name,
.wt-attr-radio:checked + label.wt-attr-style-3 .wt-attr-name {
    color: #fff;
}

/* 防止 Wokiee 父级挡住 hover 名称 */
.attribImg,
.wt-attr-card,
.wt-attr-img-wrap {
    overflow: visible !important;
}