/* ============================================================
   BABIES PLANET — Premium 3D Luxury Theme
   Mobile-First Architecture
   Breakpoints: sm 640 | md 768 | lg 1024 | xl 1280
   ============================================================ */

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

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Playfair Display', serif;
  --bottom-nav-h: 64px;
  --header-h: 56px;
}

/* ─── Arctic Mint Theme ─────────────────────────────────── */
body.arctic-mint {
  --primary: #0ABFBC;
  --primary-light: #1AD4D1;
  --primary-dark: #088E8C;
  --primary-rgb: 10, 191, 188;
  --accent: #FF6B9D;
  --accent-rgb: 255, 107, 157;
  --bg: #F5FFFE;
  --bg2: #E8FDFB;
  --surface: #FFFFFF;
  --surface2: #F0FDFB;
  --border: rgba(10,191,188,0.18);
  --border-strong: rgba(10,191,188,0.4);
  --text: #1A2B3C;
  --text2: #3A5263;
  --text3: #6B8CA0;
  --shadow-sm: 0 4px 16px rgba(10,191,188,0.12), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-md: 0 12px 40px rgba(10,191,188,0.18), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 24px 64px rgba(10,191,188,0.25), 0 8px 24px rgba(0,0,0,0.12);
  --shadow-3d: 0 30px 80px rgba(10,191,188,0.3), 0 10px 30px rgba(0,0,0,0.15);
  --glow: 0 0 30px rgba(10,191,188,0.4);
  --gradient-primary: linear-gradient(135deg, #0ABFBC 0%, #1AD4D1 50%, #0ABFBC 100%);
  --gradient-hero: linear-gradient(135deg, #FAFFFF 0%, #E0FDFB 40%, #C8FAF7 100%);
  --gradient-card: linear-gradient(145deg, #FFFFFF, #F0FDFB);
  --gradient-accent: linear-gradient(135deg, #FF6B9D, #FF9DC0);
  --gradient-mesh: radial-gradient(ellipse at 0% 0%, rgba(10,191,188,0.12) 0%, transparent 60%),
                   radial-gradient(ellipse at 100% 100%, rgba(255,107,157,0.08) 0%, transparent 60%);
  --header-bg: rgba(255,255,255,0.96);
  --card-shimmer: linear-gradient(105deg, transparent 40%, rgba(10,191,188,0.06) 50%, transparent 60%);
}

/* ─── Royal Violet Theme ────────────────────────────────── */
body.royal-violet {
  --primary: #8B5CF6;
  --primary-light: #A78BFA;
  --primary-dark: #6D28D9;
  --primary-rgb: 139, 92, 246;
  --accent: #F472B6;
  --accent-rgb: 244, 114, 182;
  --bg: #07000F;
  --bg2: #0D0120;
  --surface: rgba(22,5,50,0.97);
  --surface2: rgba(30,8,65,0.9);
  --border: rgba(139,92,246,0.2);
  --border-strong: rgba(139,92,246,0.45);
  --text: #F0E8FF;
  --text2: #C4B5FD;
  --text3: #9D8FBA;
  --shadow-sm: 0 4px 16px rgba(139,92,246,0.2), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 12px 40px rgba(139,92,246,0.3), 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 64px rgba(139,92,246,0.4), 0 8px 24px rgba(0,0,0,0.6);
  --shadow-3d: 0 30px 80px rgba(139,92,246,0.5), 0 10px 30px rgba(0,0,0,0.7);
  --glow: 0 0 40px rgba(139,92,246,0.6);
  --gradient-primary: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #A78BFA 100%);
  --gradient-hero: linear-gradient(135deg, #07000F 0%, #120225 40%, #1E0445 100%);
  --gradient-card: linear-gradient(145deg, rgba(25,6,60,0.98), rgba(15,3,40,0.98));
  --gradient-accent: linear-gradient(135deg, #F472B6, #FB7185);
  --gradient-mesh: radial-gradient(ellipse at 20% 20%, rgba(139,92,246,0.2) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 80%, rgba(244,114,182,0.12) 0%, transparent 50%);
  --header-bg: rgba(10,2,25,0.97);
  --card-shimmer: linear-gradient(105deg, transparent 40%, rgba(139,92,246,0.08) 50%, transparent 60%);
}

/* ══════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image: var(--gradient-mesh);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.2; }
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ══════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════ */
.container { width: 100%; padding: 0 16px; margin: 0 auto; max-width: 1280px; }
.section { padding: 20px 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: 12px;
  color: var(--text);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text);
  background-clip: unset;
}
.section-sub { display: none; }

/* Spinner */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid rgba(var(--primary-rgb),0.2);
  border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: flex; align-items: center; justify-content: center; padding: 60px; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
  min-height: 44px; /* touch target */
}
.btn-primary { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-accent { background: var(--gradient-accent); color: white; }
.btn-accent:hover { transform: translateY(-2px); color: white; }
.btn-ghost { background: transparent; color: var(--text2); border: none; }
.btn-ghost:hover { color: var(--primary); background: var(--surface2); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; min-height: 36px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }

/* ══════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.88rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #065f46; }
.alert-error   { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.3);   color: #991b1b; }
.alert-info    { background: rgba(var(--primary-rgb),0.1); border: 1px solid rgba(var(--primary-rgb),0.3); color: var(--primary-dark); }
.alert-warning { background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.3);  color: #92400e; }
body.royal-violet .alert-success { color: #6ee7b7; }
body.royal-violet .alert-error   { color: #fca5a5; }
body.royal-violet .alert-info    { color: var(--primary-light); }
body.royal-violet .alert-warning { color: #fde68a; }

/* ══════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR
   ══════════════════════════════════════════════════════════ */
.announcement-bar {
  background: var(--gradient-primary); color: white;
  text-align: center; padding: 8px 16px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  position: relative; overflow: hidden;
}
.announcement-bar::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.15),transparent);
  animation: shimmer-bar 3s infinite;
}
@keyframes shimmer-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ══════════════════════════════════════════════════════════
   HEADER  — mobile base: logo + icons only
   ══════════════════════════════════════════════════════════ */
.header {
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 500;
  transition: var(--transition);
  padding-top: env(safe-area-inset-top, 0px);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--header-h);
  gap: 12px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 38px; height: 38px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; box-shadow: var(--shadow-sm);
  transition: var(--transition); flex-shrink: 0;
}
.logo:hover .logo-icon { transform: rotate(-5deg) scale(1.05); }
.logo-text { line-height: 1.1; }
.logo-text .brand { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; color: var(--text); display: block; }
.logo-text .tag   { font-size: 0.58rem; color: var(--primary); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* Header icon buttons (mobile-visible) */
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1.5px solid var(--border-strong);
  color: var(--text2); font-size: 1rem; cursor: pointer;
  transition: var(--transition); flex-shrink: 0;
  text-decoration: none;
}
.icon-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }

