/* ============================================================
   Ronica Mart — theme
   Forest green, sunglow and cultured grey:
     #0F4F23 forest green - brand, buttons, prices, dark bands
     #FFCC00 sunglow      - accent, highlights, calls to action
     #F6F6F6 cultured     - page background behind white cards
   Every colour below is a token - nothing downstream hard-codes one,
   so re-skinning the whole site means editing this block alone.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* brand - forest green ramp from #0F4F23 */
  --primary-50:  #eef5f0;
  --primary-100: #dcebe0;
  --primary-200: #b9d6c1;
  --primary-300: #86b593;
  --primary-400: #3f7f52;
  --primary-500: #0f4f23;
  --primary-600: #0b401c;
  --primary-700: #083115;

  /* brand partner - sunglow, the accent that sits on the green */
  --violet-400: #ffcc00;
  --violet-500: #0b401c;
  --violet-600: #083115;

  /* accents - the colour the site is allowed to be playful with */
  --teal:   #0f4f23;
  --teal-2: #0b401c;
  --coral:  #e8891c;
  --amber:  #ffcc00;
  --rose:   #d6455d;
  --lime:   #6c9a2a;
  --sky:    #3d8fc4;
  --sun:    #ffcc00;
  --sun-2:  #e6b800;
  --sun-bg: #fff6cc;

  /* surfaces */
  --surface:   #f6f6f6;   /* page background - "cultured" */
  --surface-2: #efefef;   /* alternating band, table heads */
  --surface-3: #e4e4e4;   /* pressed / muted fills */
  --card:      #ffffff;
  --white:     #ffffff;

  /* ink */
  --ink:   #14261a;
  --ink-2: #5f6b63;
  --ink-3: #9aa39d;
  --line:  #e3e6e4;
  --line-2:#d2d7d3;

  /* the dark surfaces: member/admin sidebar, dark tiles */
  --night:   #0f4f23;
  --night-2: #0a3a19;

  /* text tones that sit on those dark surfaces */
  --on-ink:   #ffffff;
  --on-ink-2: #e2eee5;
  --on-ink-3: #bdd4c3;
  --on-ink-4: #8fb39a;
  --on-ink-5: #6b9277;

  /* semantic accents kept as their own names - inline styles use these */
  --leaf:  #0f4f23;   /* savings, discounts, "you earned" */
  --berry: #d6455d;   /* counts, attention dots */

  /* system */
  --ok:   #12a150;
  --warn: #b54708;
  --bad:  #d92d20;
  --info: #175cd3;

  /* tinted triples for badges and alerts — background / text / hairline */
  --ok-bg:   #e7f6ec;  --ok-ink:   #05603a;  --ok-line:   #b7e4c7;
  --warn-bg: #fef4e6;  --warn-ink: #93370d;  --warn-line: #fbdba7;
  --bad-bg:  #fee4e2;  --bad-ink:  #b42318;  --bad-line:  #fecdca;
  --info-bg: #e6efff;  --info-ink: #1849a9;  --info-line: #b9d3ff;
  --leaf-bg: #dcebe0;  --leaf-ink: #0b401c;
  --brand-bg:#fff6cc;  --brand-ink:#5c4a00;  --brand-line: #ffe680;
  --teal-bg: #dcebe0;  --teal-ink: #0b401c;
  --coral-bg:#fdecd8;  --coral-ink:#8a4a07;
  --rose-bg: #fbe3e7;  --rose-ink: #9c1f35;
  --violet-bg:#fff6cc; --violet-ink:#5c4a00;

  /* coloured glows */
  --glow-primary:   rgba(15, 79, 35, .2);
  --glow-primary-2: rgba(15, 79, 35, .32);
  --glow-accent:    rgba(255, 204, 0, .32);
  --ring-primary:   rgba(15, 79, 35, .18);

  /* signature fills — kept nearly flat; this theme is clean, not glossy */
  --grad-primary: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  --grad-hero:    linear-gradient(120deg, #0f4f23 0%, #145c2a 60%, #0b401c 100%);
  --grad-teal:    linear-gradient(135deg, var(--primary-500), var(--primary-600));
  --grad-coral:   linear-gradient(135deg, var(--coral), #f8b07f);
  --grad-night:   linear-gradient(160deg, var(--night), var(--night-2));

  /* shape */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 15px;
  --r-xl: 22px;
  --pill: 999px;

  --sh-1: 0 1px 2px rgba(37, 61, 78, .04);
  --sh-2: 0 10px 26px rgba(37, 61, 78, .08);
  --sh-3: 0 22px 48px rgba(37, 61, 78, .14);

  --wrap: 1400px;
  --nav-h: 64px;

  --ff-display: "Quicksand", "Lato", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; font-family: var(--ff-display); font-weight: 700; line-height: 1.18; letter-spacing: -.022em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.12rem, 2vw, 1.4rem); }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--primary-200); color: var(--primary-700); }

/* A visible focus ring everywhere, in the brand colour. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--primary-500); outline-offset: 2px; border-radius: 6px;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-sm { max-width: 760px; }
.section { padding: clamp(48px, 7vw, 92px) 0; position: relative; }
.section--cream { background: var(--surface); }
.section--cream2 { background: var(--surface-2); }
.section--white { background: var(--white); }
.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrapf { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }

/* ---------- Eyebrow / section head ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--primary-600);
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--grad-primary); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center-x { margin-inline: auto; text-align: center; }
.section-head.center-x .eyebrow::before { display: none; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 26px; border-radius: var(--pill); border: 0; cursor: pointer;
  font-weight: 700; font-size: .94rem; letter-spacing: .005em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease,
              color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad-primary); color: var(--white); box-shadow: 0 8px 20px var(--glow-primary); }
.btn-primary:hover { box-shadow: 0 12px 28px var(--glow-primary-2); }
/* kept for the pages that ask for the softer, secondary fill */
.btn-gold { background: var(--primary-100); color: var(--primary-700); box-shadow: none; }
.btn-gold:hover { background: var(--primary-200); }
.btn-accent { background: var(--grad-teal); color: #04322c; box-shadow: 0 8px 20px var(--glow-accent); }
.btn-dark { background: var(--night); color: var(--white); }
.btn-dark:hover { background: var(--night-2); }
.btn-ghost { background: var(--white); color: var(--ink); border: 1.5px solid var(--line-2); box-shadow: var(--sh-1); }
.btn-ghost:hover { border-color: var(--primary-400); color: var(--primary-600); }
.btn-sm { padding: 9px 17px; font-size: .84rem; }
.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--pill);
  background: var(--white); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; color: var(--ink-2);
  transition: all .16s ease;
}
.chip:hover { border-color: var(--primary-300); color: var(--primary-600); }
.chip.is-active { background: var(--grad-primary); border-color: transparent; color: var(--white); box-shadow: 0 6px 16px var(--glow-primary); }
/* category chip with its artwork; category_img() supplies the fallback */
.chip--img { padding-left: 5px; }
.chip--img img {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  background: var(--white); flex: 0 0 26px;
}
.chip.is-active img { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--pill);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.badge-gold  { background: var(--brand-bg); color: var(--brand-ink); }
.badge-leaf  { background: var(--leaf-bg); color: var(--leaf-ink); }
.badge-berry { background: var(--rose-bg); color: var(--rose-ink); }
.badge-ok    { background: var(--ok-bg); color: var(--ok-ink); }
.badge-warn  { background: var(--warn-bg); color: var(--warn-ink); }
.badge-bad   { background: var(--bad-bg); color: var(--bad-ink); }
.badge-info  { background: var(--info-bg); color: var(--info-ink); }
.badge-teal  { background: var(--teal-bg); color: var(--teal-ink); }
.badge-coral { background: var(--coral-bg); color: var(--coral-ink); }

/* ---------- Torn / wave dividers ---------- */
.torn { position: relative; line-height: 0; }
.torn svg { width: 100%; height: clamp(28px, 4vw, 64px); display: block; }

/* ============================================================
   HEADER
   ============================================================ */
