/* ============================================================================
   QSC — PHARMA GRADE DESIGN SYSTEM
   Clean clinical light theme: white canvas, cool light-blue-gray tints,
   one decisive pharma blue, clinical mint for verified/COA/success,
   red reserved for warnings & sale urgency.
   Type: Funnel Display (display) + Funnel Sans (body) + Red Hat Mono (data).
   NOTE: legacy variable names are kept but remapped to the light pharma
   palette so every page stylesheet inherits the theme.
   ============================================================================ */

/* === LEGACY SELF-HOSTED INTER (kept for fallback only) === */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* -- Pharma Grade core surfaces (legacy "ink" names, light values) -- */
    --ink-deep: #eef3f9;          /* sunken clinical tint (table heads, inputs) */
    --ink-base: #ffffff;          /* page background */
    --ink-panel: #ffffff;         /* raised card */
    --ink-panel-2: #f3f7fb;       /* hover / sunken-on-card */
    --ink-line: #d9e3ef;          /* 1px hairline border */

    /* -- Pharma blue (primary) -- */
    --primary: #0b5191;
    --primary-dark: #083e72;      /* hover state */
    --primary-darker: #062f58;    /* high-emphasis blue text */
    --primary-light: #3374ad;
    --primary-lighter: #7aa9d2;
    --primary-50: #eef5fb;
    --primary-100: #d8e8f5;

    /* -- Price / figure blue (legacy "amber" names) -- */
    --amber: #094678;             /* price figures — deep pharma blue */
    --amber-bright: #073a64;      /* high-emphasis figures */
    --amber-deep: #0b5191;        /* badge fills */
    --secondary-green: #0b5191;
    --success-green: #0e8c6c;     /* clinical mint/teal — verified, COA, success */
    --warning-yellow: #b45309;
    --error-red: #c4373d;
    --accent-navy: #0c2438;

    /* -- Neutral scale (light theme: text gets DARKER as number grows) -- */
    --white: #ffffff;             /* card surface */
    --gray-50: #f6f9fc;           /* page tint / even rows */
    --gray-100: #eaf1f7;          /* sunken surface / hover */
    --gray-200: #d9e3ef;          /* default border */
    --gray-300: #c0d1e1;          /* strong border */
    --gray-400: #64798e;          /* muted text */
    --gray-500: #51677c;          /* secondary text */
    --gray-600: #41566b;
    --gray-700: #32465a;
    --gray-800: #243a4e;
    --gray-900: #0c1b2c;          /* primary ink */

    --border-subtle: rgba(16, 48, 77, 0.10);
    --border-default: rgba(16, 48, 77, 0.16);
    --surface-elevated: #ffffff;
    --surface-sunken: #f3f7fb;

    /* -- Type system -- */
    --font-display: 'Frank Ruhl Libre', 'Funnel Sans', Georgia, serif;
    --font-family: 'Funnel Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Red Hat Mono', 'SF Mono', 'Cascadia Code', Consolas, monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* -- Depth: soft cool shadows, restrained blue rings -- */
    --shadow-sm: 0 1px 2px 0 rgba(16, 42, 67, 0.06);
    --shadow-md: 0 4px 16px -4px rgba(8, 28, 52, 0.10), 0 1px 2px rgba(8, 28, 52, 0.05);
    --shadow-lg: 0 18px 44px -16px rgba(8, 28, 52, 0.16);
    --shadow-xl: 0 36px 84px -28px rgba(8, 28, 52, 0.28);
    --glow-cyan: 0 0 0 1px rgba(11, 81, 145, 0.20), 0 10px 26px -10px rgba(11, 81, 145, 0.28);
    --glow-cyan-soft: 0 1px 2px rgba(16, 42, 67, 0.05), 0 10px 26px -12px rgba(11, 81, 145, 0.20);
    --glow-amber: 0 0 0 1px rgba(9, 70, 120, 0.18), 0 10px 24px -10px rgba(9, 70, 120, 0.24);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;

    /* Z-index system */
    --z-ticker: 900;
    --z-header: 1000;
    --z-modal: 2000;
    --z-notification: 3000;
}

html { font-size: 16px; }

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--ink-base);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    -webkit-touch-callout: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

::selection { background: rgba(11, 81, 145, 0.18); color: var(--gray-900); }

