/* ═══════════════════════════════════════════════════════════════
   SHOP PAGE — House of Ambava
   Elegant, fluid, polished layout with ultra-smooth animations
   ═══════════════════════════════════════════════════════════════ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .product-card { animation: none !important; opacity: 1 !important; transform: none !important; }
    .product-card.is-visible { animation: none !important; }
}

/* ── Shop-specific nav active ── */
nav a.shop-active {
    color: var(--primary) !important;
}
nav a.shop-active::after {
    transform: translateX(-50%) scaleX(1) !important;
}

/* ══════════════════════════════════
   HERO BANNER
   ══════════════════════════════════ */
.shop-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* When using image/video background */
.shop-hero--media {
    background-color: #1a1a2e;
}

.shop-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.shop-hero-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 0;
}

.shop-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #1a1a2e 0%, #2c2c2c 40%, #1a1a2e 100%);
    z-index: 0;
}

/* Subtle animated pattern overlay */
.shop-hero-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 45%, rgba(196,165,123,.18) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 55%, rgba(196,165,123,.12) 0%, transparent 55%),
        radial-gradient(circle at 50% 100%, rgba(196,165,123,.08) 0%, transparent 40%);
    animation: heroGlow 10s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0%   { opacity: .5; transform: scale(1); }
    100% { opacity: 1;  transform: scale(1.03); }
}

.shop-hero-content {
    position: relative;
    z-index: 1;
    padding: 60px 24px 50px;
}

.shop-hero-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary);
    border: 1px solid rgba(196,165,123,.35);
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 20px;
    animation: shopFadeUp .7s .15s cubic-bezier(.16,1,.3,1) both;
}

.shop-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 1rem + 3.2vw, 3.25rem);
    font-weight: 600;
    letter-spacing: clamp(1px, 0.2vw, 3px);
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shopFadeUp .7s .25s cubic-bezier(.16,1,.3,1) both;
}

.shop-hero-content p {
    font-size: 15px;
    color: rgba(255,255,255,.55);
    letter-spacing: .5px;
    max-width: 420px;
    margin: 0 auto 20px;
    line-height: 1.6;
    animation: shopFadeUp .7s .35s cubic-bezier(.16,1,.3,1) both;
}

.shop-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,.35);
    animation: shopFadeUp .7s .42s cubic-bezier(.16,1,.3,1) both;
}
.shop-breadcrumb a {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    transition: color .3s ease;
}
.shop-breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { font-size: 8px; opacity: .5; }
.shop-breadcrumb .current {
    color: var(--primary);
    font-weight: 500;
}

@keyframes shopFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════
   MAIN LAYOUT
   ══════════════════════════════════ */
.shop-page {
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    animation: none !important; /* override body main contentSlideIn — its fill:both
       applies transform:translateY(0) permanently, which creates a containing
       block that breaks position:fixed on the sidebar drawer & backdrop */
}

/* Disable 3D rendering context on shop page — only needed on home page */
.shop-page section {
    transform-style: flat;
    perspective: none;
}

.shop-main {
    padding: 0;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 40px);
}

.shop-mobile-bar {
    display: none;            /* shown only on mobile */
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all .35s cubic-bezier(.16,1,.3,1);
    font-family: 'Inter', sans-serif;
}
.filter-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(196,165,123,.1);
}
.filter-toggle-btn i { font-size: 14px; }

.shop-count {
    font-size: 13px;
    color: var(--text-muted);
}
.shop-count strong { color: var(--text); }

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 50px;
    padding: 50px 0 80px;
}


/* ══════════════════════════════════
   SIDEBAR
   ══════════════════════════════════ */
.shop-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    animation: shopFadeUp .6s .3s cubic-bezier(.16,1,.3,1) both;
}

.sidebar-inner {
    background: var(--bg-surface);
    border-radius: 20px;
    padding: 28px 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px var(--shadow);
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.sidebar-top h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: .5px;
}
.sidebar-close-btn {
    display: none;             /* visible on mobile */
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all .3s;
}
.sidebar-close-btn:hover {
    background: rgba(196,165,123,.1);
    color: var(--primary);
}

/* Filter Navigation */
.filter-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all .4s cubic-bezier(.16,1,.3,1);
    position: relative;
    overflow: hidden;
}

