/* ==========================================================================
   MERIDIAN — Core Stylesheet
   Design system + layout + components. See responsive.css for breakpoints
   and animations.css for motion/keyframes.
   ========================================================================== */

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

/* ------------------------------ Design tokens ---------------------------- */
:root{
  /* Brand colour system — marketplace orange + deep navy, high-energy retail feel */
  --color-primary: #F76B1C;        /* marketplace orange — CTAs, header accents */
  --color-primary-dark: #D9550E;
  --color-primary-light: #FF8A42;
  --color-accent: #172B4D;         /* deep navy — headings, footer, price emphasis */
  --color-accent-dark: #0E1B33;
  --color-accent-light: #2C4270;
  --color-star: #FFA41C;    /* gold rating stars, independent of brand accent */

  --color-success: #1E8E5A;
  --color-warning: #C77700;
  --color-error: #E0402A;
  --color-error-bg: #FDEBE8;
  --color-success-bg: #E9F7EF;

  --color-bg: #F4F5F7;             /* light neutral app background */
  --color-surface: #FFFFFF;
  --color-surface-alt: #FFF3EA;
  --color-border: #E7E9EC;
  --color-border-strong: #D6DAE0;

  --color-text: #1A1D23;
  --color-text-muted: #63696F;
  --color-text-faint: #9AA0A6;
  --color-text-on-primary: #FFFFFF;
  --color-text-on-accent: #FFFFFF;

  /* Typography — clean, dense, marketplace style */
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs: 0.72rem;
  --fs-sm: 0.85rem;
  --fs-base: 0.95rem;
  --fs-md: 1.05rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.6rem;
  --fs-4xl: 3.1rem;

  /* Spacing scale */
  --sp-3xs: 0.25rem;
  --sp-2xs: 0.5rem;
  --sp-xs: 0.75rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2rem;
  --sp-xl: 3rem;
  --sp-2xl: 4.5rem;
  --sp-3xl: 6rem;

  /* Radii — restrained, not pill-shaped */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 999px;

  /* Shadows — soft, low-contrast */
  --shadow-sm: 0 1px 2px rgba(22, 35, 63, 0.06), 0 1px 1px rgba(22,35,63,0.04);
  --shadow-md: 0 6px 16px rgba(22, 35, 63, 0.08), 0 2px 6px rgba(22,35,63,0.05);
  --shadow-lg: 0 16px 40px rgba(22, 35, 63, 0.14), 0 4px 12px rgba(22,35,63,0.06);
  --shadow-focus: 0 0 0 3px rgba(176, 141, 87, 0.35);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms var(--ease);
  --t-base: 250ms var(--ease);
  --t-slow: 420ms var(--ease);

  /* Layout */
  --container-max: 1280px;
  --header-h: 76px;
  --announce-h: 38px;
}

/* --------------------------------- Reset --------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font-family: inherit; cursor: pointer; }
input, select, textarea{ font-family: inherit; font-size: inherit; }
h1,h2,h3,h4,h5{ font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0; color: var(--color-accent); }
p{ margin: 0; }

::selection{ background: var(--color-accent-light); color: var(--color-primary-dark); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------- Layout --------------------------------- */
.container{
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-md);
}
.section{ padding-block: var(--sp-2xl); }
.section-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2xs);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: var(--sp-2xs);
}
.eyebrow::before{
  content: "";
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  display: inline-block;
}
.section-title{ font-size: var(--fs-2xl); }
.section-sub{ color: var(--color-text-muted); margin-top: var(--sp-2xs); max-width: 46ch; }
.visually-hidden{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link{
  position: absolute; left: var(--sp-sm); top: -60px;
  background: var(--color-primary); color: var(--color-text-on-primary);
  padding: var(--sp-xs) var(--sp-sm); z-index: 999; border-radius: var(--radius-sm);
  transition: top var(--t-base);
}
.skip-link:focus{ top: var(--sp-sm); }

/* -------------------------------- Buttons --------------------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2xs);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--color-primary); color: var(--color-text-on-primary); }
.btn-primary:hover{ background: var(--color-primary-light); }
.btn-accent{ background: var(--color-accent); color: var(--color-text-on-accent); }
.btn-accent:hover{ background: var(--color-accent-dark); }
.btn-outline{ background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover{ background: var(--color-primary); color: var(--color-text-on-primary); }
.btn-ghost{ background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-ghost:hover{ background: var(--color-surface-alt); }
.btn-sm{ padding: 0.55rem 1.1rem; font-size: var(--fs-xs); }
.btn-lg{ padding: 1rem 2rem; font-size: var(--fs-md); }
.btn-block{ width: 100%; }
.btn-icon{
  width: 42px; height: 42px; padding: 0; border-radius: var(--radius-md);
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-primary);
}
.btn-icon:hover{ border-color: var(--color-accent); color: var(--color-accent-dark); }
.btn:disabled{ opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* -------------------------------- Announcement bar ------------------------ */
.announce-bar{
  background: var(--color-accent);
  color: var(--color-text-on-primary);
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
}
.announce-track{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
  height: var(--announce-h);
  overflow: hidden;
  white-space: nowrap;
}
.announce-track span{ display: inline-flex; align-items: center; gap: var(--sp-2xs); opacity: 0.92; }
.announce-track i{ color: var(--color-primary-light); }

/* --------------------------------- Header --------------------------------- */
.site-header{
  position: sticky; top: 0; z-index: 200;
  background: rgba(251, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.site-header.is-scrolled{ box-shadow: var(--shadow-sm); }
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  height: var(--header-h);
}
.brand{
  display: flex;
  align-items: center;
  gap: var(--sp-2xs);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand .brand-mark{
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.brand .brand-tag{
  display: block; font-family: var(--font-body); font-size: 0.6rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text-faint); font-weight: 600;
}

.main-nav{ display: flex; align-items: center; gap: var(--sp-lg); }
.nav-list{ display: flex; align-items: center; gap: var(--sp-md); }
.nav-list > li{ position: relative; }
.nav-link{
  display: inline-flex; align-items: center; gap: 6px;
  padding: var(--sp-2xs) var(--sp-3xs);
  font-size: var(--fs-sm); font-weight: 600; color: var(--color-text);
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.nav-link:hover, .nav-link.is-active{ color: var(--color-primary-dark); border-color: var(--color-primary); }
.nav-link .chevron{ font-size: 0.6em; transition: transform var(--t-fast); }
.has-mega:hover .chevron, .has-mega:focus-within .chevron{ transform: rotate(180deg); }

/* Mega menu */
.mega-menu{
  position: absolute; top: calc(100% + var(--sp-md)); left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(760px, 86vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md) var(--sp-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
  z-index: 60;
}
.has-mega:hover .mega-menu, .has-mega:focus-within .mega-menu, .mega-menu.is-open{
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.mega-menu a{
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2xs);
  text-align: center; padding: var(--sp-sm) var(--sp-2xs);
  border-radius: var(--radius-md); transition: background var(--t-fast);
}
.mega-menu a:hover{ background: var(--color-surface-alt); }
.mega-menu .mega-icon{
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: var(--color-surface-alt); display: grid; place-items: center;
  color: var(--color-accent-dark); font-size: 1.1rem;
  border: 1px solid var(--color-border);
}
.mega-menu span{ font-size: var(--fs-xs); font-weight: 600; color: var(--color-text); }

.header-actions{ display: flex; align-items: center; gap: var(--sp-2xs); flex-shrink: 0; }
.icon-btn{
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: var(--radius-md); color: var(--color-primary); background: transparent; border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover{ background: var(--color-surface-alt); border-color: var(--color-border); }
.icon-badge{
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-primary); color: #fff;
  font-size: 0.62rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--color-bg);
}
.menu-toggle{ display: none; }

/* Search flyout */
.search-flyout{
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--color-surface); border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--sp-md) 0;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: transform var(--t-base), opacity var(--t-base), visibility var(--t-base);
  z-index: 55;
}
.search-flyout.is-open{ transform: translateY(0); opacity: 1; visibility: visible; }
.search-flyout-inner{ display: flex; gap: var(--sp-sm); align-items: center; }
.search-input-wrap{
  flex: 1; display: flex; align-items: center; gap: var(--sp-2xs);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  padding: 0.75rem 1rem; background: var(--color-surface-alt);
}
.search-input-wrap input{ flex: 1; border: none; background: transparent; outline: none; font-size: var(--fs-md); color: var(--color-text); }
.search-input-wrap i{ color: var(--color-text-faint); }
.search-results-preview{ margin-top: var(--sp-sm); max-height: 340px; overflow-y: auto; }
.search-result-row{
  display: flex; align-items: center; gap: var(--sp-sm); padding: var(--sp-xs);
  border-radius: var(--radius-md); transition: background var(--t-fast);
}
.search-result-row:hover{ background: var(--color-surface-alt); }
.search-result-row img{ width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); background: var(--color-surface-alt); }
.search-result-row .name{ font-weight: 600; font-size: var(--fs-sm); }
.search-result-row .meta{ font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Mobile drawer */
.mobile-drawer{
  position: fixed; inset: 0; z-index: 300; visibility: hidden;
}
.mobile-drawer.is-open{ visibility: visible; }
.drawer-backdrop{
  position: absolute; inset: 0; background: rgba(13, 23, 48, 0.5);
  opacity: 0; transition: opacity var(--t-base);
}
.mobile-drawer.is-open .drawer-backdrop{ opacity: 1; }
.drawer-panel{
  position: absolute; top: 0; right: 0; height: 100%; width: min(340px, 86vw);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform var(--t-slow);
  display: flex; flex-direction: column; padding: var(--sp-md);
  overflow-y: auto;
}
.mobile-drawer.is-open .drawer-panel{ transform: translateX(0); }
.drawer-header{ display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-md); }
.drawer-nav{ display: flex; flex-direction: column; }
.drawer-nav a, .drawer-accordion summary{
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-sm) var(--sp-2xs); font-weight: 600; border-bottom: 1px solid var(--color-border);
  color: var(--color-text); list-style: none; cursor: pointer;
}
.drawer-accordion summary::-webkit-details-marker{ display: none; }
.drawer-accordion[open] summary i{ transform: rotate(180deg); }
.drawer-cat-list{ padding: var(--sp-2xs) 0 var(--sp-sm) var(--sp-sm); display: flex; flex-direction: column; gap: var(--sp-2xs); }
.drawer-cat-list a{ border: none; padding: var(--sp-2xs); font-weight: 500; color: var(--color-text-muted); }
.drawer-footer-actions{ margin-top: auto; padding-top: var(--sp-md); display: flex; flex-direction: column; gap: var(--sp-2xs); }