/* Accessible focus rings everywhere */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Scrollbar — clinical rail */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb {
    background: #b9cbdc;
    border-radius: 6px;
    border: 3px solid var(--gray-50);
}
::-webkit-scrollbar-thumb:hover { background: #9cb4ca; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }
@media (min-width: 640px) { .container { padding: 0 var(--space-6); } }
@media (min-width: 1024px) { .container { padding: 0 var(--space-8); } }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    padding: var(--space-3) var(--space-6); font-weight: 600; font-size: var(--font-size-sm);
    font-family: var(--font-family);
    border-radius: var(--radius-md); border: none; cursor: pointer;
    transition: all var(--transition-fast); text-decoration: none; white-space: nowrap; user-select: none;
    min-height: 44px;
}
.btn-primary {
    background: linear-gradient(180deg, #0e5a9e, #094678);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #0e5c9f, #083e72);
    box-shadow: 0 6px 16px -6px rgba(11, 81, 145, 0.45);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #ffffff;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-secondary:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary-darker); }
.btn-success { background: var(--success-green); color: #ffffff; }
.btn-success:hover { background: #0b7a5e; color: #ffffff; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--font-size-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--font-size-lg); }

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.hidden { display: none; }
.text-sm { font-size: var(--font-size-sm); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }

/* === UTILITY CLASSES: SECTION === */
.section-heading { color: var(--gray-900); font-family: var(--font-display); }
.section-icon { color: var(--primary); margin-right: 8px; }
.section-alt { background-color: var(--surface-sunken); }

/* === ANNOUNCEMENT BAR === */
.announcement-bar {
    background: #fdf1f1;
    border-bottom: 1px solid #f3cdcd;
    color: #a8312f;
    padding: 10px 0;
    position: relative;
    z-index: var(--z-ticker);
    font-size: 0.85rem;
    text-align: center;
}
.announcement-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}
.announcement-icon {
    font-size: 1.1rem;
    line-height: 1;
}
.announcement-text {
    letter-spacing: 0.01em;
    line-height: 1.4;
}
.announcement-text strong {
    font-weight: 800;
    color: #8f2422;
}
@media (max-width: 767px) {
    .announcement-bar { font-size: 0.78rem; padding: 8px 0; }
    .announcement-icon { font-size: 0.95rem; }
}
@media (max-width: 479px) {
    .announcement-bar { font-size: 0.72rem; padding: 7px 0; }
    .announcement-inner { gap: 0.375rem; }
}

/* === TRUST BAR — clinical status line === */
.trust-bar {
    background: var(--ink-deep);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--gray-500);
    padding: 8px 0;
    position: relative;
    z-index: var(--z-ticker);
    font-size: var(--font-size-xs);
    font-weight: 500;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.trust-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}
.trust-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: color var(--transition-fast);
}
.trust-bar-item i {
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0.9;
}
a.trust-bar-item:hover { color: var(--primary-darker) !important; }
.cart-btn-text { display: none; }
@media (min-width: 480px) { .cart-btn-text { display: inline; } }

/* === HEADER — sticky, crisp white === */
.header {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    padding: var(--space-3) 0;
    position: sticky; top: 0; z-index: var(--z-header);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 1px 0 rgba(16, 48, 77, 0.03), 0 8px 24px -18px rgba(16, 42, 67, 0.25);
}
.header-content { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.logo { display: flex; align-items: center; text-decoration: none; gap: var(--space-3); min-height: 44px; }
.logo-img {
    width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
    box-shadow: 0 0 0 1px var(--ink-line), 0 1px 4px rgba(16, 42, 67, 0.10);
}
.footer-logo-img { width: 30px; height: 30px; border-radius: 4px; object-fit: cover; margin-right: 8px; }
.logo-text {
    font-size: 1.2rem; font-weight: 800; color: var(--gray-900); line-height: 1.2;
    letter-spacing: 0.02em; font-family: var(--font-display);
}
.logo-text small {
    display: block; font-size: 0.62rem; font-weight: 500; color: var(--gray-400);
    letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-mono);
}
.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.shipping-info {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3); background: var(--primary-50);
    border: 1px solid var(--primary-100); border-radius: var(--radius-md);
    font-size: 0.75rem; color: var(--primary-darker);
}
.shipping-info i { color: var(--primary); font-size: 0.7rem; }