/* Hover shimmer */
.filter-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(196,165,123,.08), rgba(196,165,123,.02));
    border-radius: 14px;
    opacity: 0;
    transition: opacity .4s ease;
}
.filter-item:hover::before { opacity: 1; }
.filter-item:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.filter-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: rgba(196,165,123,.08);
    color: var(--text-muted);
    transition: all .4s cubic-bezier(.16,1,.3,1);
    flex-shrink: 0;
}
.filter-item:hover .filter-icon {
    background: rgba(196,165,123,.15);
    color: var(--primary);
}

.filter-label {
    flex: 1;
    position: relative;
    z-index: 1;
}

.filter-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    background: rgba(196,165,123,.08);
    padding: 3px 10px;
    border-radius: 20px;
    min-width: 28px;
    text-align: center;
    transition: all .3s;
    position: relative;
    z-index: 1;
}

/* Active state */
.filter-item.is-active {
    background: linear-gradient(135deg, rgba(196,165,123,.14), rgba(196,165,123,.06));
    color: var(--primary);
    font-weight: 600;
}
.filter-item.is-active .filter-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(196,165,123,.35);
}
.filter-item.is-active .filter-count {
    background: var(--primary);
    color: #fff;
}

/* Sidebar Decoration */
.sidebar-decoration {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
}
.sidebar-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.sidebar-emblem {
    color: var(--primary);
    opacity: .4;
    font-size: 16px;
}

/* Sidebar Backdrop (mobile) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}
.sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: all;
}


/* ══════════════════════════════════
   PRODUCTS CONTENT
   ══════════════════════════════════ */
.shop-content {
    animation: shopFadeUp .6s .4s cubic-bezier(.16,1,.3,1) both;
}

.shop-content-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.shop-results {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: .3px;
}
.shop-results strong {
    color: var(--text);
    font-weight: 600;
}


/* ══════════════════════════════════
   PRODUCT GRID
   ══════════════════════════════════ */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    transition: opacity .55s cubic-bezier(.16,1,.3,1),
                transform .55s cubic-bezier(.16,1,.3,1);
}


/* ══════════════════════════════════
   PRODUCT CARD
   ══════════════════════════════════ */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px var(--shadow);
    transition: transform .55s cubic-bezier(.16,1,.3,1),
                box-shadow .55s cubic-bezier(.16,1,.3,1),
                border-color .4s ease;
    /* Entrance animation */
    opacity: 0;
    transform: translateY(50px) scale(.96);
}

.product-card.is-visible {
    animation: cardReveal .75s cubic-bezier(.16,1,.3,1) forwards;
    animation-delay: calc(var(--i) * 0.07s);
}

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.product-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 24px 56px var(--shadow-hover);
    border-color: rgba(196,165,123,.25);
}

/* Card Image */
.product-card-visual {
    position: relative;
    overflow: hidden;
}

.product-card-img {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(196,165,123,.05);
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.16,1,.3,1);
    will-change: transform;
}
.product-card:hover .product-card-img img {
    transform: scale(1.08);
}

/* Discount Badge */
.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    letter-spacing: .5px;
    z-index: 3;
    box-shadow: 0 4px 14px rgba(231,76,60,.3);
}

/* Hover Overlay */
.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 24px;
    opacity: 0;
    transition: opacity .45s cubic-bezier(.16,1,.3,1);
    z-index: 2;
}
.product-card:hover .product-overlay {
    opacity: 1;
}

.product-cart-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    transform: translateY(16px);
    transition: transform .45s cubic-bezier(.16,1,.3,1),
                box-shadow .3s ease,
                background .3s ease;
    box-shadow: 0 6px 24px rgba(196,165,123,.4);
    font-family: 'Inter', sans-serif;
}
.product-card:hover .product-cart-btn {
    transform: translateY(0);
}
.product-cart-btn:hover {
    background: #b8965e;
    box-shadow: 0 8px 32px rgba(196,165,123,.5);
}
.product-cart-btn:active {
    transform: scale(.95) !important;
}
.product-cart-btn i { font-size: 14px; }

/* Card Body */
.product-card-body {
    padding: 20px 22px 24px;
}

.product-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    opacity: .8;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.35;
    transition: color .3s ease;
}
.product-card:hover .product-name {
    color: var(--primary);
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.product-price {
    font-size: 19px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    letter-spacing: .3px;
}

.product-price-old {
    font-size: 14px;
    color: var(--text-faint);
    text-decoration: line-through;
}


/* ══════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════ */
.shop-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    animation: shopFadeUp .7s .3s cubic-bezier(.16,1,.3,1) both;
}

