/* ==========================================================================
   Nexsky Base Styles – corrected version
   Changes:
   1. Removed `html { font-size: 16px !important; … }` to restore user zoom
   2. Added `.announcement-bar.clickable { cursor: pointer; }`
   3. Polished mega‑menu and mobile category accordion sheet
   4. Added safe‑area support, modern accordion animation, focus states,
      OS‑level motion preference, fixed Parastoo bold font, color‑variable
      cleanup, and mega‑menu hover delay.
   5. Mobile bottom nav redesigned as floating glass island with rounded
      corners and margins. Respects lite‑mode (reduced visual effects).
   6. Footer z‑index fix: stays behind all overlays and sticky elements.
   7. Font changed to IRANSans (six weights).
   8. Floating island navbar for a more cohesive, premium look.
   ========================================================================== */

/* ---------- IRANSans Web Font ---------- */
@font-face {
  font-family: 'IRANSans';
  src: url("/static/fonts/iransans/IRANSansWeb_UltraLight.068169d2ab5f.woff2") format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSans';
  src: url("/static/fonts/iransans/IRANSansWeb_Light.f7e4be98d20e.woff2") format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSans';
  src: url("/static/fonts/iransans/IRANSansWeb.0b5055ac3573.woff2") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSans';
  src: url("/static/fonts/iransans/IRANSansWeb_Medium.9c66b762719d.woff2") format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSans';
  src: url("/static/fonts/iransans/IRANSansWeb_Bold.43a0ecf3c7f2.woff2") format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSans';
  src: url("/static/fonts/iransans/IRANSansWeb_Black.f477dd9634c9.woff2") format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
/* ---------------------------------------- */

:root {
    --bg: #02040a;
    --bg-secondary: rgba(10, 14, 29, 0.95);
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --primary: #00f0ff;
    --primary-light: #60f3ff;
    --primary-dark: #0698d6;
    --accent: #8a2be2;
    --accent-light: #a855f7;
    --accent-dark: #6d28d9;
    --cyan: #22d3ee;
    --cyan-light: #7dd3fc;
    --rose: #ff0055;
    --text: #eef2ff;
    --text-secondary: rgba(238, 242, 255, 0.72);
    --text-muted: rgba(238, 242, 255, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.16);
    --font-heading: 'IRANSans', 'Tahoma', 'Arial', sans-serif;
    --font-body: 'IRANSans', 'Tahoma', 'Arial', sans-serif;
    --fs-1: clamp(2rem, 3.2vw, 2.8rem);
    --fs-2: clamp(1.45rem, 2.2vw, 1.9rem);
    --fs-3: 1.2rem;
    --fs-body: 0.95rem;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 14px;
    --space-lg: 20px;
    --space-xl: 40px;
    --container-width: 1200px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 40px rgba(59,130,246,0.12), 0 0 80px rgba(59,130,246,0.05);
    --shadow-glow-cyan: 0 0 40px rgba(6,182,212,0.12), 0 0 80px rgba(6,182,212,0.05);
    --transition-fast: 0.2s ease;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-smooth: 0.5s cubic-bezier(0.22,1,0.36,1);
    --bottom-nav-height: 64px;
    --navbar-height: 72px;
}

body.light-mode {
    --bg: #f1f5f9;
    --bg-secondary: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --shadow-glow: 0 0 30px rgba(59,130,246,0.15);
    --shadow-glow-cyan: 0 0 30px rgba(6,182,212,0.15);
    --primary: #0698d6;
    --primary-light: #0ea5e9;
    --primary-dark: #0369a1;
}

body.light-mode .nav-logo .logo-icon {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
}

body.light-mode .nav-icon-btn {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.03);
}

body.light-mode .announcement-bar .banner-close {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.2);
    color: var(--text);
}

body.light-mode .mobile-profile {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .mobile-theme-toggle {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.12);
    color: var(--text);
}

body.light-mode .mobile-nav-links a:hover,
body.light-mode .mobile-nav-links button:hover {
    background: rgba(0,0,0,0.04);
    color: var(--text);
}

body.light-mode .footer-socials a {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.12);
    color: var(--text);
}

body.light-mode .sheet-handle {
    background: rgba(0,0,0,0.2);
}

* { margin:0; padding:0; box-sizing:border-box; }
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius:3px; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0;
    background:
        radial-gradient(circle at 18% 10%, rgba(0,240,255,0.12), transparent 18%),
        radial-gradient(circle at 84% 15%, rgba(255,0,85,0.12), transparent 20%),
        radial-gradient(circle at 50% 80%, rgba(138,43,226,0.08), transparent 22%),
        var(--bg);
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.4s ease;
    position: relative;
    padding-bottom: 0;
}

h1, h2, h3, h4, h5, h6, p, a, span, button, input, textarea, label, div, li {
    font-family: var(--font-body) !important;
}

/* ==================== ACCESSIBILITY & FOCUS ==================== */
:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* ==================== MOTION PREFERENCE ==================== */
@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;
    }
}

/* ==================== BACKGROUND ORBS ==================== */
.bg-orbs,
.bg-orbs::before,
.bg-orbs::after,
.bg-orb {
    display: none !important;
    animation: none !important;
    transform: none !important;
}

.nav-icon-btn.active {
    background: rgba(0, 240, 255, 0.14);
    color: var(--primary-light);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.16);
}

.auth-link,
.lite-mode-toggle {
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.auth-link:hover,
.lite-mode-toggle:hover,
.lite-mode-toggle.active {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.24);
    color: var(--text);
    transform: translateY(-1px);
}

body.light-mode .auth-link,
body.light-mode .lite-mode-toggle {
    color: var(--text);
    background: rgba(15,23,42,0.06);
    border-color: rgba(15,23,42,0.12);
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}

body.light-mode .auth-link:hover,
body.light-mode .lite-mode-toggle:hover,
body.light-mode .lite-mode-toggle.active {
    color: var(--text);
    background: rgba(15,23,42,0.08);
    border-color: rgba(15,23,42,0.16);
}