/* -------------------------------- Breadcrumbs ------------------------------ */
.breadcrumbs{
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2xs);
  font-size: var(--fs-xs); color: var(--color-text-muted); padding-block: var(--sp-md);
}
.breadcrumbs a:hover{ color: var(--color-accent-dark); }
.breadcrumbs .sep{ color: var(--color-border-strong); }
.breadcrumbs .current{ color: var(--color-text); font-weight: 600; }

/* --------------------------------- Hero ------------------------------------ */
.hero{
  background: linear-gradient(180deg, var(--color-surface-alt) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
}
.hero-inner{
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center;
  gap: var(--sp-2xl); padding-block: var(--sp-3xl);
}
.hero-copy .eyebrow{ margin-bottom: var(--sp-sm); }
.hero-title{ font-size: var(--fs-4xl); letter-spacing: -0.01em; }
.hero-title em{ font-style: italic; color: var(--color-accent-dark); }
.hero-desc{ margin-top: var(--sp-md); font-size: var(--fs-md); color: var(--color-text-muted); max-width: 46ch; }
.hero-ctas{ display: flex; gap: var(--sp-sm); margin-top: var(--sp-lg); flex-wrap: wrap; }
.hero-stats{ display: flex; gap: var(--sp-lg); margin-top: var(--sp-xl); }
.hero-stats div strong{ display: block; font-family: var(--font-display); font-size: var(--fs-xl); color: var(--color-primary); }
.hero-stats div span{ font-size: var(--fs-xs); color: var(--color-text-muted); }
.hero-visual{ position: relative; }
.hero-visual .frame-main{
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
}
.hero-visual .frame-main img{ width: 100%; height: 100%; object-fit: cover; }
.hero-badge-card{
  position: absolute; bottom: -18px; left: -18px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: var(--sp-sm) var(--sp-md); display: flex; align-items: center; gap: var(--sp-sm);
}
.hero-badge-card i{ color: var(--color-accent); font-size: 1.4rem; }
.hero-badge-card strong{ display: block; font-size: var(--fs-sm); }
.hero-badge-card span{ font-size: var(--fs-xs); color: var(--color-text-muted); }
.hero-dot-grid{
  position: absolute; top: 8%; right: 4%; width: 120px; height: 120px;
  background-image: radial-gradient(var(--color-primary) 1.5px, transparent 1.5px);
  background-size: 14px 14px; opacity: 0.3; z-index: 0;
}

/* ------------------------------- Category grid ----------------------------- */
.category-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); }
.category-card{
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3.2; border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
}
.category-card img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.category-card:hover img{ transform: scale(1.06); }
.category-card::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,23,48,0) 40%, rgba(13,23,48,0.82) 100%);
}
.category-card .cat-info{
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--sp-md);
  color: var(--color-text-on-primary); z-index: 2;
}
.category-card .cat-info h3{ color: var(--color-text-on-primary); font-size: var(--fs-md); }
.category-card .cat-info span{ font-size: var(--fs-xs); opacity: 0.82; }
.category-card .cat-arrow{
  position: absolute; top: var(--sp-sm); right: var(--sp-sm); z-index: 2;
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: rgba(251,250,248,0.92); color: var(--color-primary);
  display: grid; place-items: center; opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.category-card:hover .cat-arrow{ opacity: 1; transform: translateY(0); }

/* Category icon strip — quick horizontal jump-to-category row, Jumia/Konga style */
.category-strip{
  display: flex; gap: var(--sp-md); overflow-x: auto; padding-bottom: var(--sp-2xs);
  scrollbar-width: thin;
}
.category-strip::-webkit-scrollbar{ height: 5px; }
.category-strip::-webkit-scrollbar-thumb{ background: var(--color-border-strong); border-radius: var(--radius-full); }
.category-strip-item{
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 92px; text-align: center;
}
.category-strip-item .strip-icon{
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
  color: var(--color-primary); font-size: 1.3rem;
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base), color var(--t-base);
}
.category-strip-item:hover .strip-icon{
  background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: translateY(-3px);
}
.category-strip-item span{ font-size: var(--fs-xs); font-weight: 600; color: var(--color-text); }

