/* --- PREMIUM KEYFRAME ANIMATIONS --- */
@keyframes gradientMesh {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatOrb {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.05); }
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
    0% { opacity: 0; transform: translateY(-15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardReveal {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes promo-shimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes goldShimmer {
    to { background-position: 200% center; }
}

/* --- CART DROP ANIMATION --- */
.btn-cart.animating { pointer-events: none; }
.anim-cart-icon { display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 2; animation: cart-shake 1.2s ease forwards; }
.anim-item-dot { position: absolute; top: -15px; left: 50%; z-index: 1; margin-left: -4px; animation: item-drop 1.2s ease forwards; }

@keyframes item-drop {
    0% { top: -15px; opacity: 1; transform: scale(1); }
    30% { top: 35%; opacity: 1; transform: scale(1); }
    40% { top: 45%; opacity: 0; transform: scale(0.5); }
    100% { top: 45%; opacity: 0; transform: scale(0); }
}

@keyframes cart-shake {
    0%, 30% { transform: scale(1) rotate(0); }
    35% { transform: scale(1.1) rotate(-10deg); }
    40% { transform: scale(1.1) rotate(10deg); }
    45% { transform: scale(1) rotate(0); }
    80% { transform: scale(1) translateX(0); opacity: 1; }
    100% { transform: scale(1) translateX(15px); opacity: 0; }
}

/* --- CINEMATIC HERO BANNER --- */
.category-hero {
    background: linear-gradient(-45deg, #fdfbfb, #f3f4f6, #ffffff, #eef2f3);
    background-size: 400% 400%;
    animation: gradientMesh 15s ease infinite;
    padding: 7rem 2rem 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.category-hero::before {
    content: '';
    position: absolute; top: -20%; left: 5%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.04) 0%, transparent 60%);
    border-radius: 50%;
    animation: floatOrb 8s infinite alternate ease-in-out;
    pointer-events: none;
}

.category-hero::after {
    content: '';
    position: absolute; bottom: -30%; right: -5%;
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 60%);
    border-radius: 50%;
    animation: floatOrb 12s infinite alternate-reverse ease-in-out;
    pointer-events: none;
}

#page-title {
    font-family: var(--font-family-headings, 'Poppins', sans-serif);
    font-weight: 800;
    font-size: 3.2rem; 
    line-height: 1.2; 
    letter-spacing: -1px;
    text-transform: capitalize;
    position: relative;
    z-index: 2;
    margin-bottom: 0; 
    color: #111;
    background: linear-gradient(to right, #111, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUpFade 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.category-hero .decorative-line,
#page-title .decorative-line {
    display: none !important;
}

/* ========================================= */
/* 5-LAKH FEATURE: HERO SLIDING FILTERS      */
/* ========================================= */
.hero-sliding-filters {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem; /* Tighter gap for better grouping */
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 5;
    animation: slideUpFade 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s forwards;
    opacity: 0;
}

.filter-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 20px;
    width: 100%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    justify-content: flex-start; /* Naturally align left for swiping */
    -webkit-overflow-scrolling: touch;
}

/* Center on larger screens */
@media (min-width: 769px) {
    .filter-row {
        justify-content: center;
    }
}

.filter-row::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

/* Refined, app-like pills */
.filter-pill {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: #444;
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    scroll-snap-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    white-space: nowrap;
}

.filter-pill i {
    font-size: 1.1rem;
    color: inherit;
    transition: transform 0.3s ease;
}

.filter-pill:hover {
    background: #fff;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.filter-pill.active {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Distinctive look for subcategories */
.filter-pill.sub-pill {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.5);
}

.filter-pill.sub-pill.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* --- GLASSMORPHISM FILTER SECTION (SMART STICKY UX) --- */
.filter-header-mobile { display: none; }
.filter-overlay { display: none; }
.mobile-filter-toggle { display: none; }

.filter-section {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: -2.5rem auto 3rem auto;
    display: flex;
    gap: 1.2rem;
    justify-content: space-between; 
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    
    position: sticky;
    top: 80px; 
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    animation: slideUpFade 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s forwards;
    opacity: 0;
}

.filter-section.filter-stuck {
    padding: 0.8rem 1.5rem; 
    margin-top: 10px; 
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-radius: 100px; 
    border-color: rgba(0, 0, 0, 0.05); 
}

/* Dynamic Divider pushing Sort to the right edge on desktop */
.filter-divider {
    flex-grow: 1;
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding: 12px 40px 12px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    min-width: 150px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

select:hover {
    border-color: #bbb;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

select:focus {
    border-color: var(--accent-color, #e67e22);
    box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.1);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem 2rem;
}

/* --- DYNAMIC PROMO BANNER --- */
.premium-promo-banner {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin: 1rem 0 2rem 0;
    animation: cardReveal 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) backwards;
}

.premium-promo-banner::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    animation: promo-shimmer 6s infinite;
}

.promo-content h2 {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.promo-content p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.promo-btn {
    background: var(--accent-color, #e67e22);
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.promo-btn:hover {
    background: #d67118;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
}

/* --- LUXURY PRODUCT CARD STYLES --- */
.modern-product-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    height: 100%;
    animation: cardReveal 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) backwards;
}

.modern-product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.08);
}

