:root {
    --primary: #1e3a8a;
    /* Deep Navy */
    --accent: #f59e0b;
    /* Professional Gold/Amber */
    --background: #fdfdfd;
    --surface: #ffffff;
    --card-bg: #ffffff;
    --input-bg: #f1f5f9;
    --info-bg: #eef2ff;
    --info-text: #1e3a8a;
    --profile-ro-bg: #f8fafc;
    --profile-ro-text: #64748b;
    --price-text: var(--primary);
    --original-price-text: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.96);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: #f1f5f9;
    --success-bg: #f0fdf4;
    --success-text: #166534;
    --success-border: #bbf7d0;
    --shadow-main: 0 4px 20px -5px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 20px 40px -12px rgb(0 0 0 / 0.1);
    --header-h: 60px;
    --bottom-h: 80px;
    --sidebar-w: 300px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --logo-url: url('https://studynotes365.com/wp-content/uploads/2024/08/IMG_20230519_150026-scaled-1.webp');
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --card-bg: #1e293b;
        --input-bg: #334155;
        --info-bg: #1e3a8a;
        --info-text: #e2e8f0;
        --profile-ro-bg: #0f172a;
        --profile-ro-text: #94a3b8;
        --price-text: #fbbf24;
        /* Distinct amber for prices in dark mode */
        --original-price-text: #94a3b8;
        --nav-bg: rgba(15, 23, 42, 0.96);
        --text-primary: #f8fafc;
        --text-secondary: #94a3b8;
        --border: #334155;
        --success-bg: rgba(22, 101, 52, 0.2);
        --success-text: #4ade80;
        --success-border: rgba(74, 222, 128, 0.3);
        --shadow-main: 0 4px 20px -5px rgb(0 0 0 / 0.3);
        --shadow-hover: 0 20px 40px -12px rgb(0 0 0 / 0.5);
        --primary: #60a5fa;
        /* Lighter blue for dark mode contrast */
        --logo-url: url('https://studynotes365.com/wp-content/uploads/2026/02/ChatGPT-Image-Feb-24-2026-10_25_33-PM-2.png');
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    overflow-x: hidden;
}

/* Layout Hierarchy */
.main-wrapper {
    margin-top: calc(var(--header-h) + var(--safe-top));
    margin-bottom: calc(var(--bottom-h) + var(--safe-bottom));
    transition: margin-left 0.3s ease;
}

@media (max-width: 1023px) {
    .main-wrapper {
        margin-top: calc(125px + var(--safe-top));
        /* Adjusted for the new detached header height */
    }
}

@media (min-width: 1024px) {
    .has-sidebar .main-wrapper {
        margin-left: var(--sidebar-w);
        margin-top: var(--header-h);
    }

    .has-sidebar .bottom-nav {
        left: var(--sidebar-w) !important;
        width: calc(100% - var(--sidebar-w)) !important;
    }

    .has-sidebar .header-container {
        left: var(--sidebar-w) !important;
        width: calc(100% - var(--sidebar-w)) !important;
    }

    /* Hide mobile elements on desktop */
    .menu-trigger,
    .bottom-nav {
        display: none !important;
    }

    /* Adjust main-wrapper margin when no bottom nav */
    .main-wrapper {
        margin-bottom: 20px;
    }
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-top);
    /* Prevent scroll chaining to parent - stops pull-to-refresh */
    overscroll-behavior: contain;
    border-right: 1px solid var(--border);
}

.sidebar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
}


.sidebar.active {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
        box-shadow: none;
        border-right: 1px solid var(--border);
    }
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    height: 38px;
    object-fit: contain;
    content: var(--logo-url);
}


.close-sidebar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-sidebar i {
    font-size: 14px;
    transition: transform 0.3s;
}

.close-sidebar:hover {
    background: var(--border);
    color: var(--primary);
    border-color: var(--primary);
}

.close-sidebar:active {
    transform: translateX(-4px) scale(0.95);
}



.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    /* CRITICAL: Prevent pull-to-refresh when scrolling in sidebar */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Premium Scrollbar for Sidebar */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

@keyframes slide-in-sidebar {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}



.menu-label {
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 24px 0 12px 8px;
}

.menu-item {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.menu-item i {
    font-size: 10px;
    opacity: 0.3;
    transition: transform 0.2s;
}

.menu-item:hover {
    background: var(--input-bg);
    color: var(--primary);
}

.menu-item.active {
    background: var(--input-bg);
    color: var(--primary);
}

.menu-item.active i {
    opacity: 1;
    color: var(--primary);
}

.menu-item {
    margin-bottom: 4px;
}

.sub-menu {
    padding-left: 24px;
    margin-bottom: 8px;
    display: none;
    /* Controlled by JS but good to have a default */
}

.sub-item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
}