/* Flash sale banner with live countdown */
.flash-sale{
  background: linear-gradient(120deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-radius: var(--radius-lg); padding: var(--sp-lg) var(--sp-xl);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-lg); flex-wrap: wrap;
  color: #fff; position: relative; overflow: hidden;
}
.flash-sale::before{
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(247,107,28,0.25) 1.5px, transparent 1.5px);
  background-size: 16px 16px; opacity: 0.5;
}
.flash-sale-head{ position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-md); }
.flash-sale-head i{ font-size: 1.8rem; color: var(--color-primary-light); }
.flash-sale-head h2{ color: #fff; font-size: var(--fs-xl); margin: 0; }
.flash-sale-head p{ color: rgba(255,255,255,0.75); font-size: var(--fs-sm); margin-top: 2px; }
.countdown{ position: relative; z-index: 1; display: flex; gap: var(--sp-2xs); }
.countdown-unit{
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-md);
  padding: 8px 12px; text-align: center; min-width: 58px;
}
.countdown-unit strong{ display: block; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; }
.countdown-unit span{ font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.7); }
.flash-sale .btn{ position: relative; z-index: 1; }

/* -------------------------------- Product cards ----------------------------- */
.product-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-sm); }
.product-grid.grid-3{ grid-template-columns: repeat(3, 1fr); }
.product-grid.grid-4{ grid-template-columns: repeat(4, 1fr); }
.product-card{
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base);
  position: relative;
}
.product-card:hover{ box-shadow: var(--shadow-md); border-color: var(--color-primary); transform: translateY(-4px); }
.product-media{ position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--color-surface-alt); }
.product-media img{ width: 100%; height: 100%; object-fit: cover; transition: opacity var(--t-slow); }
.product-media img.img-alt{ position: absolute; inset: 0; opacity: 0; }
.product-card:hover .product-media img.img-alt{ opacity: 1; }
.product-badges{ position: absolute; top: var(--sp-2xs); left: var(--sp-2xs); display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.badge{
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.03em; padding: 4px 8px;
  border-radius: var(--radius-sm); text-transform: uppercase;
}
.badge-new{ background: var(--color-accent); color: var(--color-text-on-accent); }
.badge-sale{ background: var(--color-error); color: #fff; }
.badge-out{ background: var(--color-text-faint); color: #fff; }
.badge-best{ background: var(--color-primary); color: var(--color-text-on-primary); }

.product-quick-actions{
  position: absolute; top: var(--sp-2xs); right: var(--sp-2xs); z-index: 2;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(6px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.product-card:hover .product-quick-actions{ opacity: 1; transform: translateX(0); }
.qa-btn{
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--color-surface); border: 1px solid var(--color-border);
  display: grid; place-items: center; color: var(--color-primary); font-size: 0.85rem;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.qa-btn:hover{ background: var(--color-primary); color: var(--color-text-on-primary); border-color: var(--color-primary); }
.qa-btn.is-active{ color: var(--color-error); border-color: var(--color-error); }

.product-info{ padding: var(--sp-xs) var(--sp-sm) var(--sp-sm); display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-cat{ font-size: var(--fs-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.product-name{ font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); font-family: var(--font-body); line-height: 1.35; }
.product-name a:hover{ color: var(--color-accent-dark); }
.product-rating{ display: flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--color-text-muted); }
.product-rating .stars{ color: var(--color-star); letter-spacing: 1px; }
.product-price-row{ display: flex; align-items: baseline; gap: var(--sp-2xs); margin-top: 2px; }
.price-now{ font-weight: 800; font-size: var(--fs-md); color: var(--color-accent); }
.price-old{ font-size: var(--fs-xs); color: var(--color-text-faint); text-decoration: line-through; }
.stock-line{ font-size: var(--fs-xs); font-weight: 600; }
.stock-line.in{ color: var(--color-success); }
.stock-line.low{ color: var(--color-warning); }
.stock-line.out{ color: var(--color-error); }
.product-actions{ margin-top: var(--sp-2xs); }

/* Skeleton loading state */
.skeleton{ background: linear-gradient(90deg, var(--color-surface-alt) 25%, #ece9e2 37%, var(--color-surface-alt) 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; }
.skeleton-card{ border-radius: var(--radius-lg); border: 1px solid var(--color-border); overflow: hidden; }
.skeleton-card .skeleton-media{ aspect-ratio: 1/1; }
.skeleton-card .skeleton-line{ height: 12px; margin: var(--sp-sm) var(--sp-sm) 0; border-radius: var(--radius-sm); }
.skeleton-card .skeleton-line.w-60{ width: 60%; }
.skeleton-card .skeleton-line.w-40{ width: 40%; margin-bottom: var(--sp-sm); }

/* -------------------------------- Promo banner ------------------------------ */
.promo-banner{
  background: var(--color-primary); color: var(--color-text-on-primary);
  border-radius: var(--radius-lg); overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
  position: relative;
}
.promo-copy{ padding: var(--sp-2xl); position: relative; z-index: 2; }
.promo-copy .eyebrow{ color: var(--color-primary-light); }
.promo-copy .eyebrow::before{ background: var(--color-primary-light); }
.promo-copy h2{ color: var(--color-text-on-primary); font-size: var(--fs-2xl); max-width: 14ch; }
.promo-copy p{ color: rgba(246,244,239,0.78); margin-top: var(--sp-sm); max-width: 40ch; }
.promo-copy .btn{ margin-top: var(--sp-lg); }
.promo-image{ height: 100%; min-height: 320px; }
.promo-image img{ width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------- Feature cards ---------------------------- */
.feature-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-md); }
.feature-card{
  text-align: center; padding: var(--sp-lg) var(--sp-sm); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); background: var(--color-surface); transition: border-color var(--t-base), transform var(--t-base);
}
.feature-card:hover{ border-color: var(--color-primary); transform: translateY(-3px); }
.feature-card i{ font-size: 1.6rem; color: var(--color-accent-dark); margin-bottom: var(--sp-sm); }
.feature-card h3{ font-size: var(--fs-sm); font-family: var(--font-body); }
.feature-card p{ font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 4px; }

/* --------------------------------- Testimonials ------------------------------ */
.testimonial-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }
.testimonial-card{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--sp-lg); display: flex; flex-direction: column; gap: var(--sp-sm);
}
.testimonial-card .stars{ color: var(--color-star); }
.testimonial-card p.quote{ color: var(--color-text); font-size: var(--fs-sm); line-height: 1.7; }
.testimonial-person{ display: flex; align-items: center; gap: var(--sp-sm); margin-top: auto; padding-top: var(--sp-sm); border-top: 1px solid var(--color-border); }
.testimonial-person img{ width: 42px; height: 42px; border-radius: var(--radius-full); object-fit: cover; }
.testimonial-person strong{ display: block; font-size: var(--fs-sm); }
.testimonial-person span{ font-size: var(--fs-xs); color: var(--color-text-muted); }

/* --------------------------------- Newsletter -------------------------------- */
.newsletter{
  background: var(--color-surface-alt); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--sp-2xl);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-xl);
}
.newsletter-copy h2{ font-size: var(--fs-xl); }
.newsletter-copy p{ color: var(--color-text-muted); margin-top: var(--sp-2xs); }
.newsletter-form{ display: flex; gap: var(--sp-2xs); min-width: 380px; }
.newsletter-form input{
  flex: 1; padding: 0.85rem 1rem; border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md); background: var(--color-surface); outline: none;
  transition: border-color var(--t-fast);
}
.newsletter-form input:focus{ border-color: var(--color-accent); }
.field-error{ color: var(--color-error); font-size: var(--fs-xs); margin-top: 4px; display: none; }
.field-error.is-visible{ display: block; }
.form-field.has-error input, .form-field.has-error textarea, .form-field.has-error select{ border-color: var(--color-error); }

/* --------------------------------- Footer ------------------------------------ */
.site-footer{ background: var(--color-primary-dark); color: rgba(246,244,239,0.82); margin-top: var(--sp-2xl); }
.footer-top{ display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.3fr; gap: var(--sp-xl); padding-block: var(--sp-2xl); }
.footer-brand .brand{ color: var(--color-text-on-primary); }
.footer-brand .brand-mark{ background: var(--color-accent); color: var(--color-primary-dark); }
.footer-brand p{ margin-top: var(--sp-sm); font-size: var(--fs-sm); max-width: 32ch; color: rgba(246,244,239,0.7); }
.footer-social{ display: flex; gap: var(--sp-2xs); margin-top: var(--sp-md); }
.footer-social a{
  width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: rgba(246,244,239,0.08); transition: background var(--t-fast);
}
.footer-social a:hover{ background: var(--color-accent); color: var(--color-primary-dark); }
.footer-col h4{ color: var(--color-text-on-primary); font-family: var(--font-body); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--sp-sm); }
.footer-col ul{ display: flex; flex-direction: column; gap: var(--sp-2xs); }
.footer-col a{ font-size: var(--fs-sm); transition: color var(--t-fast); }
.footer-col a:hover{ color: var(--color-accent-light); }
.footer-contact li{ display: flex; gap: var(--sp-2xs); font-size: var(--fs-sm); align-items: flex-start; }
.footer-contact i{ color: var(--color-accent-light); margin-top: 3px; }
.footer-newsletter input{
  width: 100%; padding: 0.7rem 0.9rem; border-radius: var(--radius-md); border: 1px solid rgba(246,244,239,0.2);
  background: rgba(246,244,239,0.06); color: var(--color-text-on-primary); margin-bottom: var(--sp-2xs); outline: none;
}
.footer-newsletter input::placeholder{ color: rgba(246,244,239,0.5); }
.footer-bottom{
  border-top: 1px solid rgba(246,244,239,0.12); padding-block: var(--sp-md);
  display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); color: rgba(246,244,239,0.6);
}
.footer-bottom-links{ display: flex; gap: var(--sp-md); }

