/* ==========================================================================
   1. Base Reset & Variables (Authentic Flipkart Mobile UI + Apple Typography)
   ========================================================================== */
:root {
    /* Authentic Flipkart Brand Colors & Gradients */
    --fk-blue: #2874f0;
    --fk-blue-dark: #1b56b8;
    --fk-yellow: #ffe500;
    --fk-orange: #fb641b;
    --fk-green: #388e3c;
    
    --primary-color: #2874f0;
    --primary-gradient: linear-gradient(135deg, #2874f0 0%, #1654b8 100%);
    --secondary-color: #fb641b;
    --secondary-gradient: linear-gradient(135deg, #ff7b3b 0%, #fb641b 100%);
    --header-bg: #2874f0;
    --header-gradient: linear-gradient(180deg, #2874f0 0%, #1e5ec9 100%);
    --success-color: #388e3c;
    
    /* Flipkart App Backgrounds & Surfaces */
    --app-bg: #f1f3f6;
    --app-bg-gradient: linear-gradient(180deg, #f1f3f6 0%, #e9edf2 100%);
    --card-bg: #ffffff;
    --card-gradient: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    --inner-box-gradient: linear-gradient(180deg, #f7f9fc 0%, #f1f4f9 100%);
    --glass-bg: rgba(255, 255, 255, 0.96);
    
    /* Flipkart Text Colors */
    --text-main: #212121;
    --text-muted: #878787;
    --text-price: #212121;
    
    /* Flipkart Borders, Shadows & Tight Spacing */
    --page-side-space: clamp(4px, 1.5vw, 8px);
    --header-gap: clamp(8px, 2.4vw, 12px);
    --border-light: 1px solid rgba(255, 255, 255, 0.9);
    --border-subtle: 1px solid #e0e0e0;
    --border-card: 1px solid #f0f0f0;
    
    /* Flipkart Elevation & Item Shadows */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.12);
    --shadow-card-3d: 0 3px 8px rgba(0, 0, 0, 0.08), 
                      0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-img: 0 3px 7px rgba(15, 23, 42, 0.14);
    --icon-shadow: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.22));
    --ios-spring: cubic-bezier(0.25, 1, 0.5, 1);
    --dropdown-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.15px;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

/* Global Shadow for all FontAwesome Icons */
i[class^="fa-"], 
i[class*=" fa-"], 
.fa, 
.fas, 
.far, 
.fab, 
.fal, 
.fad {
    filter: var(--icon-shadow);
}

/* Global Link Styling & Touch Feedback */
a {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.14s var(--ios-spring), box-shadow 0.14s ease, opacity 0.14s ease;
}

a:active, 
button:active, 
.product-card:active, 
.grid-cat-card:active, 
.category-item:active,
.confidence-item:active,
.social-link:active {
    transform: scale(0.97);
}

body {
    background: var(--app-bg);
    background-image: var(--app-bg-gradient);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    padding: 0; 
    margin: 0;
    color: var(--text-main);
    font-size: 13.5px;
}

/* Mobile Responsive App Container */
.app-container {
    width: 100%;
    max-width: 100vw; 
    background: var(--app-bg); 
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
}

/* ==========================================================================
   2. Sidebar & Overlay Styles (Flipkart App Drawer)
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    width: min(285px, 82vw); 
    left: calc(-1 * min(285px, 82vw));
    height: 100%;
    background: #ffffff; 
    z-index: 2000;
    transition: left 0.28s var(--ios-spring), visibility 0.28s ease;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    visibility: hidden;
    border-radius: 0;
    overflow: hidden;
}

.sidebar.active {
    left: 0;
    visibility: visible;
}

.sidebar-header {
    background: var(--header-gradient);
    padding: clamp(14px, 3.6vw, 18px) clamp(12px, 3.2vw, 15px);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px; 
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 2;
}

.sidebar-header img {
    width: clamp(44px, 11.5vw, 50px); 
    height: clamp(44px, 11.5vw, 50px); 
    border-radius: 10px;
    border: 2px solid var(--fk-yellow);
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.sidebar-header div {
    min-width: 0;
}

.sidebar-header div h3 {
    font-size: clamp(16px, 4.5vw, 19px); 
    font-weight: 700;
    margin: 0 0 2px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-header div p {
    font-size: clamp(11px, 3vw, 12.5px);
    margin: 0;
    color: var(--fk-yellow);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu-container {
    padding: 4px 0; 
    overflow-y: auto;
    flex: 1;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #f0f0f0; 
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: clamp(11px, 3.2vw, 14px) clamp(14px, 3.8vw, 16px); 
    color: var(--text-main);
    font-weight: 500;
    font-size: clamp(13px, 3.6vw, 14.5px); 
}

.sidebar-menu li a i {
    width: clamp(22px, 5.8vw, 26px); 
    font-size: clamp(16px, 4.4vw, 18px); 
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 3px rgba(40, 116, 240, 0.25));
    margin-right: 12px; 
    text-align: center;
}

.sidebar-menu li a:active {
    background: #f1f3f6;
}

/* ==========================================================================
   3. Header Section (Increased Height, Equal Item Gaps & Wider Search Bar)
   ========================================================================== */
.header {
    position: sticky;
    top: 0; 
    width: 100%; 
    min-height: clamp(66px, 17vw, 78px);
    background: var(--header-gradient);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--header-gap); 
    padding: clamp(12px, 3.2vw, 16px) clamp(8px, 2.5vw, 12px); 
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24), 0 1px 3px rgba(0, 0, 0, 0.14);
    box-sizing: border-box;
}

.header-top { display: contents; }

.header-left {
    display: flex;
    align-items: center;
    gap: var(--header-gap); 
    order: 1; 
    flex-shrink: 0;
}

/* Slightly wider search bar + static positioning so dropdown anchors to full-width header left */
.search-container-wrapper {
    position: static;
    flex: 1 1 auto;
    max-width: clamp(210px, 62vw, 320px);
    width: 100%;
    margin: 0;
    order: 2; 
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--header-gap);
    order: 3; 
    flex-shrink: 0;
}