.topbar {
  background: var(--grad-primary); color: rgba(255, 255, 255, .92);
  font-size: .8rem; letter-spacing: .01em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar a { color: rgba(255, 255, 255, .9); }
.topbar a:hover { color: var(--white); }
.topbar-links { display: flex; gap: 18px; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { box-shadow: var(--sh-2); border-color: var(--line); background: rgba(255, 255, 255, .96); }
.nav { display: flex; align-items: center; gap: 20px; min-height: var(--nav-h); }

.logo { display: flex; align-items: center; gap: 11px; font-family: var(--ff-display); font-weight: 700; font-size: 1.28rem; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-primary);
  color: var(--white); font-size: 1.05rem; box-shadow: 0 6px 16px var(--glow-primary);
}
.logo small { display: block; font-family: var(--ff-body); font-size: .62rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); line-height: 1; }

.nav-menu { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav-menu a {
  padding: 9px 15px; border-radius: var(--pill); font-size: .93rem; font-weight: 600;
  color: var(--ink-2); transition: background .18s ease, color .18s ease;
}
.nav-menu a:hover { background: var(--primary-50); color: var(--primary-600); }
.nav-menu a.is-active { background: var(--primary-100); color: var(--primary-700); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; position: relative; transition: all .18s ease;
}
.icon-btn:hover { border-color: var(--primary-400); color: var(--primary-600); transform: translateY(-2px); }
.icon-btn .count {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--pill); background: var(--berry); color: var(--white);
  font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--white);
}

/* product gallery thumbnails */
.thumb { border-width: 1.5px; }
.thumb.is-active { border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--ring-primary); }
.thumb:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
@media (max-width: 520px) {
  .thumb { width: 62px !important; height: 52px !important; }
}
.nav-toggle { display: none; }

/* search overlay */
.search-pop {
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--sh-2);
  padding: 22px 0; display: none;
}
.search-pop.is-open { display: block; }
.search-form { display: flex; gap: 10px; }
.search-form input {
  flex: 1; padding: 14px 20px; border-radius: var(--pill);
  border: 1.5px solid var(--line); background: var(--surface); outline: 0;
}
.search-form input:focus { border-color: var(--primary-500); background: var(--white); box-shadow: 0 0 0 3px var(--ring-primary); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-hero);
  color: var(--white);
  padding: clamp(48px, 6vw, 86px) 0 clamp(70px, 8vw, 120px);
}
/* Two soft colour blobs give the flat gradient some depth. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46% 52% at 82% 8%,  rgba(0, 194, 168, .42), transparent 68%),
    radial-gradient(40% 48% at 8% 92%,  rgba(255, 122, 69, .34), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 15% 90%, rgba(255, 255, 255, .16), transparent 70%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.hero h1 { color: var(--white); margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: #ffe8a3; text-shadow: 0 3px 18px rgba(16, 24, 40, .3); }
.hero .eyebrow { color: #c9f7ef; }
.hero .eyebrow::before { background: var(--teal); }
.hero-lead { font-size: 1.08rem; color: rgba(255, 255, 255, .88); max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
/* On the gradient the filled button has to be the light one to stand out —
   an indigo button on an indigo hero disappears. */
.hero .btn-primary,
.hero .btn-dark { background: var(--white); color: var(--primary-700); box-shadow: 0 10px 26px rgba(16, 24, 40, .22); }
.hero .btn-primary:hover,
.hero .btn-dark:hover { background: var(--white); color: var(--primary-700); box-shadow: 0 14px 32px rgba(16, 24, 40, .3); }
.hero .btn-ghost { background: rgba(255, 255, 255, .12); color: var(--white); border-color: rgba(255, 255, 255, .38); box-shadow: none; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .2); border-color: var(--white); color: var(--white); }
/* Page headers reuse .hero, so the breadcrumb sitting on it must go light. */
.hero .crumb { color: rgba(255, 255, 255, .72); }
.hero .crumb a:hover { color: var(--white); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 40px; }
.hero-stats b { display: block; font-family: var(--ff-display); font-size: 1.7rem; color: var(--white); line-height: 1; }
.hero-stats span { font-size: .82rem; font-weight: 600; color: rgba(255, 255, 255, .78); }

.hero-art { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero-art img { border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.hero-float {
  position: absolute; background: var(--white); border-radius: var(--r);
  padding: 12px 16px; box-shadow: var(--sh-2); display: flex; align-items: center; gap: 10px;
  font-size: .82rem; font-weight: 700; color: var(--ink); animation: bob 5s ease-in-out infinite;
}
.hero-float i { color: var(--primary-500); font-size: 1.1rem; }
.hero-float--tl { top: 8%; left: -4%; }
.hero-float--br { bottom: 10%; right: -3%; animation-delay: -2.5s; }
.hero-float--br i { color: var(--teal-2); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* decorative leaves */
.leaf-deco { position: absolute; opacity: .35; pointer-events: none; z-index: 1; filter: saturate(0) brightness(3); }
.leaf-deco--1 { top: 6%;  left: -20px; width: 120px; transform: rotate(-18deg); }
.leaf-deco--2 { bottom: 8%; right: -24px; width: 150px; transform: rotate(24deg); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card--white { background: var(--white); }
.card--hover:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: var(--primary-300); }
/* A tinted top edge is the cheapest way to make a wall of cards feel colourful. */
.card--accent { border-top: 3px solid var(--primary-500); }
.card--accent-teal  { border-top: 3px solid var(--teal); }
.card--accent-coral { border-top: 3px solid var(--coral); }

/* product card */
.p-card {
  background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  box-shadow: var(--sh-1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--sh-2); border-color: var(--primary-200); }
.p-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(150deg, var(--primary-50), var(--surface-2)); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.p-card:hover .p-thumb img { transform: scale(1.05); }
.p-thumb .badge { position: absolute; top: 12px; left: 12px; box-shadow: var(--sh-1); }
.p-wish {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: 0; display: grid; place-items: center;
  color: var(--ink-2); cursor: pointer;
}
.p-wish:hover { color: var(--berry); }
.p-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.p-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-cat { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary-600); }
/* shipping weight, shown right on the card so the delivery rule is obvious */
.p-weight {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 3px 9px; border-radius: var(--pill);
  background: var(--surface-2); color: var(--ink-2);
  font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.p-weight i { font-size: .66rem; color: var(--ink-3); }
.p-name { font-family: var(--ff-display); font-size: 1.05rem; margin: 8px 0 8px; line-height: 1.3; }
.p-name a:hover { color: var(--primary-600); }
.p-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--ff-display); font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.price s { font-family: var(--ff-body); font-size: .85rem; font-weight: 500; color: var(--ink-3); margin-left: 7px; }
.stars { color: var(--amber); font-size: .8rem; letter-spacing: 1px; }

/* category pill card */
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 14px; border-radius: var(--r-lg); background: var(--white);
  border: 1px solid var(--line); text-align: center; box-shadow: var(--sh-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: var(--primary-300); }
.cat-card img, .cat-ico {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--primary-100), var(--violet-400));
  display: grid; place-items: center; color: var(--primary-700); font-size: 1.5rem;
}
/* Rotate the tint so a row of categories is not one flat colour. */
.cat-card:nth-child(6n+2) img, .cat-card:nth-child(6n+2) .cat-ico { background: linear-gradient(135deg, var(--teal-bg), var(--teal)); color: var(--teal-ink); }
.cat-card:nth-child(6n+3) img, .cat-card:nth-child(6n+3) .cat-ico { background: linear-gradient(135deg, var(--coral-bg), var(--coral)); color: var(--coral-ink); }
.cat-card:nth-child(6n+4) img, .cat-card:nth-child(6n+4) .cat-ico { background: linear-gradient(135deg, var(--rose-bg), var(--rose)); color: var(--rose-ink); }
.cat-card:nth-child(6n+5) img, .cat-card:nth-child(6n+5) .cat-ico { background: linear-gradient(135deg, var(--ok-bg), var(--lime)); color: var(--leaf-ink); }
.cat-card:nth-child(6n+6) img, .cat-card:nth-child(6n+6) .cat-ico { background: linear-gradient(135deg, var(--warn-bg), var(--amber)); color: var(--warn-ink); }
.cat-card b { font-size: .92rem; }
.cat-card span { font-size: .76rem; color: var(--ink-3); }

/* package card */
.pkg-card { position: relative; background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line);
  padding: 26px 24px; display: flex; flex-direction: column; box-shadow: var(--sh-1); transition: all .22s ease; }