/* --------------------------------- Shop / filters ------------------------------ */
.shop-layout{ display: grid; grid-template-columns: 268px 1fr; gap: var(--sp-xl); align-items: start; }
.filters-panel{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--sp-md); position: sticky; top: calc(var(--header-h) + var(--sp-md));
}
.filter-group{ padding-block: var(--sp-md); border-bottom: 1px solid var(--color-border); }
.filter-group:first-child{ padding-top: 0; }
.filter-group:last-child{ border-bottom: none; }
.filter-group h4{ font-family: var(--font-body); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--sp-sm); }
.filter-option{ display: flex; align-items: center; gap: var(--sp-2xs); padding: 6px 0; font-size: var(--fs-sm); cursor: pointer; }
.filter-option input{ accent-color: var(--color-accent); width: 16px; height: 16px; }
.filter-option .count{ margin-left: auto; color: var(--color-text-faint); font-size: var(--fs-xs); }
.price-range-inputs{ display: flex; align-items: center; gap: var(--sp-2xs); margin-top: var(--sp-2xs); }
.price-range-inputs input{ width: 100%; padding: 0.5rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); }
.range-slider{ width: 100%; accent-color: var(--color-accent); margin-top: var(--sp-2xs); }
.star-filter{ display: flex; align-items: center; gap: 4px; }
.rating-btn{ display: flex; align-items: center; gap: var(--sp-2xs); width: 100%; padding: 6px 4px; border-radius: var(--radius-sm); font-size: var(--fs-sm); border:1px solid transparent; background:transparent; text-align:left; }
.rating-btn:hover{ background: var(--color-surface-alt); }
.rating-btn.is-active{ border-color: var(--color-accent); background: var(--color-surface-alt); }
.rating-btn .stars{ color: var(--color-star); }

.shop-toolbar{
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
  margin-bottom: var(--sp-md); flex-wrap: wrap;
}
.results-count{ font-size: var(--fs-sm); color: var(--color-text-muted); }
.toolbar-right{ display: flex; align-items: center; gap: var(--sp-sm); }
.select-control{
  padding: 0.6rem 2rem 0.6rem 0.9rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235F5C54'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  appearance: none; font-size: var(--fs-sm); cursor: pointer;
}
.mobile-filter-btn{ display: none; }
.active-filter-chips{ display: flex; flex-wrap: wrap; gap: var(--sp-2xs); margin-bottom: var(--sp-md); }
.chip{
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-full);
  background: var(--color-surface-alt); border: 1px solid var(--color-border); font-size: var(--fs-xs); font-weight: 600;
}
.chip button{ background: none; border: none; color: var(--color-text-faint); display: grid; place-items: center; }
.chip button:hover{ color: var(--color-error); }

.load-more-wrap{ display: flex; justify-content: center; margin-top: var(--sp-xl); }

/* --------------------------------- Empty / error states ------------------------ */
.empty-state, .error-state{
  text-align: center; padding: var(--sp-3xl) var(--sp-md); display: flex; flex-direction: column; align-items: center; gap: var(--sp-sm);
}
.empty-state i, .error-state i{ font-size: 2.6rem; color: var(--color-border-strong); }
.empty-state h3, .error-state h3{ font-size: var(--fs-lg); }
.empty-state p, .error-state p{ color: var(--color-text-muted); max-width: 40ch; }