.cart-icon-btn {
  position: relative;
  background: var(--gradient-primary);
  border: none; color: white;
}
.cart-icon-btn:hover { transform: scale(1.05); color: white; box-shadow: var(--shadow-sm); }

.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--accent); color: white;
  font-size: 0.6rem; font-weight: 700;
  min-width: 17px; height: 17px;
  border-radius: 9px; border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* Desktop header elements — hidden on mobile */
.search-wrapper        { display: none; }
.header-desktop-links  { display: none; }
.navbar                { display: none; }

/* ══════════════════════════════════════════════════════════
   MOBILE SEARCH OVERLAY
   ══════════════════════════════════════════════════════════ */
.mobile-search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  flex-direction: column;
}
.mobile-search-overlay.open { display: flex; animation: fade-in 0.2s ease; }

.mobile-search-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.mobile-search-input-wrap { flex: 1; position: relative; }
.mobile-search-input-wrap .search-input { width: 100%; }
.mobile-search-back {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius-sm); background: none;
  border: 1.5px solid var(--border); cursor: pointer;
  color: var(--text2); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.mobile-search-back:hover { background: var(--primary); color: white; border-color: var(--primary); }
.mobile-search-body { flex: 1; overflow-y: auto; padding: 16px; }
.mobile-search-hint { font-size: 0.78rem; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.quick-link-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.quick-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 50px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text2); cursor: pointer;
  transition: var(--transition); text-decoration: none; min-height: 36px;
}
.quick-pill:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* Shared search input + results */
.search-input {
  width: 100%; padding: 11px 46px 11px 16px;
  border: 1.5px solid var(--border); border-radius: 50px;
  background: var(--surface); color: var(--text); font-size: 0.9rem;
  outline: none; transition: var(--transition); min-height: 44px;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.12); }
.search-input::placeholder { color: var(--text3); }

.search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gradient-primary); border: none;
  color: white; font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.search-btn:hover { transform: translateY(-50%) scale(1.1); }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 360px; overflow-y: auto; z-index: 200; display: none;
}
.search-results.open { display: block; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--transition); min-height: 44px;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface2); }
.search-result-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.search-result-info .name  { font-weight: 600; font-size: 0.86rem; color: var(--text); }
.search-result-info .price { color: var(--primary); font-weight: 600; font-size: 0.8rem; margin-top: 2px; }
.search-loading, .search-empty { padding: 16px; text-align: center; color: var(--text3); font-size: 0.86rem; }

/* ══════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION  — luxury redesign
   ══════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--header-bg);
  backdrop-filter: blur(40px) saturate(220%) brightness(1.04);
  -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(1.04);
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-start; z-index: 490;
  padding: 0 2px env(safe-area-inset-bottom, 0px);
  box-shadow:
    0 -1px 0 rgba(var(--primary-rgb), 0.1),
    0 -12px 48px rgba(var(--primary-rgb), 0.05),
    0 -2px 16px rgba(0,0,0,0.06);
}

/* ── Each tab item ──────────────────────────────── */
.bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 9px; gap: 4px;
  color: var(--text3); text-decoration: none;
  font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  transition: color 0.22s ease; position: relative;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Pill / chip that sits behind the icon */
.bn-icon-wrap {
  width: 52px; height: 30px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.18s cubic-bezier(0.23,1,0.32,1);
}

.bn-item .bn-icon {
  font-size: 1rem;
  transition: transform 0.22s cubic-bezier(0.23,1,0.32,1), color 0.22s ease;
  line-height: 1;
}

/* Active state */
.bn-item.active { color: var(--primary); }
.bn-item.active .bn-icon-wrap {
  background: linear-gradient(145deg, rgba(var(--primary-rgb),0.18), rgba(var(--primary-rgb),0.08));
  box-shadow: 0 2px 14px rgba(var(--primary-rgb),0.22), inset 0 1px 0 rgba(var(--primary-rgb),0.25);
}
.bn-item.active .bn-icon {
  transform: translateY(-1px) scale(1.12);
  color: var(--primary);
}

/* Hover (desktop fallback) */
.bn-item:hover { color: var(--primary); }
.bn-item:hover .bn-icon-wrap { background: rgba(var(--primary-rgb),0.07); }

/* ── Center "Categories" — floating FAB style ─── */
.bn-item.bn-center {
  margin-top: -18px;
}
.bn-item.bn-center .bn-icon-wrap {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow:
    0 6px 24px rgba(var(--primary-rgb),0.45),
    0 2px 8px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.25);
  border: 3px solid var(--bg);
}
.bn-item.bn-center .bn-icon {
  color: white; font-size: 1.05rem;
}
.bn-item.bn-center.active .bn-icon-wrap,
.bn-item.bn-center:hover .bn-icon-wrap {
  background: var(--gradient-primary);
  box-shadow:
    0 8px 32px rgba(var(--primary-rgb),0.6),
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transform: scale(1.06);
}
.bn-item.bn-center .bn-label { color: var(--primary); font-weight: 700; margin-top: 2px; }

/* ── Label text ─────────────────────────────────── */
.bn-label {
  font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1; user-select: none;
}

/* ── Cart badge ─────────────────────────────────── */
.bn-badge {
  position: absolute; top: 6px; left: calc(50% + 10px);
  background: var(--accent); color: white;
  font-size: 0.5rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid var(--bg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  letter-spacing: 0;
}

/* ══════════════════════════════════════════════════════════
   CATEGORIES BOTTOM SHEET
   ══════════════════════════════════════════════════════════ */
.sheet-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet-overlay.open { display: block; animation: fade-in 0.2s ease; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.bottom-sheet {
  position: fixed; bottom: var(--bottom-nav-h); left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 610; max-height: 80vh; display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.23,1,0.32,1);
  box-shadow: 0 -12px 48px rgba(0,0,0,0.2);
}
.sheet-overlay.open .bottom-sheet { transform: translateY(0); }

.sheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border-strong);
  margin: 12px auto 0; flex-shrink: 0;
}
.sheet-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.sheet-header h3 { font-family: var(--font-heading); font-size: 1.05rem; }
.sheet-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface2); border: none; cursor: pointer;
  color: var(--text2); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.sheet-close:hover { background: var(--primary); color: white; }