body.light-mode .lite-mode-toggle.active {
    background: rgba(0, 240, 255, 0.16);
    border-color: rgba(0, 240, 255, 0.32);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.12);
}

.lite-mode-toggle.active {
    background: rgba(0, 240, 255, 0.16);
    border-color: rgba(0, 240, 255, 0.32);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.16);
}

body.reduced-visual-effects {
    background: var(--bg);
}

body.reduced-visual-effects .bg-orbs,
body.reduced-visual-effects .bg-orbs::before,
body.reduced-visual-effects .bg-orbs::after,
body.reduced-visual-effects .bg-orb,
body.reduced-visual-effects .announcement-bar::before,
body.reduced-visual-effects .announcement-bar::after,
body.reduced-visual-effects .hero-floating-card,
body.reduced-visual-effects .conicSpin,
body.reduced-visual-effects .slowSpin,
body.reduced-visual-effects .gradientShift,
body.reduced-visual-effects .floatAura,
body.reduced-visual-effects .orbFloat {
    animation: none !important;
    transition: none !important;
}

body.reduced-visual-effects .announcement-bar,
body.reduced-visual-effects .announcement-bar::before,
body.reduced-visual-effects .announcement-bar::after,
body.reduced-visual-effects .mobile-nav,
body.reduced-visual-effects .search-overlay,
body.reduced-visual-effects .category-sheet,
body.reduced-visual-effects .mega-menu,
body.reduced-visual-effects .newsletter-card,
body.reduced-visual-effects .campaign-card,
body.reduced-visual-effects .navbar,
body.reduced-visual-effects .bottom-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.reduced-visual-effects .bottom-nav {
    background: rgba(0, 0, 0, 0.85);       /* solid fallback for lite mode */
}

body.light-mode.reduced-visual-effects .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
}

body.reduced-visual-effects .navbar,
body.reduced-visual-effects .navbar::before,
body.reduced-visual-effects .navbar::after {
    animation: none !important;
}

body.reduced-visual-effects .navbar {
    background: rgba(0, 0, 0, 0.92);
}

body.light-mode.reduced-visual-effects .navbar {
    background: rgba(255, 255, 255, 0.96);
}

body.reduced-visual-effects .bg-orbs::before,
body.reduced-visual-effects .bg-orbs::after {
    filter: blur(20px) !important;
    opacity: 0.08 !important;
}

body.reduced-visual-effects .bg-orb {
    filter: blur(40px) !important;
    opacity: 0.1 !important;
}

body.reduced-visual-effects .emoji-bg,
body.reduced-visual-effects .product-card,
body.reduced-visual-effects .product-card:hover,
body.reduced-visual-effects .product-card:hover .card-img-inner,
body.reduced-visual-effects .subcat-card,
body.reduced-visual-effects .subcat-card:hover,
body.reduced-visual-effects .blog-pattern,
body.reduced-visual-effects .articles-hero::before,
body.reduced-visual-effects .blog-card,
body.reduced-visual-effects .blog-card:hover,
body.reduced-visual-effects .blog-body,
body.reduced-visual-effects .read-more,
body.reduced-visual-effects .read-more:hover {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

body.reduced-visual-effects .announcement-bar {
    background: rgba(0, 0, 0, 0.92);
}

body.light-mode.reduced-visual-effects .announcement-bar {
    background: rgba(255, 255, 255, 0.96);
}

/* ===== Luxury Announcement Bar ===== */
.announcement-bar {
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    color: var(--text);
    text-align: center;
    position: relative;
    z-index: 102;
    overflow: hidden;
    height: 0;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
}

body.light-mode .announcement-bar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    color: var(--text);
}

.announcement-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 240, 255, 0.15) 0%,
        rgba(138, 43, 226, 0.1) 25%,
        rgba(255, 0, 85, 0.08) 50%,
        rgba(0, 240, 255, 0.05) 75%,
        rgba(138, 43, 226, 0.1) 100%
    );
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    z-index: 0;
}

.announcement-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--primary) 20%,
        var(--accent-light) 50%,
        var(--primary) 80%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.announcement-bar.visible {
    height: 56px;
    padding: 0 48px 0 20px;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15),
                inset 0 1px 0 rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.announcement-bar.visible::after {
    opacity: 1;
}

.announcement-bar.clickable {
    cursor: pointer;
}

.announcement-bar .banner-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
    position: relative;
    z-index: 1;
    color: var(--text);
    letter-spacing: 0.2px;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

body.light-mode .announcement-bar .banner-text {
    color: var(--text);
    text-shadow: 0 0 12px rgba(6,152,214,0.2);
}

.announcement-bar .banner-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.9;
    transition: all 0.3s;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-bar .banner-close:hover {
    opacity: 1;
    background: rgba(255, 0, 85, 0.2);
    border-color: var(--rose);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.3);
}

.banner-nav-dots {
    display: flex;
    gap: 8px;
    margin-left: 12px;
    position: relative;
    z-index: 1;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 8px rgba(0,240,255,0.2);
}

.banner-dot.active {
    background: #fff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
    transform: scale(1.3);
}

.main-container { position:relative; z-index:1; width:100%; max-width:none; margin:0; padding:0 clamp(1rem, 2.5vw, 2rem); }

/* ============ FLOATING ISLAND NAVBAR ============ */
.navbar {
    position: sticky;
    top: 10px;                         /* initial floating gap */
    z-index: 100;
    height: var(--navbar-height);
    margin: 0 clamp(1rem, 2.5vw, 2rem);
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: top 0.3s ease, margin 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout style;
    will-change: transform, box-shadow;
    overflow: visible;
    isolation: isolate;
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(0, 240, 255, 0.15) 0%,
        rgba(138, 43, 226, 0.1) 25%,
        rgba(255, 0, 85, 0.08) 50%,
        rgba(0, 240, 255, 0.05) 75%,
        rgba(138, 43, 226, 0.1) 100%
    );
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    z-index: 0;
    opacity: 0.85;
}