.brand-text, .user-icon-wrapper, .add-btn { display: none !important; }

/* Toggle menu in header with shadow */
.menu-toggle-btn {
    width: clamp(40px, 10.5vw, 46px); 
    height: clamp(40px, 10.5vw, 46px); 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(22px, 6vw, 27px); 
    cursor: pointer;
    color: white;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.menu-toggle-btn i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    width: clamp(36px, 9.5vw, 42px); 
    height: clamp(36px, 9.5vw, 42px); 
    border-radius: 8px;
    object-fit: cover;
    background: white;
    padding: 1.5px;
    border: 1.5px solid var(--fk-yellow);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

.cart-icon-wrapper {
    width: clamp(40px, 10.5vw, 46px); 
    height: clamp(40px, 10.5vw, 46px); 
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.cart-icon {
    font-size: clamp(20px, 5.5vw, 24px); 
    color: white; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff6161; 
    color: white;
    font-size: clamp(9px, 2.4vw, 10.5px); 
    font-weight: 700;
    width: clamp(16px, 4.2vw, 18px); 
    height: clamp(16px, 4.2vw, 18px);
    display: none; 
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   4. Search Bar & Left-Aligned Full-Screen Solid Search Dropdowns
   ========================================================================== */
.search-bar {
    position: relative;
    width: 100%;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.16));
}

.search-bar input {
    width: 100%;
    height: clamp(38px, 10vw, 44px);
    padding: clamp(7px, 2vw, 9px) clamp(10px, 2.5vw, 12px) clamp(7px, 2vw, 9px) clamp(32px, 8vw, 36px); 
    border: 1.5px solid transparent;
    border-radius: 8px;
    background: #ffffff; 
    color: var(--text-main);
    font-size: clamp(12px, 3.3vw, 13.5px);
    font-weight: 500;
    outline: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar input:focus {
    border-color: var(--fk-yellow);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.search-bar input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-bar i {
    position: absolute;
    left: clamp(10px, 2.6vw, 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(40, 116, 240, 0.25));
    font-size: clamp(13px, 3.5vw, 14.5px);
    pointer-events: none;
}

/* Keyframe for Smooth Slide + Fade Opening Effect */
@keyframes dropdownSlideFade {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left-Aligned, Full-Screen Width Solid Dropdown (Supports both .active & JS inline display:block) */
.search-results-dropdown,
.search-history-dropdown {
    position: absolute;
    top: 100%; 
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    background: #ffffff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.32), 
                0 6px 16px rgba(15, 23, 42, 0.18); 
    border-top: 2px solid var(--fk-yellow);
    border-bottom: 1px solid #cbd5e1;
    max-height: calc(100dvh - 70px); 
    overflow-y: auto;
    z-index: 9999;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.24s var(--dropdown-ease), transform 0.24s var(--dropdown-ease);
}

.search-results-dropdown {
    padding: 10px var(--page-side-space);
    background: #f1f5f9;
}

.search-history-dropdown {
    padding: 0;
    background: #ffffff;
}

/* Works whether JS toggles .active class OR sets inline style="display: block" */
.search-results-dropdown.active,
.search-history-dropdown.active,
.search-results-dropdown[style*="display: block"],
.search-history-dropdown[style*="display: block"],
.search-results-dropdown[style*="display:block"],
.search-history-dropdown[style*="display:block"] { 
    display: block !important;
    opacity: 1;
    transform: translateY(0);
    animation: dropdownSlideFade 0.25s var(--dropdown-ease) forwards;
}

/* Custom Sleek Scrollbar inside Search Results & History */
.search-results-dropdown::-webkit-scrollbar,
.search-history-dropdown::-webkit-scrollbar {
    width: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb,
.search-history-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Individual Solid & Stylish Search Result Cards */
.search-result-item {
    display: flex;
    align-items: center;
    padding: clamp(8px, 2.3vw, 11px); 
    margin-bottom: 7px; 
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
    transition: transform 0.18s var(--ios-spring), 
                box-shadow 0.18s ease, 
                border-color 0.18s ease,
                background-color 0.18s ease;
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-item:hover,
.search-result-item:active {
    background: #f0f7ff;
    border-color: rgba(40, 116, 240, 0.4);
    box-shadow: 0 4px 12px rgba(40, 116, 240, 0.15);
    transform: translateY(-1px);
}

.search-result-img {
    width: clamp(54px, 14vw, 62px); 
    height: clamp(54px, 14vw, 62px); 
    border-radius: 8px;
    object-fit: fill;
    margin-right: clamp(10px, 2.8vw, 14px); 
    background: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    box-shadow: var(--shadow-img);
}

.search-result-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    justify-content: center;
    gap: 4px;
}

.search-result-name {
    font-size: clamp(13px, 3.6vw, 14.5px); 
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.search-result-price-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 1px;
}

.search-result-sale-price {
    font-size: clamp(13.5px, 3.7vw, 15px);
    font-weight: 800;
    color: var(--fk-blue-dark);
}

.search-result-regular-price {
    font-size: clamp(11px, 3vw, 12.5px);
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 500;
}

.search-result-discount-badge {
    font-size: clamp(10px, 2.7vw, 11.5px);
    color: #ffffff;
    background: var(--fk-green);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(56, 142, 60, 0.3);
}

/* Search History Specific (Solid Left-Aligned Full-Width Styling) */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(9px, 2.5vw, 12px) clamp(12px, 3.5vw, 16px);
    background: #f1f5f9;
    font-size: clamp(11px, 3vw, 12.5px);
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.history-item {
    padding: clamp(11px, 2.8vw, 13px) clamp(12px, 3.5vw, 16px);
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
    font-size: clamp(13px, 3.6vw, 14.5px);
    font-weight: 500;
    cursor: pointer;
    background: #ffffff;
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.history-item:hover,
.history-item:active {
    background-color: #f0f7ff;
    padding-left: clamp(16px, 4.2vw, 20px);
}

.history-item:last-child {
    border-bottom: none;
}

.history-icon {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(40, 116, 240, 0.22));
    font-size: 13.5px;
    flex-shrink: 0;
}

/* ==========================================================================
   5. UNIFIED SECTION CONTAINERS & TITLES
   ========================================================================== */
.section-wrapper {
    background: #ffffff;
    border-radius: 6px; 
    margin: clamp(5px, 1.5vw, 8px) var(--page-side-space); 
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden; 
}

.full-width-section {
    background: #ffffff;
    border-radius: 6px;
    margin: clamp(5px, 1.5vw, 8px) var(--page-side-space); 
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden; 
}

.grid-categories, 
.products-grid, 
.confidence-scroll-wrapper {
    margin: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(9px, 2.5vw, 12px) clamp(10px, 2.8vw, 14px); 
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
}

.section-title {
    font-size: clamp(16.5px, 4.6vw, 20px); 
    font-weight: 800; 
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.section-header a {
    font-size: clamp(11px, 2.9vw, 12.5px); 
    color: #ffffff;
    font-weight: 600;
    padding: clamp(4px, 1.2vw, 6px) clamp(10px, 2.6vw, 13px); 
    border-radius: 4px;
    background: var(--fk-blue);
    box-shadow: 0 2px 5px rgba(40, 116, 240, 0.35);
}

/* ==========================================================================
   6. Horizontal Scroll Categories (Reduced Font Size & Increased Gap)
   ========================================================================== */
.scroll-categories {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding: clamp(10px, 2.8vw, 14px) var(--page-side-space); 
    margin: 0;
    border-radius: 0;
    gap: clamp(12px, 3.5vw, 18px); 
    scrollbar-width: none;
    background: #ffffff; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #eaeaea;
    position: relative;
    z-index: 10; 
    scroll-snap-type: x mandatory;
}

.scroll-categories::-webkit-scrollbar { display: none; }

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px; 
    flex-shrink: 0;
    width: clamp(66px, 17.5vw, 76px);
    scroll-snap-align: start;
}

.category-image-wrapper {
    width: clamp(52px, 14vw, 60px);
    height: clamp(52px, 14vw, 60px);
    border-radius: 10px;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eceff4;
    overflow: hidden;
    box-shadow: var(--shadow-img);
}

.category-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 10px;
    box-shadow: var(--shadow-img);
}

.category-item span {
    font-size: clamp(9.5px, 2.5vw, 11px);
    color: var(--text-main);
    font-weight: 500; 
    text-align: center;
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   7. Image Slider (No Container, No Border Radius, Increased Height, Added Shadow)
   ========================================================================== */
.slider-wrapper {
    margin: 0 0 clamp(6px, 1.8vw, 10px) 0; 
    padding: 0;
    border-radius: 0 !important; 
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16), 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
    background: transparent;
}

.slider-container {
    width: 100%;
    height: clamp(230px, 60vw, 320px);
    border-radius: 0 !important;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    background: transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.slider-container::-webkit-scrollbar { display: none; }

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    scroll-snap-align: center;
    display: flex;
    align-items: flex-end; 
    padding: clamp(10px, 2.8vw, 14px); 
    position: relative;
    border-radius: 0 !important;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 0 !important;
}

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 45%);
    border-radius: 0 !important;
}

.slide-content {
    position: relative;
    z-index: 1;
    color: white;
}

.slide-content h2 {
    font-size: clamp(13.5px, 3.8vw, 16px); 
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.65); 
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 5px; 
    padding: 6px; 
    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%; 
    background: #d0d5dd; 
    transition: all 0.25s var(--ios-spring);
}

.dot.active {
    background: var(--fk-blue); 
    width: 16px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(40, 116, 240, 0.4);
}

/* ==========================================================================
   8. Grid Categories / New Offer Categories (Reduced Font Size & Increased Gap)
   ========================================================================== */
.grid-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap: clamp(8px, 2.2vw, 12px); 
    padding: clamp(8px, 2.4vw, 12px); 
    background: #ffffff;
}