.modern-product-card::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    z-index: 10;
    transition: all 0.7s ease;
    pointer-events: none;
}

.modern-product-card:hover::before {
    left: 200%;
}

/* --- PREMIUM BADGES SYSTEM --- */
.card-badge-left {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 11;
}

.card-badge-right {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.badge-sale {
    background: linear-gradient(135deg, #CC0C39 0%, #ff4d4d 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(204, 12, 57, 0.2);
}

.badge-pastel-red {
    background-color: #ffe6eb;
    color: #d61c4e;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(214, 28, 78, 0.1);
}

.badge-pastel-blue {
    background-color: #e0f2fe;
    color: #0284c7;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

.badge-golden-seal {
    background: linear-gradient(135deg, #d4af37 0%, #fff2b2 40%, #d4af37 60%, #fff2b2 100%);
    background-size: 200% auto;
    color: #5a3c00;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4), inset 0 0 0 2px rgba(255,255,255,0.5);
    border: 1px solid #b38728;
    animation: goldShimmer 3s linear infinite;
}

.badge-golden-seal i {
    font-size: 14px;
    margin-bottom: 2px;
    color: #5a3c00;
}

/* --- IMAGE & DETAILS --- */
.modern-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, #fbfbfb 0%, #f4f4f4 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-card-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2.5rem;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modern-product-card:hover .modern-card-image img {
    transform: scale(1.1) translateY(-5px);
}

.modern-card-body {
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #fff;
    position: relative;
    z-index: 2;
}

.card-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

/* Protection against long subcategory text blowing out the card layout */
.product-category-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

.product-sku-label {
    font-size: 0.75rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: #666;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
    border: 1px solid #eaeaea;
    flex-shrink: 0;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.25rem;
}

.modern-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 1.8rem;
}

.price-current {
    font-weight: 800;
    font-size: 1.4rem;
    color: #111;
    letter-spacing: -0.5px;
}

.price-old {
    font-size: 0.95rem;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 500;
}

.modern-card-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.action-btn {
    flex: 1;
    padding: 14px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.action-btn .material-icons,
.action-btn .fab {
    font-size: 1.25rem;
    z-index: 2;
}

.action-btn .btn-text {
    z-index: 2;
}

/* Metallic Shimmer for buttons */
.action-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    z-index: 1;
}

.action-btn:hover::after {
    left: 150%;
}

.btn-cart {
    background-color: #fff;
    color: #111;
    border: 2px solid #eaeaea;
}

.btn-cart:hover {
    background-color: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-inquire {
    background-color: #25D366;
    color: white;
    border: 2px solid #25D366;
}

.btn-inquire:hover {
    background-color: #1ebe5d;
    border-color: #1ebe5d;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-disabled {
    background-color: #f5f5f5;
    color: #aaa;
    border: 2px solid #eee;
    cursor: not-allowed;
    width: 100%;
}

.btn-success-state {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
    color: white !important;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    #page-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 6rem 1.5rem 4rem 1.5rem;
    }

    #page-title {
        font-size: 2rem; 
        line-height: 1.2;
        letter-spacing: -1px;
    }
    
    /* Sliding Filters align to left to allow natural swiping on mobile */
    .filter-row {
        justify-content: flex-start;
        padding: 5px 1.5rem;
    }

    /* --- 5-LAKH MOBILE UX: BOTTOM SHEET MODAL --- */
    .filter-section {
        position: fixed;
        top: auto !important;
        bottom: -100%;
        left: 0;
        width: 100%;
        margin: 0 !important;
        padding: 2rem 1.5rem;
        border-radius: 24px 24px 0 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
        z-index: 10001;
        opacity: 1; 
        transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .filter-section.filter-stuck {
        border-radius: 24px 24px 0 0;
        padding: 2rem 1.5rem;
        background: #fff;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
        border-color: transparent;
    }

    .filter-section.bottom-sheet-open {
        bottom: 0;
    }

    .filter-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }
    
    .filter-header-mobile h3 {
        font-family: var(--font-family-headings);
        font-size: 1.4rem;
        color: #111;
        margin: 0;
    }
    
    #close-filter-btn {
        background: #f4f4f4;
        color: #111;
        border: none;
        width: 40px; height: 40px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
    }
    
    /* Hide the divider pushing flex right on desktop, since mobile uses column layout */
    .filter-divider { display: none; }

    .filter-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 10000;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .filter-overlay.show {
        display: block;
        opacity: 1;
    }

    /* Reference Image Style: Clean, White, Elevated Floating Pill */
    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        bottom: 25px; 
        left: 50%;
        transform: translateX(-50%);
        background: #ffffff; 
        color: #111; 
        border: 1px solid #eaeaea; 
        padding: 12px 28px; 
        border-radius: 30px;
        font-family: var(--font-family-headings);
        font-weight: 600; 
        font-size: 0.95rem; 
        z-index: 9999; 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
    }
    
    .mobile-filter-toggle i {
        font-size: 1.1rem;
        color: #333;
    }
    
    .mobile-filter-toggle.hidden {
        transform: translate(-50%, 150px);
    }

    select {
        width: 100%;
        padding: 16px 45px 16px 20px; 
        font-size: 1rem;
    }

    /* 1-COLUMN LUXURY EDITORIAL GRID FOR MOBILE */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 0 1rem 8rem 1rem; 
    }

    .premium-promo-banner {
        padding: 3rem 1.5rem;
    }

    .promo-content h2 {
        font-size: 1.8rem;
    }

    .modern-card-body {
        padding: 1.5rem;
    }

    .modern-card-image {
        aspect-ratio: 4 / 3; 
    }
    .modern-card-image img {
        padding: 1.5rem;
    }

    .card-meta-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

    .product-title {
        font-size: 1.25rem;
        height: auto; 
        letter-spacing: -0.5px;
        margin-bottom: 12px;
    }

    .price-current {
        font-size: 1.4rem;
    }

    .price-old {
        font-size: 0.95rem;
    }

    /* Adjust Mobile Badge Placement slightly */
    .card-badge-left {
        top: 15px; left: 15px;
    }
    .card-badge-right {
        top: 15px; right: 15px;
    }
    
    .badge-sale {
        padding: 6px 14px; font-size: 0.7rem;
    }

    .modern-card-actions {
        gap: 1rem;
    }

    .action-btn {
        padding: 14px 10px;
        border-width: 2px;
    }

    .action-btn .btn-text {
        display: inline-block; 
    }
}