/* --------------------------------- Product detail page ------------------------- */
.product-detail{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2xl); align-items: start; }
.gallery-main{
  aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border);
  background: var(--color-surface-alt); position: relative; cursor: zoom-in;
}
.gallery-main img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-base); }
.gallery-main.is-zoomed img{ transform: scale(1.65); cursor: zoom-out; }
.gallery-thumbs{ display: flex; gap: var(--sp-2xs); margin-top: var(--sp-sm); }
.gallery-thumbs button{
  width: 76px; height: 76px; border-radius: var(--radius-md); overflow: hidden; border: 2px solid var(--color-border);
  padding: 0; background: var(--color-surface-alt); transition: border-color var(--t-fast);
}
.gallery-thumbs button.is-active{ border-color: var(--color-accent); }
.gallery-thumbs img{ width: 100%; height: 100%; object-fit: cover; }

.pd-brand{ font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent-dark); font-weight: 700; }
.pd-title{ font-size: var(--fs-2xl); margin-top: var(--sp-2xs); }
.pd-meta{ display: flex; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-sm); font-size: var(--fs-sm); color: var(--color-text-muted); }
.pd-meta .stars{ color: var(--color-star); }
.pd-price-row{ display: flex; align-items: baseline; gap: var(--sp-sm); margin-top: var(--sp-md); }
.pd-price-row .price-now{ font-size: var(--fs-2xl); }
.pd-price-row .badge-sale{ font-size: 0.72rem; }
.pd-short-desc{ margin-top: var(--sp-md); color: var(--color-text-muted); }
.pd-divider{ height: 1px; background: var(--color-border); margin-block: var(--sp-lg); }
.pd-stock{ font-weight: 600; font-size: var(--fs-sm); }
.pd-purchase-row{ display: flex; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-md); flex-wrap: wrap; }
.qty-stepper{ display: flex; align-items: center; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); overflow: hidden; }
.qty-stepper button{ width: 40px; height: 44px; background: var(--color-surface-alt); border: none; font-size: 1rem; color: var(--color-primary); }
.qty-stepper button:hover{ background: var(--color-border); }
.qty-stepper input{ width: 48px; height: 44px; border: none; text-align: center; border-left: 1px solid var(--color-border-strong); border-right: 1px solid var(--color-border-strong); outline: none; }
.pd-actions-row{ display: flex; gap: var(--sp-sm); flex-wrap: wrap; margin-top: var(--sp-md); }
.pd-actions-row .btn{ flex: 1; min-width: 160px; }
.pd-trust-list{ display: flex; flex-direction: column; gap: var(--sp-2xs); margin-top: var(--sp-lg); }
.pd-trust-list li{ display: flex; align-items: center; gap: var(--sp-2xs); font-size: var(--fs-sm); color: var(--color-text-muted); }
.pd-trust-list i{ color: var(--color-success); }

.pd-tabs{ margin-top: var(--sp-2xl); }
.pd-tab-nav{ display: flex; gap: var(--sp-lg); border-bottom: 1px solid var(--color-border); }
.pd-tab-btn{
  padding: var(--sp-sm) var(--sp-2xs); font-weight: 600; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; background:none; border-top:none; border-left:none; border-right:none;
}
.pd-tab-btn.is-active{ color: var(--color-primary); border-color: var(--color-accent); }
.pd-tab-panel{ display: none; padding-block: var(--sp-lg); }
.pd-tab-panel.is-active{ display: block; }
.spec-table{ width: 100%; border-collapse: collapse; }
.spec-table tr{ border-bottom: 1px solid var(--color-border); }
.spec-table td{ padding: var(--sp-xs) var(--sp-2xs); font-size: var(--fs-sm); }
.spec-table td:first-child{ color: var(--color-text-muted); width: 40%; }
.feature-list li{ display: flex; gap: var(--sp-2xs); padding: 6px 0; font-size: var(--fs-sm); }
.feature-list i{ color: var(--color-accent-dark); }

.review-summary{ display: flex; gap: var(--sp-2xl); align-items: center; padding-bottom: var(--sp-lg); border-bottom: 1px solid var(--color-border); margin-bottom: var(--sp-lg); }
.review-score{ text-align: center; }
.review-score strong{ font-family: var(--font-display); font-size: var(--fs-4xl); color: var(--color-primary); display:block; }
.review-score .stars{ color: var(--color-star); }
.review-list{ display: flex; flex-direction: column; gap: var(--sp-lg); }
.review-item{ padding-bottom: var(--sp-lg); border-bottom: 1px solid var(--color-border); }
.review-item:last-child{ border-bottom: none; }
.review-item-head{ display: flex; justify-content: space-between; align-items: center; }
.review-item-head strong{ font-size: var(--fs-sm); }
.review-item-head span{ font-size: var(--fs-xs); color: var(--color-text-faint); }
.review-item p{ margin-top: var(--sp-2xs); font-size: var(--fs-sm); color: var(--color-text-muted); }

.related-section{ margin-top: var(--sp-2xl); }

/* --------------------------------- Cart page ------------------------------------ */
.cart-layout{ display: grid; grid-template-columns: 1fr 360px; gap: var(--sp-xl); align-items: start; }
.cart-item{
  display: grid; grid-template-columns: 92px 1fr auto auto; gap: var(--sp-md); align-items: center;
  padding: var(--sp-md) 0; border-bottom: 1px solid var(--color-border);
}
.cart-item img{ width: 92px; height: 92px; object-fit: cover; border-radius: var(--radius-md); background: var(--color-surface-alt); }
.cart-item-name{ font-weight: 600; font-size: var(--fs-sm); }
.cart-item-cat{ font-size: var(--fs-xs); color: var(--color-text-faint); margin-top: 2px; }
.cart-item-price{ font-size: var(--fs-sm); color: var(--color-text-muted); margin-top: 4px; }
.cart-item-remove{ background: none; border: none; color: var(--color-text-faint); font-size: 1rem; }
.cart-item-remove:hover{ color: var(--color-error); }
.cart-item-total{ font-weight: 700; text-align: right; min-width: 70px; }

.cart-summary{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--sp-lg); position: sticky; top: calc(var(--header-h) + var(--sp-md));
}
.summary-row{ display: flex; justify-content: space-between; font-size: var(--fs-sm); padding: var(--sp-2xs) 0; }
.summary-row.total{ font-size: var(--fs-md); font-weight: 700; color: var(--color-primary); border-top: 1px solid var(--color-border); margin-top: var(--sp-sm); padding-top: var(--sp-sm); }
.promo-row{ display: flex; gap: var(--sp-2xs); margin: var(--sp-md) 0; }
.promo-row input{ flex: 1; padding: 0.65rem 0.8rem; border-radius: var(--radius-md); border: 1px solid var(--color-border-strong); outline: none; }
.promo-feedback{ font-size: var(--fs-xs); margin-top: var(--sp-2xs); display: none; }
.promo-feedback.is-visible{ display: block; }
.promo-feedback.success{ color: var(--color-success); }
.promo-feedback.error{ color: var(--color-error); }