.empty-icon-wrap {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(196,165,123,.12), rgba(196,165,123,.04));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.empty-icon-wrap i {
    font-size: 40px;
    color: var(--primary);
    opacity: .5;
}

.shop-empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.shop-empty-state p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
    transition: all .35s cubic-bezier(.16,1,.3,1);
    box-shadow: 0 6px 24px rgba(196,165,123,.3);
}
.empty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(196,165,123,.4);
}
.empty-cta i { font-size: 12px; transition: transform .3s; }
.empty-cta:hover i { transform: translateX(4px); }


/* ══════════════════════════════════
   DARK MODE OVERRIDES
   ══════════════════════════════════ */
[data-theme="dark"] .sidebar-inner {
    background: var(--bg-surface);
    border-color: rgba(196,165,123,.1);
}

[data-theme="dark"] .product-card {
    border-color: rgba(255,255,255,.06);
    box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
[data-theme="dark"] .product-card:hover {
    border-color: rgba(196,165,123,.2);
    box-shadow: 0 20px 50px rgba(196,165,123,.08);
}

[data-theme="dark"] .shop-hero-bg {
    background: linear-gradient(160deg, #0a0a18 0%, #12122a 40%, #0a0a18 100%);
}

[data-theme="dark"] .filter-toggle-btn {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.08);
}


/* ══════════════════════════════════
   RESPONSIVE — 1200px
   ══════════════════════════════════ */
@media (max-width: 1200px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
    .shop-layout { gap: 36px; }
    .shop-container { padding: 0 28px; }
}


/* ══════════════════════════════════
   RESPONSIVE — 768px (TABLET / MOBILE)
   ══════════════════════════════════ */
@media (max-width: 768px) {
    .shop-hero { min-height: 220px; }
    .shop-hero-content { padding: 36px 16px 28px; }
    .shop-hero-content h1 { font-size: 30px; letter-spacing: 2px; }
    .shop-hero-content p { font-size: 13px; }
    .shop-hero-badge { font-size: 9px; letter-spacing: 3px; }

    .shop-container { padding: 0 14px; }

    .shop-mobile-bar { display: flex; }

    .shop-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 20px 0 50px;
    }

    /* Sidebar becomes a slide-out drawer */
    .shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100dvh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform .5s cubic-bezier(.16,1,.3,1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        animation: none; /* kill shopFadeUp — its fill:both overrides transform */
    }
    .shop-sidebar .sidebar-inner {
        border-radius: 0;
        border: none;
        min-height: 100vh;
        padding: 24px 20px;
        box-shadow: 6px 0 30px rgba(0,0,0,.15);
    }
    .shop-sidebar.is-open {
        transform: translateX(0);
    }
    .sidebar-close-btn { display: flex; align-items: center; justify-content: center; }
    .sidebar-backdrop { display: block; }

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

    .product-card-body { padding: 12px 14px 16px; }
    .product-name { font-size: 14px; }
    .product-price { font-size: 16px; }
    .product-category { font-size: 9px; }
    .product-badge { font-size: 10px; padding: 3px 8px; }

    .shop-content-header { margin-bottom: 16px; padding-bottom: 10px; }
    .shop-empty-state { padding: 50px 20px; }
    .shop-empty-state h3 { font-size: 22px; }
    .shop-empty-state p { font-size: 14px; }
}


/* ══════════════════════════════════
   RESPONSIVE — 480px (SMALL PHONE)
   ══════════════════════════════════ */
@media (max-width: 480px) {
    .shop-hero-content h1 { font-size: 30px; }
    .shop-hero-content p { font-size: 13px; }

    .shop-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-card-body { padding: 12px 12px 16px; }
    .product-name { font-size: 14px; margin-bottom: 8px; }
    .product-price { font-size: 15px; }
    .product-price-old { font-size: 12px; }
    .product-category { font-size: 8px; letter-spacing: 2px; margin-bottom: 5px; }

    .product-cart-btn {
        padding: 10px 20px;
        font-size: 12px;
        gap: 6px;
    }
    .product-cart-btn span { display: none; }
    .product-cart-btn { border-radius: 50%; padding: 12px; }

    .shop-sidebar { width: 260px; }
}