.cart-btn {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(180deg, #0e5a9e, #094678);
    color: #ffffff; border: none; border-radius: var(--radius-md);
    cursor: pointer; font-size: var(--font-size-sm); font-weight: 700;
    transition: all var(--transition-fast); position: relative;
    min-height: 44px;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.cart-btn:hover { box-shadow: 0 6px 16px -6px rgba(11, 81, 145, 0.45); transform: translateY(-1px); }
.cart-count {
    background: #ffffff; color: var(--primary-darker); border-radius: 50%;
    width: 20px; height: 20px; display: flex; align-items: center;
    justify-content: center; font-size: 0.7rem; font-weight: 700;
    font-family: var(--font-mono);
}

/* === DESKTOP NAVIGATION === */
.nav-desktop { display: none; }
@media (min-width: 768px) { .nav-desktop { display: block; } }
.nav-links {
    list-style: none; display: flex; gap: var(--space-1); align-items: center;
}
.nav-link {
    padding: var(--space-2) 10px; color: var(--gray-600);
    text-decoration: none; font-size: 0.82rem; font-weight: 500;
    border-radius: var(--radius-md); transition: all var(--transition-fast);
    white-space: nowrap;
}
.nav-link:hover { color: var(--primary-darker); background: var(--primary-50); }
.nav-link.active {
    color: var(--primary-dark); font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--primary);
    border-radius: var(--radius-md) var(--radius-md) 2px 2px;
}
.nav-link-secondary { color: var(--gray-500); font-size: var(--font-size-xs); }
.nav-link-secondary:hover { color: var(--primary-darker); background: var(--primary-50); }
.nav-link-secondary.active { color: var(--primary-dark); }

/* Verified On dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; right: 0;
    background: #ffffff; border: 1px solid var(--ink-line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
    list-style: none; padding: 6px 0; min-width: 200px; z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
    display: flex; align-items: center; gap: 8px; padding: 9px 16px;
    font-size: 0.82rem; color: var(--gray-600); text-decoration: none;
    transition: all 0.15s;
}
.nav-dropdown-menu li a:hover { background: var(--primary-50); color: var(--primary-darker); }
.nav-dropdown-menu li a i { width: 16px; text-align: center; color: var(--primary); font-size: 0.78rem; }

.desktop-only { display: none; }
@media (min-width: 768px) { .desktop-only { display: flex; } }
.mobile-only { display: flex; }
@media (min-width: 768px) { .mobile-only { display: none; } }

/* === HAMBURGER MENU === */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
}
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gray-600);
    border-radius: 1px;
    transition: all 0.3s ease;
}
@media (max-width: 767px) {
    .hamburger-btn { display: flex; }
}

/* === MOBILE MENU === */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: calc(var(--z-header) + 10);
    background: rgba(16, 42, 67, 0.36);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }
.mobile-menu {
    position: fixed;
    top: 0; right: 0;
    width: 300px;
    max-width: 85%;
    height: 100%;
    height: 100dvh;
    background: #ffffff;
    border-left: 1px solid var(--ink-line);
    box-shadow: -12px 0 40px rgba(16, 42, 67, 0.18);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-6) var(--space-4);
    z-index: calc(var(--z-header) + 11);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--space-4);
}
.mobile-menu-title {
    font-weight: 700; font-size: var(--font-size-lg); color: var(--gray-900);
    font-family: var(--font-display);
}
.mobile-menu-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-100); border: none; border-radius: 50%;
    cursor: pointer; font-size: 1rem; color: var(--gray-600);
}
.mobile-menu-close:hover { background: var(--gray-200); }
.mobile-menu-footer {
    margin-top: var(--space-6); padding-top: var(--space-4);
    border-top: 1px solid var(--gray-100);
    display: flex; flex-direction: column; gap: var(--space-3);
}
.mobile-menu-footer a {
    display: flex; align-items: center; gap: var(--space-2);
    color: var(--primary); text-decoration: none; font-size: var(--font-size-sm); font-weight: 500;
}
.mobile-menu-footer a:hover { text-decoration: underline; }
.mobile-nav-links {
    list-style: none;
}
.mobile-nav-links li { border-bottom: 1px solid var(--gray-100); }
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-2);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.mobile-nav-links a:hover { color: var(--primary-darker); }
.mobile-nav-links a.active { color: var(--primary-dark); font-weight: 600; }
.mobile-nav-links a i { width: 20px; text-align: center; color: var(--primary); }