.pkg-card:hover { transform: translateY(-6px); box-shadow: var(--sh-2); border-color: var(--primary-300); }
.pkg-card.is-featured {
  background: linear-gradient(165deg, var(--white), var(--primary-50));
  border-color: var(--primary-300); box-shadow: 0 12px 32px var(--glow-primary);
}
.pkg-price { font-family: var(--ff-display); font-size: 2rem; color: var(--primary-600); line-height: 1; margin: 6px 0 4px; }
.pkg-list { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 9px; font-size: .9rem; }
.pkg-list li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); }
.pkg-list i { color: var(--teal-2); margin-top: 4px; font-size: .8rem; }

/* feature / usp strip */
.usp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.usp-item { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--white);
  border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.usp-ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-100); color: var(--primary-600); font-size: 1.15rem; }
/* Each item in a strip gets its own colour, in a fixed rotation. */
.usp-item:nth-child(4n+2) .usp-ico { background: var(--teal-bg);  color: var(--teal-ink); }
.usp-item:nth-child(4n+3) .usp-ico { background: var(--coral-bg); color: var(--coral-ink); }
.usp-item:nth-child(4n+4) .usp-ico { background: var(--ok-bg);    color: var(--ok-ink); }
.usp-item b { display: block; font-size: .95rem; }
.usp-item p { margin: 2px 0 0; font-size: .84rem; color: var(--ink-2); line-height: 1.5; }

/* split feature (image + copy) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split-art { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-2); }
.split-art img { width: 100%; height: 100%; object-fit: cover; }

/* stat tiles */
.stat-tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--sh-1); }
.stat-tile b { display: block; font-family: var(--ff-display); font-size: 1.8rem; line-height: 1; color: var(--primary-600); }
.stat-tile span { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.stat-tile:nth-child(4n+2) b { color: var(--teal-2); }
.stat-tile:nth-child(4n+3) b { color: var(--coral); }
.stat-tile:nth-child(4n+4) b { color: var(--rose); }

/* reward rail */
.reward-card { text-align: center; padding: 22px 16px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); transition: all .2s ease; }
.reward-card:hover { transform: translateY(-5px); box-shadow: var(--sh-2); border-color: var(--primary-300); }
.reward-card .r-ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; display: grid;
  place-items: center; background: var(--grad-primary); color: var(--white); font-size: 1.3rem;
  box-shadow: 0 8px 18px var(--glow-primary); }
.reward-card:nth-child(5n+2) .r-ico { background: var(--grad-teal); box-shadow: 0 8px 18px var(--glow-accent); }
.reward-card:nth-child(5n+3) .r-ico { background: var(--grad-coral); box-shadow: none; }
.reward-card:nth-child(5n+4) .r-ico { background: linear-gradient(135deg, var(--rose), #ff86b0); box-shadow: none; }
.reward-card:nth-child(5n+5) .r-ico { background: linear-gradient(135deg, var(--lime), #a6e02f); box-shadow: none; }
.reward-card b { display: block; font-size: .95rem; }
.reward-card span { font-size: .76rem; color: var(--ink-3); }

/* testimonial */
.quote-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-1); }
.quote-card p { font-size: .95rem; color: var(--ink-2); }
.quote-who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-primary); color: var(--white); font-weight: 800; font-size: .85rem; flex: none; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--grad-hero);
  border-radius: var(--r-xl); padding: clamp(32px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  box-shadow: 0 18px 44px var(--glow-primary);
  color: var(--white);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(45% 70% at 92% 12%, rgba(0, 194, 168, .45), transparent 70%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: .25em; color: var(--white); }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .86); }
.cta-band .btn-primary { background: var(--white); color: var(--primary-700); }
.cta-band .btn-ghost { background: rgba(255, 255, 255, .12); color: var(--white); border-color: rgba(255, 255, 255, .4); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--white); outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--ring-primary);
}
.field .hint { font-size: .78rem; color: var(--ink-3); margin-top: 5px; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 18px; border-radius: var(--r-sm); font-size: .9rem; font-weight: 600;
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px;
  border: 1px solid transparent; border-left-width: 4px; }
.alert-success { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); border-left-color: var(--ok); }
.alert-danger  { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-line); border-left-color: var(--bad); }
.alert-warning { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); border-left-color: var(--warn); }
.alert-info    { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-line); border-left-color: var(--info); }

.flash-stack { position: fixed; top: 88px; right: 20px; z-index: 200; width: min(340px, calc(100vw - 40px)); }
.flash-stack .alert { box-shadow: var(--sh-2); animation: slideIn .3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--white); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 620px; }
table.tbl th { text-align: left; padding: 13px 16px; background: var(--surface-2); font-size: .74rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); white-space: nowrap; }
table.tbl td { padding: 13px 16px; border-top: 1px solid var(--line); }
table.tbl tbody tr:hover { background: var(--primary-50); }

/* ---------- Breadcrumb ---------- */
.crumb { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-3); padding: 18px 0; flex-wrap: wrap; }
.crumb a:hover { color: var(--primary-600); }
.crumb i { font-size: .6rem; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; }
.pager a:hover { border-color: var(--primary-400); color: var(--primary-600); }
.pager .is-active { background: var(--grad-primary); border-color: transparent; color: var(--white); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty i { font-size: 2.6rem; color: var(--primary-300); margin-bottom: 14px; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--grad-night); color: var(--on-ink-2); padding: clamp(46px, 6vw, 76px) 0 0; }
.site-footer h4 { color: var(--white); font-family: var(--ff-body); font-size: .82rem;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: var(--on-ink-3); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .9rem; }
.footer-grid a { color: var(--on-ink-3); }
.footer-grid a:hover { color: var(--white); }
.footer-brand p { font-size: .9rem; color: var(--on-ink-3); max-width: 34ch; }
.footer-brand .logo { color: var(--on-ink); }
.footer-brand .logo small { color: var(--on-ink-4); }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .09); color: var(--on-ink-2); transition: all .2s ease; }
.social a:hover { background: var(--grad-primary); color: var(--white); transform: translateY(-2px); }
.foot-contact { display: grid; gap: 12px; font-size: .9rem; }
.foot-contact div { display: flex; gap: 10px; align-items: flex-start; }
.foot-contact i { color: var(--violet-400); margin-top: 4px; }
.footer-bottom { margin-top: 46px; border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--on-ink-4); }

/* ============================================================
   DASHBOARD SHELL  (member + admin)
   ============================================================ */
.dash { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; background: var(--surface); }

.side {
  background: var(--grad-night); color: var(--on-ink-3); padding: 22px 16px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .logo { color: var(--on-ink); margin-bottom: 18px; padding-inline: 8px; }
.side .logo small { color: var(--on-ink-4); }
.side-group { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--on-ink-5); margin: 16px 0 6px; padding-inline: 12px; }
.side a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px;
  font-size: .92rem; font-weight: 600; color: var(--on-ink-3); transition: all .16s ease;
}
.side a i { width: 18px; text-align: center; font-size: .95rem; color: var(--on-ink-4); transition: color .16s ease; }
.side a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.side a:hover i { color: var(--violet-400); }
.side a.is-active { background: var(--grad-primary); color: var(--white); box-shadow: 0 8px 18px rgba(91, 75, 214, .45); }
.side a.is-active i { color: var(--white); }
.side .side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }

.dash-body { min-width: 0; display: flex; flex-direction: column; }
.dash-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.dash-top h1 { font-size: 1.4rem; margin: 0; }
.dash-top .spacer { margin-left: auto; }
.dash-main { padding: 28px; flex: 1; }
.side-toggle { display: none; }

/* metric tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; display: flex; gap: 14px; align-items: flex-start;
  box-shadow: var(--sh-1); transition: transform .2s ease, box-shadow .2s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tile-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--primary-100); color: var(--primary-600); font-size: 1.05rem; }
.tile b { display: block; font-family: var(--ff-display); font-size: 1.5rem; line-height: 1.15; }
.tile span { font-size: .8rem; color: var(--ink-3); font-weight: 600; }

/* A row of plain tiles cycles through the accent colours rather than sitting
   flat. :not([class*="tile--"]) keeps it away from the tiles that already
   declare a variant — those set their own icon colour, and without this the
   rotation would out-specify them and drop a pale teal chip on a dark tile. */