.sheet-body { flex: 1; overflow-y: auto; padding: 12px 16px 20px; -webkit-overflow-scrolling: touch; }

/* Category grid inside sheet */
.cat-sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cat-sheet-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-md); text-decoration: none;
  color: var(--text2); font-size: 0.85rem; font-weight: 500;
  transition: var(--transition); min-height: 48px;
}
.cat-sheet-item:hover, .cat-sheet-item.active {
  background: rgba(var(--primary-rgb),0.1);
  border-color: var(--primary); color: var(--primary);
}
.cat-sheet-item .count { margin-left: auto; font-size: 0.72rem; color: var(--text3); }

/* ══════════════════════════════════════════════════════════
   FILTER BOTTOM SHEET
   ══════════════════════════════════════════════════════════ */
#filterSheet .sheet-body { padding-bottom: 0; }
.filter-sheet-footer {
  padding: 14px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-shrink: 0;
}
.filter-sheet-footer .btn { flex: 1; }

/* Filter bar (above product grid on mobile) */
.mobile-filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
  flex-shrink: 0;
}
.mobile-filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 50px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text2);
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: var(--transition); flex-shrink: 0;
  min-height: 38px;
}
.filter-chip:hover, .filter-chip.active {
  background: var(--primary); border-color: var(--primary); color: white;
}
.filter-chip .remove {
  font-size: 0.9rem; line-height: 1;
  opacity: 0.7; margin-left: 2px;
}

/* ══════════════════════════════════════════════════════════
   MOBILE SHOP — Category Tiles + Sort Bar
   ══════════════════════════════════════════════════════════ */

/* Desktop toolbar — hidden on mobile by default */
.shop-desktop-toolbar {
  display: none;
  align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}

/* Category emoji tiles grid (used in Categories bottom sheet) */
.cat-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 8px;
}

.cat-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 16px 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); text-decoration: none;
  text-align: center; transition: var(--transition);
  position: relative; overflow: hidden;
  min-height: 96px;
  -webkit-tap-highlight-color: transparent;
}

.cat-tile::before {
  content: ''; position: absolute;
  top: -20px; right: -20px;
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1), transparent);
  pointer-events: none;
}

/* Full-width "All Products" tile — horizontal layout */
.cat-tile-all {
  grid-column: 1 / -1;
  flex-direction: row; justify-content: flex-start;
  padding: 14px 18px; gap: 14px; min-height: 60px;
}
.cat-tile-all .cat-tile-emoji { font-size: 1.5rem; }
.cat-tile-all .cat-tile-name  { font-size: 0.95rem; font-weight: 700; text-align: left; }
.cat-tile-all .cat-tile-count { font-size: 0.72rem; }

.cat-tile-emoji { font-size: 2rem; line-height: 1; }

.cat-tile-name {
  font-size: 0.78rem; font-weight: 600; color: var(--text);
  line-height: 1.2;
}

.cat-tile-count {
  font-size: 0.65rem; color: var(--text3);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 50px;
  display: inline-block;
}

.cat-tile:hover, .cat-tile.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.14);
  transform: translateY(-1px);
}
.cat-tile.active .cat-tile-name { color: var(--primary); }
.cat-tile.active .cat-tile-count {
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.3);
  color: var(--primary);
}
.cat-tile.active::after {
  content: '✓';
  position: absolute; top: 7px; right: 9px;
  font-size: 0.62rem; font-weight: 800; color: var(--primary);
}

/* Sort bar — filter btn pinned left, chips scroll right */
.shop-mobile-bar {
  display: flex; align-items: stretch;
  position: sticky; top: var(--header-h); z-index: 100;
  background: var(--bg);
  margin: 0 -16px 14px;
  border-bottom: 1px solid var(--border);
}
/* Pinned filter button */
.sort-chip-filter {
  flex-shrink: 0;
  width: 48px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: none;
  border-right: 1px solid var(--border);
  color: var(--text2); font-size: 1rem;
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.sort-chip-filter.has-active { color: var(--primary); background: rgba(var(--primary-rgb),0.06); }
.sort-chip-filter .filter-dot {
  position: absolute; top: 8px; right: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}
/* Scrollable chips wrapper */
.sort-chips {
  flex: 1; display: flex; align-items: center; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 12px;
}
.sort-chips::-webkit-scrollbar { display: none; }
/* Count as first chip in scroll area */
.shop-result-count {
  font-size: 0.7rem; font-weight: 600; color: var(--text3);
  white-space: nowrap; flex-shrink: 0;
  padding-right: 10px; border-right: 1px solid var(--border);
  margin-right: 2px;
}

.sort-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 11px; border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text2);
  font-size: 0.74rem; font-weight: 500; font-family: inherit;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: var(--transition); text-decoration: none;
  min-height: 34px;
  -webkit-tap-highlight-color: transparent;
}
.sort-chip:hover  { border-color: var(--primary); color: var(--primary); }
.sort-chip.active { background: var(--primary); border-color: var(--primary); color: white; }
.sort-chip-filter { color: var(--text2); }
.sort-chip-filter:hover { background: var(--surface2); }

/* Mobile shop page heading (hidden on desktop) */
.shop-mobile-title {
  display: flex; align-items: baseline; gap: 8px;
  padding: 14px 0 4px;
}
.shop-mobile-title h1 {
  font-family: var(--font-heading); font-size: 1.3rem;
  font-weight: 700; color: var(--text); margin: 0; line-height: 1.2;
}
.shop-mobile-title .shop-meta {
  font-size: 0.76rem; color: var(--text3); white-space: nowrap;
}

/* Category hero — compact on mobile */
.cat-hero {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  background: var(--gradient-hero);
}
.cat-hero-bc { display: none; }
.cat-hero-title { font-size: 1.45rem; }
.cat-hero-desc { font-size: 0.78rem; margin-top: 4px; color: var(--text3); }

/* Subcategory pills — horizontal scroll on mobile */
.cat-hero-pills {
  display: flex; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 10px -16px 0; padding: 2px 16px 4px;
  justify-content: flex-start;
}
.cat-hero-pills::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════════════════
   HERO  — mobile: compact left-aligned app banner
   ══════════════════════════════════════════════════════════ */