/* --------------------------------- Forms (contact) ------------------------------ */
.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.form-field{ display: flex; flex-direction: column; gap: 6px; }
.form-field.full{ grid-column: 1 / -1; }
.form-field label{ font-size: var(--fs-sm); font-weight: 600; }
.form-field input, .form-field textarea, .form-field select{
  padding: 0.8rem 1rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); outline: none;
  background: var(--color-surface); transition: border-color var(--t-fast);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus{ border-color: var(--color-accent); }
.contact-info-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); margin-bottom: var(--sp-2xl); }
.contact-info-card{ text-align: center; padding: var(--sp-lg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.contact-info-card i{ font-size: 1.4rem; color: var(--color-accent-dark); margin-bottom: var(--sp-sm); }
.contact-info-card h3{ font-size: var(--fs-sm); font-family: var(--font-body); }
.contact-info-card p{ font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 4px; }
.contact-map{ aspect-ratio: 16/6; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); margin-top: var(--sp-2xl); background: var(--color-surface-alt); display: grid; place-items: center; color: var(--color-text-faint); flex-direction: column; gap: var(--sp-2xs); }
.contact-layout{ display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--sp-2xl); }
.contact-side{ display: flex; flex-direction: column; gap: var(--sp-md); }
.contact-side .why-item{ display:flex; gap: var(--sp-sm); }
.contact-side .why-item i{ color: var(--color-accent-dark); margin-top: 3px; }

/* --------------------------------- About page ---------------------------------- */
.about-hero{ text-align: center; max-width: 780px; margin-inline: auto; padding-block: var(--sp-2xl); }
.about-hero .eyebrow{ justify-content: center; }
.about-hero h1{ font-size: var(--fs-3xl); }
.about-hero p{ color: var(--color-text-muted); margin-top: var(--sp-md); font-size: var(--fs-md); }
.stats-strip{ display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-md); background: var(--color-primary); border-radius: var(--radius-lg); padding: var(--sp-xl); }
.stats-strip div{ text-align: center; color: var(--color-text-on-primary); }
.stats-strip strong{ display: block; font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--color-accent-light); }
.stats-strip span{ font-size: var(--fs-xs); opacity: 0.85; }
.values-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }
.value-card{ padding: var(--sp-lg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.value-card i{ font-size: 1.5rem; color: var(--color-accent-dark); margin-bottom: var(--sp-sm); }
.timeline{ position: relative; padding-left: var(--sp-lg); }
.timeline::before{ content:""; position:absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--color-border); }
.timeline-item{ position: relative; padding-bottom: var(--sp-lg); }
.timeline-item::before{ content:""; position:absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-accent); border: 2px solid var(--color-surface); box-shadow: 0 0 0 2px var(--color-accent); }
.timeline-item strong{ display:block; color: var(--color-accent-dark); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; }
.team-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); }
.team-card{ text-align: center; }
.team-card img{ aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: var(--sp-sm); }
.team-card strong{ display: block; font-size: var(--fs-sm); }
.team-card span{ font-size: var(--fs-xs); color: var(--color-text-muted); }

/* --------------------------------- Policy page ---------------------------------- */
.policy-layout{ display: grid; grid-template-columns: 260px 1fr; gap: var(--sp-2xl); align-items: start; }
.toc-panel{ background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--sp-md); position: sticky; top: calc(var(--header-h) + var(--sp-md)); }
.toc-panel h4{ font-size: var(--fs-sm); margin-bottom: var(--sp-sm); }
.toc-panel a{ display: block; padding: 6px 0; font-size: var(--fs-sm); color: var(--color-text-muted); border-left: 2px solid transparent; padding-left: var(--sp-xs); }
.toc-panel a:hover, .toc-panel a.is-active{ color: var(--color-accent-dark); border-color: var(--color-accent); }
.policy-content section{ margin-bottom: var(--sp-xl); scroll-margin-top: calc(var(--header-h) + var(--sp-md)); }
.policy-content h2{ font-size: var(--fs-lg); margin-bottom: var(--sp-sm); }
.policy-content p{ color: var(--color-text-muted); margin-bottom: var(--sp-sm); }
.policy-content ul{ margin: var(--sp-sm) 0; padding-left: var(--sp-md); list-style: disc; color: var(--color-text-muted); }
.policy-content li{ margin-bottom: 6px; }
.last-updated{ display:inline-flex; align-items:center; gap: 6px; font-size: var(--fs-xs); color: var(--color-text-muted); background: var(--color-surface-alt); padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--color-border); }

/* --------------------------------- 404 page -------------------------------------- */
.error-page{ text-align: center; padding-block: var(--sp-3xl); }
.error-page .code{ font-family: var(--font-display); font-size: 8rem; color: var(--color-primary); line-height: 1; }
.error-page .code span{ color: var(--color-accent); }
.error-page h1{ font-size: var(--fs-xl); margin-top: var(--sp-sm); }
.error-page p{ color: var(--color-text-muted); margin-top: var(--sp-sm); max-width: 48ch; margin-inline: auto; }
.error-actions{ display: flex; gap: var(--sp-sm); justify-content: center; margin-top: var(--sp-lg); flex-wrap: wrap; }
.error-search{ max-width: 420px; margin: var(--sp-lg) auto 0; display: flex; gap: var(--sp-2xs); }
.error-search input{ flex: 1; padding: 0.8rem 1rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); outline: none; }

/* --------------------------------- Page header banner ----------------------------- */
.page-banner{ background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); padding-block: var(--sp-xl); }
.page-banner h1{ font-size: var(--fs-2xl); }
.page-banner p{ color: var(--color-text-muted); margin-top: var(--sp-2xs); max-width: 60ch; }

/* --------------------------------- Toast (custom, lightweight) --------------------- */
.cart-toast-wrap{ position: fixed; bottom: 24px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }

/* SweetAlert2 brand overrides */
.swal2-popup.meridian-popup{ border-radius: var(--radius-lg); font-family: var(--font-body); }
.swal2-popup.meridian-popup .swal2-title{ font-family: var(--font-display); color: var(--color-primary); }
.swal2-styled.swal2-confirm.meridian-confirm{ background: var(--color-primary) !important; border-radius: var(--radius-md) !important; box-shadow: none !important; }
.swal2-styled.swal2-cancel.meridian-cancel{ background: var(--color-surface-alt) !important; color: var(--color-text) !important; border-radius: var(--radius-md) !important; box-shadow: none !important; }

/* ============================================================================
   ACCOUNT / AUTH / CART PREVIEW / CHECKOUT / ORDERS
   ============================================================================ */