.navbar::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--primary) 20%,
        var(--accent-light) 50%,
        var(--primary) 80%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
    border-radius: 2px;
}

.navbar.scrolled {
    top: 0;                            /* attach to top – no gap */
    margin: 0;
    border-radius: 0 0 24px 24px;
    border-color: rgba(0,240,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    background: rgba(0, 0, 0, 0.85);
}

.navbar.scrolled::after {
    opacity: 0.6;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(6,152,214,0.2);
}

.nav-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 clamp(1rem, 2.5vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo .logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s, filter 0.3s;
    background: rgba(255,255,255,0.05);
}
.nav-logo .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.nav-logo:hover .logo-icon { transform: scale(1.05); filter: drop-shadow(0 0 8px rgba(0,240,255,0.4)); }

/* Desktop nav links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    flex: 1;
    overflow: visible;
    flex-wrap: nowrap;
}
.nav-links::-webkit-scrollbar {
    display: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.25s ease, background-color 0.25s ease;
    position: relative;
    white-space: nowrap;
}
.nav-links a:hover {
    color: var(--text);
    background: rgba(0,240,255,0.06);
}
body.light-mode .nav-links a:hover {
    color: var(--primary-dark);
    background: rgba(6,152,214,0.06);
}
.nav-links a.active {
    background: rgba(0,240,255,0.1);
    color: var(--primary-light);
    font-weight: 600;
}
body.light-mode .nav-links a {
    color: var(--text-secondary);
}
body.light-mode .nav-links a.active {
    background: rgba(6,152,214,0.12);
    color: var(--primary-dark);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* Icon buttons */
.nav-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0,240,255,0.2);
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    font-size: 1rem;
    cursor: pointer;
    background-color: transparent;
    font-family: var(--font-body);
}
.nav-icon-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0,240,255,0.3);
    background: rgba(0,240,255,0.08);
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--rose);
    color: #fff;
    border-radius: 12px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Login/Register buttons */
.btn-nav {
    padding: 10px 18px;
    border-radius: 28px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: var(--font-body);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-nav-outline {
    background: transparent;
    border: 1.5px solid rgba(0,240,255,0.3);
    color: var(--text);
}
.btn-nav-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(0,240,255,0.05);
    box-shadow: 0 0 20px rgba(0,240,255,0.2);
}
.btn-nav-filled {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,240,255,0.35);
}
.btn-nav-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,240,255,0.5);
}

/* User menu dropdown */
.user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.user-menu-btn {
    background: transparent;
    border: 1.5px solid rgba(0,240,255,0.3);
    border-radius: 28px;
    color: var(--text);
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-family: var(--font-body);
    white-space: nowrap;
}
.user-menu-btn:hover {
    border-color: var(--primary);
    background: rgba(0,240,255,0.05);
    color: var(--primary-light);
    box-shadow: 0 0 20px rgba(0,240,255,0.2);
}
.user-menu-btn i { font-size: 1.1rem; }
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(8,12,22,0.96);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(0,240,255,0.15);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(0,240,255,0.1);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 200;
    direction: rtl;
    text-align: right;
}
body.light-mode .user-dropdown {
    background: rgba(255,255,255,0.97);
    border-color: rgba(6,152,214,0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: var(--font-body);
}
.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(0,240,255,0.06);
    color: var(--text);
}
body.light-mode .user-dropdown a:hover,
body.light-mode .user-dropdown button:hover {
    color: var(--primary-dark);
    background: rgba(6,152,214,0.06);
}
.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 6px 0;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.8rem;
    padding: 8px;
    transition: color 0.2s;
    flex-shrink: 0;
}
.hamburger:hover { color: var(--primary-light); }

/* ===== Default Mega Menu (blog & others) ===== */
.has-mega { position: relative; }

.has-mega::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 14px;
    z-index: 1;
}

.mega-menu {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    background: rgba(8, 12, 20, 0.97);
    border: 1px solid rgba(0,240,255,0.12);
    border-radius: 28px;
    min-width: 700px;
    padding: 28px;
    box-shadow: 0 40px 90px rgba(0,0,0,0.8), 0 0 40px rgba(0,240,255,0.15);
    z-index: 200;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px) scale(0.98);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.has-mega:not(:hover) > .mega-menu {
    transition-delay: 0.15s;
}

.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.mega-col {
    min-width: 0;
}
.mega-col h5 { color: var(--primary-light); margin-bottom: 12px; font-size: 0.95rem; font-weight: 700; }
.mega-col h5 a { color: inherit; text-decoration: none; }
.mega-col a { display: block; padding: 6px 0; color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.mega-col a:hover { color: var(--primary-light); }

body.light-mode .mega-menu {
    background: rgba(255,255,255,0.98);
    border-color: rgba(6,152,214,0.1);
    box-shadow: 0 40px 90px rgba(15,23,42,0.1);
}

/* ===== Catalog Mega Menu – Grandparent → Parent → Child (hover) ===== */
.mega-menu-catalog {
    display: flex !important;
    flex-direction: row !important;
    min-width: 800px !important;
    max-width: 1100px !important;
    padding: 0 !important;
    overflow: visible !important;
    grid-template-columns: unset !important;
    gap: unset !important;
    background: rgba(8, 12, 20, 0.97) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 28px !important;
}

.mega-menu-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow: visible;
    padding: 24px 28px;
    gap: 32px;
    direction: rtl;
}

.mega-grandparent-column {
    flex: 1;
    min-width: 180px;
}

.mega-grandparent-title {
    color: var(--primary-light);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0,240,255,0.2);
    padding-bottom: 8px;
    letter-spacing: -0.2px;
}
.mega-grandparent-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.mega-grandparent-title a:hover { color: var(--text); }