/* === CHINESE CULTURAL ACCENTS === */
.cn-accent { font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif; }
.cn-divider {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    margin: 1.5rem 0; color: var(--gray-300);
}
.cn-divider::before, .cn-divider::after {
    content: ''; flex: 1; max-width: 80px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}
.cn-divider span { font-size: 0.75rem; color: var(--gray-400); letter-spacing: 0.1em; }
.cn-seal {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border: 2px solid var(--primary); border-radius: 4px;
    color: var(--primary); font-size: 0.6rem; font-weight: 800;
    font-family: 'Noto Serif SC', serif; transform: rotate(-3deg);
    line-height: 1;
    box-shadow: 0 1px 4px rgba(11, 81, 145, 0.18);
}

/* === MODAL SYSTEM === */
.modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(16, 42, 67, 0.42); z-index: var(--z-modal); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-4); align-items: flex-start; justify-content: center;
    opacity: 0; transition: opacity 0.25s ease; backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.modal.show { display: flex; opacity: 1; }
.modal-content {
    background: #ffffff; border-radius: var(--radius-xl);
    border: 1px solid var(--ink-line);
    width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-xl); margin: auto;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--primary-100);
    position: sticky; top: 0; z-index: 1;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: linear-gradient(180deg, #f4f9fd, #ffffff);
}
.modal-title {
    font-size: var(--font-size-lg); font-weight: 700; color: var(--gray-900);
    font-family: var(--font-display);
}
.modal-close {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: #ffffff; border: 1px solid var(--gray-200); border-radius: 50%;
    cursor: pointer; color: var(--gray-500); transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.modal-close:hover { background: var(--error-red); color: #ffffff; border-color: var(--error-red); transform: rotate(90deg); }
.modal-body { padding: var(--space-4) var(--space-6); }

/* === NOTIFICATION TOAST === */
.notification-toast {
    position: fixed; top: 20px; right: 20px; z-index: var(--z-notification);
    transform: translateX(120%); transition: transform 0.3s ease;
}
.notification-toast.show { transform: translateX(0); }
.toast-content {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-3) var(--space-4); background: #ffffff;
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--success-green); min-width: 280px;
    max-width: 90vw;
}
.toast-content.error { border-left-color: var(--error-red); }
.toast-content.warning { border-left-color: var(--warning-yellow); }
.toast-content.info { border-left-color: var(--primary); }
.toast-icon { font-size: 1.2rem; color: var(--success-green); }
.toast-message { font-weight: 600; font-size: var(--font-size-sm); color: var(--gray-800); }
.toast-subtitle { font-size: var(--font-size-xs); color: var(--gray-500); }
.toast-close { background: none; border: none; color: var(--gray-400); cursor: pointer; padding: 4px; }

/* === SEARCH DROPDOWN === */
.search-container { position: relative; flex-shrink: 0; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: var(--font-size-sm); }
.search-input {
    width: 220px; padding: var(--space-2) var(--space-3) var(--space-2) 36px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    background: #ffffff; color: var(--gray-800);
    font-size: var(--font-size-sm); outline: none; transition: all var(--transition-fast);
    font-family: var(--font-family);
    min-height: 44px;
}
.search-input::placeholder { color: var(--gray-400); }
.search-input:focus { border-color: var(--primary); width: 280px; box-shadow: 0 0 0 3px rgba(11, 81, 145, 0.12); }
.search-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #ffffff; border: 1px solid var(--ink-line);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    z-index: 100; max-height: 400px; overflow-y: auto; margin-top: 4px;
}
.search-result-item {
    display: flex; align-items: center; padding: var(--space-3);
    border-bottom: 1px solid var(--gray-100); cursor: pointer;
    transition: background var(--transition-fast);
}
.search-result-item:hover { background: var(--primary-50); }
.search-result-info { flex: 1; }
.search-result-name { font-weight: 600; font-size: var(--font-size-sm); color: var(--gray-900); }
.search-result-details { font-size: var(--font-size-xs); color: var(--gray-500); }
.search-result-price { font-weight: 600; color: var(--amber); font-size: var(--font-size-sm); font-family: var(--font-mono); }