.grid-categories > *:nth-child(n+7) {
    display: none !important;
}

.grid-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #f7f9fc; 
    border: 1px solid #edf1f7;
    border-radius: 8px;
    padding: clamp(6px, 1.8vw, 9px); 
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.grid-cat-card img {
    width: 90%;
    height: clamp(80px, 24vw, 110px);
    border-radius: 10px;
    object-fit: fill; 
    margin-bottom: 6px; 
    background: #ffffff;
    box-shadow: var(--shadow-img);
}

.grid-cat-card span {
    color: var(--text-main); 
    font-size: clamp(9.5px, 2.6vw, 11px);
    font-weight: 500; 
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   9. Promotional Banner Area
   ========================================================================== */
.promo-banner-wrapper {
    position: relative;
    height: clamp(175px, 47vw, 245px); 
    margin: clamp(5px, 1.5vw, 8px) var(--page-side-space);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: none;
}

.dyn-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dyn-banner.active {
    opacity: 1;
    z-index: 2;
}

.dyn-banner img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* ==========================================================================
   10. New Products Section (Reduced Product Name Font Size)
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: clamp(6px, 1.8vw, 10px); 
    padding: clamp(8px, 2.4vw, 12px); 
    background: #f1f3f6;
}

@media (min-width: 540px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    }
}

