/*
 * Shared product-card skin
 * Used by the home page, shop grid and related-product lists.
 * The markup and JavaScript remain unchanged so cart and wishlist actions
 * continue to use the existing handlers.
 */
.product-card {
    --pc-purple-light: #a36cff;
    --pc-purple: #7d3fe9;
    --pc-purple-dark: #5720b7;
    --pc-ink: #171331;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin-top: 20px;
    isolation: isolate;
    overflow: visible;
    cursor: pointer;
    filter: drop-shadow(0 14px 20px rgba(35, 19, 89, .11));
    transition: transform .28s ease, filter .28s ease;
}

.product-card:hover {
    transform: translateY(-7px);
    filter: drop-shadow(0 20px 28px rgba(35, 19, 89, .19));
}

.pc-visual {
    position: relative;
    z-index: 0;
    min-height: 252px;
    overflow: visible;
}

.pc-pattern-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    background:
        radial-gradient(circle at 15% 18%, rgba(125, 63, 233, .08) 0 2px, transparent 2.5px) 0 0 / 15px 15px,
        #f8f7fd;
}

.pc-pattern-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .45;
    background-image:
        linear-gradient(45deg, rgba(125, 63, 233, .13) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(125, 63, 233, .13) 1px, transparent 1px);
    background-size: 14px 14px;
}

.pc-purple-shape {
    position: absolute;
    top: -20px;
    right: 0;
    z-index: 1;
    width: 76%;
    height: calc(100% + 38px);
    border-radius: 36px 36px 36px 88px;
    background: linear-gradient(145deg, var(--pc-purple-light) 0%, var(--pc-purple) 54%, var(--pc-purple-dark) 100%);
    box-shadow: 0 15px 28px rgba(76, 29, 149, .28);
}

.pc-purple-tail {
    position: absolute;
    left: 3%;
    bottom: -15px;
    z-index: 1;
    width: 30%;
    height: 58px;
    border-radius: 0 0 0 58px;
    background: linear-gradient(145deg, var(--pc-purple-light) 0%, var(--pc-purple) 58%, var(--pc-purple-dark) 100%);
    pointer-events: none;
}

.pc-discount-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 7;
    padding: 6px 11px;
    border-radius: 999px;
    background: #fff;
    color: #f41860;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(28, 15, 75, .16);
}

.pc-price-badge-wrap {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    max-width: calc(100% - 52px);
}

.pc-price-old-badge,
.pc-price-badge {
    max-width: 100%;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-price-old-badge {
    padding: 4px 10px;
    background: rgba(27, 17, 61, .58);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-decoration: line-through;
}

.pc-price-badge {
    display: inline-flex;
    padding: 8px 14px;
    background: linear-gradient(145deg, #9b63ff 0%, #7135db 58%, #5420ad 100%);
    box-shadow: 0 8px 18px rgba(76, 29, 149, .35);
}

.pc-price-value {
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.product-card .product-image {
    position: relative;
    z-index: 4;
    width: 82%;
    aspect-ratio: 1;
    margin: 49px auto 0;
    padding: 5px;
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 16px 27px rgba(20, 10, 50, .29);
    cursor: pointer;
}

.product-card .product-image img {
    display: block;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
    transition: transform .28s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.035);
}

.product-card .btn-wish {
    position: absolute;
    right: 13px;
    bottom: 12px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: #443079;
    box-shadow: 0 7px 15px rgba(35, 20, 80, .19);
    font-size: 19px;
    cursor: pointer;
    transition: transform .2s ease, color .2s ease, background .2s ease;
}

.product-card .btn-wish:hover {
    color: #ef185d;
    transform: scale(1.06);
}

.product-card .btn-wish.active {
    background: #ef185d;
    color: #fff;
}

.pc-panel {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-height: 145px;
    margin-top: -14px;
    padding: 17px 15px 16px;
    border-radius: 25px 25px 29px 29px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(35, 20, 80, .12);
}

.pc-category {
    min-height: 15px;
    color: #7135db;
    font-size: 11px;
    font-weight: 800;
    text-align: right;
}

.pc-title {
    position: relative;
    min-height: 58px;
    overflow: hidden;
    color: var(--pc-ink);
    padding-bottom: 12px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.62;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pc-title::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 0;
    width: 78px;
    height: 7px;
    transform: translateX(50%);
    background:
        radial-gradient(circle at 50% 50%, #7135db 0 3px, transparent 3.5px),
        linear-gradient(#b58bff, #b58bff) center / 100% 1px no-repeat;
    pointer-events: none;
}

.pc-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 3px;
}

.product-card .btn-buy {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    gap: 7px;
    padding: 9px 12px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #211a38 0%, #0f0b1f 100%);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(15, 11, 31, .33);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
}

.product-card .btn-buy:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
    box-shadow: 0 14px 26px rgba(15, 11, 31, .41);
}

.product-card .btn-buy.added {
    background: #22c55e;
}

.btn-buy-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: rgba(125, 77, 255, .65);
    font-size: 10px;
}

.btn-buy-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .pc-visual {
        min-height: 216px;
    }

    .product-card .product-image {
        width: 82%;
        margin-top: 43px;
    }

    .pc-panel {
        min-height: 130px;
        margin-top: -11px;
        padding: 13px 11px 13px;
    }

    .pc-title {
        min-height: 51px;
        padding-bottom: 10px;
        font-size: 12.5px;
        line-height: 1.58;
    }

    .pc-category {
        font-size: 9px;
    }

    .product-card .btn-buy {
        min-height: 36px;
        padding: 7px 8px;
        font-size: 10.5px;
    }

    .btn-buy-icon {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }

    .product-card .btn-wish {
        right: 9px;
        bottom: 9px;
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .pc-price-value {
        font-size: 11px;
    }

    .pc-price-badge {
        padding: 7px 10px;
    }

    .pc-price-old-badge {
        padding: 3px 8px;
        font-size: 9px;
    }

    .pc-discount-badge {
        top: 11px;
        left: 10px;
        padding: 5px 8px;
        font-size: 9px;
    }
}