.mega-parent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-parent-item {
    position: relative;
    margin-bottom: 2px;
}

.mega-parent-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 600;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    position: relative;
}
.mega-parent-link.has-children::after {
    content: '‹';
    font-size: 1.1rem;
    color: inherit;
    margin-right: auto;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.3s ease;
}
.mega-parent-item:hover .mega-parent-link.has-children::after {
    opacity: 1;
    transform: rotate(90deg) translateX(2px);
}
.mega-parent-link:hover {
    background: rgba(0,240,255,0.08);
    color: var(--text);
    box-shadow: 0 0 12px rgba(0,240,255,0.08);
}

.mega-child-panel {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    background: rgba(8,12,22,0.96);
    border: 1px solid rgba(0,240,255,0.1);
    border-radius: 16px;
    min-width: 200px;
    max-height: 320px;
    overflow-y: auto;
    padding: 10px 0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    z-index: 10;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeSlideIn 0.2s ease;
    transition: visibility 0s 0.2s, opacity 0.2s 0.1s;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.mega-parent-item:hover .mega-child-panel,
.mega-parent-item:focus-within .mega-child-panel {
    display: block;
}

.mega-parent-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    width: 6px;
    height: 100%;
    z-index: 2;
}

.mega-child-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mega-child-list li a {
    display: block;
    padding: 9px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.mega-child-list li a:hover {
    background: rgba(0,240,255,0.08);
    color: var(--text);
}

body.light-mode .mega-menu-catalog {
    background: rgba(255,255,255,0.98) !important;
}
body.light-mode .mega-parent-link:hover {
    background: rgba(6,152,214,0.06);
    color: var(--text);
}
body.light-mode .mega-child-panel {
    background: rgba(255,255,255,0.98);
    border-color: rgba(6,152,214,0.1);
}

.mega-menu-catalog .mega-sidebar,
.mega-menu-catalog .mega-content-area,
.mega-menu-catalog .mega-content-panel,
.mega-menu-catalog .mega-col {
    display: none !important;
}

/* ==================== MOBILE BOTTOM NAVIGATION (FLOATING GLASS ISLAND) ==================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 480px;
    height: auto;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    background: rgba(10, 14, 26, 0.72);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 4px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

body.light-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Lite mode – no backdrop, simpler background */
body.reduced-visual-effects .bottom-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.85);
}

body.light-mode.reduced-visual-effects .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
}

.bottom-nav a,
.bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 52px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    gap: 2px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    border-radius: 28px;
    padding: 4px 4px;
}

.bottom-nav a.active,
.bottom-nav button.active {
    color: var(--primary-light, #00f0ff);
}

.bottom-nav a.active::before,
.bottom-nav button.active::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: rgba(0, 240, 255, 0.12);
    border-radius: 28px;
    z-index: -1;
}

.bottom-nav .nav-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.bottom-nav .cart-badge-mobile {
    position: absolute;
    top: 2px;
    right: calc(50% - 14px);
    background: var(--rose, #ff0055);
    color: #fff;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

/* Adjust body padding on mobile so content is not hidden behind the island */
@media (max-width: 768px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* ==================== MOBILE SIDE PANEL ==================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(8,12,20,0.98) 0%, rgba(3,5,10,0.98) 100%);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-left: 1px solid rgba(0,240,255,0.12);
    z-index: 200;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: -20px 0 60px rgba(0,0,0,0.8);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
body.light-mode .mobile-nav {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,245,249,0.98) 100%);
    border-left-color: rgba(6,152,214,0.2);
    box-shadow: -20px 0 60px rgba(0,0,0,0.1);
}
.mobile-nav.open { transform: translateX(0); }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(0,240,255,0.08);
    background: linear-gradient(135deg, rgba(0,240,255,0.05), rgba(138,43,226,0.05));
}
.mobile-brand { display: flex; align-items: center; gap: 8px; }
.mobile-brand .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
}
.mobile-brand .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.mobile-close {
    background: rgba(255,255,255,0.06);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.mobile-close:hover { background: rgba(255,0,85,0.15); color: var(--rose); }

.mobile-profile {
    margin: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
}
.mobile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}
.mobile-user-details { flex: 1; }
.mobile-user-name { font-weight: 700; color: var(--text); font-size: 1rem; }
.mobile-user-email { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.mobile-theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 0 20px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0,240,255,0.1);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: background 0.2s;
}
.mobile-theme-toggle:hover { background: rgba(0,240,255,0.05); }

.mobile-nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px 20px;
}
.mobile-nav-links a,
.mobile-nav-links button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: right;
    font-family: var(--font-body);
}
.mobile-nav-links a:hover,
.mobile-nav-links button:hover {
    background: rgba(0,240,255,0.06);
    color: var(--text);
}
body.light-mode .mobile-nav-links a:hover,
body.light-mode .mobile-nav-links button:hover {
    background: rgba(6,152,214,0.06);
    color: var(--text);
}
.mobile-nav-links .nav-icon { font-size: 1.3rem; width: 24px; text-align: center; }

.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 150; cursor: pointer; }
.overlay.show { display: block; }

/* ==================== SEARCH OVERLAY ==================== */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 250;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    box-sizing: border-box;
}
body.light-mode .search-overlay {
    background: rgba(255,255,255,0.95);
}
.search-overlay.show { display: flex; }
.search-overlay .close-search {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}
.search-overlay form {
    width: 100%;
    max-width: 500px;
    margin-top: 80px;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0,240,255,0.3);
    border-radius: 40px;
    overflow: hidden;
    height: 56px;
}
.search-overlay input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 0 24px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    outline: none;
}
.search-overlay button {
    background: var(--primary);
    border: none;
    color: var(--text);
    padding: 0 24px;
    height: 100%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 40px;
    margin: 4px;
    transition: background 0.2s;
}
.search-overlay button:hover { background: var(--primary-dark); }
body.light-mode .search-overlay form {
    background: rgba(0,0,0,0.05);
    border-color: rgba(6,152,214,0.3);
}
body.light-mode .search-overlay input { color: var(--text); }