/* === PAGE HERO (About, Contact, 404) === */
.page-hero {
    background:
        radial-gradient(700px 240px at 18% 110%, rgba(11, 81, 145, 0.06), transparent 65%),
        linear-gradient(180deg, #f3f8fc 0%, #ffffff 100%);
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}
.page-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: var(--gray-900) !important;
}
.page-hero p {
    font-size: 1rem;
    color: var(--gray-500);
}

/* === ABOUT & CONTACT MODALS === */
.about-content, .contact-content { line-height: 1.7; }
.about-section, .contact-section { margin-bottom: var(--space-6); }
.about-section h3, .contact-section h3 { font-size: var(--font-size-lg); font-weight: 600; margin-bottom: var(--space-3); color: var(--gray-900); }
.about-section p, .contact-section p { margin-bottom: var(--space-3); color: var(--gray-600); }
.about-section ul, .contact-section ul { padding-left: var(--space-6); margin-bottom: var(--space-3); }
.about-section li, .contact-section li { margin-bottom: var(--space-2); color: var(--gray-600); }
.contact-item { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.contact-item i { color: var(--primary); margin-top: 4px; }
.contact-item a { color: var(--primary); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* === POLICY MODAL === */
.policy-section { margin-bottom: 1.5rem; }
.policy-section h3 {
    font-size: 1rem; font-weight: 600; color: var(--primary-darker);
    margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
}
.policy-section h3 i { color: var(--primary); }
.policy-section ul { list-style: none; padding: 0; }
.policy-section ul li {
    padding: 0.5rem 0 0.5rem 1.5rem; position: relative;
    font-size: 0.875rem; color: var(--gray-600); line-height: 1.5;
}
.policy-section ul li::before {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; left: 0; color: var(--success-green); font-size: 0.75rem; top: 0.625rem;
}
.policy-highlight {
    background: var(--primary-50);
    border: 1px solid var(--primary-100); border-radius: var(--radius-lg);
    padding: 1rem 1.25rem; margin: 1rem 0;
}
.policy-highlight p { font-size: 0.875rem; color: var(--primary-darker); font-weight: 500; }
.policy-guarantee {
    background: #ecf8f4; border: 1px solid #c4e8dc; border-radius: var(--radius-lg);
    padding: 1.25rem; text-align: center; margin-top: 1.5rem;
}
.policy-guarantee i { font-size: 2rem; color: var(--success-green); margin-bottom: 0.5rem; }
.policy-guarantee h4 { font-size: 1rem; color: #0a6e55; margin-bottom: 0.25rem; }
.policy-guarantee p { font-size: 0.8125rem; color: #0d7e61; }

/* === FOOTER === */
.footer {
    background: linear-gradient(180deg, #f3f7fb 0%, #e9f0f7 100%);
    border-top: 1px solid var(--border-subtle);
    color: var(--gray-500); padding: 3.5rem 0 2rem;
    margin-top: var(--space-8); font-size: var(--font-size-sm);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute; top: -1px; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent 5%, rgba(11, 81, 145, 0.45) 50%, transparent 95%);
}
.footer a { color: var(--primary-dark); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.footer a:hover { text-decoration: none; }
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem; margin-bottom: 2rem;
}
.footer-col h4 {
    color: var(--gray-700); font-size: 0.8125rem; font-weight: 700; margin-bottom: 1rem;
    text-transform: uppercase; letter-spacing: 0.14em; position: relative; padding-bottom: 0.625rem;
    font-family: var(--font-mono);
}
.footer-col h4::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 24px; height: 2px; background: var(--primary); border-radius: 1px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
    color: var(--gray-600); font-size: 0.8125rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    position: relative; display: inline-block;
}
.footer-col ul li a::after {
    content: ''; position: absolute; bottom: -1px; left: 0;
    width: 0; height: 1px; background: var(--primary); transition: width 0.25s ease;
}
.footer-col ul li a:hover { color: var(--primary-dark); padding-left: 4px; text-decoration: none; }
.footer-col ul li a:hover::after { width: 100%; }
.footer-col p { font-size: 0.8125rem; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid rgba(16, 48, 77, 0.12); padding-top: 2rem;
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
}
.footer-bottom p { font-size: 0.75rem; color: var(--gray-500); }
.footer-logo {
    display: flex; align-items: center; gap: var(--space-2);
    font-size: 1.1rem; font-weight: 800; color: var(--gray-900);
    margin-bottom: 0.75rem; text-decoration: none;
    font-family: var(--font-display);
}
.footer-logo small {
    display: block; font-size: 0.6rem; font-weight: 400;
    color: var(--gray-500); letter-spacing: 0.08em;
    font-family: var(--font-mono);
}
.footer-copyright {
    text-align: center; padding-top: 0.5rem; margin-top: 0.5rem;
    font-size: 0.7rem; color: var(--gray-500);
}
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: #ffffff; border: 1px solid var(--ink-line);
    border-radius: var(--radius-md); color: var(--gray-500);
    transition: all 0.25s ease;
}
.footer-social a:hover {
    background: var(--primary); color: #ffffff; border-color: var(--primary);
    transform: translateY(-3px); box-shadow: 0 6px 14px -6px rgba(11, 81, 145, 0.45);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(11, 81, 145, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(11, 81, 145, 0); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.loading { text-align: center; padding: var(--space-8); color: var(--gray-500); }
.loading-spinner {
    width: 40px; height: 40px; border: 3px solid var(--gray-200);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto var(--space-4);
}

/* Skeleton shimmer on light */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, #f7fafd 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === RESPONSIVE BASE === */
@media (max-width: 640px) {
    .header-content { flex-wrap: nowrap; }
    .modal-content { max-width: 100%; margin: var(--space-2); }
    .modal-body { padding: var(--space-3); }
    .modal-header { padding: var(--space-3) var(--space-4); }
    .page-hero h1 { word-wrap: break-word; overflow-wrap: break-word; }
}

@media (max-width: 767px) {
    .header .shipping-info { display: none; }
    .header .cart-btn.desktop-only { display: none !important; }

    body { font-size: 1rem; line-height: 1.65; -webkit-text-size-adjust: 100%; }

    .header { padding: var(--space-2) 0; }
    .header-content { gap: var(--space-2); }
    .logo-img { width: 30px; height: 30px; }
    .logo-text { font-size: 1.05rem; }
    .logo-text small { font-size: 0.55rem; }

    .search-container { width: 100%; }
    .search-input { width: 100%; min-height: 44px; }
    .search-input:focus { width: 100%; }
    .search-dropdown { left: var(--space-2); right: var(--space-2); }

    /* Touch targets */
    .cart-btn { padding: 0.625rem 1rem; min-height: 44px; font-size: 0.875rem; }
    .btn { min-height: 44px; padding: 0.625rem 1.25rem; }
    .btn-sm { min-height: 40px; padding: 0.5rem 1rem; }
    .btn-lg { min-height: 52px; padding: 0.875rem 1.5rem; }
    .modal-close { width: 44px; height: 44px; font-size: 1.125rem; }

    /* Modal bottom sheet */
    .modal { padding: 0; align-items: flex-end; }
    .modal-content {
        max-width: 100%; width: 100%; max-height: 95vh; margin: 0;
        border-radius: 12px 12px 0 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .modal-header {
        padding: var(--space-4); border-radius: 12px 12px 0 0;
        position: sticky; top: 0; z-index: 2;
    }
    .modal-body { padding: var(--space-4); overflow-y: auto; -webkit-overflow-scrolling: touch; }

    /* Notification toast full width */
    .notification-toast { right: var(--space-3); left: var(--space-3); top: auto; bottom: var(--space-3); }
    .toast-content { width: 100%; min-width: unset; max-width: unset; }

    /* Larger icons */
    i.fa, i.fas, i.far, i.fab { font-size: 1.125em; }

    /* Improve text contrast */
    .text-gray-500 { color: var(--gray-600); }

    /* Page hero */
    .page-hero { padding: 1.75rem 0 1.5rem; }
    .page-hero h1 { font-size: 1.5rem; }
    .page-hero p { font-size: 0.9rem; }

    /* Footer */
    .footer { padding: 2rem 0 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-col h4 { font-size: 0.875rem; margin-bottom: 0.875rem; }
    .footer-col ul li a { padding: 0.5rem 0; font-size: 0.875rem; display: block; min-height: 44px; line-height: 2.4; }
    .footer-col p { font-size: 0.875rem; line-height: 1.65; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 0.75rem; }
    .footer-bottom p { font-size: 0.8125rem; }
    .footer-social { justify-content: center; }
    .footer-social a { width: 44px; height: 44px; font-size: 1.125rem; }
}

/* === EMAIL CAPTURE POPUP === */
.email-capture-code-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--primary-50);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    margin-top: var(--space-3);
}
.email-capture-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-xs);
    font-weight: 600;
    transition: background var(--transition-fast);
    min-height: 36px;
}
.email-capture-copy-btn:hover { background: var(--primary-dark); }

/* === TELEGRAM REPS MODAL === */
.tg-reps-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.tg-rep-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    min-height: 44px;
}
.tg-rep-card:hover {
    background: rgba(34, 158, 217, 0.08);
    border-color: #229ED9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.tg-rep-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #229ED9, #1a8bc7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.tg-rep-info {
    flex: 1;
}
.tg-rep-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--gray-800);
}
.tg-rep-handle {
    font-size: var(--font-size-xs);
    color: #1a8bc7;
    font-weight: 500;
}
.tg-rep-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: #229ED9;
    color: white;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
    min-height: 36px;
}
.tg-rep-card:hover .tg-rep-btn {
    background: #1a8bc7;
}

