product-card {
    --card-padding: 22px;
    display: flex;
    flex-direction: column;
    background: transparent;
    --button-background-color: 51, 51, 51;
    --button-text-color: 255, 255, 255;
}

product-card .product-card {
    position: relative;
    background: #F4F4F4;
    border-radius: 14px;
    overflow: hidden;
    transition: .25s ease;
}

product-card .product-card>div {
    width: 100%;
    height: 100%;
}

product-card .product-media {
    position: relative;
    overflow: hidden;
    background: #F4F4F4;
}

product-card .product-image {
    position: relative;
    aspect-ratio: 530/400;
    overflow: hidden;
    background: #F4F4F4;
}

product-card .mk-product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

product-card .mk-product-image-link .product-image {
    width: 100%;
}

product-card .block-product-card__image,
product-card .block-product-card__image-second {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: .35s ease;
}

product-card .block-product-card__image {
    z-index: 1;
    transform: none;
}

product-card .block-product-card__image-second {
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

product-card:hover .block-product-card__image-second {
    opacity: 1;
}

product-card:hover .block-product-card__image,
product-card:hover .block-product-card__image-second {
    transform: none;
}

/* 信息区 */
product-card .product-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title price"
        "colors colors";
    row-gap: 12px;
    column-gap: 16px;
    align-items: center;
    padding: 16px 24px 18px;
    position: relative;
    background: #F4F4F4;
    z-index: 5;
    min-height: 86px;
}

product-card .product-card .product-title {
    grid-area: title;
    color: #222;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

product-card .product-title a {
    color: inherit;
    text-decoration: none;
}

product-card .product-price {
    grid-area: price;
    position: static;
    transform: none;
    color: #D89A3D;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
}

product-card .product-price__item {
    color: #D89A3D;
}

product-card .product-price__item--compare {
    color: rgba(51, 51, 51, .5);
    text-decoration: line-through;
}

product-card .product-badge {
    position: absolute;
    top: var(--card-padding);
    left: var(--card-padding);
    z-index: 10;
}

product-card .badge-tag {
    padding: 4px 15px;
    border-radius: 3px;
}

product-card .block-product-card__sold-out {
    background: #fff;
    color: #000;
}

product-card .block-product-card__discount-tag {
    background: #FFE600;
    color: #000;
}

product-card .product-card-button,
product-card:hover .product-card-button {
    display: none !important;
    opacity: 0 !important;
}

product-card:hover .product-title,
product-card:hover .product-price {
    opacity: 1 !important;
}

product-card:hover .product-card {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}

/* 颜色圆点 */
product-card .product-card-colors {
    grid-area: colors;
    display: flex;
    gap: 6px;
    margin-top: 0;
    align-items: center;
    min-height: 28px;
}

product-card .product-card-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 3px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    box-sizing: border-box;
    pointer-events: auto;
}