/* ---- Cart preview dropdown ---- */
.cart-trigger{ position: relative; }
.cart-preview{
  position: absolute; top: calc(100% + var(--sp-sm)); right: 0; width: 340px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--sp-md);
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(0.98); transform-origin: top right;
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
  z-index: 210;
}
.cart-preview.is-open{ opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.cart-preview-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-sm); }
.cart-preview-head strong{ font-family: var(--font-display); font-size: var(--fs-sm); }
.cart-preview-head span{ font-size: var(--fs-xs); color: var(--color-text-muted); }
.cart-preview-list{ max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-xs); }
.cart-preview-item{ display: grid; grid-template-columns: 46px 1fr auto; gap: var(--sp-xs); align-items: center; }
.cart-preview-item img{ width: 46px; height: 46px; object-fit: cover; border-radius: var(--radius-sm); background: var(--color-surface-alt); }
.cart-preview-item .cpi-name{ font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; }
.cart-preview-item .cpi-meta{ font-size: 0.68rem; color: var(--color-text-muted); margin-top: 2px; }
.cart-preview-item .cpi-remove{ background: none; border: none; color: var(--color-text-faint); font-size: 0.8rem; padding: 4px; }
.cart-preview-item .cpi-remove:hover{ color: var(--color-error); }
.cart-preview-footer{ margin-top: var(--sp-sm); padding-top: var(--sp-sm); border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: var(--sp-2xs); }
.cart-preview-subtotal{ display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: 4px; }
.cart-preview-empty{ text-align: center; padding: var(--sp-lg) var(--sp-sm); color: var(--color-text-muted); }
.cart-preview-empty i{ font-size: 1.8rem; color: var(--color-border-strong); margin-bottom: var(--sp-2xs); display: block; }

/* ---- Auth-aware header actions ---- */
.auth-guest-actions{ display: flex; align-items: center; gap: 6px; }
.account-menu{ position: relative; display: none; }
.account-menu.is-authed{ display: block; }
.auth-guest-actions.is-hidden{ display: none; }
.account-trigger{
  display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent;
  padding: 6px 10px 6px 6px; border-radius: var(--radius-full); transition: background var(--t-fast), border-color var(--t-fast);
}
.account-trigger:hover, .account-trigger.is-open{ background: var(--color-surface-alt); border-color: var(--color-border); }
.account-trigger .chevron{ font-size: 0.6em; color: var(--color-text-faint); transition: transform var(--t-fast); }
.account-trigger.is-open .chevron{ transform: rotate(180deg); }
.account-avatar{
  width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent); color: #fff;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; text-transform: uppercase;
}
.account-name{ font-size: var(--fs-sm); font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown{
  position: absolute; top: calc(100% + 8px); right: 0; width: 230px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
  z-index: 210;
}
.account-dropdown.is-open{ opacity: 1; visibility: visible; transform: translateY(0); }
.account-dropdown a, .account-dropdown button{
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 500; color: var(--color-text); background: none; border: none; text-align: left; width: 100%;
}
.account-dropdown a:hover, .account-dropdown button:hover{ background: var(--color-surface-alt); color: var(--color-primary-dark); }
.account-dropdown i{ width: 16px; color: var(--color-text-faint); }
.account-dropdown button{ border-top: 1px solid var(--color-border); margin-top: 4px; padding-top: 12px; color: var(--color-error); cursor: pointer; }
.account-dropdown button i{ color: var(--color-error); }

.drawer-user-block{
  display: flex; align-items: center; gap: 10px; padding: var(--sp-sm); margin-bottom: var(--sp-sm);
  background: var(--color-surface-alt); border-radius: var(--radius-md); border: 1px solid var(--color-border);
}
.drawer-user-block .account-avatar{ width: 40px; height: 40px; font-size: 1rem; }

/* ---- Order status badges (shared across dashboard/history/details/tracking) ---- */
.status-badge{ display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 700; }
.status-badge::before{ content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending{ background: #FFF3E0; color: var(--color-warning); }
.status-confirmed{ background: #E9F0FF; color: #2255C9; }
.status-processing{ background: #FFF3E0; color: var(--color-warning); }
.status-shipped{ background: #E3F2FF; color: #1272C9; }
.status-delivered{ background: var(--color-success-bg); color: var(--color-success); }
.status-cancelled{ background: var(--color-error-bg); color: var(--color-error); }

/* ---- Auth pages (login / register / forgot password) ---- */
.auth-shell{ display: flex; align-items: center; justify-content: center; padding-block: var(--sp-2xl); }
.auth-card{
  width: 100%; max-width: 440px; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--sp-xl); box-shadow: var(--shadow-md);
}
.auth-card-head{ text-align: center; margin-bottom: var(--sp-lg); }
.auth-card-head .brand-mark{ width: 46px; height: 46px; margin-inline: auto; margin-bottom: var(--sp-sm); font-size: 1.3rem; background: var(--color-primary); color: #fff; border-radius: var(--radius-md); display:grid; place-items:center; }
.auth-card-head h1{ font-size: var(--fs-xl); }
.auth-card-head p{ color: var(--color-text-muted); font-size: var(--fs-sm); margin-top: 4px; }
.password-field{ position: relative; }
.password-field input{ padding-right: 42px !important; width: 100%; }
.password-toggle{ position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--color-text-faint); padding: 4px; }
.password-toggle:hover{ color: var(--color-text); }
.auth-divider{ display: flex; align-items: center; gap: var(--sp-sm); margin-block: var(--sp-md); color: var(--color-text-faint); font-size: var(--fs-xs); }
.auth-divider::before, .auth-divider::after{ content:""; flex:1; height:1px; background: var(--color-border); }
.auth-footer-link{ text-align: center; margin-top: var(--sp-md); font-size: var(--fs-sm); color: var(--color-text-muted); }
.auth-footer-link a{ color: var(--color-primary-dark); font-weight: 700; }
.form-check{ display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.form-check input{ width: 16px; height: 16px; accent-color: var(--color-primary); }
.form-row-between{ display: flex; align-items: center; justify-content: space-between; }

/* ---- Account dashboard ---- */
.dashboard-layout{ display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-xl); align-items: start; }
.dashboard-sidebar{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--sp-md); position: sticky; top: calc(var(--header-h) + var(--sp-md));
}
.dashboard-user{ display: flex; align-items: center; gap: 10px; padding-bottom: var(--sp-md); margin-bottom: var(--sp-sm); border-bottom: 1px solid var(--color-border); }
.dashboard-user .account-avatar{ width: 42px; height: 42px; font-size: 1.05rem; }
.dashboard-user strong{ display: block; font-size: var(--fs-sm); }
.dashboard-user span{ font-size: var(--fs-xs); color: var(--color-text-muted); }
.dashboard-nav{ display: flex; flex-direction: column; gap: 2px; }
.dashboard-nav a{
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-muted);
}
.dashboard-nav a:hover{ background: var(--color-surface-alt); color: var(--color-text); }
.dashboard-nav a.is-active{ background: var(--color-surface-alt); color: var(--color-primary-dark); }
.dashboard-nav a i{ width: 16px; }
.dashboard-nav .nav-sep{ height: 1px; background: var(--color-border); margin: 6px 0; }
.dashboard-nav .logout-link{ color: var(--color-error); }

.dashboard-section{ display: none; }
.dashboard-section.is-active{ display: block; animation: fadeInUp 420ms var(--ease) both; }

.stat-grid{ display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-sm); margin-bottom: var(--sp-lg); }
.stat-card{ background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--sp-md); }
.stat-card i{ color: var(--color-primary); font-size: 1.1rem; }
.stat-card strong{ display: block; font-family: var(--font-display); font-size: var(--fs-xl); margin-top: 6px; }
.stat-card span{ font-size: var(--fs-xs); color: var(--color-text-muted); }

.dash-welcome{ display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-lg); flex-wrap: wrap; gap: var(--sp-sm); }
.dash-welcome h1{ font-size: var(--fs-xl); }
.dash-welcome p{ color: var(--color-text-muted); margin-top: 2px; }
.quick-actions{ display: flex; gap: var(--sp-sm); flex-wrap: wrap; }