/* === WAREHOUSE BUTTON === */
.warehouse-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-darker);
    transition: all 0.15s;
}
.warehouse-btn:hover {
    background: var(--primary-100);
    border-color: var(--primary);
}
@media (max-width: 768px) {
    .warehouse-btn .warehouse-btn-name { display: none; }
}

/* Performance */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
    .modal-content { will-change: transform; }
    .notification-toast { will-change: transform; }
    .modal-close:hover { transform: none; }
    .footer-social a:hover { transform: none; }
}

@media (max-width: 767px) {
    .trust-bar-inner { gap: 0.75rem; }
    .trust-bar-item { font-size: 0.7rem; }
    .trust-bar-item:nth-child(n+4) { display: none; }
}
@media (max-width: 479px) {
    .modal-header { padding: var(--space-3) var(--space-4); }
    .modal-title { font-size: var(--font-size-base); }
    .btn { width: 100%; }
    .btn-lg { padding: 0.75rem 1.25rem; font-size: var(--font-size-base); }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 359px) {
    .modal-header { padding: var(--space-3); }
    .modal-body { padding: var(--space-3); }
    .container { padding: 0 var(--space-3); }
    .logo-text { font-size: 0.95rem; }
    .logo-text small { font-size: 0.55rem; }
    .header { padding: var(--space-1) 0; }
}

