/* ==========================================
   RESQ STORE - PREMIUM INDUSTRIAL PRECISION
   Clean, Trustworthy, High-End Hardware Aesthetic
   
   TABLE OF CONTENTS
   1.  CSS Variables (Light + Dark Theme)
   2.  Global Reset & Typography
   3.  Header & Navigation (3-Bar Sticky + Vibrant Dark Glass)
   4.  Hero Section (Banner + Search + Glow Effects)
   5.  Sidebar Filters
   6.  Product Cards & Grid
   7.  Product Detail Page
   8.  Footer
   9.  Mobile Bottom Navigation
   10. Utility Classes & Animations
   11. Live Search Dropdown
   12. Variation Pills
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================
   1. CSS VARIABLES
   ========================================== */
:root {
    --rms-green: #047857;
    --rms-green-dark: #065F46;
    --rms-green-light: rgba(4, 120, 87, 0.08);
    --rms-green-glow: rgba(4, 120, 87, 0.15);
    
    /* Premium Light Theme - Warm Stone + Deep Emerald */
    --bg-main: #FAFAF9;
    --bg-card: #FFFFFF;
    --bg-sidebar: #F5F5F4;
    --bg-elevated: #FFFFFF;
    --bg-input: #FFFFFF;
    --text-primary: #1C1917;
    --text-secondary: #57534E;
    --text-muted: #78716C;
    --text-inverse: #FFFFFF;
    --border: #E7E5E4;
    --border-strong: #D6D3D1;
    --border-focus: #047857;
    --accent: #047857;
    --accent-hover: #065F46;
    --accent-subtle: rgba(4, 120, 87, 0.06);
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.08);
    --warning: #D97706;
    --warning-bg: rgba(217, 119, 6, 0.08);
    --danger: #DC2626;
    --danger-bg: rgba(220, 38, 38, 0.08);
    --whatsapp: #25D366;
    --whatsapp-hover: #128C7E;
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(28, 25, 23, 0.07), 0 2px 4px -2px rgba(28, 25, 23, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(28, 25, 23, 0.08), 0 4px 6px -4px rgba(28, 25, 23, 0.04);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --nav-height: 60px;
    --bottom-nav-height: 64px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg-main: #18181B;
    --bg-card: #27272A;
    --bg-sidebar: #1F1F23;
    --bg-elevated: #27272A;
    --bg-input: #27272A;
    --text-primary: #FAFAF9;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --text-inverse: #18181B;
    --border: #3F3F46;
    --border-strong: #52525B;
    --border-focus: #D97706;
    --accent: #D97706;
    --accent-hover: #B45309;
    --accent-subtle: rgba(217, 119, 6, 0.1);
    --success: #34D399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #FBBF24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #F87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   2. GLOBAL RESET & TYPOGRAPHY
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background-color var(--transition), color var(--transition);
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    font-size: 15px;
}
@media (min-width: 768px) { body { padding-bottom: 0; } }

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

/* ==========================================
   3. HEADER & NAVIGATION (3-Bar Sticky + Vibrant Dark Glass)
   ========================================== */
.store-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border);
    height: auto;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition), border-color var(--transition);
}

/* --- Logo --- */
.brand-logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.brand-logo .logo-res { color: var(--text-primary) !important; }
.brand-logo .logo-q { color: var(--accent) !important; }
.brand-logo .logo-movil { color: var(--text-secondary) !important; font-weight: 500 !important; opacity: 0.9 !important; }
.brand-logo .logo-icon { color: var(--accent) !important; margin-right: 8px !important; }

