/* ============================================================
   Art by Adliya Furnishing — PREMIUM PRODUCT CARD SYSTEM
   Luxury-grade product cards with glassmorphism, gold accents,
   3D depth, refined typography, and premium micro-interactions.
   ============================================================ */

/* ===== PREMIUM CARD CONTAINER ===== */
.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(200, 169, 110, 0.08);
    position: relative;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.4s ease;
    will-change: transform, box-shadow;
    container-type: inline-size;
}

/* Animated gold gradient border on hover */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.5px;
    background: linear-gradient(
        135deg,
        transparent 0%,
        var(--gold-glow-30) 25%,
        var(--gold) 50%,
        var(--gold-glow-30) 75%,
        transparent 100%
    );
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease, background-position 1.5s ease;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
    background-position: 100% 100%;
}

/* Premium hover state */
.product-card:hover,
.product-card:focus-within {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow:
        0 20px 60px rgba(201, 169, 110, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(201, 169, 110, 0.08);
}

/* Subtle inner glow on hover */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-glow-40), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.product-card:hover::after {
    opacity: 1;
}

/* ===== PREMIUM IMAGE AREA ===== */
.product-image {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(145deg, #faf8f5 0%, #f0ede8 100%);
    aspect-ratio: 4/3.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.5s ease;
}

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

/* Luxury vignette overlay on hover */
.product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 26, 0) 0%,
        rgba(26, 26, 26, 0) 50%,
        rgba(26, 26, 26, 0.35) 100%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    z-index: 2;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

/* Shimmer sweep effect */
.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 4;
    pointer-events: none;
}

.product-card:hover .product-image::before {
    left: 140%;
}

/* ===== PREMIUM BADGES ===== */
.product-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

.badge-new {
    background: var(--gold);
    color: var(--obsidian);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(201, 169, 110, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.badge-sale {
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-pack {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--obsidian);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(201, 169, 110, 0.3);
}

/* ===== PREMIUM ACTION BUTTONS ===== */
.product-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    transform: translateX(60px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.35s ease;
}

.product-card:hover .product-actions,
.product-card:focus-within .product-actions {
    transform: translateX(0);
    opacity: 1;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--obsidian);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 1px solid rgba(200, 169, 110, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

/* Stagger animation for action icons */
.product-card:hover .action-icon:nth-child(1) { transition-delay: 0s; }
.product-card:hover .action-icon:nth-child(2) { transition-delay: 0.05s; }
.product-card:hover .action-icon:nth-child(3) { transition-delay: 0.1s; }

.action-icon:hover {
    background: var(--gold);
    color: var(--obsidian);
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(201, 169, 110, 0.4);
    transform: scale(1.08);
}

/* Wishlist heart active state */
.action-icon .fas.fa-heart {
    color: #e74c3c;
}

/* ===== PREMIUM ADD TO CART BUTTON ===== */
.add-to-cart-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--gold-light);
    text-align: center;
    padding: 14px 20px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease,
                color 0.3s ease;
    z-index: 5;
    transform: translateY(100%);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.product-card:hover .add-to-cart-btn,
.product-card:focus-within .add-to-cart-btn {
    transform: translateY(0);
}

.add-to-cart-btn:hover {
    background: var(--gold);
    color: var(--obsidian);
}

.add-to-cart-btn i {
    font-size: 13px;
    transition: transform 0.3s ease;
}

.add-to-cart-btn:hover i {
    transform: scale(1.15);
}

/* ===== PREMIUM PRODUCT INFO ===== */
.product-info {
    padding: 18px 20px 20px;
    position: relative;
}

/* Gold accent line at top of info section */
.product-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-glow-20), transparent);
}

/* Category label */
.product-category {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 600;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    opacity: 0.85;
}

/* Product name — Playfair Display for luxury feel */
.product-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    height: auto;
    max-height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-name a {
    color: var(--obsidian);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: var(--gold-dark);
}

/* ===== PREMIUM RATING ===== */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-rating .stars {
    display: flex;
    gap: 2px;
}

.product-rating .stars i {
    font-size: 11px;
    color: var(--gold);
}

