/* ============================================
   ALTERVAPE WEB SHOP - Main Stylesheet
   ============================================ */

:root {
  --primary: #00B548;
  --primary-dark: #007A32;
  --primary-light: rgba(0, 181, 72, 0.10);
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-elevated: #F0F1F3;
  --card: #FFFFFF;
  --border: #E2E4E8;
  --border-light: #D0D3D9;
  --text: #0F1115;
  --text-secondary: #555B67;
  --text-muted: #9AA0AC;
  --error: #E53935;
  --warning: #F59E0B;
  --success: #00B548;
  --info: #0288D1;
  --white: #FFFFFF;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --transition: all 0.2s ease;
  --nav-height: 62px;
  --cats-bar-height: 40px;
  --bottom-nav-height: 64px;
  --nav-gap: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F0F1F3; }
::-webkit-scrollbar-thumb { background: #C8CDD6; border-radius: 3px; }

/* ══════════════════════════════
   TOP NAVBAR
══════════════════════════════ */
#shop-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226,228,232,0.8);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 20px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.nav-top-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  /* No fixed height — let padding control it so the row
     is content-height only and cats row sits immediately below */
  padding: 10px 28px 0;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}
#shop-nav.scrolled {
  background: rgba(255,255,255,0.99);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 6px 28px rgba(0,0,0,0.08);
}

.nav-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.nav-logo span { color: var(--primary); }
.nav-logo::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,181,72,0.25);
  flex-shrink: 0;
}

.nav-search {
  width: 100%;
  max-width: 560px;
  justify-self: center;
  position: relative;
}
.nav-search input {
  width: 100%;
  background: #F3F4F6;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text);
  padding: 10px 40px 10px 44px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  outline: none;
}
.nav-search input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,181,72,0.12);
}
.nav-search input::placeholder { color: var(--text-muted); font-weight: 400; }
.nav-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}
.nav-search .search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  display: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--border);
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition);
}
.nav-search .search-clear:hover { background: var(--border-light); }

.nav-actions { display: flex; align-items: center; gap: 6px; justify-self: end; }

.nav-btn {
  position: relative;
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}
.nav-btn:hover {
  background: #F3F4F6;
  color: var(--primary);
  transform: scale(1.04);
}
.nav-btn .badge {
  position: absolute;
  top: 3px; right: 3px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
  line-height: 1;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

/* Mobile search icon button — hidden on desktop */
#nav-mobile-search-btn {
  display: none;
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  flex-shrink: 0;
}
#nav-mobile-search-btn:hover {
  background: #F3F4F6;
  color: var(--primary);
}
#nav-mobile-search-btn.search-open { color: var(--primary); background: var(--primary-light); }

/* Mobile search bar
   Hidden: translateY(-100%) slides it above its top edge (= nav-height) → invisible.
   Open:   translateY(0) → flush below navbar.
   z-index 1050 → above nav shadow (nav=1000). */
#nav-mobile-search-bar {
  position: fixed;
  /* Default: parked above the screen, out of sight */
  top: -200px;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 14px 16px 16px;
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  z-index: 1050;
  opacity: 0;
  transition: top 0.28s cubic-bezier(0.4,0,0.2,1),
              opacity 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  display: block;
}
#nav-mobile-search-bar.open {
  top: var(--nav-height);
  opacity: 1;
  pointer-events: auto;
}
#mobile-search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}
#mobile-search-input {
  width: 100%;
  font-size: 16px;
  padding: 13px 44px 13px 48px;
  background: #F3F4F6;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
#mobile-search-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,181,72,0.15);
}
#mobile-search-input::placeholder { color: var(--text-muted); }
#mobile-search-form .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
#mobile-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
@media (min-width: 641px) {
  #nav-mobile-search-bar { display: none !important; }
}

/* Live search dropdown */
#search-live-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  z-index: 2000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
#search-live-drop.visible { display: block; }
.search-drop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-light);
}
.search-drop-item:last-child { border-bottom: none; }
.search-drop-item:hover { background: var(--primary-light); }
.search-drop-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface-elevated);
  flex-shrink: 0;
}
.search-drop-info { flex: 1; min-width: 0; }
.search-drop-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-drop-price { font-size: 12px; color: var(--primary); font-weight: 700; margin-top: 2px; }
.search-drop-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.search-drop-footer { padding: 10px 14px; text-align: center; font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; border-top: 1px solid var(--border-light); }
.search-drop-footer:hover { background: var(--primary-light); }