.tiles > .tile:not([class*="tile--"]):nth-child(4n+2) .tile-ico { background: var(--teal-bg);   color: var(--teal-ink); }
.tiles > .tile:not([class*="tile--"]):nth-child(4n+3) .tile-ico { background: var(--coral-bg);  color: var(--coral-ink); }
.tiles > .tile:not([class*="tile--"]):nth-child(4n+4) .tile-ico { background: var(--violet-bg); color: var(--violet-ink); }

/* the two headline tiles keep their own explicit look */
.tile--gold { background: var(--grad-primary); border-color: transparent; box-shadow: 0 12px 28px var(--glow-primary); }
.tile--gold .tile-ico { background: rgba(255, 255, 255, .22); color: var(--white); }
.tile--gold b, .tile--gold span { color: var(--white); }
.tile--gold span { color: rgba(255, 255, 255, .8); }
.tile--dark { background: var(--grad-night); border-color: transparent; }
.tile--dark .tile-ico { background: rgba(255, 255, 255, .12); color: var(--violet-400); }
.tile--dark b { color: var(--on-ink); } .tile--dark span { color: var(--on-ink-4); }
.tile--teal { background: var(--grad-teal); border-color: transparent; box-shadow: 0 12px 28px var(--glow-accent); }
.tile--teal .tile-ico { background: rgba(255, 255, 255, .3); color: #04322c; }
.tile--teal b, .tile--teal span { color: #04322c; }

/* panel */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(180deg, var(--primary-50), var(--white)); }
.panel-head h3 { margin: 0; font-size: 1.02rem; }
.panel-body { padding: 20px; }
.panel .table-wrap { border: 0; border-radius: 0; }

/* referral link box */
.copy-box { display: flex; gap: 8px; background: var(--primary-50); border: 1.5px dashed var(--primary-300);
  border-radius: var(--r-sm); padding: 8px 8px 8px 14px; align-items: center; }
.copy-box input { flex: 1; border: 0; background: transparent; outline: 0; font-size: .86rem; font-weight: 600; min-width: 0; }

/* binary tree */
.tree { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tree-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.tree-node {
  width: 132px; padding: 12px 10px; border-radius: var(--r); text-align: center;
  background: var(--white); border: 1.5px solid var(--line); font-size: .78rem; box-shadow: var(--sh-1);
}
.tree-node.is-me { background: var(--grad-primary); border-color: transparent; color: var(--white); box-shadow: 0 10px 22px var(--glow-primary); }
.tree-node.is-me span { color: rgba(255, 255, 255, .82); }
.tree-node.is-me .t-av { background: rgba(255, 255, 255, .25); color: var(--white); }
.tree-node.is-empty { background: var(--surface-2); border-style: dashed; color: var(--ink-3); box-shadow: none; }
.tree-node .t-av { width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 50%; display: grid;
  place-items: center; background: var(--primary-100); color: var(--primary-700); font-weight: 800; font-size: .72rem; }
.tree-node b { display: block; font-size: .8rem; line-height: 1.25; }
.tree-node span { color: var(--ink-3); font-size: .68rem; }
.tree-link { width: 2px; height: 26px; background: var(--line-2); }
.tree-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* progress */
.bar { height: 9px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--grad-primary); }
.bar--teal span { background: var(--grad-teal); }

@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 90;
    transform: translateX(-100%); transition: transform .25s ease;

    /* 100vh on a phone is the LARGE viewport — it includes the space behind
       the browser URL bar and the Android navigation bar. The panel was
       therefore taller than the screen, and because .side-foot is pushed down
       with margin-top:auto, "Back to site" and "Sign out" ended up below the
       fold with no way to reach them. dvh is the height actually visible. */
    height: 100vh;              /* fallback for older browsers */
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;   /* scrolling the menu must not scroll the page */

    /* Clear the gesture bar / navigation bar at the bottom of the screen. */
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .side.is-open { transform: none; box-shadow: var(--sh-3); }

  /* Sign out is the last thing in the panel and the one people look for, so it
     stays put while the links above it scroll. */
  .side .side-foot {
    position: sticky; bottom: 0;
    margin-top: auto; padding-bottom: 4px;
    background: var(--night-2);
    box-shadow: 0 -10px 16px -8px var(--night-2);
  }
  .side .side-foot a:last-child { color: var(--violet-400); font-weight: 700; }

  /* Touch-friendly and readable at arm's length. */
  .side a { min-height: 48px; font-size: .98rem; padding: 12px 14px; }
  .side a i { font-size: 1.05rem; width: 22px; }
  .side-group { font-size: .72rem; margin: 18px 0 6px; }
  .side .logo { font-size: 1.15rem; margin-bottom: 14px; }
  .side-toggle { display: grid; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .dash-main { padding: 20px 16px; }
  .dash-top { padding: 12px 16px; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .tree-legs { grid-template-columns: 1fr; }
}

/* ---------- Utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--primary-300); border-radius: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .g-4, .usp { grid-template-columns: repeat(2, 1fr); }
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .leaf-deco { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--sh-2);
    padding: 14px 20px 22px; gap: 4px; display: none;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { padding: 12px 16px; border-radius: var(--r-sm); }
  .nav-toggle { display: grid; }
  .logo { margin-right: auto; }
  .topbar-links { display: none; }

  /* Account links belong in the dropdown here; the bar has no room for them. */
  .nav-account { display: flex; flex-direction: column; gap: 4px;
                 margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
  .nav-account a { display: flex; align-items: center; gap: 10px; }
  .nav-account .is-signout { color: var(--bad); font-weight: 700; }
}

/* On desktop the same links sit in the bar, so the dropdown copy is redundant. */
@media (min-width: 861px) {
  .nav-account { display: none; }
}

/* ---------- Header must never push the page sideways ----------
   .nav is a flex row: a 1.3rem logo plus search, cart, a button and the
   hamburger overflowed a 360px screen, which clipped the header and let the
   whole page scroll horizontally. Let the logo give way instead. */
@media (max-width: 560px) {
  .nav { gap: 10px; }
  .logo { font-size: 1.05rem; gap: 8px; min-width: 0; }
  .logo > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logo small { display: none; }            /* the "Wellness & Rewards" strapline */
  .logo-mark { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px; }
  .nav-actions { gap: 6px; }
  .icon-btn { width: 38px; height: 38px; }
  .nav-cta { padding: 9px 14px; }
  .nav-cta-text { display: none; }           /* icon-only Sign in / Dashboard */
  .nav-signout { display: none; }            /* it is in the dropdown instead */
}

/* Belt and braces: nothing may make the document wider than the screen. */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 680px) {
  /* !important is deliberate. Fourteen pages set grid-template-columns as an
     inline style (checkout, cart, contact, register, deposit and most admin
     screens), and an inline style outranks a media query — so without this
     they stayed two-column on a phone and every field was half-width. */
  .g-2, .g-3, .g-4, .g-6, .usp, .split { grid-template-columns: 1fr !important; }
  .hero-stats { gap: 20px; }
  .cta-band { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
  .flash-stack { top: auto; bottom: 16px; right: 16px; }

  /* A sticky summary column eats the screen once things are stacked. */
  .split > aside[style*="sticky"] { position: static !important; top: auto !important; }

  /* Comfortable tap targets and no iOS zoom-on-focus (needs >= 16px). */
  input, select, textarea { font-size: 16px; }
  .btn { padding: 13px 22px; }
  .btn-sm { padding: 11px 18px; }
}

/* ---------- Binary tree on small screens ---------- */
@media (max-width: 680px) {
  /* The tree keeps its own horizontal scroll, but shrink the nodes so a phone
     shows a useful amount of it before scrolling. */
  .tree[style*="min-width"] { min-width: 460px !important; }
  .tree-node { min-width: 96px; padding: 10px 8px; }
  .tree-node b { font-size: .74rem; }
  .tree-node span { font-size: .62rem; }
  .tree-node .t-av { width: 28px; height: 28px; }
  .tree-row { gap: 10px; }
  .tree-legs { gap: 10px; }
}

/* Tables always scroll rather than squashing or pushing the page sideways. */
@media (max-width: 560px) {
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .tbl { font-size: .86rem; }
  .tbl th, .tbl td { padding-inline: 10px; }
  .p-meta { flex-wrap: wrap; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE LAYER
   Mobile-first behaviour for desktop, laptop, tablet and phone.
   Appended last so it settles ties with the rules above.

   Breakpoints in use across this file:
     1024px  laptop / tablet landscape
      900px  tablet portrait
      860px  navbar collapses
      680px  large phone
      560px  phone
   ============================================================ */

/* ---------- 1. Nothing may exceed the viewport ---------- */

/* The single most common cause of sideways scroll: a grid or flex child
   defaults to min-width:auto, so a wide item — a 620px table, a long word, an
   unbroken URL — pushes its track wider than the screen instead of scrolling
   inside it. Allowing children to shrink lets the overflow container do its job. */
.grid > *,
.split > *,
.tiles > *,
.dash-body,
.panel,
.card { min-width: 0; }

/* Long unbroken strings (order codes, payment ids, emails) wrap instead of
   stretching their column. */
body { overflow-wrap: break-word; }

/* Media scales with its box rather than forcing width. height:auto keeps the
   aspect ratio when a width/height attribute is present on the tag. */
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

/* ============================================================
   LEGACY TOKEN ALIASES
   The palette above renamed every colour. A handful of inline styles in the
   PHP templates still reach for the old warm names, and third-party or
   hand-edited markup may too, so the old names stay defined and point at the
   nearest role in the new system. Nothing in this stylesheet uses them.
   ============================================================ */
:root {
  --gold-100: var(--primary-50);
  --gold-200: var(--primary-100);
  --gold-300: var(--primary-300);
  --gold-400: var(--primary-400);
  --gold-500: var(--primary-500);
  --amber-500: var(--violet-500);
  --amber-600: var(--primary-600);
  --amber-700: var(--primary-700);
  --cream:   var(--surface);
  --cream-2: var(--surface-2);
  --cream-3: var(--surface-3);
}

/* ============================================================
   FRESH GROCERY LAYER
   The clean white-and-green storefront: utility bar, search-led
   header, category menu, hero slider, pastel category tiles,
   promo tiles and compact product cards. Appended last so it
   settles ties with everything above.
   ============================================================ */

[hidden] { display: none !important; }
body { font-size: 15.5px; color: var(--ink); }
h1, h2, h3, h4, h5 { color: var(--ink); letter-spacing: -.01em; }
a:hover { color: var(--primary-500); }
.torn { display: none; }

/* ---------- Buttons ---------- */
.btn { border-radius: 6px; font-family: var(--ff-display); font-weight: 700; }
.btn:hover { transform: none; }
.btn-primary { background: var(--primary-500); box-shadow: none; }
.btn-primary:hover { background: var(--primary-600); box-shadow: none; color: var(--white); }
.btn-gold { background: var(--primary-100); color: var(--primary-600); }
.btn-gold:hover { background: var(--primary-500); color: var(--white); }
.btn-accent { background: var(--amber); color: var(--ink); box-shadow: none; }
.btn-ghost { border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--primary-500); color: var(--primary-500); }
.chip.is-active { background: var(--primary-500); box-shadow: none; }
.pager .is-active { background: var(--primary-500); }
.eyebrow { color: var(--primary-500); letter-spacing: .12em; }
.eyebrow::before { background: var(--primary-500); }

/* ---------- Utility bar ---------- */
.topbar { background: var(--white); color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: .78rem; }
.topbar .wrap { min-height: 38px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; }
.topbar a { color: var(--ink-2); }
.topbar a:hover { color: var(--primary-500); }
.topbar-links { display: flex; gap: 0; }
.topbar-links a { padding: 0 10px; border-left: 1px solid var(--line); }
.topbar-links a:first-child { padding-left: 0; border-left: 0; }
.topbar-promo { color: var(--primary-500); font-weight: 700; text-align: center; }
.topbar-help { text-align: right; }
.topbar-help a { color: var(--primary-500); font-weight: 700; }

/* ---------- Header ---------- */
.site-header { position: relative; background: var(--white); backdrop-filter: none; border-bottom: 1px solid var(--line); box-shadow: none; }
.site-header.is-stuck { box-shadow: none; background: var(--white); }
.header-main .wrap { display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); min-height: 96px; }
.logo { font-size: 1.55rem; color: var(--primary-500); flex: none; }
.logo small { color: var(--ink-2); letter-spacing: .18em; }
.logo-mark { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-500); box-shadow: none; font-size: 1.2rem; }

.header-search {
  flex: 1; max-width: 720px; display: flex; align-items: stretch;
  border: 2px solid var(--primary-300); border-radius: 6px; background: var(--white); overflow: hidden;
}
.header-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 13px 18px; font-size: .92rem; background: transparent; }
.header-search button {
  border: 0; cursor: pointer; background: var(--primary-500); color: var(--white);
  padding: 0 24px; font-family: var(--ff-display); font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
}
.header-search button:hover { background: var(--primary-600); }
.header-search:focus-within { border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--ring-primary); }