.product-rating > span:not(.sr-only) {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== PREMIUM PRICE DISPLAY ===== */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.current-price {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--obsidian);
    letter-spacing: -0.3px;
    line-height: 1;
}

.old-price {
    font-size: 13px;
    color: #b0b0b0;
    text-decoration: line-through;
    text-decoration-color: rgba(176, 176, 176, 0.6);
    font-weight: 400;
    order: 2;
}

.discount-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    order: 3;
    line-height: 1.3;
}

.compare-price {
    font-size: 13px !important;
    color: #b0b0b0 !important;
    font-weight: 400 !important;
}

/* ===== PRODUCTS GRID LAYOUT ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ===== SHOP PAGE GRID ===== */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.shop-grid.list-view {
    grid-template-columns: 1fr;
}

.shop-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
}

.shop-grid.list-view .product-image {
    aspect-ratio: auto;
    height: 240px;
    border-radius: 16px 0 0 16px;
}

.shop-grid.list-view .product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 28px;
}

.shop-grid.list-view .product-name {
    font-size: 18px;
    max-height: none;
    -webkit-line-clamp: unset;
}

.shop-grid.list-view .current-price {
    font-size: 22px;
}

/* ===== PREMIUM CARD KEYFRAMES ===== */
@keyframes premiumFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet landscape */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Tablet portrait */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .shop-grid.list-view .product-card {
        grid-template-columns: 220px 1fr;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-card::before {
        border-radius: 12px;
    }

    .product-info {
        padding: 14px 16px 16px;
    }

    .product-info::before {
        left: 16px;
        right: 16px;
    }

    .product-name {
        font-size: 14px;
    }

    .current-price {
        font-size: 17px;
    }

    .product-category {
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    .action-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 13px;
    }

    .add-to-cart-btn {
        padding: 12px 16px;
        font-size: 10px;
        letter-spacing: 1.4px;
    }

    .shop-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }

    .shop-grid.list-view .product-image {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        border-radius: 10px;
    }

    .product-card::before {
        border-radius: 10px;
    }

    .product-info {
        padding: 10px 12px 14px;
    }

    .product-info::before {
        left: 12px;
        right: 12px;
    }

    .product-name {
        font-size: 13px;
        max-height: 36px;
        margin-bottom: 6px;
    }

    .current-price {
        font-size: 15px;
    }

    .old-price {
        font-size: 11px;
    }

    .discount-tag {
        font-size: 9px;
        padding: 2px 6px;
    }

    .product-category {
        font-size: 8px;
        margin-bottom: 4px;
    }

    .product-rating {
        margin-bottom: 8px;
    }

    .product-rating .stars i {
        font-size: 10px;
    }

    .product-rating > span:not(.sr-only) {
        font-size: 10px;
    }

    .badge-new,
    .badge-sale,
    .badge-pack {
        padding: 3px 10px;
        font-size: 8px;
    }

    .product-badges {
        top: 10px;
        left: 10px;
        gap: 4px;
    }

    .product-actions {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .action-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 8px;
    }

    .add-to-cart-btn {
        padding: 10px 12px;
        font-size: 9px;
        letter-spacing: 1px;
        gap: 6px;
    }

    .add-to-cart-btn i {
        font-size: 11px;
    }
}

/* ===== ACCESSIBILITY: REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-card::before,
    .product-card::after,
    .product-image img,
    .product-image::before,
    .product-image::after,
    .product-actions,
    .action-icon,
    .add-to-cart-btn,
    .product-name a {
        transition: none !important;
        animation: none !important;
    }

    .product-card:hover {
        transform: none;
    }

    .product-card:hover .product-image img {
        transform: none;
    }

    .product-card:hover .product-image::before {
        left: -100%;
    }

    /* Still show actions/cart on hover, just without animation */
    .product-card:hover .product-actions {
        transform: translateX(0);
        opacity: 1;
    }

    .product-card:hover .add-to-cart-btn {
        transform: translateY(0);
    }
}

/* ===== HIGH DPI SCREENS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-card {
        border-width: 0.5px;
    }
}

/* ===== PRINT ===== */
@media print {
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }

    .product-actions,
    .add-to-cart-btn,
    .product-image::before,
    .product-image::after {
        display: none !important;
    }
}