.sub-item:hover,
.sub-item.active {
    color: var(--primary);
    background: var(--input-bg);
    font-weight: 700;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-footer a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer a:hover {
    color: var(--primary);
}

.sub-item {
    padding: 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.sub-item:hover {
    color: var(--primary);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Header & Search */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--surface);
    z-index: 2000;
    padding: calc(var(--safe-top) + 8px) 16px 12px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .header-container {
        display: flex;
        align-items: center;
        gap: 30px;
        height: var(--header-h);
        padding: 0 40px;
    }

    .brand-section {
        flex-shrink: 0;
        width: auto;
    }

    .search-wrapper {
        flex: 1;
        margin: 0;
        max-width: 600px;
    }

    .header-actions {
        margin-left: auto;
    }
}

.brand-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
}

.logo-text {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -1px;
    color: var(--primary);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.logo-lite {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 1px 4px;
    border-radius: 4px;
    position: relative;
    animation: float-lite 3s ease-in-out infinite;
}

@keyframes float-lite {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-wrapper {
    margin-top: 10px;
    margin-bottom: 4px;
    position: relative;
}

.search-input-group {
    background: var(--input-bg);
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 14px;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    padding-left: 10px;
    color: var(--text-primary);
}

.action-btn {
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text-primary);
    padding: 8px;
    position: relative;
    cursor: pointer;
}

.badge,
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 9px;
    background: var(--accent);
    color: white;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Exam Category Buttons */
.main-exam-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.exam-btn {
    padding: 14px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.exam-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
}

.exam-btn:hover::before {
    opacity: 1;
}

.exam-btn.ca-final {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.exam-btn.ca-inter {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.exam-btn.cma-final {
    background: linear-gradient(135deg, #dc2626 0%, #f43f5e 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.exam-btn.cma-inter {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

@media (prefers-color-scheme: dark) {
    .exam-btn {
        opacity: 0.9;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .exam-btn.active {
        opacity: 1;
        border-color: var(--accent);
    }
}

.exam-btn.active {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: var(--accent);
}

.exam-btn:active {
    transform: translateY(-2px) scale(1.02);
}

@media (max-width: 480px) {
    .exam-btn {
        font-size: 10px;
        padding: 12px 6px;
    }
}

@media (min-width: 768px) {
    .main-exam-buttons {
        grid-template-columns: repeat(4, minmax(150px, 200px));
        justify-content: center;
        gap: 16px;
        padding: 16px;
    }

    .exam-btn {
        font-size: 14px;
        padding: 18px 16px;
    }
}

/* Horizontal Categories */
.scrolling-wrapper {
    display: flex;
    overflow-x: auto;
    padding: 8px 16px;
    gap: 8px;
    scrollbar-width: none;
    background: transparent;
    margin-top: 12px;
    /* Detached gap */
    margin-bottom: 12px;
}

.category-chip {
    flex: 0 0 auto;
    padding: 8px 18px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    background: var(--input-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.category-chip.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    transform: translateY(-2px);
}

@media (min-width: 1024px) {
    .scrolling-wrapper {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 12px;
        padding: 12px 0;
        scrollbar-width: none;
    }

    .scrolling-wrapper::-webkit-scrollbar {
        display: none;
    }

    .category-chip {
        padding: 10px 24px;
        font-size: 14px;
        flex-shrink: 0;
    }
}

/* Promo Banner */
.promo-banner {
    margin: 0 16px 24px;
    padding: 32px 24px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    border-radius: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
    .promo-banner {
        margin: 0 0 32px;
        padding: 60px 50px;
        border-radius: 32px;
    }

    .promo-text h1 {
        font-size: 42px;
        margin-bottom: 12px;
    }

    .promo-text p {
        font-size: 18px;
    }

    .promo-stats {
        margin-top: 30px;
        font-size: 14px;
        gap: 24px;
    }
}

@media (prefers-color-scheme: dark) {
    .promo-banner {
        background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.promo-banner::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.promo-text h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.promo-text p {
    font-size: 13px;
    opacity: 0.8;
}

.promo-stats {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* Grid & Cards */
.product-section {
    padding: 0 16px;
}

.section-header {
    margin: 24px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.view-options {
    display: flex;
    background: var(--input-bg);
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.view-btn {
    border: none;
    background: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .grid-2 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-image-box {
    aspect-ratio: 1/1.2;
    background: #f8fafc;
    position: relative;
    padding: 12px;
}

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    color: #cbd5e1;
    transition: all 0.2s;
}

.wishlist-btn.active {
    color: #f43f5e;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 11.5px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-primary);
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
    cursor: pointer;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-tag {
    font-weight: 800;
    font-size: 14px;
    color: var(--price-text);
}

.btn-add {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    border: none;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add:active {
    transform: scale(0.9);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: calc(var(--bottom-h) + var(--safe-bottom));
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: calc(var(--safe-bottom) + 12px);
    border-top: 1px solid var(--border);
    z-index: 1100;
}

.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    flex: 1;
    height: 100%;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-item.active i {
    transform: translateY(-2px);
}

.nav-item span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cart Sheet Improved */
.cart-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    z-index: 2500;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.15);
    padding-bottom: var(--safe-bottom);
    display: flex;
    flex-direction: column;
}

.cart-sheet.open {
    transform: translateX(-50%) translateY(0);
}

@media (min-width: 1024px) {
    .cart-sheet {
        top: 0;
        bottom: 0;
        left: auto;
        right: 0;
        height: 100vh;
        width: 400px;
        max-width: 400px;
        border-radius: 0;
        transform: translateX(100%);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.1);
    }

    .cart-sheet.open {
        transform: translateX(0);
    }

    .cart-items {
        max-height: none;
    }
}

.cart-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 800;
}

.close-btn {
    border: none;
    background: var(--input-bg);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 60vh;
}

.cart-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 60px;
    height: 80px;
    object-fit: contain;
    background: var(--input-bg);
    border-radius: 8px;
}

.cart-footer {
    padding: 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 18px;
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.2);
    transition: transform 0.2s;
}

.btn-checkout:active {
    transform: scale(0.98);
}

.search-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background);
    z-index: 1800;
    display: none;
    overflow-y: auto;
    padding: calc(var(--header-h) + 20px + var(--safe-top)) 16px 100px;
}

@media (min-width: 1024px) {
    .has-sidebar .search-results-overlay {
        left: var(--sidebar-w);
        width: calc(100% - var(--sidebar-w));
    }

    .search-results-overlay {
        padding-top: calc(var(--header-h) + 40px);
    }
}

.search-results-overlay.active {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-results-header {
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--background);
    z-index: 10;
}

.search-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--input-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 16px;
}

.search-results-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.search-results-header span {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}

.search-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.search-item:hover {
    background: #f8fafc;
    border-color: var(--border);
}

.search-item-img {
    width: 60px;
    height: 80px;
    object-fit: contain;
    background: #f1f5f9;
    border-radius: 10px;
    flex-shrink: 0;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--price-text);
}


/* Animation Utils */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.shimmer-loader {
    height: 150px;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 800px 104px;
    animation: shimmer 1.2s infinite;
    border-radius: 12px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    margin: 0 4px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: dots 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Shimmer Loading Effect */
.shimmer {
    background: #f1f5f9;
    background-image: linear-gradient(to right, #f1f5f9 0%, #e2e8f0 20%, #f1f5f9 40%, #f1f5f9 100%);
    background-repeat: no-repeat;
    background-size: 800px 400px;
    display: inline-block;
    position: relative;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.floating-help {
    position: fixed;
    bottom: calc(var(--bottom-h) + 20px);
    right: 20px;
    width: 48px;
    height: 48px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-help:active {
    transform: scale(0.9);
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 10px 0;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.2;
    margin-bottom: 16px;
    display: block;
}

/* Policy Page Overlays */
.policy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background);
    z-index: 3000;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.policy-overlay.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.policy-header {
    padding: calc(20px + var(--safe-top)) 20px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.policy-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--input-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
}

.policy-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    flex: 1;
}

.policy-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    color: var(--text-primary);
    line-height: 1.6;
}

.policy-content h2,
.policy-content h3 {
    color: var(--primary);
    margin: 24px 0 12px;
    font-weight: 800;
}

.policy-content p {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.policy-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.menu-separator {
    height: 1px;
    background: var(--border);
    margin: 16px 20px;
}

.menu-section-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px 8px;
    opacity: 0.6;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--input-bg);
    border-radius: 16px;
    margin-bottom: 12px;
    text-decoration: none;
}

.contact-card i {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.contact-info h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.contact-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}