.product-card {
    background: #ffffff; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card-3d); 
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    padding: 6px;
    transition: transform 0.14s var(--ios-spring);
}

.product-image-container {
    height: clamp(160px, 44vw, 200px);
    background: #f8f9fb; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; 
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: var(--shadow-img);
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: fill !important;
    border-radius: 10px !important;
    box-shadow: var(--shadow-img);
}

.product-info {
    padding: 6px 3px 2px 3px; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h4 {
    font-size: clamp(11px, 3.1vw, 12.5px);
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.product-price-section {
    padding: 2px 2px 2px 2px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-text {
    font-size: clamp(13px, 3.7vw, 15px);
    font-weight: 700;
    color: var(--text-price); 
    line-height: 1.1;
}

.regular-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: clamp(10px, 2.8vw, 11.5px);
}

.discount-badge {
    color: var(--fk-green);
    font-size: clamp(10px, 2.8vw, 11.5px);
    font-weight: 700;
    margin-left: 3px;
}

.product-add-btn {
    background: var(--secondary-gradient);
    width: clamp(28px, 7.5vw, 32px); 
    height: clamp(28px, 7.5vw, 32px); 
    border-radius: 6px; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(12px, 3.4vw, 13.5px);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(251, 100, 27, 0.35);
}

.product-add-btn i {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.view-more-container {
    display: none; 
    justify-content: center; 
    padding: clamp(8px, 2.2vw, 11px); 
    background: #ffffff;
    border-top: 1px solid #f0f0f0; 
}
        
.btn-view-more {
    background: var(--fk-blue);
    color: white;
    padding: clamp(8px, 2.5vw, 10px) clamp(14px, 4vw, 18px);
    border-radius: 4px; 
    font-size: clamp(12px, 3.4vw, 13.5px);
    font-weight: 600;
    border: none;
    width: 100%;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(40, 116, 240, 0.3);
}

/* ==========================================================================
   11. Shop With Confidence Section (Gradient + Shadow on FontAwesome Icons)
   ========================================================================== */
.confidence-scroll-wrapper {
    display: flex;
    overflow-x: auto;
    gap: clamp(6px, 1.8vw, 10px); 
    padding: clamp(8px, 2.4vw, 12px); 
    scrollbar-width: none; 
    scroll-snap-type: x mandatory;
    background: #ffffff;
}

.confidence-scroll-wrapper::-webkit-scrollbar { display: none; }

.confidence-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8faff;
    border: 1px solid #e6eefc;
    border-radius: 8px;
    padding: clamp(8px, 2.4vw, 10px) clamp(6px, 1.8vw, 8px); 
    width: clamp(78px, 22vw, 90px); 
    text-align: center;
    color: var(--text-main);
    scroll-snap-align: start;
    box-shadow: var(--shadow-sm);
}

.confidence-item i {
    font-size: clamp(18px, 5.2vw, 22px);
    margin-bottom: 5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(40, 116, 240, 0.28));
}

.confidence-item span {
    font-size: clamp(9.5px, 2.6vw, 11px);
    font-weight: 600;
    line-height: 1.15;
}

/* ==========================================================================
   12. Footer (Flipkart Dark Navy Footer)
   ========================================================================== */
.footer {
    color: #ffffff;
    text-align: center;
    padding: clamp(14px, 3.8vw, 18px) var(--page-side-space); 
    background: #172337;
    border: none;
    margin: clamp(6px, 1.8vw, 10px) 0 0 0;
    border-radius: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

.footer .social-icons {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2.8vw, 14px); 
    margin-bottom: 10px; 
}

.social-link {
    width: clamp(34px, 9vw, 38px); 
    height: clamp(34px, 9vw, 38px); 
    border-radius: 50%; 
    background: rgba(255, 255, 255, 0.1); 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(15px, 4.2vw, 17px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.social-link i {
    background: linear-gradient(135deg, #ffe500 0%, #ff9f00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.footer p {
    font-size: clamp(10.5px, 2.8vw, 12px); 
    font-weight: 400;
    color: #878787;
}

/* ==========================================================================
   13. Global Loader
   ========================================================================== */
.global-loader {
    position: fixed;
    inset: 0; 
    background: rgba(255, 255, 255, 0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-loader.hidden {
    display: none;
}

.global-spinner {
    width: clamp(32px, 9vw, 38px); 
    height: clamp(32px, 9vw, 38px);
    border: 3px solid #e0e0e0; 
    border-top: 3px solid var(--fk-blue);
    border-radius: 50%; 
    animation: spin-loader 0.75s linear infinite;
}

@keyframes spin-loader { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   14. Category Modal (Full Screen from Top Edge - Zero Top Free Space)
   ========================================================================== */
.cat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55); 
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.cat-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--app-bg);
    border-radius: 0; 
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, visibility 0.28s ease;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    overflow: hidden;
}

.cat-modal.active { 
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cat-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(12px, 3.2vw, 15px) clamp(12px, 3.2vw, 15px); 
    background: var(--fk-blue);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cat-modal-header h3 {
    font-size: clamp(16.5px, 4.6vw, 19.5px); 
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.close-cat-modal {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    width: clamp(28px, 7.5vw, 32px); 
    height: clamp(28px, 7.5vw, 32px); 
    border-radius: 50%; 
    font-size: clamp(14px, 3.8vw, 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cat-modal-search {
    padding: clamp(8px, 2.2vw, 10px) clamp(10px, 2.8vw, 14px);
    background: var(--fk-blue);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.cat-modal-search .search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 6px;
    padding: 0;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    filter: none;
}

.cat-modal-search .search-bar i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(40, 116, 240, 0.25));
    padding-left: clamp(10px, 2.5vw, 12px);
    position: static;
    transform: none;
    font-size: clamp(12.5px, 3.4vw, 14.5px);
}

.cat-modal-search .search-bar input {
    border: none;
    background: transparent;
    height: auto;
    padding: clamp(7px, 2vw, 9px);
    width: 100%;
    font-size: clamp(12.5px, 3.4vw, 14px);
    color: var(--text-main);
    box-shadow: none;
}

.cat-modal-body {
    padding: clamp(6px, 2vw, 10px) var(--page-side-space); 
    overflow-y: auto;
    flex-grow: 1;
    background: var(--app-bg);
}

.modal-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(5px, 1.5vw, 8px); 
}

@media (min-width: 540px) {
    .modal-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    }
}

/* Strictly enforce 10px border-radius & shadows on Modal Product Cards, Containers & Images with object-fit: fill */
.cat-modal .product-card,
.modal-products-grid .product-card {
    border-radius: 10px !important;
    background: #ffffff;
    box-shadow: var(--shadow-card-3d);
    padding: 5px;
}

.cat-modal .product-image-container,
.modal-products-grid .product-image-container {
    border-radius: 10px !important;
    overflow: hidden;
    background: #f8f9fb;
    box-shadow: var(--shadow-img);
}

.cat-modal .product-image-container img,
.modal-products-grid .product-image-container img,
.cat-modal .product-card img {
    border-radius: 10px !important;
    object-fit: fill !important;
    box-shadow: var(--shadow-img);
}

/* ==========================================================================
   15. Exit Toast Notification
   ========================================================================== */
.exit-toast {
    position: fixed;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: #212121;
    color: #fff;
    width: clamp(230px, 75%, 310px);
    text-align: center;
    padding: clamp(8px, 2.4vw, 10px) clamp(14px, 3.5vw, 18px); 
    border-radius: 4px; 
    font-size: clamp(12px, 3.4vw, 13.5px); 
    font-weight: 500;
    z-index: 9999999;
    transition: 0.28s var(--ios-spring);
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.exit-toast.show {
    bottom: 24px; 
    opacity: 1;
}

/* Lazy Load */
.lazy-load-img, .lazy-bg {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}
.lazy-load-img.loaded, .lazy-bg.loaded {
    opacity: 1;
}