/* Mobile live search drop — attaches to the mobile bar */
#mobile-search-live-wrap { position: relative; }

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 8px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.nav-user-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.nav-user-btn .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#nav-login-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  padding: 8px 18px;
}
#nav-login-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

/* ══════════════════════════════
   DESKTOP NAV CATEGORIES ROW
   (inside #shop-nav, no separator)
══════════════════════════════ */

/* entry animation — items fly up one by one */
@keyframes chipIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-categories {
  /* hidden by default on mobile */
  display: none;
  width: 100%;
  overflow: hidden;
  /* extra 2px so the bottom chip shadow isn't clipped */
  max-height: calc(var(--cats-bar-height) + 2px);
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity    0.35s cubic-bezier(0.4,0,0.2,1);
  opacity: 1;
  will-change: max-height, opacity;
  /* flush below the top row — no gap, no border */
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.nav-categories.cats-hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-cats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: var(--cats-bar-height);
  padding: 0 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-cats-inner::-webkit-scrollbar { display: none; }

/* plain text chips */
.nav-cat-chip {
  flex-shrink: 0;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.15s ease;
  opacity: 0;
  animation: chipIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.nav-cat-chip:nth-child(1)  { animation-delay: 0.04s; }
.nav-cat-chip:nth-child(2)  { animation-delay: 0.08s; }
.nav-cat-chip:nth-child(3)  { animation-delay: 0.12s; }
.nav-cat-chip:nth-child(4)  { animation-delay: 0.16s; }
.nav-cat-chip:nth-child(5)  { animation-delay: 0.20s; }
.nav-cat-chip:nth-child(6)  { animation-delay: 0.24s; }
.nav-cat-chip:nth-child(7)  { animation-delay: 0.28s; }
.nav-cat-chip:nth-child(8)  { animation-delay: 0.32s; }
.nav-cat-chip:nth-child(9)  { animation-delay: 0.36s; }
.nav-cat-chip:nth-child(10) { animation-delay: 0.40s; }
.nav-cat-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(0,181,72,0.3);
  transform: translateY(-1px);
}
.nav-cat-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,181,72,0.25);
}

/* On desktop: show the categories row */
@media (min-width: 641px) {
  .nav-categories { display: block; }
  /* no extra gap — cats row is flush inside the navbar */
  #shop-app         { padding-top: calc(var(--nav-height) + var(--cats-bar-height) + 36px); }
  .product-gallery  { top: calc(var(--nav-height) + var(--cats-bar-height) + 12px); }
  .cart-summary     { top: calc(var(--nav-height) + var(--cats-bar-height) + 12px); }
}

/* ══════════════════════════════
   BOTTOM NAV (mobile)
══════════════════════════════ */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255,255,255,0.97);
  border-top: 1px solid var(--border);
  z-index: 999;
  backdrop-filter: blur(12px);
}
.bottom-nav-inner {
  display: flex;
  height: 100%;
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.bnav-item .bnav-icon { font-size: 22px; line-height: 1; }
.bnav-item.active { color: var(--primary); }
.bnav-item .badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--primary);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* ══════════════════════════════
   MAIN LAYOUT
══════════════════════════════ */
#shop-app {
  /* mobile: navbar + breathing room */
  padding-top: calc(var(--nav-height) + 36px);
  min-height: 100vh;
}

/* Page container */
.page { display: none; min-height: calc(100vh - var(--nav-height)); }
.page.active { display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: #00a843; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary-light); }
.btn-ghost {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: var(--error);
  color: var(--white);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); font-size: 18px; }
.btn-icon-sm { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-sm); font-size: 16px; }