/* ---- Order cards (dashboard recent orders / purchase history / my orders) ---- */
.order-filters{ display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-md); }
.order-filter-btn{
  padding: 8px 14px; border-radius: var(--radius-full); border: 1px solid var(--color-border); background: var(--color-surface);
  font-size: var(--fs-xs); font-weight: 600; color: var(--color-text-muted); transition: all var(--t-fast);
}
.order-filter-btn:hover{ border-color: var(--color-primary); }
.order-filter-btn.is-active{ background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.order-search{ margin-bottom: var(--sp-md); max-width: 320px; }

.order-card{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--sp-md); margin-bottom: var(--sp-sm); transition: box-shadow var(--t-base), border-color var(--t-base);
}
.order-card:hover{ box-shadow: var(--shadow-sm); border-color: var(--color-border-strong); }
.order-card-head{ display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-sm); padding-bottom: var(--sp-sm); border-bottom: 1px solid var(--color-border); }
.order-card-head .order-num{ font-weight: 700; font-size: var(--fs-sm); }
.order-card-head .order-date{ font-size: var(--fs-xs); color: var(--color-text-muted); }
.order-card-products{ display: flex; gap: 6px; margin-bottom: var(--sp-sm); }
.order-card-products img{ width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-surface-alt); }
.order-card-products .more-count{ width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--color-surface-alt); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; color: var(--color-text-muted); }
.order-card-foot{ display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.order-card-total{ font-weight: 700; }
.order-card-actions{ display: flex; gap: 6px; }

/* ---- Checkout ---- */
.checkout-steps{ display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: var(--sp-xl); }
.checkout-step{ display: flex; align-items: center; gap: 8px; }
.checkout-step .step-circle{
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700;
  background: var(--color-surface-alt); border: 2px solid var(--color-border); color: var(--color-text-faint); transition: all var(--t-base);
}
.checkout-step span{ font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-faint); transition: color var(--t-base); }
.checkout-step.is-active .step-circle{ background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.checkout-step.is-active span{ color: var(--color-text); }
.checkout-step.is-done .step-circle{ background: var(--color-success); border-color: var(--color-success); color: #fff; }
.checkout-step-line{ width: 48px; height: 2px; background: var(--color-border); }
.checkout-panel{ display: none; animation: fadeInUp 380ms var(--ease) both; }
.checkout-panel.is-active{ display: block; }
.checkout-layout{ display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-xl); align-items: start; }
.checkout-card{ background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--sp-lg); }
.review-line-item{ display: flex; gap: var(--sp-sm); align-items: center; padding: var(--sp-sm) 0; border-bottom: 1px solid var(--color-border); }
.review-line-item img{ width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--color-surface-alt); }
.review-line-item .rli-name{ font-weight: 600; font-size: var(--fs-sm); }
.review-line-item .rli-meta{ font-size: var(--fs-xs); color: var(--color-text-muted); }
.review-line-item .rli-total{ margin-left: auto; font-weight: 700; }

.payment-methods{ display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-sm); }
.payment-method-card{
  border: 2px solid var(--color-border); border-radius: var(--radius-md); padding: var(--sp-md);
  display: flex; align-items: center; gap: var(--sp-sm); cursor: pointer; transition: all var(--t-fast);
}
.payment-method-card:hover{ border-color: var(--color-border-strong); }
.payment-method-card.is-selected{ border-color: var(--color-primary); background: var(--color-surface-alt); }
.payment-method-card i{ font-size: 1.3rem; color: var(--color-primary); }
.payment-method-card strong{ display: block; font-size: var(--fs-sm); }
.payment-method-card span{ font-size: var(--fs-xs); color: var(--color-text-muted); }

.payment-processing{ text-align: center; padding: var(--sp-2xl) var(--sp-md); }
.payment-processing .spinner-lg{ margin-bottom: var(--sp-md); }

.checkout-nav-actions{ display: flex; justify-content: space-between; margin-top: var(--sp-lg); }

/* ---- Order confirmation ---- */
.confirmation-check{
  width: 84px; height: 84px; border-radius: 50%; background: var(--color-success-bg); color: var(--color-success);
  display: grid; place-items: center; font-size: 2.4rem; margin-inline: auto; margin-bottom: var(--sp-md);
  animation: scaleIn 500ms var(--ease) both;
}

/* ---- Order tracking timeline ---- */
.tracking-timeline{ display: flex; flex-direction: column; }
.tracking-stage{ display: flex; gap: var(--sp-md); position: relative; padding-bottom: var(--sp-lg); }
.tracking-stage:last-child{ padding-bottom: 0; }
.tracking-stage-marker{ display: flex; flex-direction: column; align-items: center; }
.tracking-stage-dot{
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem;
  background: var(--color-surface-alt); border: 2px solid var(--color-border); color: var(--color-text-faint); flex-shrink: 0;
  transition: all var(--t-base); z-index: 1;
}
.tracking-stage-line{ width: 2px; flex: 1; background: var(--color-border); margin-top: 2px; }
.tracking-stage.is-complete .tracking-stage-dot{ background: var(--color-success); border-color: var(--color-success); color: #fff; }
.tracking-stage.is-complete .tracking-stage-line{ background: var(--color-success); }
.tracking-stage.is-current .tracking-stage-dot{ background: var(--color-primary); border-color: var(--color-primary); color: #fff; animation: badgePop 600ms var(--ease); }
.tracking-stage-body{ padding-top: 4px; }
.tracking-stage-body strong{ font-size: var(--fs-sm); }
.tracking-stage-body span{ display: block; font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
.tracking-stage.is-upcoming .tracking-stage-body strong{ color: var(--color-text-faint); }

.tracking-lookup{ display: flex; gap: var(--sp-sm); max-width: 480px; }
.tracking-summary-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); margin-bottom: var(--sp-xl); }
.tracking-summary-card{ background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--sp-md); }
.tracking-summary-card span{ display: block; font-size: var(--fs-xs); color: var(--color-text-muted); margin-bottom: 4px; }
.tracking-summary-card strong{ font-size: var(--fs-sm); }

/* ---- Avatar upload (profile settings) ---- */
.avatar-upload{ display: flex; align-items: center; gap: var(--sp-md); }
.avatar-upload .account-avatar{ width: 64px; height: 64px; font-size: 1.4rem; }