.nav-actions { gap: 22px; flex: none; margin-left: auto; }
.head-act { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.head-act:hover { color: var(--primary-500); }
.head-ico { position: relative; font-size: 1.35rem; line-height: 1; }
.head-ico .count {
  position: absolute; top: -9px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--pill); background: var(--primary-500); color: var(--white);
  font-size: .66rem; font-weight: 700; display: grid; place-items: center; font-family: var(--ff-body);
}
.head-label { font-size: .88rem; color: var(--ink-2); }
.head-act:hover .head-label { color: var(--primary-500); }

/* navigation row */
.header-nav { border-top: 1px solid var(--line); }
.header-nav .wrap { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.cat-menu { position: relative; flex: none; }
.cat-menu-btn {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--primary-500); color: var(--white); border-radius: 6px;
  padding: 12px 18px; font-family: var(--ff-display); font-weight: 700; font-size: .93rem;
}
.cat-menu-btn:hover { background: var(--primary-600); }
.cat-menu-btn .fa-chevron-down { font-size: .7rem; transition: transform .2s ease; }
.cat-menu.is-open .cat-menu-btn .fa-chevron-down { transform: rotate(180deg); }
.cat-menu-list {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 80; width: 460px;
  background: var(--white); border: 1px solid var(--primary-200); border-radius: 10px; box-shadow: var(--sh-3);
  padding: 18px; display: none; grid-template-columns: 1fr 1fr; gap: 10px;
}
.cat-menu.is-open .cat-menu-list { display: grid; }
.cat-menu-list a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 6px; font-family: var(--ff-display); font-weight: 700; font-size: .88rem; color: var(--ink);
}
.cat-menu-list a:hover { border-color: var(--primary-300); color: var(--primary-500); box-shadow: var(--sh-2); }
.cat-menu-list img, .cat-menu-ico { width: 28px; height: 28px; object-fit: contain; flex: none; }
.cat-menu-ico { display: grid; place-items: center; color: var(--primary-500); }
.cat-menu-list .cat-menu-all { grid-column: 1 / -1; justify-content: center; background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-600); }

.nav-menu { margin-inline: 0 auto; gap: 6px; }
.nav-menu a {
  border-radius: 0; padding: 8px 12px; background: none !important;
  font-family: var(--ff-display); font-weight: 700; font-size: .98rem; color: var(--ink);
}
.nav-menu a:hover, .nav-menu a.is-active { color: var(--primary-500); }

.hotline { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.hotline i { font-size: 1.9rem; color: var(--primary-500); }
.hotline b { display: block; font-family: var(--ff-display); font-size: 1.25rem; color: var(--primary-500); line-height: 1.1; }
.hotline small { font-size: .74rem; color: var(--ink-2); }

/* ---------- Home: hero slider ---------- */
.home-hero { padding: 26px 0 10px; }
.hero-slider {
  position: relative; border-radius: 30px; overflow: hidden; background: var(--grad-hero);
  min-height: clamp(320px, 38vw, 520px);
}
.hero-slider::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 183, 126, .14) 0 60px, transparent 61px),
    radial-gradient(circle at 46% 86%, rgba(253, 192, 64, .16) 0 80px, transparent 81px),
    radial-gradient(circle at 92% 12%, rgba(59, 183, 126, .12) 0 110px, transparent 111px);
}
.hero-slide {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
  gap: 24px; padding: clamp(28px, 5vw, 72px) clamp(24px, 6vw, 96px);
  opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s;
}
.hero-slide.is-active { position: relative; opacity: 1; visibility: visible; }
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 4.2rem); font-weight: 700; line-height: 1.12; margin-bottom: .45em; }
.hero-copy p { font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 46ch; margin-bottom: 1.6em; }
.hero-search {
  display: flex; align-items: center; background: var(--white); border-radius: var(--pill);
  max-width: 470px; padding-left: 22px; box-shadow: var(--sh-2);
}
.hero-search i { color: var(--ink-3); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 18px 14px; background: transparent; }
.hero-search button {
  border: 0; cursor: pointer; background: var(--primary-500); color: var(--white); border-radius: var(--pill);
  padding: 18px 30px; font-family: var(--ff-display); font-weight: 700;
}
.hero-search button:hover { background: var(--primary-600); }
.hero-pic { display: grid; place-items: center; }
.hero-pic img { max-height: clamp(220px, 32vw, 420px); width: auto; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(37, 61, 78, .15)); }
.hero-dots { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--primary-500);
  background: transparent; padding: 0; cursor: pointer;
}
.hero-dots button.is-active { background: var(--primary-500); }