/* ══════════════════════════════
   CARDS & SURFACES
══════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ══════════════════════════════
   FORM ELEMENTS
══════════════════════════════ */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); }
.form-input::placeholder { color: var(--text-muted); }
.form-input.error { border-color: var(--error); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-error { color: var(--error); font-size: 12px; margin-top: 4px; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ══════════════════════════════
   HOME PAGE
══════════════════════════════ */
/* ── Hero Slider (replaces static hero-banner) ── */
.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1A1A2E;
  /* No margin/border-radius — full width flush */
}
.hs-track {
  position: relative;
  width: 100%;
  height: clamp(320px, 52vw, 580px);
}
.hs-slide {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
}
.hs-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(5,5,15,0.82) 0%, rgba(5,5,15,0.45) 55%, rgba(5,5,15,0.10) 100%);
}
.hs-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(20px, 6vw, 80px);
  max-width: 680px;
  color: #fff;
}
.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(0,181,72,0.18);
  border: 1px solid rgba(0,181,72,0.45);
  color: #4ade80;
  border-radius: 50px;
  padding: 4px 14px;
  margin-bottom: 14px;
  width: fit-content;
}
.hs-title {
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 14px;
  color: #fff;
}
.hs-title span { color: #4ade80; }
.hs-sub {
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin: 0 0 28px;
  max-width: 480px;
}
.hs-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hs-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.hs-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,181,72,0.38);
}
.hs-btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.hs-btn--outline {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
}
.hs-btn--outline:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

/* Arrows */
.hs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.hs-arrow:hover { background: rgba(0,181,72,0.75); border-color: transparent; }
.hs-arrow--prev { left: 16px; }
.hs-arrow--next { right: 16px; }

/* Dots */
.hs-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.hs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.22s ease;
}
.hs-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* Legacy hero-banner kept for fallback / other uses */
.hero-banner {
  background: linear-gradient(135deg, #E8F7EE 0%, #F0FBF4 60%, #FFFFFF 100%);
  border: 1px solid rgba(0,181,72,0.25);
  border-radius: var(--radius-xl);
  margin: 24px 20px;
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(0,181,72,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-subtitle { color: var(--primary); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }
.hero-title { color: var(--text); font-size: clamp(28px, 4vw, 48px); font-weight: 900; line-height: 1.2; margin-bottom: 24px; }
.hero-title span { color: var(--primary); }
.hero-decor { font-size: clamp(80px, 12vw, 130px); line-height: 1; opacity: 0.6; user-select: none; }

.section { padding: 32px 20px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-size: 20px; font-weight: 800; color: var(--text); }
.see-all-btn {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.see-all-btn:hover { text-decoration: underline; }

/* Categories strip */
.categories-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.categories-strip::-webkit-scrollbar { display: none; }

.category-chip-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 72px;
  transition: var(--transition);
}
.category-chip-img:hover .cat-img-wrap { border-color: var(--primary); transform: scale(1.05); }
.cat-img-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: var(--transition);
}
.cat-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cat-chip-label { color: var(--text-secondary); font-size: 11px; font-weight: 600; text-align: center; white-space: nowrap; }

/* Promo/loyalty banner */
.promo-banner {
  margin: 0 20px 32px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}
.promo-banner:hover { opacity: 0.9; transform: translateY(-2px); }
.promo-title { color: var(--white); font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.promo-subtitle { color: rgba(255,255,255,0.8); font-size: 13px; }

/* Featured products horizontal scroll */
.featured-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  align-items: stretch;
}
.featured-scroll::-webkit-scrollbar { display: none; }

/* Each featured card wrapper — fixed width, full height flex column */
.featured-card-wrap {
  flex: 0 0 200px;
  width: 200px;
  display: flex;
}
.featured-card-wrap .product-card {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.featured-card-wrap .product-card-body {
  flex: 1;          /* grows to push footer to bottom */
}
.featured-card-wrap .product-card-img {
  height: 200px;    /* fixed image height — all cards identical */
  flex-shrink: 0;
}

/* ══════════════════════════════
   PRODUCT CARD
══════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  /* reset <a> tag styles */
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,181,72,0.15);
}

.product-card-img {
  position: relative;
  background: var(--surface-elevated);
  aspect-ratio: 1;
  overflow: hidden;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img .img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--text-muted);
}

.product-badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.badge-discount { background: var(--error); color: var(--white); }
.badge-out { background: rgba(100,100,110,0.18); color: var(--text-muted); }
.badge-featured { background: var(--primary); color: var(--white); }