.hero {
  background: var(--gradient-hero);
  position: relative; overflow: hidden;
  padding: 20px 0 16px;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(var(--accent-rgb),0.08) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(var(--primary-rgb),0.1) 0%, transparent 40%);
}
.hero-bubbles { display: none; }
@keyframes float-bubble {
  0%   { transform: translateY(110%) scale(0); opacity: 0; }
  100% { transform: translateY(-110%) scale(1); opacity: 0; }
}

/* Mobile: left text + right product thumbnail */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 160px;
  align-items: start;
  gap: 14px;
  position: relative; z-index: 1;
}
.hero-content { text-align: left; }
.hero-visual { display: flex; align-items: flex-start; justify-content: center; }
/* Stage holds the main image + floating cards; stacked on mobile, layered on desktop */
.hero-img-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; width: 100%;
}
/* Compact image on mobile */
.hero-img-wrap { max-width: 160px; width: 160px; margin: 0; }
.hero-img-wrap::before { inset: -6px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(var(--primary-rgb),0.12); color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb),0.3);
  border-radius: 50px; padding: 4px 12px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em;
  margin-bottom: 10px; text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800; line-height: 1.15; margin-bottom: 8px; color: var(--text);
}
.hero-title .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-text { color: var(--text2); font-size: 0.82rem; margin-bottom: 14px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-start; }
.hero-actions .btn-lg { padding: 11px 20px; font-size: 0.85rem; }
.hero-stats {
  display: flex; gap: 0; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border);
  justify-content: flex-start; flex-wrap: nowrap;
}
.hero-stat { flex: 1; text-align: center; }
.hero-stat + .hero-stat { border-left: 1px solid var(--border); }
.hero-stat .value { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.hero-stat .label { font-size: 0.65rem; color: var(--text3); }

/* Hero image (desktop) */
.hero-img-wrap {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 1;
  animation: float-hero 6s ease-in-out infinite; margin: 0 auto;
}
@keyframes float-hero { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
.hero-img-wrap::before {
  content: ''; position: absolute; inset: -20px;
  background: radial-gradient(circle, rgba(var(--primary-rgb),0.2) 0%, transparent 70%);
  border-radius: 50%; animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow { 0%,100% { opacity:0.6; transform:scale(1); } 50% { opacity:1; transform:scale(1.05); } }
.hero-main-img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-xl); box-shadow: var(--shadow-3d);
  border: 2px solid var(--border-strong);
}
.hero-stat-card {
  position: absolute; background: var(--surface);
  backdrop-filter: blur(20px); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 10px 16px;
  box-shadow: var(--shadow-md); text-align: center;
}
.hero-stat-card:nth-child(2) { top: 10%;  right: -4%; }
.hero-stat-card:nth-child(3) { bottom: 14%; left: -6%; }
.hero-stat-card .num { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--primary); line-height: 1; }
.hero-stat-card .lbl { font-size: 0.68rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }

/* ── Featured product cards (hero) ───────────────────── */
/* Mobile: row of small thumbnail badges below the main image */
.hero-float-row {
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: center;
  gap: 6px; width: 100%;
}
.hero-float-card {
  display: flex; align-items: center;
  width: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.hero-float-card .hero-float-info { display: none; }
.hero-float-card .hero-float-img { width: 36px; height: 36px; border-radius: 7px; }
.hero-float-img {
  width: 100px; height: 100px;
  border-radius: 14px; object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg2);
}
.hero-float-name {
  font-size: 0.8rem; font-weight: 600; color: var(--text);
  line-height: 1.3; margin-bottom: 4px;
  max-width: 160px;
}
.hero-float-price {
  font-size: 0.86rem; font-weight: 700; color: var(--primary);
}
.hero-float-locked {
  font-size: 0.7rem; font-weight: 500; color: var(--text3);
}

/* Subtle pulse ring behind the main image */
.hero-pulse-ring {
  display: none;
  position: absolute; inset: -20px; border-radius: 50%;
  border: 2px solid rgba(var(--primary-rgb), 0.2);
  animation: pulse-ring 3s ease-in-out infinite;
  pointer-events: none; z-index: 0;
}
@keyframes pulse-ring {
  0%,100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.04); opacity: 1; }
}

/* Float keyframes — 3 different rhythms */
@keyframes hfc-float-a {
  0%, 100% { transform: translateY(0px) rotate(-0.8deg); }
  50%      { transform: translateY(-10px) rotate(0.4deg); }
}
@keyframes hfc-float-b {
  0%, 100% { transform: translateY(0px) rotate(0.6deg); }
  50%      { transform: translateY(-13px) rotate(-0.5deg); }
}
@keyframes hfc-float-c {
  0%, 100% { transform: translateY(0px) rotate(-0.4deg); }
  50%      { transform: translateY(-8px) rotate(0.8deg); }
}

/* ══════════════════════════════════════════════════════════
   CATEGORY CARDS  — mobile: 3 columns
   ══════════════════════════════════════════════════════════ */
.category-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.category-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 3/4; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.category-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px;
}
.category-name { color: white; font-family: var(--font-heading); font-weight: 700; font-size: 0.82rem; line-height: 1.2; }
.category-count { color: rgba(255,255,255,0.75); font-size: 0.66rem; margin-top: 2px; }
.category-glow {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.3), transparent);
  opacity: 0; transition: opacity 0.3s;
}

/* ══════════════════════════════════════════════════════════
   PRODUCT CARDS  — mobile: 2 columns
   ══════════════════════════════════════════════════════════ */
.products-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }

.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: var(--transition); position: relative;
  cursor: pointer; display: flex; flex-direction: column;
}
.product-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg2); }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }

.product-badges {
  position: absolute; top: 6px; left: 6px;
  display: flex; flex-direction: column; gap: 3px;
}
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 50px;
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-featured { background: var(--gradient-accent); color: white; }
.badge-sale     { background: var(--gradient-primary); color: white; }
.badge-out      { background: rgba(0,0,0,0.6); color: white; }

/* Quick actions: visible on touch (no hover) */
.product-actions-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px; display: flex; gap: 5px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}
.quick-btn {
  flex: 1; padding: 7px 0; border-radius: 50px; border: none;
  font-size: 0.72rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-align: center; min-height: 32px;
}
.quick-view { background: rgba(255,255,255,0.9); color: #1A2B3C; }
.quick-add  { background: var(--gradient-primary); color: white; }
.quick-view:hover { background: white; }
.quick-add:hover  { box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.5); }

