/**
 * Premium product card — shared across shop, home, related products.
 * Carousel width overrides live in pages/home.css.
 */

.product-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
    background: linear-gradient(180deg, #fff 0%, var(--off-white, #fafaf8) 100%);
    border: 1px solid rgba(176, 141, 87, 0.12);
    border-radius: 6px;
    padding: clamp(10px, 1.2vw, 14px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 8px 28px rgba(10, 10, 10, 0.05);
    transition:
        transform 0.55s cubic-bezier(0.19, 1, 0.22, 1),
        box-shadow 0.55s cubic-bezier(0.19, 1, 0.22, 1),
        border-color 0.4s ease;
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-6px);
        border-color: rgba(176, 141, 87, 0.35);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.95) inset,
            0 20px 48px rgba(10, 10, 10, 0.1),
            0 0 0 1px rgba(176, 141, 87, 0.08);
    }
}

.shop-grid .product-card,
.related-products-section .product-card,
.gender-products-grid .product-card {
    width: 100%;
    max-width: none;
    flex-shrink: 1;
}

/* Carousel cards: no outer frame (home.css sets width) */
.carousel-track .product-card,
.related-products-section .carousel-track .product-card,
.categories-section .carousel-track .product-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

@media (hover: hover) {
    .carousel-track .product-card:hover,
    .related-products-section .carousel-track .product-card:hover,
    .categories-section .carousel-track .product-card:hover {
        transform: none;
        border-color: transparent;
        box-shadow: none;
    }
}

.product-card .image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.22;
    overflow: hidden;
    background: linear-gradient(165deg, #f5f2ec 0%, #ebe6dc 48%, #e8e4da 100%);
    border-radius: 4px;
    border: 1px solid rgba(176, 141, 87, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.65),
        0 4px 16px rgba(10, 10, 10, 0.04);
    transition: box-shadow 0.5s ease, border-color 0.4s ease;
}

.product-card .image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0) 55%,
        rgba(10, 10, 10, 0.12) 100%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
}

@media (hover: hover) {
    .product-card:hover .image-container {
        border-color: rgba(176, 141, 87, 0.28);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.75),
            0 10px 28px rgba(10, 10, 10, 0.08);
    }

    .product-card:hover .image-container::after {
        opacity: 1;
    }
}

.product-card .image-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
    display: block;
}

.product-card .img-main {
    z-index: 2;
}

.product-card .img-hover {
    z-index: 1;
    transform: translateX(-100%);
}

.product-card:hover .img-main {
    transform: translateX(100%) scale(1.02);
}

.product-card:hover .img-hover {
    transform: translateX(0) scale(1.02);
}

.product-card .badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 6;
    padding: 7px 14px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(176, 141, 87, 0.45);
    border-radius: 2px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.product-card .badge:not(.badge-bundle):not(.badge-tester) {
    border-color: rgba(230, 57, 70, 0.35);
}

.product-card .badge-bundle {
    background: linear-gradient(135deg, rgba(176, 141, 87, 0.95), rgba(154, 122, 58, 0.95));
    border-color: rgba(255, 255, 255, 0.25);
}

.product-card .badge-tester {
    background: rgba(74, 74, 74, 0.9);
    letter-spacing: 2.5px;
}

.product-card .view-more-circle {
    position: absolute;
    width: clamp(64px, 7.5vw, 88px);
    height: clamp(64px, 7.5vw, 88px);
    z-index: 10;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.85) translate(-50%, -50%);
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: clamp(7px, 0.75vw, 9px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--black, #0a0a0a);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    border: 1px solid rgba(176, 141, 87, 0.55);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        opacity 0.45s ease,
        transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1);
    will-change: transform, left, top;
}

.product-card:hover .view-more-circle {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%);
}

@media (hover: none) {
    .product-card .view-more-circle {
        display: none !important;
    }
}

.product-card .info {
    position: relative;
    padding: clamp(14px, 1.6vw, 20px) clamp(2px, 0.4vw, 6px) clamp(4px, 0.6vw, 8px);
    margin-top: clamp(10px, 1.2vw, 16px);
}