/* ==================== CATEGORY BOTTOM SHEET (accordion) ==================== */
.category-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: rgba(8, 12, 22, 0.97);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    z-index: 10001;
    overflow-y: auto;
    padding: 24px 16px 32px;
    box-shadow: 0 -15px 60px rgba(0,0,0,0.9);
    flex-direction: column;
}
body.light-mode .category-sheet {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 -15px 60px rgba(0,0,0,0.08);
}
.category-sheet.show { display: flex; }
.category-sheet .sheet-handle {
    width: 48px;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    margin: 0 auto 20px;
}
.category-sheet h4 {
    color: var(--primary-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}
.close-sheet {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: var(--text);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}
.close-sheet:hover {
    background: rgba(255,0,85,0.2);
    color: var(--rose);
}

/* Accordion tree – modern grid animation, smoother transitions */
.nav-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-tree-item {
    overflow: hidden;
    position: relative;
    margin: 4px 0;
    padding-inline-start: 6px;
}
.nav-tree-item::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 999px;
    background: var(--tree-accent, rgba(255,255,255,0.25));
    opacity: 0.95;
    transition: background 0.3s;
}
.nav-tree-item.nav-tree-tone-1 { --tree-accent: #00f0ff; --tree-accent-soft: rgba(0,240,255,0.16); --tree-link-color: #eaffff; --tree-link-hover: #ffffff; }
.nav-tree-item.nav-tree-tone-2 { --tree-accent: #8a2be2; --tree-accent-soft: rgba(138,43,226,0.16); --tree-link-color: #f7f2ff; --tree-link-hover: #ffffff; }
.nav-tree-item.nav-tree-tone-3 { --tree-accent: #ff5ea8; --tree-accent-soft: rgba(255,94,168,0.16); --tree-link-color: #fff4fa; --tree-link-hover: #ffffff; }
.nav-tree-item.nav-tree-tone-4 { --tree-accent: #f59e0b; --tree-accent-soft: rgba(245,158,11,0.16); --tree-link-color: #fff9e8; --tree-link-hover: #ffffff; }
body.light-mode .nav-tree-item.nav-tree-tone-1 { --tree-accent: #0698d6; --tree-accent-soft: rgba(6,152,214,0.16); --tree-link-color: #0f172a; --tree-link-hover: #0698d6; }
body.light-mode .nav-tree-item.nav-tree-tone-2 { --tree-accent: #7c3aed; --tree-accent-soft: rgba(124,58,237,0.16); --tree-link-color: #0f172a; --tree-link-hover: #7c3aed; }
body.light-mode .nav-tree-item.nav-tree-tone-3 { --tree-accent: #db2777; --tree-accent-soft: rgba(219,39,119,0.16); --tree-link-color: #0f172a; --tree-link-hover: #db2777; }
body.light-mode .nav-tree-item.nav-tree-tone-4 { --tree-accent: #d97706; --tree-accent-soft: rgba(217,119,6,0.16); --tree-link-color: #0f172a; --tree-link-hover: #d97706; }
.nav-tree-row {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding-inline-start: 8px;
    background: linear-gradient(90deg, var(--tree-accent-soft), rgba(255,255,255,0.025));
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
}
.nav-tree-item:hover > .nav-tree-row {
    transform: translateX(-2px);
    border-color: var(--tree-accent-soft);
    box-shadow: 0 0 12px rgba(0,240,255,0.15);
}
.nav-tree-link {
    flex: 1;
    display: block;
    padding: 14px 8px;
    color: var(--tree-link-color, var(--text-secondary));
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.25s;
}
.nav-tree-link:hover {
    color: var(--tree-link-hover, var(--primary-light));
}
body.light-mode .nav-tree-row {
    background: linear-gradient(90deg, var(--tree-accent-soft), rgba(255,255,255,0.95));
    border-color: rgba(15, 23, 42, 0.1);
}
body.light-mode .nav-tree-children {
    border-inline-start-color: rgba(15, 23, 42, 0.12);
}
body.light-mode .nav-tree-link {
    color: var(--tree-link-color, var(--text-primary));
}
body.light-mode .nav-tree-link:hover {
    color: var(--tree-link-hover, var(--accent-cyan));
}

.nav-tree-toggle {
    background: none;
    border: none;
    color: var(--tree-accent, var(--text-muted));
    padding: 14px 12px;
    cursor: pointer;
    transition: color 0.2s, transform 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-tree-toggle:hover {
    color: #fff;
}
.nav-tree-item.open > .nav-tree-row .nav-tree-toggle {
    transform: rotate(-180deg);
}

.nav-tree-children {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease, opacity 0.35s ease;
    margin: 4px 0 0 8px;
    padding-inline-start: 6px;
    border-inline-start: 1px solid rgba(255,255,255,0.08);
    opacity: 0;
}
.nav-tree-children > * {
    overflow: hidden;
}
.nav-tree-item.open > .nav-tree-children {
    grid-template-rows: 1fr;
    opacity: 1;
}
.nav-tree-item.open > .nav-tree-row .nav-tree-link i {
    transform: rotate(180deg);
    transition: transform 0.3s;
}
.nav-tree-children .nav-tree-link {
    padding-right: 32px;
    font-size: 0.9rem;
    color: var(--tree-link-color, var(--text-secondary));
}
.nav-tree-children .nav-tree-children .nav-tree-link {
    padding-right: 56px;
    font-size: 0.85rem;
}

.sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
}
.sheet-backdrop.show { display: block; }

/* ==================== FOOTER (mobile‑first, fully responsive) ==================== */
.site-footer {
    position: relative;
    z-index: 0;                     /* keep footer behind all overlapping elements */
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 1.5rem);
    margin-top: clamp(2rem, 5vw, 4rem);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
}

.footer-col {
    min-width: 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}

body.light-mode .footer-logo-img {
    background: rgba(0,0,0,0.05);
}

.footer-site-name {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, padding-right 0.2s ease;
    display: inline-block;
    padding: 0.15rem 0;
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-right: 4px;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.footer-socials a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: clamp(1rem, 3vw, 1.5rem);
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .footer-col {
        text-align: center;
    }
    .footer-logo {
        justify-content: center;
    }
    .footer-socials {
        justify-content: center;
    }
    .footer-links {
        align-items: center;
    }
}

/* ==================== RESPONSIVE (global) ==================== */
@media (max-width: 1280px) {
    /* Shrink desktop links and actions when they start getting cramped */
    .nav-links a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .nav-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .btn-nav {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    .user-menu-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .auth-link,
    .lite-mode-toggle {
        padding: 0.35rem 0.6rem;
        font-size: 0.72rem;
        gap: 0.3rem;
    }
    .nav-inner {
        gap: 16px;
    }
}

@media (max-width: 1160px) {
    .nav-links {
        display: none !important;
    }
    .mega-menu {
        display: none !important;
    }
    .nav-links {display: none !important;}
    .user-menu { display: none; }
    .hamburger { display: block; }
    .nav-actions { gap: 6px; }
    .auth-link,
    .lite-mode-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .auth-link span:last-child,
    .lite-mode-toggle span:last-child {
        display: none;
    }
}

@media (min-width: 481px) and (max-width: 1160px) {
    .nav-actions {
        gap: 6px;
        flex-wrap: nowrap;
        align-items: center;
    }
    .nav-icon-btn,
    .auth-link,
    .lite-mode-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.95rem;
    }
    .nav-icon-btn i,
    .auth-link i,
    .lite-mode-toggle i {
        font-size: 1rem;
    }
    .nav-actions .btn-nav { display: none !important; }
    .nav-logo .logo-icon { width: 40px; height: 40px; }
    .nav-inner { padding: 0 14px; }
}

@media (max-width: 768px) {
    .bottom-nav { display: flex; }
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

    :root { --navbar-height: 60px; }
    .nav-inner { padding: 0 14px; }
    .nav-logo .logo-icon { width: 38px; height: 38px; }
    .nav-icon-btn { width: 36px; height: 36px; font-size: 0.95rem; }
    .mega-menu { display: none !important; }
}

@media (max-width: 480px) {
    .nav-inner { padding: 0 12px; }
    .nav-actions { gap: 4px; }
}

@media (max-width: 768px) {
    .bg-orbs::before,
    .bg-orbs::after,
    .bg-orb,
    .announcement-bar::before {
        animation: none !important;
    }
    .card-img-inner,
    .btn,
    .nav-item,
    .icon-btn,
    .hero-slide-link-text,
    .campaign-card,
    .blog-card,
    .product-card,
    .newsletter-card,
    .read-more,
    .subcat-card,
    .campaign-card {
        transition: none !important;
    }
    .product-card:hover,
    .blog-card:hover,
    .campaign-card:hover,
    .btn:hover,
    .icon-btn:hover,
    .hero-slide-link-text:hover,
    .subcat-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

body.light-mode .bottom-nav a,
body.light-mode .bottom-nav button {
    color: #1e293b;
}
body.light-mode .bottom-nav a.active,
body.light-mode .bottom-nav button.active {
    color: var(--primary-dark);
}



@media (min-width: 1161px) {
  .navbar {
    overflow: visible !important;
  }
  .nav-links {
    overflow: visible !important;
  }
}

/* Mobile nav panel moved to left side */
.mobile-nav {
  left: 0 !important;
  right: auto !important;
  border-right: 1px solid rgba(0,240,255,0.12) !important;
  border-left: none !important;
  transform: translateX(-100%) !important;
  box-shadow: 20px 0 60px rgba(0,0,0,0.8) !important;
}
.mobile-nav.open {
  transform: translateX(0) !important;
}
body.light-mode .mobile-nav {
  border-right-color: rgba(6,152,214,0.2) !important;
  border-left-color: transparent !important;
  box-shadow: 20px 0 60px rgba(0,0,0,0.1) !important;
}

/* Lite mode dark background – deep blue instead of pure black */
body.reduced-visual-effects:not(.light-mode) {
  background: #080D19 !important;
}

/* Markdown content link styling */
.article-body a,
.short-desc a,
.long-description a {
  color: var(--primary-light, #00f0ff);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-body a:hover,
.short-desc a:hover,
.long-description a:hover {
  color: var(--primary, #00f0ff);
  text-decoration-color: var(--accent-light, #a855f7);
}

body.light-mode .article-body a,
body.light-mode .short-desc a,
body.light-mode .long-description a {
  color: var(--primary-dark, #0698d6);
}

body.light-mode .article-body a:hover,
body.light-mode .short-desc a:hover,
body.light-mode .long-description a:hover {
  color: #0369a1;
}

/* AI Assistant Support Widget Styles */
.support-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}

.support-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.2s ease;
  font-family: inherit;
}

.support-tab:hover {
  background: rgba(0,240,255,0.06);
  color: var(--text, #fff);
}

.support-tab.active {
  background: rgba(0,240,255,0.12);
  border-color: rgba(0,240,255,0.3);
  color: var(--primary-light, #00f0ff);
}

.ai-support-body {
  display: flex;
  flex-direction: column;
  height: 380px;
  max-height: 380px;
  overflow: hidden;
  padding: 12px;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.ai-welcome {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.85rem;
  line-height: 1.7;
  background: rgba(0,240,255,0.06);
  padding: 12px;
  border-radius: 12px;
}

.ai-welcome i {
  color: var(--primary-light, #00f0ff);
  font-size: 1.2rem;
  margin-top: 2px;
}

.ai-message {
  display: flex;
  flex-direction: column;
}

.ai-user {
  align-items: flex-end;
}

.ai-assistant {
  align-items: flex-start;
}

.ai-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  word-break: break-word;
}

.ai-user .ai-bubble {
  background: rgba(0,240,255,0.12);
  color: var(--text, #fff);
  border-bottom-left-radius: 4px;
}

.ai-assistant .ai-bubble {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary, #e2e8f0);
  border-bottom-right-radius: 4px;
}

.ai-product-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.ai-product-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,240,255,0.2);
  background: rgba(0,240,255,0.06);
  color: inherit;
  text-decoration: none;
  transition: 0.2s ease;
}

.ai-product-card:hover {
  background: rgba(0,240,255,0.12);
  border-color: var(--primary-light, #00f0ff);
}

.ai-product-title {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-product-price {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--primary-light, #00f0ff);
  white-space: nowrap;
}

.ai-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}

.ai-chat-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  background: rgba(255,255,255,0.04);
  color: var(--text, #fff);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

.ai-chat-form input:focus {
  border-color: var(--primary-light, #00f0ff);
  box-shadow: 0 0 0 3px rgba(0,240,255,0.1);
}

.ai-chat-form button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00f0ff, #8a2be2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-form button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.ai-typing .ai-bubble span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted, #94a3b8);
  margin: 0 2px;
  animation: aiTyping 1.2s infinite;
}

.ai-typing .ai-bubble span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-typing .ai-bubble span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes aiTyping {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* AI product card image */
.ai-product-card {
  flex-direction: column;
  padding: 8px;
}

.ai-product-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 6px;
}

.ai-product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.ai-product-title {
  flex: 1;
}

.ai-product-price {
  white-space: nowrap;
}

/* Markdown styles inside AI chat */
.ai-bubble h2,
.ai-bubble h3,
.ai-bubble h4 {
  margin: 8px 0 4px;
  color: var(--text, #fff);
  line-height: 1.4;
}

.ai-bubble h2 { font-size: 1.1rem; }
.ai-bubble h3 { font-size: 1rem; }
.ai-bubble h4 { font-size: 0.95rem; }

.ai-bubble ul,
.ai-bubble ol {
  margin: 6px 0;
  padding-inline-start: 20px;
}

.ai-bubble li {
  margin-bottom: 4px;
}

.ai-bubble a {
  color: var(--primary-light, #00f0ff);
  text-decoration: underline;
}

.ai-bubble code {
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  direction: ltr;
}

.ai-bubble pre {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px;
  border-radius: 8px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}

.ai-bubble pre code {
  background: none;
  padding: 0;
}

/* Colorful Markdown styles for AI assistant messages */
.ai-bubble strong {
  color: #fbbf24;
  font-weight: 800;
}

.ai-bubble h2 {
  color: var(--primary-light, #00f0ff);
  font-weight: 900;
}

.ai-bubble h3 {
  color: var(--accent-light, #a855f7);
  font-weight: 800;
}

.ai-bubble h4 {
  color: var(--rose, #ff0055);
  font-weight: 800;
}

.ai-bubble em {
  color: #f472b6;
}

.ai-bubble a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ai-bubble li::marker {
  color: var(--primary-light, #00f0ff);
  font-weight: bold;
}

.ai-bubble blockquote {
  border-right: 3px solid var(--primary-light, #00f0ff);
  color: #cbd5e1;
  padding-right: 10px;
  margin: 8px 0;
  background: rgba(0,240,255,0.05);
  border-radius: 8px;
  padding: 6px 10px;
}

body.light-mode .ai-bubble strong {
  color: #b45309;
}

body.light-mode .ai-bubble h2 {
  color: #0369a1;
}

body.light-mode .ai-bubble h3 {
  color: #7c3aed;
}

body.light-mode .ai-bubble h4 {
  color: #be185d;
}

body.light-mode .ai-bubble a {
  color: #0284c7;
}

body.light-mode .ai-bubble li::marker {
  color: #0284c7;
}

/* Fullscreen support panel */
.support-panel.support-panel-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
}

.support-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.support-fullscreen-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.support-fullscreen-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.support-panel-fullscreen .support-body,
.support-panel-fullscreen .ai-support-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

/* AI product suggestions: horizontal cards with tiny image */
.ai-product-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.ai-product-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px !important;
}

.ai-product-img {
  width: 42px !important;
  height: 42px !important;
  aspect-ratio: auto !important;
  border-radius: 10px !important;
  margin: 0 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.ai-product-info {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

/* Fullscreen support panel */
.support-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.support-fullscreen-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.support-fullscreen-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.support-panel.support-panel-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
}

.support-panel-fullscreen .support-body,
.support-panel-fullscreen .ai-support-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  min-height: 0 !important;
}

/* AI product suggestions: horizontal cards with small image */
.ai-product-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.ai-product-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px !important;
}

.ai-product-img {
  width: 42px !important;
  height: 42px !important;
  aspect-ratio: auto !important;
  border-radius: 10px !important;
  margin: 0 !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.ai-product-info {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

/* ================= RESPONSIVE FULLSCREEN SUPPORT ================= */

/* Header button alignment */
.support-header {
  flex-wrap: nowrap !important;
}

.support-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.support-header > .support-fullscreen-btn,
.support-header > .close-panel {
  flex: 0 0 auto;
}

.support-header > .support-fullscreen-btn {
  margin-inline-start: auto;
}

.support-header > .close-panel {
  margin-inline-start: 8px;
}

/* Fullscreen layout structure */
.support-panel.support-panel-fullscreen {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.support-panel-fullscreen .support-header,
.support-panel-fullscreen .support-tabs {
  flex: 0 0 auto !important;
}

.support-panel-fullscreen .support-body,
.support-panel-fullscreen .ai-support-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

.support-panel-fullscreen .ai-support-body {
  height: auto !important;
  max-height: none !important;
}

/* Desktop / tablet: large rounded centered panel */
@media (min-width: 769px) {
  .support-panel.support-panel-fullscreen {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(920px, calc(100vw - 2rem)) !important;
    max-width: 100% !important;
    height: 90vh !important;
    max-height: 90vh !important;
    border-radius: 24px !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55) !important;
  }
}

/* Mobile: true fullscreen sheet */
@media (max-width: 768px) {
  .support-panel.support-panel-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
}

/* Clear AI memory button */
.ai-clear-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ai-clear-toolbar span {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}

.ai-clear-memory-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 85, 0.25);
  background: rgba(255, 0, 85, 0.08);
  color: #ff6b9d;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ai-clear-memory-btn:hover {
  background: rgba(255, 0, 85, 0.16);
  border-color: rgba(255, 0, 85, 0.45);
}

body.light-mode .ai-clear-memory-btn {
  border-color: rgba(190, 24, 93, 0.25);
  background: rgba(190, 24, 93, 0.07);
  color: #be185d;
}



/* =========================================================
   GLOBAL PRICE COLOR OVERRIDE
   Dark mode  -> white
   Light mode -> black
   ========================================================= */

/* Main price elements */
body:not(.light-mode) [class*="price"],
body:not(.light-mode) [class*="Price"],
body:not(.light-mode) [class*="amount"],
body:not(.light-mode) [class*="Amount"] {
  color: #ffffff !important;
}

body.light-mode [class*="price"],
body.light-mode [class*="Price"],
body.light-mode [class*="amount"],
body.light-mode [class*="Amount"] {
  color: #000000 !important;
}

/* Currency unit inherits from price parent */
body:not(.light-mode) [class*="price"] .currency,
body:not(.light-mode) [class*="Price"] .currency {
  color: inherit !important;
}

body.light-mode [class*="price"] .currency,
body.light-mode [class*="Price"] .currency {
  color: inherit !important;
}

/* Old/strikethrough prices remain readable */
body:not(.light-mode) [class*="price"] del,
body:not(.light-mode) [class*="Price"] del {
  color: rgba(255, 255, 255, 0.70) !important;
}

body.light-mode [class*="price"] del,
body.light-mode [class*="Price"] del {
  color: rgba(0, 0, 0, 0.55) !important;
}


/* =========================================================
   GLOBAL PRODUCT IMAGE FIT FIX
   Show the full product image inside its card,
   without cropping or overflowing behind card edges.
   ========================================================= */

.card-img-wrap img,
.card-img-inner img,
.showcase-img img,
.result-img,
.ai-product-img,
.cart-item-image img,
.order-item-image img,
.product-image img,
.product-gallery img,
.product-thumbnail img {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
  margin: 0 auto;
}

/* Keep the existing dark/light image box background */
.card-img-wrap,
.card-img-inner,
.showcase-img,
.product-image,
.product-gallery {
  background: var(--bg-secondary, rgba(10, 14, 29, 0.95)) !important;
}


/* =========================================================
   EXTEND BACKGROUND COLOR ORBS TO BOTTOM
   Static gradients only — no fixed elements or animations.
   ========================================================= */

body:not(.reduced-visual-effects) {
    background:
        radial-gradient(circle at 18% 10%, rgba(0,240,255,0.12), transparent 18%),
        radial-gradient(circle at 84% 15%, rgba(255,0,85,0.12), transparent 20%),
        radial-gradient(circle at 50% 80%, rgba(138,43,226,0.08), transparent 22%),
        radial-gradient(circle at 12% 88%, rgba(0,240,255,0.10), transparent 20%),
        radial-gradient(circle at 88% 90%, rgba(255,0,85,0.10), transparent 22%),
        radial-gradient(circle at 50% 100%, rgba(138,43,226,0.08), transparent 24%),
        var(--bg);
}


/* =========================================================
   EXTEND BACKGROUND COLOR ORBS TO MIDDLE
   Static gradients only — no fixed elements or animations.
   ========================================================= */

body:not(.reduced-visual-effects) {
    background:
        radial-gradient(circle at 18% 10%, rgba(0,240,255,0.12), transparent 18%),
        radial-gradient(circle at 84% 15%, rgba(255,0,85,0.12), transparent 20%),
        radial-gradient(circle at 15% 50%, rgba(0,240,255,0.10), transparent 20%),
        radial-gradient(circle at 85% 50%, rgba(255,0,85,0.10), transparent 22%),
        radial-gradient(circle at 50% 55%, rgba(138,43,226,0.08), transparent 24%),
        radial-gradient(circle at 50% 80%, rgba(138,43,226,0.08), transparent 22%),
        radial-gradient(circle at 12% 88%, rgba(0,240,255,0.10), transparent 20%),
        radial-gradient(circle at 88% 90%, rgba(255,0,85,0.10), transparent 22%),
        radial-gradient(circle at 50% 100%, rgba(138,43,226,0.08), transparent 24%),
        var(--bg);
}


/* User profile avatar in navbar/mobile */
.user-menu-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.user-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: var(--surface);
}

.mobile-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: var(--surface);
}

/* =========================================================
   PROFILE AVATAR HARD CONSTRAINTS
   ========================================================= */

.user-menu-btn {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-btn .user-menu-avatar,
.user-menu-btn img.user-menu-avatar,
.mobile-profile .mobile-avatar-img,
.mobile-profile img.mobile-avatar-img {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  flex: 0 0 28px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: inline-block !important;
  overflow: hidden !important;
  vertical-align: middle !important;
}

.mobile-profile .mobile-avatar-img,
.mobile-profile img.mobile-avatar-img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  flex: 0 0 48px !important;
  border-radius: 14px !important;
  display: block !important;
}

.mobile-profile {
  align-items: center !important;
}

/* =========================================================
   SEARCH + AI SUPPORT IMAGE SIZE FIX
   Keep these small thumbnails fixed.
   ========================================================= */
.result-img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  flex-shrink: 0 !important;
}

.ai-product-img {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  object-fit: cover !important;
  aspect-ratio: auto !important;
  border-radius: 10px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