product-card .product-card-color-swatch::before {
    content: "";
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--swatch-color, #ddd);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

product-card .product-card-color-swatch:hover {
    transform: scale(1.08);
}

product-card .product-card-color-swatch.active {
    border: 3px solid #2F2F2F;
    padding: 3px;
}

/* 颜色映射 */
product-card .product-card-color-swatch[data-color="Black"]::before,
product-card .product-card-color-swatch[style*="Black"]::before {
    background: #000000 !important;
}

product-card .product-card-color-swatch[data-color="Blue"]::before,
product-card .product-card-color-swatch[style*="Blue"]::before {
    background: #010fd0 !important;
}

product-card .product-card-color-swatch[data-color="Gray"]::before,
product-card .product-card-color-swatch[data-color="Grey"]::before,
product-card .product-card-color-swatch[style*="Gray"]::before,
product-card .product-card-color-swatch[style*="Grey"]::before {
    background: #999999 !important;
}

product-card .product-card-color-swatch[data-color="Green"]::before,
product-card .product-card-color-swatch[style*="Green"]::before {
    background: #007d1e !important;
}

product-card .product-card-color-swatch[data-color="Brown"]::before,
product-card .product-card-color-swatch[style*="Brown"]::before {
    background: #cf570d !important;
}

product-card .product-card-color-swatch[data-color="Gold"]::before,
product-card .product-card-color-swatch[style*="Gold"]::before {
    background: #fbd100 !important;
}

product-card .product-card-color-swatch[data-color="Coffee"]::before,
product-card .product-card-color-swatch[style*="Coffee"]::before {
    background: #655337 !important;
}

product-card .product-card-color-swatch[data-color="Orange"]::before,
product-card .product-card-color-swatch[style*="Orange"]::before {
    background: #ff8000 !important;
}

product-card .product-card-color-swatch[data-color="Red"]::before,
product-card .product-card-color-swatch[style*="Red"]::before {
    background: #e70013 !important;
}

product-card .product-card-color-swatch[data-color="Silver"]::before,
product-card .product-card-color-swatch[style*="Silver"]::before {
    background: #d2d4e4 !important;
}

product-card .product-card-color-swatch[data-color="Tea"]::before,
product-card .product-card-color-swatch[style*="Tea"]::before {
    background: #b06944 !important;
}

product-card .product-card-color-swatch[data-color="Purple"]::before,
product-card .product-card-color-swatch[style*="Purple"]::before {
    background: #9256a5 !important;
}

product-card .product-card-color-swatch[data-color="White"]::before,
product-card .product-card-color-swatch[style*="White"]::before {
    background: #f3ede9 !important;
}

product-card .product-card-color-swatch[data-color="Yellow"]::before,
product-card .product-card-color-swatch[style*="Yellow"]::before {
    background: #ffeb00 !important;
}

product-card .product-card-color-swatch[data-color="Fluorescent Green"]::before,
product-card .product-card-color-swatch[style*="Fluorescent Green"]::before {
    background: #bfe95a !important;
}

/* 图片色卡 */
product-card .product-card-color-swatch[data-color="Transparent"]::before,
product-card .product-card-color-swatch[data-color="Clear"]::before,
product-card .product-card-color-swatch[data-color="Transparent Gray"]::before,
product-card .product-card-color-swatch[data-color="Transparent Grey"]::before,
product-card .product-card-color-swatch[style*="Transparent"]::before,
product-card .product-card-color-swatch[style*="Clear"]::before {
    background-image: url("https://img-va.myshopline.com/image/store/1706523551450/--417.png?w=100&h=100") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

product-card .product-card-color-swatch[data-color="Tortoise"]::before,
product-card .product-card-color-swatch[data-color="Tortoise Brown"]::before,
product-card .product-card-color-swatch[data-color="Tortoise Shell"]::before,
product-card .product-card-color-swatch[style*="Tortoise"]::before {
    background-image: url("https://img-va.myshopline.com/image/store/1706523551450/--415.png?w=100&h=100") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 标签 */
product-card .mk-card-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    background: #E8A656;
    color: #F4F4F4;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: .01em;
}

/* Mobile */
@media(max-width:959px) {
    product-card {
        --card-padding: 10px;
    }

    product-card .product-card {
        display: flex;
        height: 100%;
        flex-direction: column;
        justify-content: space-between;
        border-radius: 12px;
    }

    product-card .product-image {
        aspect-ratio: 1/1;
    }

    product-card .block-product-card__image,
    product-card .block-product-card__image-second {
        object-fit: cover;
    }

    product-card .block-product-card__image {
        transform: none;
    }

    product-card .product-info {
        padding: 10px 10px 12px;
        min-height: 76px;
        row-gap: 10px;
        column-gap: 10px;
    }

    product-card .product-card .product-title {
        font-size: 14.5px;
        line-height: 1.3;
        color: #222;
    }

    product-card .product-price {
        font-size: 14px;
    }

    product-card .badge-tag {
        padding: 4px 10px;
    }

    product-card .product-card-colors {
        gap: 4px;
        min-height: 22px;
    }

    product-card .product-card-color-swatch {
        width: 22px;
        height: 22px;
        padding: 2px;
    }

    product-card .product-card-color-swatch.active {
        border: 2px solid #2F2F2F;
        padding: 2px;
    }
}