.product-body { padding: 9px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.product-category-tag { font-size: 0.62rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.product-name {
  font-family: var(--font-heading); font-size: 0.84rem; font-weight: 600;
  color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-sku { font-size: 0.65rem; color: var(--text3); }
.product-pricing { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-main { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; color: var(--primary); }
.price-old  { font-size: 0.75rem; color: var(--text3); text-decoration: line-through; }
.product-footer { padding: 0 9px 9px; }
.add-to-cart-btn {
  width: 100%; padding: 9px; border-radius: 50px; border: none;
  background: var(--gradient-primary); color: white;
  font-weight: 600; font-size: 0.78rem; cursor: pointer;
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 36px;
}
.add-to-cart-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.add-to-cart-btn.login-to-buy { background: var(--surface2); color: var(--primary); border: 1.5px solid var(--primary); }
.add-to-cart-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ══════════════════════════════════════════════════════════
   PRODUCT DETAIL  — mobile: single column
   ══════════════════════════════════════════════════════════ */
.product-detail-grid { display: grid; grid-template-columns: 1fr; gap: clamp(20px,4vw,48px); }
.product-gallery { position: static; }
.main-img-wrap {
  border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  background: var(--bg2); margin-bottom: 10px;
}
.main-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.thumb-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.thumb-item {
  flex-shrink: 0; width: 62px; height: 62px;
  border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  cursor: pointer; transition: var(--transition); scroll-snap-align: start;
}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item.active, .thumb-item:hover { border-color: var(--primary); box-shadow: var(--glow); }

.product-detail-info { display: flex; flex-direction: column; gap: 16px; }
.detail-category { color: var(--primary); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.detail-title    { font-family: var(--font-heading); font-size: clamp(1.3rem,4vw,2.2rem); font-weight: 700; line-height: 1.2; }
.detail-sku      { color: var(--text3); font-size: 0.78rem; }

.price-block { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.detail-price-main { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.detail-price-old  { font-size: 0.92rem; color: var(--text3); text-decoration: line-through; margin-left: 8px; }

.qty-selector { display: flex; align-items: center; border: 1.5px solid var(--border-strong); border-radius: 50px; overflow: hidden; width: fit-content; }
.qty-btn { background: none; border: none; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; color: var(--text2); transition: var(--transition); }
.qty-btn:hover { background: var(--primary); color: white; }
.qty-input { width: 56px; text-align: center; border: none; background: none; color: var(--text); font-size: 1rem; font-weight: 600; outline: none; }

.product-description { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.product-description h4 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 10px; color: var(--primary); }

/* ── Variant selectors (configurable products) ──────────── */
.variant-group { margin-bottom: 14px; }
.variant-label { font-size: 0.85rem; font-weight: 600; color: var(--text2); display: block; margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-option {
  border: 1.5px solid var(--border-strong); background: var(--surface2); color: var(--text2);
  border-radius: 50px; padding: 7px 18px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.variant-option:hover { border-color: var(--primary); color: var(--primary); }
.variant-option.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.variant-option.unavailable { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }
.variant-swatch {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--border-strong); transition: var(--transition);
}
.variant-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.variant-swatch.unavailable { opacity: 0.35; cursor: not-allowed; }
.variant-message { font-size: 0.8rem; color: var(--text3); margin-top: 6px; min-height: 1.2em; }
.product-description p, .product-description ul { color: var(--text2); font-size: 0.88rem; line-height: 1.7; }

/* Sticky buy bar on mobile product page */
.mobile-buy-bar {
  position: fixed; bottom: var(--bottom-nav-h); left: 0; right: 0; z-index: 480;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}
.mobile-buy-bar .price-col { flex: 1; }
.mobile-buy-bar .price-col .p-main { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.mobile-buy-bar .price-col .p-old  { font-size: 0.76rem; color: var(--text3); text-decoration: line-through; }
.mobile-buy-bar .btn { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   CART  — mobile: single column stacked
   ══════════════════════════════════════════════════════════ */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }

.cart-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.cart-table-header { display: none; } /* shown on desktop */

/* Mobile cart item: card style */
.cart-item {
  display: block; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-product-info { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.cart-img { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.cart-product-name { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.cart-product-sku  { font-size: 0.72rem; color: var(--text3); margin-top: 3px; }

.cart-item-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.cart-qty-control { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.cart-qty-btn { background: none; border: none; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; color: var(--text2); transition: var(--transition); }
.cart-qty-btn:hover { background: var(--primary); color: white; }
.cart-qty-input { width: 42px; text-align: center; border: none; background: none; color: var(--text); font-weight: 600; font-size: 0.88rem; outline: none; }

.cart-price    { font-weight: 600; color: var(--text); font-size: 0.88rem; }
.cart-subtotal { font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.cart-remove {
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 1rem; padding: 6px; border-radius: 4px; transition: var(--transition);
  min-width: 34px; min-height: 34px; display: flex; align-items: center; justify-content: center;
}
.cart-remove:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

.order-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; position: static; }
.order-summary h3 { font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 0.88rem; color: var(--text2); border-bottom: 1px dashed var(--border); }
.summary-row:last-of-type { border-bottom: none; }
.summary-row.total { color: var(--text); font-weight: 700; font-size: 1.05rem; padding-top: 12px; border-top: 2px solid var(--primary); }
.summary-row .amount { font-weight: 600; color: var(--text); }
.summary-row.total .amount { color: var(--primary); font-size: 1.1rem; }

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text2); }
.form-input, .form-control {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-size: 0.9rem; outline: none; transition: var(--transition); width: 100%; min-height: 44px;
}
.form-input:focus, .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.1); }
.form-input::placeholder, .form-control::placeholder { color: var(--text3); }
textarea.form-input, textarea.form-control { min-height: 100px; resize: vertical; }
select.form-input, select.form-control { cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-col-full { grid-column: 1/-1; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(16px,4vw,28px); }
.auth-card { max-width: 440px; margin: clamp(28px,5vw,60px) auto; }

.input-with-media { position: relative; }
.form-control.has-media-picker { padding-right: 50px; }
.media-picker-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--gradient-primary); border: none; color: white;
  font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.media-picker-btn:hover { box-shadow: var(--shadow-md); }

/* ══════════════════════════════════════════════════════════
   MEDIA LIBRARY MODAL
   ══════════════════════════════════════════════════════════ */
.media-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  z-index: 2000; display: none; align-items: flex-end; justify-content: center; padding: 0;
}
.media-modal-overlay.open { display: flex; }
.media-modal {
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.5); border: 1px solid var(--border-strong); border-bottom: none;
  animation: sheet-up 0.3s cubic-bezier(0.23,1,0.32,1);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.media-modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.media-modal-header h3 { font-family: var(--font-heading); font-size: 1.1rem; }
.modal-close { background: none; border: 1.5px solid var(--border); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--text2); font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.modal-close:hover { background: #ef4444; border-color: #ef4444; color: white; }
.media-modal-toolbar { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.media-modal-folders { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.media-modal-folders::-webkit-scrollbar { display: none; }
.media-modal-folders .folder-chip { flex-shrink: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: .8rem; font-weight: 600; cursor: pointer; transition: .15s; }
.media-modal-folders .folder-chip:hover { border-color: var(--primary); color: var(--text); }
.media-modal-folders .folder-chip.active { background: var(--gradient-primary); border-color: transparent; color: #fff; }
.media-modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; -webkit-overflow-scrolling: touch; }
.media-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.media-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: var(--transition); position: relative; background: var(--bg2); }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item:hover { border-color: var(--primary); }
.media-item.selected { border-color: var(--primary); box-shadow: var(--glow); }
.media-item-check { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.65rem; font-weight: 700; opacity: 0; transform: scale(0); transition: var(--transition); }
.media-item.selected .media-item-check { opacity: 1; transform: scale(1); }
.media-modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   FILTER SIDEBAR (desktop only — hidden on mobile)
   ══════════════════════════════════════════════════════════ */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.filter-sidebar { display: none; } /* shown on desktop */
.filter-section { margin-bottom: 20px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-title { font-weight: 600; font-size: 0.83rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.filter-option { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; min-height: 40px; }
.filter-option input[type="radio"], .filter-option input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.filter-option label { font-size: 0.85rem; color: var(--text2); cursor: pointer; flex: 1; }
.filter-option:hover label { color: var(--primary); }
.filter-count { font-size: 0.72rem; color: var(--text3); }

/* ══════════════════════════════════════════════════════════
   BREADCRUMBS, PAGINATION, PRICE LOCK
   ══════════════════════════════════════════════════════════ */
.breadcrumbs { display: flex; align-items: center; gap: 5px; padding: 12px 0; font-size: 0.78rem; color: var(--text3); flex-wrap: wrap; }
.breadcrumbs a { color: var(--text3); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: var(--border-strong); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 24px 0; flex-wrap: wrap; }
.page-btn { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); background: var(--surface); color: var(--text2); font-size: 0.86rem; cursor: pointer; transition: var(--transition); text-decoration: none; }
.page-btn:hover, .page-btn.active { background: var(--gradient-primary); border-color: var(--primary); color: white; }

.price-lock-banner {
  background: var(--gradient-primary); color: white;
  padding: 13px 16px; border-radius: var(--radius-md);
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 20px; box-shadow: var(--shadow-md); flex-wrap: wrap;
}
.price-lock-banner .icon { font-size: 1.3rem; flex-shrink: 0; }
.price-lock-banner p { font-size: 0.86rem; line-height: 1.4; flex: 1; }
.price-lock-banner strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.price-lock-banner .btn { flex-shrink: 0; background: white; color: var(--primary); padding: 7px 14px; }

/* ══════════════════════════════════════════════════════════
   FEATURES STRIP  — 2×2 on mobile
   ══════════════════════════════════════════════════════════ */
.features-strip { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature-item { display: flex; align-items: center; gap: 10px; padding: 16px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: var(--transition); }
.feature-item:nth-child(even) { border-right: none; }
.feature-item:nth-last-child(-n+2) { border-bottom: none; }
.feature-item:hover { background: var(--surface2); }
.feature-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(var(--primary-rgb),0.12); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.feature-text .title { font-weight: 600; font-size: 0.78rem; color: var(--text); }
.feature-text .desc  { font-size: 0.68rem; color: var(--text3); margin-top: 1px; display: none; }

/* ══════════════════════════════════════════════════════════
   FOOTER  — mobile: single column
   ══════════════════════════════════════════════════════════ */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: clamp(32px,6vw,80px) 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.footer-brand p { color: var(--text3); font-size: 0.85rem; line-height: 1.7; margin: 10px 0 16px; }
.social-links { display: flex; gap: 8px; }
.social-btn { width: 38px; height: 38px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text2); font-size: 1rem; transition: var(--transition); }
.social-btn:hover { background: var(--primary); border-color: var(--primary); color: white; transform: translateY(-3px); }
.footer-col h4 { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; color: var(--text); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--primary); display: inline-block; }
.footer-col ul { display: flex; flex-direction: column; gap: 6px; }
.footer-col ul a { color: var(--text3); font-size: 0.84rem; transition: var(--transition); display: flex; align-items: center; gap: 5px; min-height: 32px; }
.footer-col ul a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 0.78rem; color: var(--text3); gap: 6px; }

/* Mobile: brand banner on top, link columns arranged compactly below */
@media (max-width: 639px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }

/* ══════════════════════════════════════════════════════════
   EMPTY STATE, TOAST, BACK TO TOP
   ══════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-state .icon { font-size: 3.5rem; margin-bottom: 14px; opacity: 0.5; }
.empty-state h3 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--text2); margin-bottom: 10px; }
.empty-state p { font-size: 0.88rem; }

.toast-container { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-nav-h) + 12px); z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 12px 16px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 0.88rem; animation: toast-up 0.3s ease; }
@keyframes toast-up { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.toast.success .toast-icon { color: #10b981; }
.toast.error   .toast-icon { color: #ef4444; }
.toast.info    .toast-icon { color: var(--primary); }
.toast-icon  { font-size: 1.1rem; flex-shrink: 0; }
.toast-text  { flex: 1; color: var(--text); }
.toast-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1rem; padding: 4px; min-width: 28px; }

.back-to-top { position: fixed; bottom: calc(var(--bottom-nav-h) + 12px); right: 14px; width: 42px; height: 42px; background: var(--gradient-primary); color: white; border: none; border-radius: 50%; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(20px); transition: var(--transition); z-index: 100; }
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ══════════════════════════════════════════════════════════
   BREAKPOINT: sm — 640px
   ══════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .container { padding: 0 20px; }
  .products-grid { grid-template-columns: repeat(3,1fr); gap: 14px; }
  .category-grid { grid-template-columns: repeat(4,1fr); gap: 14px; }
  .category-name { font-size: 0.92rem; }
  .category-overlay { padding: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: row; text-align: left; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .feature-text .desc { display: block; }
  .features-strip { grid-template-columns: repeat(4,1fr); }
  .feature-item { border-bottom: none; padding: 20px 18px; gap: 12px; }
  .feature-item:nth-child(even) { border-right: 1px solid var(--border); }
  .feature-item:last-child { border-right: none; }
  .cat-sheet-grid { grid-template-columns: repeat(3,1fr); }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 10px; }
}

/* ══════════════════════════════════════════════════════════
   BREAKPOINT: md — 768px (desktop layout kicks in)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  body {
    padding-bottom: 0;
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    overscroll-behavior-y: auto;
  }

  /* Restore desktop section sizing */
  .section { padding: clamp(40px,8vw,96px) 0; }
  .section-title {
    font-size: clamp(1.6rem,5vw,2.8rem);
    text-align: center;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .section-sub { display: block; color: var(--text3); text-align: center; margin-bottom: clamp(24px,5vw,56px); font-size: 0.95rem; }

  /* Restore desktop hero */
  .hero { padding: clamp(36px,7vw,100px) 0 clamp(28px,5vw,80px); }
  .hero-bubbles { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
  .hero-bubbles .bubble { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(var(--primary-rgb),0.15), transparent); animation: float-bubble linear infinite; }
  .hero-bubbles .bubble:nth-child(1) { width: 60px; height: 60px; left: 10%; animation-duration: 8s; }
  .hero-bubbles .bubble:nth-child(2) { width: 40px; height: 40px; left: 25%; animation-duration: 10s; animation-delay: -3s; }
  .hero-bubbles .bubble:nth-child(3) { width: 80px; height: 80px; left: 60%; animation-duration: 12s; animation-delay: -6s; }
  .hero-bubbles .bubble:nth-child(4) { width: 30px; height: 30px; left: 75%; animation-duration: 9s;  animation-delay: -2s; }
  .hero-bubbles .bubble:nth-child(5) { width: 70px; height: 70px; left: 85%; animation-duration: 11s; animation-delay: -5s; }
  @keyframes float-bubble {
    0%   { transform: translateY(110%) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-110%) scale(1); opacity: 0; }
  }
  .hero-grid { gap: 28px; }
  .hero-content { text-align: center; }
  .hero-badge { margin-bottom: 14px; font-size: 0.72rem; padding: 5px 14px; }
  .hero-title { font-size: clamp(1.8rem,6vw,3.6rem); margin-bottom: 14px; }
  .hero-text { font-size: 0.95rem; margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn-lg { padding: 14px 32px; font-size: 1rem; }
  .hero-stats { gap: 20px; margin-top: 24px; padding-top: 20px; justify-content: center; }
  .hero-stat { flex: unset; border-left: none; }
  .hero-stat + .hero-stat { border-left: none; }
  .hero-stat .value { font-size: 1.4rem; }
  .hero-stat .label { font-size: 0.72rem; }
  .header { padding-top: 0; }

  .container { padding: 0 28px; }

  /* Header: 3-column, search in middle */
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px; padding: 0 28px;
  }
  .logo-icon { width: 44px; height: 44px; font-size: 1.4rem; }
  .logo-text .brand { font-size: 1.1rem; }

  /* Show desktop search */
  .search-wrapper {
    display: block; position: relative;
    max-width: 520px; width: 100%; margin: 0 auto;
  }
  /* Hide mobile search icon since search is in header */
  .icon-btn.search-trigger { display: none; }

  /* Desktop nav */
  .navbar { display: block; background: var(--surface); border-bottom: 1px solid var(--border); }
  .navbar-inner { display: flex; align-items: center; padding: 0 28px; overflow-x: auto; scrollbar-width: none; }
  .navbar-inner::-webkit-scrollbar { display: none; }
  .nav-item { position: relative; }
  .nav-link { display: flex; align-items: center; gap: 5px; padding: 13px 16px; color: var(--text2); font-size: 0.86rem; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; transition: var(--transition); }
  .nav-link:hover, .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); }
  .nav-link .arrow { font-size: 0.6rem; transition: transform 0.2s; }
  .nav-item:hover .arrow { transform: rotate(180deg); }
  .nav-dropdown { position: absolute; top: 100%; left: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 200px; z-index: 100; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: all 0.2s ease; }
  .nav-item:hover .nav-dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }
  .nav-dropdown a { display: block; padding: 11px 18px; color: var(--text2); font-size: 0.86rem; border-bottom: 1px solid var(--border); transition: var(--transition); min-height: 44px; }
  .nav-dropdown a:last-child { border-bottom: none; }
  .nav-dropdown a:hover { color: var(--primary); background: var(--surface2); padding-left: 24px; }

  /* Show desktop account links */
  .header-desktop-links { display: flex; align-items: center; gap: 8px; }
  .header-btn { background: none; border: 1.5px solid var(--border-strong); border-radius: 50px; padding: 8px 16px; color: var(--text); font-size: 0.84rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: var(--transition); white-space: nowrap; text-decoration: none; }
  .header-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
  .cart-btn { background: var(--gradient-primary); border: none; color: white; border-radius: 50px; padding: 9px 18px; font-size: 0.84rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: var(--transition); text-decoration: none; position: relative; }
  .cart-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
  .cart-btn .cart-badge { position: static; border: none; min-width: 18px; height: 18px; border-radius: 9px; }

  /* Hide mobile-only elements */
  .mobile-bottom-nav    { display: none; }
  .mobile-buy-bar       { display: none; }
  .mobile-search-overlay { display: none !important; }
  .icon-btn.cart-icon-btn-mobile { display: none; }

  /* Desktop icon btn (cart in header-actions area) */
  .header-actions { display: none; } /* desktop uses header-desktop-links */

  /* Hero: 2-col on desktop */
  .hero-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    align-items: center; gap: clamp(32px,5vw,64px);
  }
  .hero-content { text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .hero-stats   { justify-content: flex-start; }
  .hero-text    { margin-left: 0; margin-right: 0; max-width: 100%; }
  .hero-visual  { display: flex; align-items: center; justify-content: center; }

  /* Stage: image stays centered, cards lift out of flow to float beside it */
  .hero-img-stage { display: block; width: auto; max-width: 460px; margin: 0 auto; }
  /* Give the photo breathing room so cards can sit fully outside it */
  .hero-img-wrap { max-width: 380px; }

  /* Floating product cards — desktop only — anchored just outside the photo */
  .hero-float-card {
    position: absolute;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 116px; max-width: 116px;
    padding: 10px;
    background: var(--surface);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 4; white-space: normal; text-align: center;
    transition: box-shadow 0.3s ease;
  }
  .hero-float-card:hover { box-shadow: var(--shadow-3d); }
  .hero-float-card .hero-float-name { display: none; } /* keep the floating badge compact */
  .hero-float-card .hero-float-img { width: 64px; height: 64px; border-radius: 10px; }

  /* Perched outside the photo's edges — right, lower-left, upper-left */
  .hfc-1 {
    top: 4%; left: 100%; margin-left: 6px;
    animation: hfc-float-a 4.6s ease-in-out infinite;
  }
  .hfc-2 {
    bottom: 6%; right: 100%; margin-right: 14px;
    animation: hfc-float-b 5.4s ease-in-out infinite 1.6s;
  }
  .hfc-3 {
    top: 30%; right: 100%; margin-right: 14px;
    animation: hfc-float-c 4.9s ease-in-out infinite 3.1s;
  }

  /* Pulse ring */
  .hero-pulse-ring { display: block; }

  /* Product grid: 3-col on md */
  .products-grid { grid-template-columns: repeat(3,1fr); gap: 20px; }
  .product-body { padding: 12px; }
  .product-name { font-size: 0.92rem; }
  .price-main   { font-size: 1.05rem; }
  .product-footer { padding: 0 12px 12px; }

  /* Shop layout: show filter sidebar */
  .shop-layout { grid-template-columns: 240px 1fr; gap: 28px; }
  .filter-sidebar { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: calc(var(--header-h) + 14px); }

  /* Product detail: 2-col */
  .product-detail-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .product-gallery { position: sticky; top: calc(var(--header-h) + 20px); }
  .thumb-item { width: 70px; height: 70px; }

  /* Cart: with sidebar */
  .cart-layout { grid-template-columns: 1fr 320px; gap: 28px; }
  .cart-table-header { display: grid; grid-template-columns: 3fr 1fr 1.2fr 1fr auto; gap: 14px; padding: 13px 20px; background: var(--gradient-primary); color: white; font-weight: 600; font-size: 0.83rem; }
  .cart-item { display: grid; grid-template-columns: 3fr 1fr 1.2fr 1fr auto; gap: 14px; padding: 13px 20px; align-items: center; border-bottom: 1px solid var(--border); }
  .cart-item:last-child { border-bottom: none; }
  .cart-item:hover { background: var(--surface2); }
  .cart-product-info { margin-bottom: 0; }
  .cart-item-actions { display: contents; }
  .order-summary { position: sticky; top: calc(var(--header-h) + 20px); padding: 22px; }

  /* Checkout */
  .checkout-layout { grid-template-columns: 1fr 340px; gap: 28px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
  .features-strip { grid-template-columns: repeat(4,1fr); }

  /* Category grid */
  .category-grid { grid-template-columns: repeat(5,1fr); gap: 18px; }
  .category-overlay { padding: 16px; }
  .category-name { font-size: 1rem; }

  /* Hover 3D effects (pointer devices) */
  .product-card:hover {
    transform: perspective(800px) rotateX(-4deg) rotateY(3deg) translateZ(10px);
    box-shadow: var(--shadow-3d); border-color: var(--border-strong);
  }
  .product-card::after { content: ''; position: absolute; inset: 0; background: var(--card-shimmer); background-size: 200% 100%; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
  .product-card:hover::after { opacity: 1; animation: card-shine 1s ease forwards; }
  .product-card:hover .product-img-wrap img { transform: scale(1.05); }
  .product-actions-overlay { bottom: -50px; transition: bottom 0.3s ease; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); padding: 10px; }
  .product-card:hover .product-actions-overlay { bottom: 0; }
  .category-card:hover { transform: perspective(600px) rotateX(-5deg) rotateY(3deg) translateZ(6px); box-shadow: var(--shadow-3d); }
  .category-card:hover img { transform: scale(1.06); }
  .category-card:hover .category-glow { opacity: 1; }
  @keyframes card-shine { from { background-position: -100% 0; } to { background-position: 200% 0; } }

  /* Toast: corner aligned */
  .toast-container { left: auto; right: 20px; bottom: 20px; width: 340px; }
  .toast { animation: toast-in 0.3s ease; }
  @keyframes toast-in { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

  /* Back to top */
  .back-to-top { bottom: 24px; right: 20px; width: 46px; height: 46px; }

  /* Media modal: center on desktop */
  .media-modal-overlay { align-items: center; padding: 20px; }
  .media-modal { border-radius: var(--radius-xl); border-bottom: 1px solid var(--border-strong); max-height: 88vh; width: min(900px,100%); animation: modal-in 0.3s cubic-bezier(0.23,1,0.32,1); }
  @keyframes modal-in { from { opacity:0; transform:scale(0.92) translateY(16px); } to { opacity:1; transform:scale(1) translateY(0); } }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; }

  /* Bottom sheets: hidden on desktop */
  .sheet-overlay { display: none !important; }
  .mobile-filter-bar { display: none !important; }

  /* Shop mobile elements: hidden on desktop */
  .shop-mobile-bar { display: none !important; }
  .shop-mobile-title { display: none; }

  /* Shop desktop toolbar: shown on desktop */
  .shop-desktop-toolbar { display: flex !important; }

  /* Category hero: full size on desktop */
  .cat-hero { padding: 40px 0; }
  .cat-hero-bc { display: flex; }
  .cat-hero-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
  .cat-hero-desc { font-size: 1rem; margin-top: 8px; }
  .cat-hero-pills { flex-wrap: wrap; overflow-x: visible; margin: 20px 0 0; padding: 0; justify-content: center; }
}

/* ══════════════════════════════════════════════════════════
   BREAKPOINT: lg — 1024px
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .container { padding: 0 32px; }
  .products-grid { grid-template-columns: repeat(4,1fr); gap: 24px; }
  .product-body { padding: 14px; }
  .product-name { font-size: 0.98rem; }
  .price-main   { font-size: 1.12rem; }
  .product-footer { padding: 0 14px 14px; }
  .shop-layout { grid-template-columns: 260px 1fr; gap: 32px; }
  .cart-layout { grid-template-columns: 1fr 360px; gap: 32px; }
  .checkout-layout { grid-template-columns: 1fr 380px; gap: 32px; }
  .category-grid { grid-template-columns: repeat(6,1fr); gap: 20px; }
}

/* ══════════════════════════════════════════════════════════
   TOUCH DEVICE OVERRIDES (always show overlays, no hover tilt)
   ══════════════════════════════════════════════════════════ */
@media (hover: none) {
  .product-card:hover { transform: none; }
  .product-actions-overlay { bottom: 0 !important; }
}

/* ══════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