.wishlist-btn-card {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}
.wishlist-btn-card:hover { background: rgba(229,57,53,0.1); border-color: var(--error); }
.wishlist-btn-card.active { color: var(--error); }

.product-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-category { color: var(--primary); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.product-name { color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price-row { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.product-price { color: var(--primary); font-size: 15px; font-weight: 800; }
.product-compare-price { color: var(--text-muted); font-size: 12px; text-decoration: line-through; }
.product-out-text { color: var(--text-muted); font-size: 12px; }

.product-card-footer {
  padding: 10px 12px 12px;
  display: flex;
  gap: 8px;
}
.add-to-cart-btn {
  flex: 1;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.add-to-cart-btn:hover:not(:disabled) { background: #00a843; }
.add-to-cart-btn:disabled { background: var(--surface-elevated); color: var(--text-muted); cursor: not-allowed; }
.quick-add-btn {
  width: 36px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-add-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ══════════════════════════════
   SHOP PAGE
══════════════════════════════ */
.shop-header {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.shop-title { font-size: 24px; font-weight: 900; color: var(--text); }
.shop-count { color: var(--text-muted); font-size: 14px; font-weight: 400; }

.sort-select {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.sort-select:focus { border-color: var(--primary); }

.categories-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 16px;
  scrollbar-width: none;
}
.categories-filter::-webkit-scrollbar { display: none; }
.cat-filter-chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.cat-filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-filter-chip.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

.shop-content { padding: 0 20px 40px; }

.load-more-wrap { text-align: center; padding: 24px 0; }

/* ══════════════════════════════
   PRODUCT DETAIL PAGE
══════════════════════════════ */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 32px 20px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.product-gallery { position: sticky; top: calc(var(--nav-height) + 16px); align-self: start; }
.main-image-wrap {
  background: var(--surface-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 1;
  position: relative;
  margin-bottom: 12px;
}
.main-image-wrap img { width: 100%; height: 100%; object-fit: contain; }
.main-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--text-muted);
}
.main-discount-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--error);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.thumbnails-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.thumbnails-row::-webkit-scrollbar { display: none; }
.thumbnail {
  width: 68px; height: 68px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail.active { border-color: var(--primary); }
.thumbnail:hover { border-color: var(--primary); }

.product-detail-info { padding: 8px 0; }
.product-detail-category { color: var(--primary); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.product-detail-name { color: var(--text); font-size: clamp(20px, 3vw, 30px); font-weight: 900; line-height: 1.3; margin-bottom: 16px; }

.price-stock-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.price-group { display: flex; align-items: baseline; gap: 10px; }
.detail-price { color: var(--primary); font-size: 28px; font-weight: 900; }
.detail-compare { color: var(--text-muted); font-size: 16px; text-decoration: line-through; }
.stock-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
}
.stock-in { background: rgba(0,200,81,0.12); color: var(--primary); }
.stock-out { background: rgba(255,68,68,0.12); color: var(--error); }

.detail-sku { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.detail-section-title { color: var(--text); font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.detail-description { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }

.quantity-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty-btn {
  width: 40px; height: 42px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--border); color: var(--primary); }
.qty-value { width: 44px; text-align: center; font-size: 16px; font-weight: 800; color: var(--text); }
.qty-total { color: var(--text-secondary); font-size: 14px; }
.qty-total strong { color: var(--primary); font-size: 18px; }

.detail-actions { display: flex; gap: 12px; }
.detail-wishlist-btn {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  font-size: 22px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-wishlist-btn:hover { border-color: var(--error); }
.detail-wishlist-btn.active { color: var(--error); border-color: var(--error); background: rgba(229,57,53,0.08); }

/* ══════════════════════════════
   CART
══════════════════════════════ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 24px 20px 48px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.cart-items-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: flex;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  align-items: center;
  transition: var(--transition);
}
.cart-item:hover { border-color: var(--border-light); }
.cart-item-img {
  width: 80px; height: 80px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { color: var(--text-muted); font-size: 13px; margin-bottom: 10px; }
.cart-qty-row { display: flex; align-items: center; gap: 10px; }
.cart-qty-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.cart-qty-val { color: var(--text); font-size: 15px; font-weight: 800; min-width: 20px; text-align: center; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.cart-item-total { color: var(--primary); font-size: 16px; font-weight: 800; }
.cart-remove-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(229,57,53,0.08);
  border: 1px solid transparent;
  color: var(--error);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-remove-btn:hover { border-color: var(--error); }

.cart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cart-title { font-size: 22px; font-weight: 900; color: var(--text); }
.clear-cart-btn { color: var(--error); font-size: 13px; font-weight: 600; background: none; border: none; cursor: pointer; }

.cart-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}
.summary-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.summary-label { color: var(--text-secondary); font-size: 14px; }
.summary-value { color: var(--text); font-size: 14px; font-weight: 600; }
.summary-total-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 20px; }
.summary-total-label { color: var(--text); font-size: 17px; font-weight: 800; }
.summary-total-value { color: var(--primary); font-size: 22px; font-weight: 900; }
.promo-code-row { display: flex; gap: 8px; margin-bottom: 12px; }
.promo-code-input {
  flex: 1;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}
.promo-code-input:focus { border-color: var(--primary); }
.promo-code-input::placeholder { color: var(--text-muted); }
.promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,181,72,0.08);
  border: 1px solid rgba(0,122,50,0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.promo-applied-text { color: var(--primary); font-size: 14px; font-weight: 700; }

/* ══════════════════════════════
   CHECKOUT
══════════════════════════════ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 24px 20px 48px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}
.checkout-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
}
.checkout-section-title { color: var(--text); font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-elevated);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 10px;
}
.payment-option:hover { border-color: var(--primary); }
.payment-option.active { border-color: var(--primary); background: var(--primary-light); }
.payment-option-icon { font-size: 24px; }
.payment-option-info { flex: 1; }
.payment-option-label { color: var(--text); font-size: 15px; font-weight: 700; }
.payment-option-sub { color: var(--text-muted); font-size: 12px; }
.radio-btn { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--transition); }
.radio-btn.active { border-color: var(--primary); }
.radio-inner { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.loyalty-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.loyalty-info h4 { color: var(--text); font-size: 15px; font-weight: 700; }
.loyalty-info p { color: var(--text-muted); font-size: 12px; }
.toggle-switch { width: 48px; height: 26px; border-radius: 13px; background: var(--border); cursor: pointer; position: relative; transition: var(--transition); flex-shrink: 0; }
.toggle-switch.on { background: var(--primary); }
.toggle-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--white); position: absolute; top: 3px; left: 3px; transition: var(--transition); }
.toggle-switch.on .toggle-thumb { transform: translateX(22px); }

/* ══════════════════════════════
   ORDER SUCCESS
══════════════════════════════ */
.order-success-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.order-success-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}
.success-icon-wrap {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8F7EE, #C8EDD8);
  border: 2px solid rgba(0,181,72,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 48px;
}
.success-title { color: var(--text); font-size: 30px; font-weight: 900; margin-bottom: 10px; }
.success-subtitle { color: var(--text-secondary); font-size: 15px; line-height: 1.6; margin-bottom: 28px; }
.order-info-grid {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}
.order-info-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.order-info-row:last-child { margin-bottom: 0; }
.order-info-label { color: var(--text-secondary); font-size: 14px; }
.order-info-value { color: var(--text); font-size: 14px; font-weight: 700; }
.loyalty-earned-banner {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.loyalty-earned-text { color: var(--warning); font-size: 14px; font-weight: 700; }

/* ══════════════════════════════
   AUTH PAGE
══════════════════════════════ */
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at top, rgba(0,181,72,0.06) 0%, transparent 50%);
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo-text { font-size: 28px; font-weight: 900; letter-spacing: 2px; color: var(--text); }
.auth-logo-text span { color: var(--primary); }
.auth-tagline { color: var(--text-muted); font-size: 13px; text-align: center; margin-bottom: 28px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1px;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-error { background: rgba(229,57,53,0.08); border: 1px solid rgba(229,57,53,0.3); border-radius: var(--radius-md); padding: 12px; color: var(--error); font-size: 14px; margin-bottom: 14px; display: none; }
.auth-error.show { display: block; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 12px; margin: 16px 0; }
.auth-footer { text-align: center; color: var(--text-secondary); font-size: 14px; margin-top: 20px; }

/* ══════════════════════════════
   PROFILE PAGE
══════════════════════════════ */
.profile-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}
.user-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
}
.user-avatar-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name { color: var(--text); font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.user-email { color: var(--text-secondary); font-size: 14px; }
.loyalty-card {
  background: linear-gradient(135deg, #007A32, #00B548);
  border: 1px solid rgba(0,122,50,0.3);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 16px;
  transition: var(--transition);
}
.loyalty-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,200,81,0.15); }
.loyalty-pts-big { color: var(--white); font-size: 28px; font-weight: 900; }
.loyalty-pts-label { color: rgba(255,255,255,0.85); font-size: 13px; }
.loyalty-pts-value { color: var(--primary); font-size: 14px; font-weight: 700; }
.profile-menu { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 16px; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: var(--surface); }
.menu-icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.menu-item-label { flex: 1; color: var(--text); font-size: 15px; font-weight: 600; }
.menu-item-arrow { color: var(--text-muted); font-size: 16px; }

/* ══════════════════════════════
   ORDERS PAGE
══════════════════════════════ */
.orders-layout { max-width: 860px; margin: 0 auto; padding: 28px 20px 48px; }
.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.order-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-number { color: var(--text); font-size: 15px; font-weight: 800; }
.order-status-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.status-pending { background: rgba(255,187,51,0.15); color: var(--warning); }
.status-confirmed,.status-processing { background: rgba(51,181,229,0.15); color: var(--info); }
.status-shipped { background: rgba(100,100,255,0.15); color: #8888ff; }
.status-delivered { background: rgba(0,200,81,0.15); color: var(--primary); }
.status-cancelled { background: rgba(255,68,68,0.15); color: var(--error); }
.order-card-footer { display: flex; justify-content: space-between; align-items: center; }
.order-date { color: var(--text-muted); font-size: 13px; }
.order-total { color: var(--primary); font-size: 16px; font-weight: 800; }

/* ══════════════════════════════
   WISHLIST
══════════════════════════════ */
.wishlist-layout { max-width: 860px; margin: 0 auto; padding: 28px 20px 48px; }
.wishlist-item {
  display: flex;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
  /* reset <a> tag styles */
  text-decoration: none;
  color: inherit;
}
.wishlist-item:hover { border-color: var(--primary); }
.wishlist-item-img {
  width: 100px; height: 100px;
  flex-shrink: 0;
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
}
.wishlist-item-img img { width: 100%; height: 100%; object-fit: cover; }
.wishlist-item-info { flex: 1; padding: 14px 0; min-width: 0; }
.wishlist-item-name { color: var(--text); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.wishlist-item-price { color: var(--primary); font-size: 16px; font-weight: 900; margin-bottom: 4px; }
.wishlist-item-compare { color: var(--text-muted); font-size: 13px; text-decoration: line-through; }
.wishlist-item-actions { display: flex; flex-direction: column; gap: 8px; padding: 14px; justify-content: center; flex-shrink: 0; }

/* ══════════════════════════════
   LOYALTY PAGE
══════════════════════════════ */
.loyalty-layout { max-width: 680px; margin: 0 auto; padding: 28px 20px 48px; }
.loyalty-hero {
  background: linear-gradient(135deg, #007A32, #00B548);
  border: 1px solid rgba(0,122,50,0.3);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
}
.loyalty-star { font-size: 48px; margin-bottom: 12px; }
.loyalty-balance-big { color: var(--white); font-size: 52px; font-weight: 900; line-height: 1; }
.loyalty-balance-label { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.loyalty-euro-value { color: var(--primary); font-size: 20px; font-weight: 700; }
.how-it-works { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 20px; margin-bottom: 20px; }
.how-step { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.how-step:last-child { margin-bottom: 0; }
.how-step-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--primary-light); border: 1px solid var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.how-step-title { color: var(--text); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.how-step-desc { color: var(--text-muted); font-size: 13px; }
.loyalty-history-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.loyalty-history-item:last-child { border-bottom: none; }
.loyalty-tx-icon { font-size: 22px; margin-right: 12px; }
.loyalty-tx-label { color: var(--text); font-size: 14px; font-weight: 600; }
.loyalty-tx-date { color: var(--text-muted); font-size: 12px; }
.loyalty-tx-pts { font-size: 16px; font-weight: 900; }
.loyalty-tx-pts.earn { color: var(--primary); }
.loyalty-tx-pts.spend { color: var(--error); }

/* ══════════════════════════════
   MODAL
══════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  margin-bottom: 16px;
}
.modal-title { color: var(--text); font-size: 18px; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; padding: 4px; line-height: 1; transition: var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 0 24px 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 10px; justify-content: flex-end; }

/* ══════════════════════════════
   EMPTY STATE
══════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
}
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-title { color: var(--text); font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-subtitle { color: var(--text-secondary); font-size: 15px; line-height: 1.5; margin-bottom: 24px; max-width: 320px; }

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  pointer-events: all;
}
.toast.success { border-left: 3px solid var(--primary); }
.toast.error { border-left: 3px solid var(--error); }
.toast.info { border-left: 3px solid var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; transform: translateX(20px); } }

/* ══════════════════════════════
   LOADING
══════════════════════════════ */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 16px;
  color: var(--text-secondary);
}

/* ══════════════════════════════
   PAGE HEADER
══════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 16px;
}
.page-back-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.page-back-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-header-title { color: var(--text); font-size: 22px; font-weight: 900; }

/* ══════════════════════════════
   ORDER DETAIL MODAL
══════════════════════════════ */
.order-detail-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.order-detail-item { display: flex; justify-content: space-between; }
.order-detail-item-name { color: var(--text-secondary); font-size: 14px; }
.order-detail-item-price { color: var(--text); font-size: 14px; font-weight: 600; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 900px) {
  .product-detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-gallery { position: static; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

@media (max-width: 640px) {
  #shop-nav { padding: 0 14px; gap: 0; }
  .nav-top-row { padding: 10px 14px 0; gap: 12px; }
  .nav-search { display: none; }
  #nav-mobile-search-btn { display: flex !important; }
  .nav-user-btn span { display: none; }
  .nav-user-btn { padding: 0; width: 36px; height: 36px; border-radius: 50%; background: transparent !important; border: none !important; }
  .nav-user-btn .avatar { width: 32px; height: 32px; font-size: 13px; }
  #nav-login-btn { padding: 0; width: 36px; height: 36px; border-radius: 50%; background: transparent !important; border: none !important; font-size: 0; }
  #nav-login-btn::after { content: '👤'; font-size: 18px; }
  #bottom-nav { display: block; }
  #shop-app { padding-bottom: var(--bottom-nav-height); }
  .hero-banner { padding: 32px 20px; margin: 16px 12px; }
  .hero-decor { display: none; }
  /* Slider mobile */
  .hs-track { height: clamp(260px, 72vw, 380px); }
  .hs-content { padding: 32px 18px; }
  .hs-arrow { width: 34px; height: 34px; font-size: 20px; }
  .hs-arrow--prev { left: 8px; }
  .hs-arrow--next { right: 8px; }
  .hs-btn { padding: 10px 20px; font-size: 13px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .featured-card-wrap { flex: 0 0 160px; width: 160px; }
  .featured-card-wrap .product-card-img { height: 160px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .cart-layout, .checkout-layout { padding: 16px 12px 80px; }
  .product-detail-layout { padding: 16px 12px 80px; }
  .detail-actions { flex-direction: column; }
  .detail-wishlist-btn { width: 100%; }
  .order-success-card { padding: 32px 20px; }
  .auth-card { padding: 28px 20px; }
  .section { padding: 20px 12px; }
  .container { padding: 0 12px; }
  .toast-container { bottom: calc(var(--bottom-nav-height) + 10px); right: 12px; left: 12px; }
  .toast { max-width: 100%; }
  .modal-overlay { padding: 12px; }
}

@media (max-width: 380px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card-body { padding: 8px; }
  .product-name { font-size: 12px; }
}

/* ══════════════════════════════
   DESKTOP ENHANCEMENTS (≥ 1024px)
══════════════════════════════ */
@media (min-width: 1024px) {

  /* Wider navbar padding */
  #shop-nav {
    padding: 0 40px;
    gap: 28px;
  }
  .nav-search { max-width: 600px; }
  .nav-logo { font-size: 21px; letter-spacing: 3px; }
  .nav-cats-inner { padding: 0 40px; }

  /* Bottom nav hidden on desktop — top nav handles everything */
  #bottom-nav { display: none !important; }
  #shop-app { padding-bottom: 0; }

  /* Content max-width container */
  #shop-app > .page.active {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
  }
  /* Hero slider breaks out of the max-width constraint on desktop */
  .hero-slider {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }

  /* ── Home ── */
  .hero-banner {
    margin: 32px 40px;
    padding: 64px 56px;
    border-radius: 24px;
  }
  .hero-title { font-size: 52px; }
  .hero-decor { font-size: 140px; }
  /* Slider desktop — constrain height, bigger arrows */
  .hs-track { height: clamp(400px, 44vw, 580px); }
  .hs-arrow { width: 48px; height: 48px; font-size: 28px; }
  .hs-arrow--prev { left: 28px; }
  .hs-arrow--next { right: 28px; }
  .hs-dots { bottom: 22px; }

  .section { padding: 40px 40px; }

  .categories-strip { gap: 20px; padding-bottom: 12px; justify-content: center; flex-wrap: wrap; overflow-x: visible; }
  .category-chip-img { min-width: 90px; }
  .cat-img-wrap { width: 80px; height: 80px; font-size: 32px; }
  .cat-chip-label { font-size: 12px; }

  .featured-card-wrap { flex: 0 0 240px; width: 240px; }
  .featured-card-wrap .product-card-img { height: 240px; }
  .promo-banner { margin: 0 40px 40px; padding: 28px 36px; }

  /* ── Shop grid ── */
  .shop-header { padding: 32px 40px 20px; }
  .categories-filter { padding: 0 40px 20px; gap: 10px; }
  .shop-content { padding: 0 40px 60px; }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  /* ── Product detail ── */
  .product-detail-layout {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding: 40px 40px 64px;
    max-width: 1200px;
  }
  .product-detail-name { font-size: 32px; }
  .detail-price { font-size: 34px; }

  /* ── Cart / Checkout ── */
  .cart-layout {
    grid-template-columns: 1fr 400px;
    padding: 32px 40px 64px;
    max-width: 1200px;
    gap: 32px;
  }
  .checkout-layout {
    grid-template-columns: 1fr 400px;
    padding: 32px 40px 64px;
    max-width: 1200px;
    gap: 32px;
  }

  /* ── Auth ── */
  .auth-page { min-height: calc(100vh - var(--nav-height)); }
  .auth-card { max-width: 440px; padding: 48px; }

  /* ── Profile ── */
  .profile-layout { max-width: 860px; margin: 0 auto; padding: 32px 40px 64px; }

  /* ── Orders / Wishlist ── */
  .orders-layout { max-width: 980px; padding: 32px 40px 64px; }
  .wishlist-layout { max-width: 980px; padding: 32px 40px 64px; }

  /* ── Loyalty ── */
  .loyalty-layout { max-width: 760px; padding: 32px 40px 64px; }

  /* ── Page headers ── */
  .page-header { padding: 32px 40px 20px; }
  .page-header-title { font-size: 26px; }

  /* ── Toasts go bottom-right ── */
  .toast-container { bottom: 32px; right: 40px; }

  /* ── Order success ── */
  .order-success-page { padding: 64px 40px; }
  .order-success-card { max-width: 560px; padding: 56px 48px; }

  /* ── Desktop nav: show category links ── */
  .nav-desktop-links {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .nav-desktop-link {
    padding: 7px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    white-space: nowrap;
  }
  .nav-desktop-link:hover { color: var(--primary); background: var(--surface-elevated); }
  .nav-desktop-link.active { color: var(--primary); }
}

/* ── Medium screens 900–1023px ── */
@media (min-width: 900px) and (max-width: 1023px) {
  #bottom-nav { display: none !important; }
  #shop-app { padding-bottom: 0; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .shop-content { padding: 0 24px 48px; }
  .shop-header { padding: 24px 24px 16px; }
  .categories-filter { padding: 0 24px 16px; }
  .section { padding: 32px 24px; }
  .hero-banner { margin: 24px 24px; padding: 48px 40px; }
}