/* ---------- Home: blocks ---------- */
.home-block { padding: clamp(26px, 3.5vw, 44px) 0; }
.home-block--tint { background: var(--primary-50); margin: 20px 0; padding-block: clamp(40px, 5vw, 64px); }
.block-head { display: flex; align-items: baseline; gap: 14px 28px; flex-wrap: wrap; margin-bottom: 26px; }
.block-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; }
.block-sub { flex-basis: 100%; margin: 0; color: var(--ink-2); }
.block-tabs { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.block-head .block-tabs:last-child { margin-left: auto; }
.block-tabs a, .block-tabs button {
  border: 0; background: none; cursor: pointer; padding: 2px 0;
  font-family: var(--ff-display); font-weight: 700; font-size: .95rem; color: var(--ink);
}
.block-tabs a:hover, .block-tabs button:hover, .block-tabs .is-active { color: var(--primary-500); }
.block-link { margin-left: auto; font-family: var(--ff-display); font-weight: 700; color: var(--primary-500); }

/* pastel category tiles */
.cat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 24px 10px 20px; border-radius: 10px; background: #f2fce4; border: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.cat-tile:nth-child(10n+2) { background: #fffceb; }
.cat-tile:nth-child(10n+3) { background: #ecffec; }
.cat-tile:nth-child(10n+4) { background: #feefea; }
.cat-tile:nth-child(10n+5) { background: #fff3eb; }
.cat-tile:nth-child(10n+6) { background: #fff3ff; }
.cat-tile:nth-child(10n+7) { background: #f2fce4; }
.cat-tile:nth-child(10n+8) { background: #feefea; }
.cat-tile:nth-child(10n+9) { background: #fffceb; }
.cat-tile:nth-child(10n+10) { background: #ecffec; }
.cat-tile:hover { border-color: var(--primary-300); box-shadow: var(--sh-2); transform: translateY(-3px); color: var(--ink); }
.cat-tile img, .cat-tile-ico { width: 80px; height: 80px; object-fit: contain; margin-bottom: 8px; }
.cat-tile-ico { display: grid; place-items: center; font-size: 2.2rem; color: var(--primary-500); }
.cat-tile b { font-family: var(--ff-display); font-size: .95rem; line-height: 1.3; }
.cat-tile span { font-size: .8rem; color: var(--ink-2); }

/* promo tiles */
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.promo {
  position: relative; overflow: hidden; border-radius: 10px; min-height: 220px;
  padding: clamp(26px, 3vw, 40px); display: flex; align-items: center; color: var(--ink);
}
.promo--sand { background: #f0e8d5; }
.promo--rose { background: #f3e8e8; }
.promo--sky  { background: #e7eaf3; }
.promo-copy { position: relative; z-index: 1; max-width: 58%; }
.promo h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.3; margin-bottom: 18px; }
.btn-shop {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-500); color: var(--white);
  padding: 7px 13px; border-radius: 4px; font-size: .78rem; font-family: var(--ff-display); font-weight: 700;
}
.promo:hover .btn-shop { background: var(--primary-600); }
.promo img {
  position: absolute; right: 4%; bottom: 8%; width: 44%; height: 80%; object-fit: contain;
  transition: transform .35s ease;
}
.promo:hover img { transform: scale(1.05); }

/* ---------- Product grid & card ---------- */
.p-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.p-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-cell { display: flex; }
.p-cell > .p-card { flex: 1; }

.p-card {
  position: relative; border-radius: 15px; border: 1px solid var(--line); box-shadow: none; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.p-card:hover { transform: none; border-color: var(--primary-300); box-shadow: 0 10px 22px rgba(37, 61, 78, .08); }
.p-flag {
  position: absolute; top: 0; left: 0; z-index: 2; padding: 6px 16px;
  border-radius: 15px 0 20px 0; color: var(--white); font-size: .74rem; font-weight: 700;
}
.p-flag--sale { background: var(--primary-500); }
.p-flag--hot  { background: var(--rose); }
.p-flag--pink { background: var(--coral); }
.p-flag--gold { background: var(--amber); color: var(--ink); }
.p-flag--out  { background: var(--ink-3); }
.p-thumb { aspect-ratio: 1 / 1; padding: 26px 22px 6px; background: var(--white); }
.p-thumb img { object-fit: contain; }
.p-card:hover .p-thumb img { transform: scale(1.06); }
.p-body { padding: 8px 20px 20px; }
.p-cat { font-size: .76rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.p-name {
  font-size: 1rem; font-weight: 700; margin: 6px 0 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-name a:hover { color: var(--primary-500); }
.p-rating { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-3); }
.p-by { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }
.p-by i { font-size: .7rem; margin-right: 2px; }
.p-foot { padding-top: 14px; }
.price { font-size: 1.12rem; color: var(--primary-500); }
.price s { color: var(--ink-3); font-size: .82rem; }
.stars { color: var(--amber); }
.btn-add {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; white-space: nowrap;
  background: var(--primary-100); color: var(--primary-600); border-radius: 4px; padding: 7px 14px;
  font-family: var(--ff-display); font-weight: 700; font-size: .84rem; transition: background .18s ease, color .18s ease;
}
.btn-add:hover { background: var(--primary-500); color: var(--white); }
.btn-add.is-disabled { background: var(--surface-2); color: var(--ink-3); cursor: default; }

/* ---------- Older card styles, brought into the palette ---------- */
.card, .panel, .usp-item, .stat-tile, .reward-card, .quote-card, .pkg-card { border-color: var(--line); }
.card--hover:hover, .pkg-card:hover, .reward-card:hover { border-color: var(--primary-300); }
.cat-card img, .cat-ico { background: var(--primary-50); object-fit: contain; }
.p-thumb .badge { display: none; }
.pkg-card.is-featured { background: var(--white); border: 2px solid var(--primary-500); box-shadow: 0 12px 28px var(--glow-primary); }
.pkg-price { color: var(--primary-500); }
.stat-tile b { color: var(--primary-500); }
.avatar { background: var(--primary-500); }

/* USP strip */
.usp--5 { grid-template-columns: repeat(5, 1fr); }
.usp-item { background: var(--surface-2); border: 0; box-shadow: none; align-items: center; border-radius: 10px; padding: 22px 20px; }
.usp-ico, .usp-item:nth-child(n) .usp-ico { background: transparent; color: var(--primary-500); font-size: 1.9rem; flex-basis: 48px; }
.usp-item b { font-family: var(--ff-display); font-size: 1rem; }

/* page headers on inner pages reuse .hero — a soft green banner now */
.hero { background: var(--grad-hero); color: var(--ink); margin: 24px auto 0; }
.hero::before, .hero::after { display: none; }
.hero h1 { color: var(--ink); }
.hero h1 em { color: var(--primary-500); text-shadow: none; }
.hero .eyebrow { color: var(--primary-500); }
.hero .eyebrow::before { background: var(--primary-500); }
.hero-lead { color: var(--ink-2); }
.hero .crumb { color: var(--ink-2); }
.hero .crumb a:hover { color: var(--primary-500); }
.hero .btn-primary, .hero .btn-dark { background: var(--primary-500); color: var(--white); box-shadow: none; }
.hero .btn-primary:hover, .hero .btn-dark:hover { background: var(--primary-600); color: var(--white); box-shadow: none; }
.hero .btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.hero .btn-ghost:hover { background: var(--white); color: var(--primary-500); border-color: var(--primary-500); }
.hero-stats b { color: var(--primary-500); }
.hero-stats span { color: var(--ink-2); }
.leaf-deco { filter: none; opacity: .18; }
.section { padding: clamp(36px, 5vw, 70px) 0; }

/* CTA band */
.cta-band { background: var(--grad-hero); color: var(--ink); box-shadow: none; border-radius: 20px; }
.cta-band::before { display: none; }
.cta-band h2 { color: var(--ink); }
.cta-band p { color: var(--ink-2); }
.cta-band .btn-primary { background: var(--primary-500); color: var(--white); }
.cta-band .btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }

/* ---------- Footer: light ---------- */
.site-footer { background: var(--white); color: var(--ink-2); border-top: 1px solid var(--line); }
.site-footer h4 { color: var(--ink); font-family: var(--ff-display); font-size: 1.15rem; letter-spacing: 0; text-transform: none; }
.site-footer a, .footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--primary-500); }
.footer-brand p { color: var(--ink-2); }
.footer-brand .logo { color: var(--primary-500); }
.footer-brand .logo small { color: var(--ink-2); }
.social a { background: var(--primary-500); color: var(--white); }
.social a:hover { background: var(--primary-600); }
.foot-contact i { color: var(--primary-500); }
.footer-bottom { border-top-color: var(--line); color: var(--ink-2); }

/* ---------- Member / admin shell in the new palette ---------- */
.side a.is-active { background: var(--primary-500); box-shadow: 0 8px 18px rgba(59, 183, 126, .35); }
.side a:hover i { color: var(--primary-300); }
.tree-node.is-me { background: var(--primary-500); }
.tile--dark .tile-ico { color: var(--primary-300); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .p-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hotline { display: none; }
}
@media (max-width: 1024px) {
  .p-grid, .p-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .usp--5 { grid-template-columns: repeat(2, 1fr); }
  .promo-row { grid-template-columns: 1fr 1fr; }
  .promo-row > :last-child { grid-column: 1 / -1; }
  .head-label { display: none; }
}
@media (max-width: 860px) {
  .topbar .wrap { grid-template-columns: 1fr; }
  .topbar-links, .topbar-help { display: none; }
  .header-main .wrap { flex-wrap: wrap; min-height: 0; padding-block: 14px; gap: 12px 16px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .nav-actions { gap: 14px; }
  .header-nav .wrap { min-height: 58px; }
  .nav-menu {
    position: absolute; inset: 100% 0 auto 0; z-index: 70;
    max-height: 70vh; overflow-y: auto;
  }
  .nav-menu a { border-radius: var(--r-sm); }
  .cat-menu-list { width: min(460px, calc(100vw - 40px)); }
  .hero-slide { grid-template-columns: 1fr; text-align: left; }
  .hero-pic { display: none; }
}
@media (max-width: 680px) {
  .p-grid, .p-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .p-body { padding: 6px 12px 14px; }
  .p-thumb { padding: 22px 12px 4px; }
  .p-foot { flex-wrap: wrap; gap: 8px; }
  .promo-row { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
  .cat-tile img, .cat-tile-ico { width: 60px; height: 60px; }
  .usp--5 { grid-template-columns: 1fr; }
  .hero-slider { border-radius: 18px; min-height: 0; }
  .hero-search button { padding: 15px 20px; }
  .hero-search input { padding: 15px 10px; }
  .cat-menu-list { grid-template-columns: 1fr; }
  .block-head .block-tabs:last-child { margin-left: 0; }
}
@media (max-width: 560px) {
  .logo { font-size: 1.2rem; }
  .logo-mark { width: 38px; height: 38px; }
  .cat-menu-btn { padding: 10px 14px; font-size: .86rem; }
}
.cat-tile .cat-tile-ico { font-size: 2.2rem; color: var(--primary-500); }
.p-foot .price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.p-foot .price s { margin-left: 0; }
@media (max-width: 860px) {
  .hero-slide { padding-bottom: 58px; }
}

/* ============================================================
   PALETTE LAYER - forest green #0F4F23 · sunglow #FFCC00 · cultured #F6F6F6
   Places where the palette's character matters more than a token swap:
   dark-green bands with sunglow highlights, and sunglow calls to action.
   ============================================================ */
::selection { background: var(--sun); color: var(--primary-700); }
body { background: var(--surface); }
.site-header, .header-main, .header-nav { background: var(--white); }

/* buttons - green by default, sunglow for the loudest call to action */
.btn-accent, .btn-sun { background: var(--sun); color: var(--primary-700); }
.btn-accent:hover, .btn-sun:hover { background: var(--sun-2); color: var(--primary-700); }
.eyebrow::before { background: var(--sun); }

/* utility bar - a dark green strip */
.topbar { background: var(--primary-500); color: var(--on-ink-2); border-bottom: 0; }
.topbar a { color: var(--on-ink-2); }
.topbar a:hover { color: var(--sun); }
.topbar-links a { border-left-color: rgba(255, 255, 255, .2); }
.topbar-promo, .topbar-help a { color: var(--sun); }

/* header */
.logo-mark { background: var(--primary-500); color: var(--sun); }
.header-search { border-color: var(--primary-200); }
.head-ico .count { background: var(--sun); color: var(--primary-700); }
.cat-menu-btn i:first-child { color: var(--sun); }
.nav-menu a.is-active { box-shadow: inset 0 -3px 0 var(--sun); }
.cat-menu-list .cat-menu-all { background: var(--sun-bg); border-color: #ffe680; color: var(--primary-700); }

/* hero slider - forest green with sunglow headline accents */
.hero-slider::before {
  opacity: 1;
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 204, 0, .10) 0 70px, transparent 71px),
    radial-gradient(circle at 48% 90%, rgba(255, 204, 0, .08) 0 90px, transparent 91px),
    radial-gradient(circle at 94% 10%, rgba(255, 255, 255, .06) 0 120px, transparent 121px);
}
.hero-copy h1 { color: var(--white); }
.hero-copy h1::first-line { color: var(--sun); }
.hero-copy p { color: var(--on-ink-2); }
.hero-search button { background: var(--sun); color: var(--primary-700); }
.hero-search button:hover { background: var(--sun-2); }
.hero-dots button { border-color: var(--sun); }
.hero-dots button.is-active { background: var(--sun); }
.hero-pic img { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .25)); }

/* inner-page banners share the dark green */
.hero { color: var(--white); }
.hero h1 { color: var(--white); }
.hero h1 em, .hero .eyebrow { color: var(--sun); }
.hero-lead { color: var(--on-ink-2); }
.hero .crumb { color: var(--on-ink-3); }
.hero .crumb a:hover { color: var(--sun); }
.hero .btn-primary, .hero .btn-dark { background: var(--sun); color: var(--primary-700); }
.hero .btn-primary:hover, .hero .btn-dark:hover { background: var(--sun-2); color: var(--primary-700); }
.hero .btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .4); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--white); border-color: var(--white); }
.hero-stats b { color: var(--sun); }
.hero-stats span { color: var(--on-ink-3); }

/* category tiles - white and soft tints of the two brand colours */
.cat-tile, .cat-tile:nth-child(n) { background: var(--white); border-color: var(--line); }
.cat-tile:nth-child(3n+2) { background: var(--sun-bg); border-color: #ffeb99; }
.cat-tile:nth-child(3n+3) { background: var(--primary-50); border-color: var(--primary-100); }
.cat-tile:hover { border-color: var(--primary-500); }
.cat-tile-ico { color: var(--primary-500); }

/* promo tiles - one per swatch */
.promo--sand { background: var(--primary-500); }
.promo--sand h3 { color: var(--sun); }
.promo--sand .btn-shop { background: var(--sun); color: var(--primary-700); }
.promo--rose { background: var(--sun); }
.promo--rose h3 { color: var(--primary-700); }
.promo--sky { background: var(--white); border: 1px solid var(--line); }
.promo .btn-shop:hover, .promo:hover .btn-shop { filter: brightness(1.08); }

/* product cards - white on the cultured background */
.p-card { background: var(--white); }
.p-card:hover { border-color: var(--primary-300); box-shadow: 0 10px 24px rgba(15, 79, 35, .1); }
.p-flag--sale { background: var(--primary-500); color: var(--white); }
.p-flag--hot, .p-flag--gold { background: var(--sun); color: var(--primary-700); }
.p-flag--pink { background: var(--coral); }
.btn-add { background: var(--primary-100); color: var(--primary-500); }
.btn-add:hover { background: var(--primary-500); color: var(--sun); }

/* blocks and strips */
.home-block--tint { background: var(--primary-50); }
.usp-item { background: var(--white); }
.stat-tile, .reward-card, .pkg-card, .quote-card, .card, .panel { background: var(--white); }
.reward-card .r-ico { background: var(--primary-500); color: var(--sun); box-shadow: none; }
.reward-card:nth-child(n) .r-ico { box-shadow: none; }
.reward-card:nth-child(2n) .r-ico { background: var(--sun); color: var(--primary-700); }
.block-tabs .is-active { box-shadow: inset 0 -2px 0 var(--sun); }

/* CTA band - dark green, sunglow button */
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--on-ink-2); }
.cta-band .btn-primary { background: var(--sun); color: var(--primary-700); }
.cta-band .btn-primary:hover { background: var(--sun-2); }
.cta-band .btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .4); }

/* footer - forest green with sunglow headings */
.site-footer { background: var(--primary-500); color: var(--on-ink-2); border-top: 0; }
.site-footer h4 { color: var(--sun); }
.site-footer a, .footer-grid a { color: var(--on-ink-2); }
.footer-grid a:hover { color: var(--sun); }
.footer-brand p { color: var(--on-ink-3); }
.footer-brand .logo { color: var(--white); }
.footer-brand .logo small { color: var(--on-ink-4); }
.social a { background: rgba(255, 255, 255, .12); color: var(--white); }
.social a:hover { background: var(--sun); color: var(--primary-700); }
.foot-contact i { color: var(--sun); }
.footer-bottom { border-top-color: rgba(255, 255, 255, .15); color: var(--on-ink-3); }

/* member / admin shell */
.side a.is-active { background: var(--sun); color: var(--primary-700); box-shadow: none; }
.side a.is-active i { color: var(--primary-700); }
.side a:hover i { color: var(--sun); }
.side .side-foot a:last-child { color: var(--sun); }
.tile--dark .tile-ico { color: var(--sun); }
.tree-node.is-me { background: var(--primary-500); }
.tree-node.is-me .t-av { background: var(--sun); color: var(--primary-700); }
.panel-head { background: linear-gradient(180deg, var(--primary-50), var(--white)); }
.promo-copy { max-width: 52%; }
.promo img { width: 40%; right: 3%; border-radius: 8px; }
.footer-brand .logo img { background: var(--white); border-radius: 8px; padding: 6px 12px; height: 56px !important; }
@media print {
  .side, .dash-top .side-toggle, .no-print, .site-header, .topbar, .site-footer, .pager { display: none !important; }
  .dash { display: block; }
  .dash-main { padding: 0; }
  .panel, .tile { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* ============================================================
   BINARY TREE - round photo nodes, status rings, dashed elbows
   Markup: .btree > ul > li > (.bt-node + ul > li ...)
   ============================================================ */
.tree-scroll { overflow-x: auto; padding: 8px 0 6px; -webkit-overflow-scrolling: touch; }
.btree { --bt-gap: 34px; --bt-w: 3px; --bt-line: #2f3e46; margin: 0 auto; }
.btree--dots { --bt-gap: 18px; --bt-w: 1.5px; }
.btree ul { list-style: none; margin: 0; padding: var(--bt-gap) 0 0; display: flex; position: relative; }
.btree > ul { padding-top: 0; }
.btree li {
  flex: 1 1 0; min-width: 0; position: relative; text-align: center;
  padding: var(--bt-gap) 3px 0; display: flex; flex-direction: column; align-items: center;
}
.btree > ul > li { padding-top: 0; }
/* the two halves of the horizontal bar above each pair, plus the drop to each child */
.btree li::before, .btree li::after {
  content: ""; position: absolute; top: 0; width: 50%; height: var(--bt-gap);
  border-top: var(--bt-w) dashed var(--bt-line);
}
.btree li::before { right: 50%; }
.btree li::after  { left: 50%; border-left: var(--bt-w) dashed var(--bt-line); }
.btree li:first-child::before, .btree li:last-child::after { border: 0 none; }
.btree li:last-child::before { border-right: var(--bt-w) dashed var(--bt-line); border-radius: 0 10px 0 0; }
.btree li:first-child::after { border-radius: 10px 0 0 0; }
.btree > ul > li::before, .btree > ul > li::after { display: none; }
/* the drop from a parent down to its pair */
.btree ul ul::before {
  content: ""; position: absolute; top: 0; left: 50%; height: var(--bt-gap);
  border-left: var(--bt-w) dashed var(--bt-line); transform: translateX(calc(var(--bt-w) / -2));
}

.bt-node { position: relative; z-index: 1; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); --ring: var(--primary-500); }
.bt-node.is-pending { --ring: var(--sun); }
.bt-node.is-blocked { --ring: var(--rose); }
.bt-node.is-empty   { --ring: var(--line-2); }
.bt-ring {
  position: relative; display: block; width: var(--bt-size); height: var(--bt-size);
  border-radius: 50%; background: var(--white); transition: transform .18s ease, box-shadow .18s ease;
}
.bt-node.is-root .bt-ring { width: calc(var(--bt-size) * 1.3); height: calc(var(--bt-size) * 1.3); }
/* the ring, with a small open arc like a progress ring */
.bt-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: max(2px, calc(var(--bt-size) * .06)) solid var(--ring);
  border-top-color: transparent; transform: rotate(40deg);
}
.bt-pic {
  position: absolute; inset: max(3px, calc(var(--bt-size) * .11)); border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--primary-100); color: var(--primary-700);
  font-family: var(--ff-display); font-weight: 700; font-size: calc(var(--bt-size) * .3); line-height: 1;
}
.bt-pic img { width: 100%; height: 100%; object-fit: cover; }
.bt-node.is-pending .bt-pic { background: var(--sun-bg); color: #5c4a00; }
.bt-node.is-blocked .bt-pic { background: var(--rose-bg); color: var(--rose-ink); }
.bt-node.is-empty .bt-ring::before { border-style: dashed; border-top-color: var(--ring); transform: none; }
.bt-node.is-empty .bt-pic { background: var(--surface-2); color: var(--ink-3); font-size: calc(var(--bt-size) * .26); }
a.bt-node:hover .bt-ring { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 79, 35, .18); }
a.bt-node:hover b { color: var(--primary-500); }
.bt-node b { font-family: var(--ff-display); font-size: .82rem; line-height: 1.15; max-width: 100%; }
.bt-node small { font-size: .68rem; color: var(--ink-2); line-height: 1; }
.bt-node.is-empty b { color: var(--ink-3); font-weight: 600; }
.btree--dots .bt-pic { font-size: 0; }

.bt-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 16px; }
.bt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bt-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--primary-500); }
.bt-dot.is-pending { border-color: var(--sun); }
.bt-dot.is-blocked { border-color: var(--rose); }
.bt-dot.is-empty   { border: 2px dashed var(--line-2); }
.btree li > ul { align-self: stretch; }   /* each pair spans its parent's full half, so legs split evenly */

/* ---------- Home: app download band ---------- */
.app-band {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
  background: var(--primary-500); color: var(--white); border-radius: 20px; padding: clamp(24px, 4vw, 40px);
}
.app-copy { display: flex; align-items: center; gap: 18px; }
.app-ico { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--sun); color: var(--primary-700); font-size: 1.8rem; }
.app-band h2 { color: var(--white); font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 0 0 4px; }
.app-band p { margin: 0; color: var(--on-ink-2); }
.app-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.app-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 10px;
  background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .25); min-width: 170px;
  transition: transform .18s ease, background .18s ease;
}
.app-btn:hover { color: #fff; background: #111; transform: translateY(-2px); }
.app-btn i { font-size: 1.7rem; }
.app-btn span { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--ff-display); font-weight: 700; font-size: 1.05rem; }
.app-btn small { font-family: var(--ff-body); font-weight: 400; font-size: .66rem; letter-spacing: .04em; opacity: .85; }
@media (max-width: 560px) { .app-copy { flex-direction: column; align-items: flex-start; } .app-btn { flex: 1; } }