/* ========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ======================================================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-top: 1px solid var(--ink-line);
        box-shadow: 0 -6px 24px rgba(16, 42, 67, 0.10);
        z-index: 1500;
        padding: 4px 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 0;
        text-decoration: none;
        color: var(--gray-500);
        font-size: 0.65rem;
        font-weight: 500;
        transition: color 0.15s;
        position: relative;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item i {
        font-size: 1.1rem;
    }

    .bottom-nav-item.active {
        color: var(--primary-dark);
        font-weight: 600;
    }

    .bottom-nav-item:active {
        color: var(--primary);
    }

    .bottom-nav-badge {
        position: absolute;
        top: 2px;
        right: 50%;
        transform: translateX(12px);
        background: var(--error-red);
        color: #ffffff;
        font-size: 0.6rem;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        border-radius: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
    }

    .bottom-nav-badge:empty,
    .bottom-nav-badge[data-count="0"] {
        display: none;
    }

    /* Add bottom padding to body so content isn't hidden behind nav */
    body {
        padding-bottom: 64px;
    }

    /* Hide footer social on mobile — bottom nav replaces it */
    .footer { padding-bottom: 20px; }
}

/* === REPORT LIGHTBOX === */
.report-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(13, 33, 53, 0.88);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.report-lightbox.active { display: flex; }
.report-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    border: none;
    transition: background 0.2s;
    z-index: 1;
}
.report-lightbox-close:hover { background: rgba(255,255,255,0.25); }
.report-lightbox-img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 60px rgba(13, 33, 53, 0.7);
    cursor: default;
    background: #fff;
}
.report-lightbox-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.report-lightbox-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    font-family: var(--font-mono);
}
.report-lightbox-verify {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.report-lightbox-verify:hover { background: var(--primary-dark); }