.product-card .info::before {
    content: '';
    display: block;
    width: 36px;
    height: 1px;
    margin-bottom: clamp(12px, 1.4vw, 16px);
    background: linear-gradient(90deg, var(--lux-gold, #b08d57), rgba(176, 141, 87, 0.15));
}

.product-card .category {
    margin: 0 0 8px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: clamp(11px, 1.05vw, 13px);
    font-weight: 500;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--lux-gold, #b08d57);
}

.product-card .title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.product-card .title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
    font-size: clamp(15px, 1.45vw, 18px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--black, #0a0a0a);
}

.product-card .prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.product-card .old-price {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 10px;
    color: #9a9590;
    text-decoration: line-through;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.product-card .new-price {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: clamp(12px, 1.15vw, 14px);
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--black, #0a0a0a);
    white-space: nowrap;
}

.product-card .prices:has(.old-price) .new-price {
    color: var(--lux-gold, #b08d57);
}

.product-card .quantity {
    margin: 0 0 14px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8a8580;
}

.product-card .quantity--out {
    color: #b54a42;
    font-weight: 500;
}

.product-card .add-to-cart-btn {
    width: 100%;
    padding: clamp(12px, 1.3vw, 14px) 16px;
    margin-top: 2px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: clamp(9px, 0.85vw, 10px);
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--black, #0a0a0a);
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(176, 141, 87, 0.45);
    border-radius: 2px;
    transition:
        color 0.35s ease,
        background 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.product-card .add-to-cart-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(176, 141, 87, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.product-card .add-to-cart-btn:hover {
    color: #fff;
    background: var(--black, #0a0a0a);
    border-color: var(--black, #0a0a0a);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(10, 10, 10, 0.18);
}

.product-card .add-to-cart-btn:hover::before {
    opacity: 1;
}

.product-card .add-to-cart-btn:active {
    transform: translateY(0);
}

.product-card .add-to-cart-btn.added {
    pointer-events: none;
    color: transparent;
    background: var(--black, #0a0a0a);
    border-color: var(--black, #0a0a0a);
}

.product-card .add-to-cart-btn.added .btn-text {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;
}

.product-card .add-to-cart-btn .anim-package {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #d9b870, #b8924a);
    border-radius: 3px;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-card .add-to-cart-btn.added .anim-package {
    animation: mf-pkgEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes mf-pkgEnter {
    0% {
        right: -18px;
        opacity: 1;
        transform: translateY(-50%) scale(0.6);
    }
    25% {
        right: 38%;
        opacity: 1;
        transform: translateY(-55%) scale(1);
    }
    45% {
        right: 38%;
        opacity: 1;
        transform: translateY(-55%) scale(0.9);
    }
    60% {
        right: 52%;
        opacity: 1;
        transform: translateY(-50%) scale(0.55);
    }
    80% {
        right: 55%;
        opacity: 0.6;
        transform: translateY(-50%) scale(0.2);
    }
    100% {
        right: 58%;
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
}

.product-card .add-to-cart-btn .anim-bag {
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 18px;
    height: 18px;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .add-to-cart-btn .anim-bag::before {
    content: '';
    display: block;
    width: 16px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 2px 2px 4px 4px;
    border-top: 2px solid #fff;
    position: relative;
}

.product-card .add-to-cart-btn .anim-bag::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    border: 2px solid #fff;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.product-card .add-to-cart-btn.added .anim-bag {
    animation: mf-bagAppear 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes mf-bagAppear {
    0% {
        left: -22px;
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    20% {
        left: 30%;
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    45% {
        left: 30%;
        opacity: 1;
        transform: translateY(-50%) scale(1.08);
    }
    70% {
        left: 30%;
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    85% {
        left: 30%;
        opacity: 1;
        transform: translateY(-50%) scale(0.95);
    }
    100% {
        left: 35%;
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.product-card .add-to-cart-btn .btn-text {
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

/* Text colours stay fixed on hover (image effects only) */
@media (hover: hover) {
    .product-card:hover .title,
    .product-card:hover .category,
    .product-card:hover .old-price,
    .product-card:hover .new-price {
        color: inherit;
    }

    .product-card:hover .title {
        color: var(--black, #0a0a0a);
    }

    .product-card:hover .category {
        color: var(--lux-gold, #b08d57);
    }

    .product-card:hover .prices:has(.old-price) .new-price {
        color: var(--lux-gold, #b08d57);
    }

    .product-card:hover .new-price {
        color: var(--black, #0a0a0a);
    }
}

@media (max-width: 768px) {
    .product-card .category {
        font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
        font-size: clamp(10px, 2.8vw, 12px);
        letter-spacing: 2.2px;
        margin-bottom: 6px;
    }

    .product-card .title,
    .carousel-track .product-card .title,
    .gender-products-grid .product-card .title,
    .shop-grid .product-card .title,
    .related-products-section .product-card .title {
        font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
        font-size: clamp(15px, 4.2vw, 18px);
        font-weight: 500;
    }

    .product-card .new-price {
        font-size: clamp(11px, 3vw, 13px);
    }
}

@media (max-width: 480px) {
    .product-card .category {
        font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
        font-size: 10px;
        letter-spacing: 2px;
    }

    .product-card .title,
    .carousel-track .product-card .title,
    .gender-products-grid .product-card .title,
    .shop-grid .product-card .title,
    .related-products-section .product-card .title {
        font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
        font-size: clamp(14px, 4vw, 17px);
        font-weight: 500;
    }
}

/* Home / shop page CSS loads after this file — keep product name font on mobile */
@media (max-width: 768px) {
    .product-card .info .title,
    a.product-card .title {
        font-family: var(--font-sans, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif) !important;
    }
}