/* --- Toggle Buttons --- */
.toggle-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    cursor: pointer;
}
.toggle-btn:hover {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

/* --- Nav Links --- */
.store-header .nav-link {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}
.store-header .nav-link:hover,
.store-header .nav-link.active {
    background: var(--accent-subtle) !important;
    color: var(--accent) !important;
}

/* --- Header Layout --- */
.main-header-block .container {
    padding-top: 0.60rem !important;
    padding-bottom: 0.50rem !important;
}
.top-bar-utility { z-index: 5 !important; position: relative; }
.main-header-block { z-index: 10 !important; position: relative; overflow: visible !important; }

/* --- Search Overlap --- */
.search-overlap {
    margin-top: -24px !important;
    position: relative !important;
    z-index: 20 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
    border-radius: 50px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
}
.search-overlap input { border-radius: 50px !important; }

/* --- Header Visibility Rescue --- */
.store-header, .store-header * {
    color: var(--text-primary) !important;
    transition: color 0.2s ease !important;
}
.store-header a:hover, .store-header button:hover { color: var(--accent) !important; }
.store-header .top-bar {
    background: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-secondary) !important;
}

/* --- Vibrant Dark Glass Navbar (Dark Mode Only) --- */
[data-theme="dark"] .store-header .top-bar-utility {
    background: rgba(12, 18, 34, 0.95) !important;
    border-bottom: 1px solid rgba(16, 185, 129, 0.12) !important;
    backdrop-filter: blur(12px);
}
/* --- Light Mode Premium Header --- */
[data-theme="light"] .store-header,
html:not([data-theme="dark"]) .store-header {
    background: var(--bg-card) !important;
    box-shadow: var(--shadow-sm) !important;
    border-bottom: 1px solid var(--border) !important;
}
[data-theme="light"] .store-header .top-bar-utility,
html:not([data-theme="dark"]) .store-header .top-bar-utility {
    background: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border) !important;
}
[data-theme="light"] .store-header .main-header-block,
html:not([data-theme="dark"]) .store-header .main-header-block {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
}
[data-theme="light"] .store-header .header-nav-menu,
html:not([data-theme="dark"]) .store-header .header-nav-menu {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 2px solid var(--accent-subtle) !important;
}
[data-theme="light"] .brand-logo .logo-res,
html:not([data-theme="dark"]) .brand-logo .logo-res {
    color: var(--text-primary) !important;
    text-shadow: none !important;
}
[data-theme="light"] .brand-logo .logo-q,
html:not([data-theme="dark"]) .brand-logo .logo-q {
    color: var(--accent) !important;
    text-shadow: none !important;
}
[data-theme="light"] .brand-logo .logo-movil,
html:not([data-theme="dark"]) .brand-logo .logo-movil {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .toggle-btn,
html:not([data-theme="dark"]) .toggle-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text-secondary) !important;
}
[data-theme="light"] .toggle-btn:hover,
html:not([data-theme="dark"]) .toggle-btn:hover {
    background: var(--accent) !important;
    color: var(--text-inverse) !important;
    border-color: var(--accent) !important;
}
[data-theme="light"] .nav-link,
html:not([data-theme="dark"]) .nav-link {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active,
html:not([data-theme="dark"]) .nav-link:hover,
html:not([data-theme="dark"]) .nav-link.active {
    color: var(--accent) !important;
    background: var(--accent-subtle) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
[data-theme="light"] .search-box input,
html:not([data-theme="dark"]) .search-box input {
    background: var(--bg-sidebar) !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .live-search-dropdown,
html:not([data-theme="dark"]) .live-search-dropdown {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    backdrop-filter: none !important;
    box-shadow: var(--shadow-lg) !important;
}
[data-theme="dark"] .store-header .top-bar-utility span,
[data-theme="dark"] .store-header .top-bar-utility a { color: #94a3b8 !important; }
[data-theme="dark"] .store-header .top-bar-utility a:hover { color: #34d399 !important; text-shadow: 0 0 12px rgba(52, 211, 153, 0.4); }
[data-theme="dark"] .store-header .top-bar-utility i.text-success { color: #34d399 !important; filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.3)); }

[data-theme="dark"] .store-header .main-header-block {
    background: rgba(15, 23, 42, 0.92) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    backdrop-filter: blur(16px);
}
[data-theme="dark"] .store-header .brand-logo .logo-res { color: #ffffff !important; text-shadow: 0 0 20px rgba(255,255,255,0.15); }
[data-theme="dark"] .store-header .brand-logo .logo-q { color: #34d399 !important; text-shadow: 0 0 25px rgba(52, 211, 153, 0.5); }
[data-theme="dark"] .store-header .brand-logo .logo-movil { color: #94a3b8 !important; }

[data-theme="dark"] .store-header .search-box input {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #f1f5f9 !important;
    border-radius: 50px !important;
}
[data-theme="dark"] .store-header .search-box input::placeholder { color: #64748b !important; }
[data-theme="dark"] .store-header .search-box input:focus {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 0 20px rgba(16, 185, 129, 0.1) !important;
}
[data-theme="dark"] .store-header .search-box i { color: #34d399 !important; }

[data-theme="dark"] .store-header .toggle-btn {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .store-header .toggle-btn:hover {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .store-header .header-nav-menu {
    background: rgba(12, 18, 34, 0.95) !important;
    border-top: 1px solid rgba(255,255,255,0.04) !important;
    border-bottom: 1px solid rgba(16, 185, 129, 0.08) !important;
    backdrop-filter: blur(12px);
}
[data-theme="dark"] .store-header .nav-link { color: #94a3b8 !important; }
[data-theme="dark"] .store-header .nav-link:hover { color: #34d399 !important; background: rgba(16, 185, 129, 0.1) !important; text-shadow: 0 0 12px rgba(52, 211, 153, 0.3); }
[data-theme="dark"] .store-header .nav-link.active { color: #34d399 !important; background: rgba(16, 185, 129, 0.15) !important; box-shadow: 0 0 15px rgba(16, 185, 129, 0.1); }

/* Seamless Hero Transition */
.store-header + .hero-search,
.store-header ~ .hero-search { margin-top: 0 !important; border-top: none !important; }

/* ==========================================
   4. HERO SECTION (Vibrant + Glow Effects)
   ========================================== */
.hero-search {
    background: linear-gradient(135deg, #0c1222 0%, #162032 40%, #0f172a 100%);
    padding: 40px 0 35px;
    margin-top: calc(var(--nav-height) + 40px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}
.hero-search::before {
    content: '';
    position: absolute;
    top: -30%; right: -15%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(16,185,129,0.2) 0%, rgba(16,185,129,0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite alternate;
}
.hero-search::after {
    content: '';
    position: absolute;
    bottom: -20%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    animation: orbFloat 10s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}
.hero-search .container {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* Hero Text - Ultra White */
.brand-text-logo {
    font-size: 2.8rem !important;
    font-weight: 900 !important;
    letter-spacing: -1.5px !important;
    line-height: 1.1 !important;
    margin-bottom: 10px !important;
    color: #ffffff !important;
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.4), 0 4px 20px rgba(0,0,0,0.3);
}
.brand-text-logo .logo-q { color: #34d399 !important; text-shadow: 0 0 30px rgba(52, 211, 153, 0.6); }
.brand-text-logo .logo-movil { color: #94a3b8 !important; font-weight: 600 !important; }
.brand-intro-text { font-size: 1.2rem !important; color: #cbd5e1 !important; font-weight: 500 !important; margin-bottom: 0 !important; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem; font-weight: 700;
    margin-bottom: 24px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.2rem; font-weight: 800; line-height: 1.15;
    margin-bottom: 12px;
    color: #ffffff !important;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.hero-title .text-success { color: #34d399 !important; text-shadow: 0 0 25px rgba(52, 211, 153, 0.5); }
.hero-subtitle { font-size: 1rem; color: #94a3b8 !important; max-width: 550px; margin: 0 auto 25px; line-height: 1.6; font-weight: 500; }

/* Trust Badges - Glass Effect */
.trust-badges { display: flex; justify-content: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
.trust-item {
    display: flex; align-items: center; gap: 10px;
    color: #e2e8f0 !important; font-size: 0.9rem; font-weight: 600;
    padding: 10px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.trust-item:hover { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); transform: translateY(-2px); }
.trust-item i { color: #34d399 !important; font-size: 1.3rem; filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.4)); }

/* Quick Category Pills */
.quick-cats { margin-top: 30px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.quick-cat-label { color: #64748b !important; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 5px; }
.cat-pill-hero {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #f1f5f9 !important;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 0.88rem; font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}
.cat-pill-hero:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

/* Hero Mobile */
@media (max-width: 768px) {
    .hero-search { min-height: auto; padding: 30px 0 25px; margin-top: var(--nav-height); }
    .brand-text-logo { font-size: 1.8rem !important; }
    .brand-intro-text { font-size: 0.95rem !important; padding: 0 15px; }
    .hero-title { font-size: 1.9rem !important; margin-bottom: 12px; }
    .hero-subtitle { font-size: 0.95rem !important; margin-bottom: 25px; padding: 0 10px; }
    .trust-badges { gap: 10px; margin-top: 30px; }
    .trust-item { padding: 8px 14px; font-size: 0.78rem; }
    .quick-cats { gap: 8px; margin-top: 20px; }
    .cat-pill-hero { padding: 7px 14px; font-size: 0.8rem; }
}

/* --- Light Mode Hero: Soft Emerald Gradient --- */
[data-theme="light"] .hero-search,
html:not([data-theme="dark"]) .hero-search {
    background: linear-gradient(180deg, #ECFDF5 0%, #F0FDF4 40%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border);
}
[data-theme="light"] .hero-search::before,
html:not([data-theme="dark"]) .hero-search::before {
    background: radial-gradient(circle, rgba(4,120,87,0.08) 0%, transparent 70%);
    animation: none;
}
[data-theme="light"] .hero-search::after,
html:not([data-theme="dark"]) .hero-search::after {
    display: none;
}
[data-theme="light"] .brand-text-logo,
html:not([data-theme="dark"]) .brand-text-logo {
    color: var(--text-primary) !important;
    text-shadow: none !important;
}
[data-theme="light"] .brand-text-logo .logo-q,
html:not([data-theme="dark"]) .brand-text-logo .logo-q {
    color: var(--accent) !important;
    text-shadow: none !important;
}
[data-theme="light"] .brand-text-logo .logo-movil,
html:not([data-theme="dark"]) .brand-text-logo .logo-movil {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .brand-intro-text,
html:not([data-theme="dark"]) .brand-intro-text {
    color: var(--text-secondary) !important;
    text-shadow: none !important;
}
[data-theme="light"] .hero-badge,
html:not([data-theme="dark"]) .hero-badge {
    background: var(--rms-green-light);
    color: var(--accent);
    border-color: rgba(4, 120, 87, 0.2);
    box-shadow: none;
    backdrop-filter: none;
}
[data-theme="light"] .hero-title,
html:not([data-theme="dark"]) .hero-title {
    color: var(--text-primary) !important;
    text-shadow: none !important;
}
[data-theme="light"] .hero-title .text-success,
html:not([data-theme="dark"]) .hero-title .text-success {
    color: var(--accent) !important;
    text-shadow: none !important;
}
[data-theme="light"] .hero-subtitle,
html:not([data-theme="dark"]) .hero-subtitle {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .trust-item,
html:not([data-theme="dark"]) .trust-item {
    color: var(--text-secondary) !important;
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: none;
}
[data-theme="light"] .trust-item i,
html:not([data-theme="dark"]) .trust-item i {
    color: var(--accent) !important;
    filter: none;
}
[data-theme="light"] .cat-pill-hero,
html:not([data-theme="dark"]) .cat-pill-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    color: var(--text-primary) !important;
    backdrop-filter: none;
}
[data-theme="light"] .cat-pill-hero:hover,
html:not([data-theme="dark"]) .cat-pill-hero:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
    box-shadow: var(--shadow-md);
}

/* ==========================================
   5. SIDEBAR FILTERS
   ========================================== */
.filter-sidebar {
    background: var(--bg-card) !important;
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    transition: background var(--transition), border-color var(--transition);
}
.filter-sidebar h6 {
    font-weight: 700; margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.form-select, .form-control {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.875rem;
    transition: all var(--transition);
}
.form-select:focus, .form-control:focus {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px var(--accent-subtle) !important;
}
.product-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
    display: flex; flex-direction: column;
    cursor: pointer;
    height: 100%;
}
/* ==========================================
   6. PRODUCT CARDS - CLEAN PROFESSIONAL DESIGN
   ========================================== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.product-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

/* Image: Perfect Square, No Crop */
.product-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: var(--bg-sidebar);
    overflow: hidden;
    flex-shrink: 0;
}
.product-img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain; /* NEVER crops - fits entire product */
    padding: 12px; /* Breathing room around product */
    transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

/* Emoji Placeholder (matches image container exactly) */
.emoji-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
[data-theme="dark"] .emoji-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.emoji-icon { font-size: 3.5rem; line-height: 1; }

/* Card Body: Flexible, Never Crops */
.product-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-brand {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 700;
}

.product-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.1em; /* Prevents layout shift */
}
[data-theme="dark"] .product-title { color: #f1f5f9; }
.product-card:hover .product-title { color: var(--accent); }

.product-model {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price Row: Always Pinned to Bottom */
.product-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
}

.price-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.price-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1;
}
.price-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
    white-space: nowrap;
}

.stock-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}
.stock-in { color: var(--success); background: var(--success-bg); }
.stock-out { color: var(--danger); background: var(--danger-bg); }

/* Variation Pills (Compact) */
.variations-mini { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 0.15rem; }
.var-pill {
    font-size: 0.6rem; font-weight: 600;
    padding: 2px 6px; border-radius: 10px;
    background: var(--bg-sidebar); border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    transition: all 0.2s; line-height: 1.2;
}
.var-pill:hover, .var-pill.active {
    background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ==========================================
   7. PRODUCT DETAIL PAGE
   ========================================== */
.product-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: background var(--transition), border-color var(--transition);
}
.product-image-wrap {
    background: var(--bg-sidebar);
    aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
    transition: background var(--transition);
}
.product-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }

.product-info { padding: 2rem; }
.product-info .product-brand { font-size: 0.75rem; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.product-info .product-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 1rem; line-height: 1.2; letter-spacing: -0.03em; color: var(--text-primary); }

.price-display { font-size: 2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 1.5rem; letter-spacing: -0.03em; }

.quality-label { font-size: 0.75rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }
.quality-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.quality-pill {
    padding: 0.5rem 1rem; border-radius: var(--radius-full);
    border: 1px solid var(--border-strong); background: transparent;
    color: var(--text-primary); font-weight: 600; font-size: 0.8rem;
    cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.quality-pill:hover:not(.out-of-stock) { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
.quality-pill.active { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }
.quality-pill.out-of-stock { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }

.stock-badge { font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 1.25rem; padding: 0.35rem 0.7rem; border-radius: var(--radius-full); }
.stock-in { color: var(--success); background: var(--success-bg); }
.stock-low { color: var(--warning); background: var(--warning-bg); }
.stock-out { color: var(--danger); background: var(--danger-bg); }

.btn-action {
    width: 100%; padding: 0.85rem; border-radius: var(--radius);
    font-weight: 700; font-size: 0.95rem; text-align: center;
    border: none; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-family: inherit; cursor: pointer;
}
.btn-wa { background: var(--whatsapp); color: white; }
.btn-wa:hover { background: var(--whatsapp-hover); color: white; }

.specs-table {
    background: var(--bg-elevated); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 1.25rem; margin-top: 1.5rem;
}
.specs-table h5 { font-weight: 700; margin-bottom: 0.85rem; color: var(--text-primary); font-size: 0.95rem; }
.spec-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
.spec-value { font-weight: 600; text-align: right; color: var(--text-primary); font-size: 0.85rem; }

/* ==========================================
   8. FOOTER
   ========================================== */
.store-footer {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border);
    padding: 2rem 0 1.5rem; margin-top: 3rem;
}
.resq-footer {
    background: var(--bg-sidebar) !important;
    color: var(--text-secondary) !important;
    padding: 60px 0 0 !important; margin-top: 80px !important;
}
.resq-footer h5 { color: var(--text-primary) !important; font-weight: 700 !important; margin-bottom: 20px !important; font-size: 1.1rem !important; }
.resq-footer a { color: var(--text-secondary) !important; text-decoration: none !important; transition: color 0.2s !important; display: block !important; margin-bottom: 10px !important; }
.resq-footer a:hover { color: var(--rms-green) !important; }
.footer-social a {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    width: 40px !important; height: 40px !important;
    background: var(--bg-card) !important; border-radius: 50% !important;
    margin-right: 10px !important; font-size: 1.2rem !important;
    transition: all 0.3s !important; color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
}
.footer-social a:hover { background: var(--rms-green) !important; color: white !important; border-color: var(--rms-green) !important; transform: translateY(-3px) !important; }
.footer-bottom { border-top: 1px solid var(--border) !important; margin-top: 40px !important; padding: 20px 0 !important; font-size: 0.9rem !important; color: var(--text-muted) !important; }

/* --- Light Mode Footer: Visible Logo & Text --- */
[data-theme="light"] .resq-footer,
html:not([data-theme="dark"]) .resq-footer {
    background: #F5F5F4 !important;
    color: var(--text-secondary) !important;
    border-top: 1px solid var(--border);
}
[data-theme="light"] .resq-footer h5,
html:not([data-theme="dark"]) .resq-footer h5 {
    color: var(--text-primary) !important;
}
[data-theme="light"] .resq-footer a,
html:not([data-theme="dark"]) .resq-footer a {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .resq-footer a:hover,
html:not([data-theme="dark"]) .resq-footer a:hover {
    color: var(--accent) !important;
}
[data-theme="light"] .footer-social a,
html:not([data-theme="dark"]) .footer-social a {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text-secondary) !important;
}
[data-theme="light"] .footer-social a:hover,
html:not([data-theme="dark"]) .footer-social a:hover {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}
[data-theme="light"] .footer-bottom,
html:not([data-theme="dark"]) .footer-bottom {
    border-top: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
}
/* Ensure any logo text/image in footer is visible */
[data-theme="light"] .resq-footer .brand-logo,
[data-theme="light"] .resq-footer .brand-text-logo,
html:not([data-theme="dark"]) .resq-footer .brand-logo,
html:not([data-theme="dark"]) .resq-footer .brand-text-logo {
    color: var(--text-primary) !important;
}
[data-theme="light"] .resq-footer .brand-logo .logo-q,
html:not([data-theme="dark"]) .resq-footer .brand-logo .logo-q {
    color: var(--accent) !important;
}

/* ==========================================
   9. MOBILE BOTTOM NAVIGATION
   ========================================== */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border);
    display: flex !important;
    justify-content: space-around; align-items: center;
    z-index: 9999 !important;
    padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 768px) { .mobile-bottom-nav { display: none !important; } }

.nav-item-mobile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.6rem; font-weight: 600;
    flex: 1; height: 100%;
    transition: color var(--transition); position: relative;
}
.nav-item-mobile i { font-size: 1.3rem; margin-bottom: 2px; transition: color var(--transition); }
.nav-item-mobile.active, .nav-item-mobile:hover { color: var(--accent); }
.nav-item-mobile.active::after {
    content: ''; position: absolute; top: 0;
    width: 24px; height: 2px;
    background: var(--accent); border-radius: 0 0 2px 2px;
}

/* ==========================================
   10. UTILITY CLASSES & ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease backwards; }

/* ==========================================
   11. LIVE SEARCH DROPDOWN
   ========================================== */
.live-search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    margin-top: 8px; z-index: 1000;
    display: none; overflow: hidden;
}
.live-search-dropdown.active { display: block; animation: fadeInUp 0.2s ease; }
.search-result-item {
    display: flex; align-items: center; gap: 15px;
    padding: 12px 16px; text-decoration: none;
    color: var(--text-primary); transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-sidebar); color: var(--accent); }
.search-result-emoji { font-size: 1.5rem; width: 40px; text-align: center; }
.search-result-info { flex: 1; }
.search-result-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.search-result-price { font-size: 0.8rem; color: var(--accent); font-weight: 700; }

/* Dark Mode Search Dropdown */
[data-theme="dark"] .live-search-dropdown {
    background: rgba(15, 23, 42, 0.97) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(20px);
}
[data-theme="dark"] .search-result-item { color: #e2e8f0 !important; border-bottom: 1px solid rgba(255,255,255,0.05) !important; }
[data-theme="dark"] .search-result-item:hover { background: rgba(16, 185, 129, 0.1) !important; color: #34d399 !important; }
[data-theme="dark"] .search-result-price { color: #34d399 !important; }

/* ==========================================
   12. VARIATION PILLS
   ========================================== */
.variations-mini { display: flex; flex-wrap: wrap; gap: 4px; }
.var-pill {
    background: var(--bg-sidebar); border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.65rem; font-weight: 600;
    padding: 3px 8px; border-radius: 20px;
    cursor: pointer; transition: all 0.2s; line-height: 1.2;
}
.var-pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.var-pill.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }/* ═══════════════════════════════════════════════
   THEME COMPLIANCE OVERRIDES v3.1
   Fixes conflicts between CSS vars and hardcoded colors
   MUST BE LAST IN FILE
   ═══════════════════════════════════════════════ */

/* 1. IMAGE LOGO: Kill all text-logo color rules for img tags */
#main-logo,
.brand-logo img {
    color: transparent !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    height: 38px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
}

/* 2. HEADER: Force theme-aware backgrounds */
[data-theme="dark"] .store-header .main-header-block,
[data-theme="dark"] .store-header .header-nav-menu {
    background: var(--bg-card) !important;
}
[data-theme="light"] .store-header .main-header-block,
[data-theme="light"] .store-header .header-nav-menu,
html:not([data-theme="dark"]) .store-header .main-header-block,
html:not([data-theme="dark"]) .store-header .header-nav-menu {
    background: var(--bg-card) !important;
}

/* 3. FOOTER: Always dark, ignore light theme overrides */
.resq-footer,
[data-theme="light"] .resq-footer,
html:not([data-theme="dark"]) .resq-footer {
    background: #0f172a !important;
    color: #94a3b8 !important;
}
.resq-footer h5,
.resq-footer h4,
[data-theme="light"] .resq-footer h5,
html:not([data-theme="dark"]) .resq-footer h5 {
    color: #fff !important;
}
.resq-footer a,
[data-theme="light"] .resq-footer a,
html:not([data-theme="dark"]) .resq-footer a {
    color: #94a3b8 !important;
}
.resq-footer a:hover,
[data-theme="light"] .resq-footer a:hover,
html:not([data-theme="dark"]) .resq-footer a:hover {
    color: #10b981 !important;
}
/* Kill footer text-logo color rules entirely */
.resq-footer .brand-logo *,
.resq-footer .brand-text-logo *,
[data-theme="light"] .resq-footer .brand-logo *,
html:not([data-theme="dark"]) .resq-footer .brand-text-logo * {
    color: inherit !important;
    text-shadow: none !important;
}

/* 4. MOBILE NAV: Respect theme variables */
.mobile-bottom-nav {
    background: var(--bg-card) !important;
    border-top-color: var(--border) !important;
}
.mobile-bottom-nav .nav-item {
    color: var(--text-muted) !important;
}
.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--accent) !important;
}

/* 5. BODY PADDING: Prevent content hidden behind fixed elements */
@media (max-width: 767.98px) {
    body { padding-bottom: 70px !important; }
}