/* ════════════════════════════════════════════════════════════════
   LOTS OF LEGS THAILAND — Public site styles
   Design language: Airbnb (airbnb.com) — light, airy, rounded cards,
   soft shadows, Rausch coral accent, generous whitespace.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Brand / Airbnb palette */
  --rausch:        #C8102E;   /* primary accent — Thai-flag red (logo) */
  --rausch-dark:   #A00C24;
  --rausch-press:  #7E0A1C;
  --rausch-rgb:    200, 16, 46;  /* RGB of --rausch, for rgba() tints — keep in sync */
  --babu:          #16284F;   /* secondary accent — logo banner navy */

  /* Logo-derived brand colors */
  --navy:          #16284F;   /* logo banner navy */
  --navy-deep:     #0E1B38;
  --gold:          #E8B23A;   /* logo "THAILAND" gold */

  /* Neutrals */
  --bg:            #FFFFFF;
  --bg-soft:       #F7F7F7;
  --bg-softer:     #FAFAFA;
  --surface:       #FFFFFF;
  --text:          #222222;
  --text-soft:     #5E5E5E;
  --text-mute:     #717171;
  --border:        #DDDDDD;
  --border-soft:   #EBEBEB;

  /* Category accent (semantic) */
  --venomous-col:  #C13515;
  --caution-col:   #B47800;
  --mild-col:      #946800;
  --safe-col:      #2E7D32;

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Shape & depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.18);
  --shadow-card-hover: 0 10px 28px rgba(0,0,0,0.14);

  --nav-h: 80px;
  --maxw: 1280px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-wholesale, .btn-member, .btn-submit {
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--r-sm);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-primary, .btn-wholesale, .btn-submit {
  background: var(--rausch);
  color: #fff;
  padding: 14px 24px;
  font-size: 1rem;
}
.btn-primary:hover, .btn-wholesale:hover, .btn-submit:hover {
  background: var(--rausch-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active, .btn-wholesale:active { transform: translateY(0); background: var(--rausch-press); }

.btn-ghost {
  background: #fff;
  color: var(--text);
  padding: 14px 24px;
  font-size: 1rem;
  border: 1px solid var(--text);
}
.btn-ghost:hover { background: var(--bg-soft); transform: translateY(-1px); }

.btn-member {
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: .95rem;
  font-weight: 600;
}
.btn-member:hover { background: var(--bg-soft); }

.btn-label-short { display: none; }

/* ════════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);   /* slight shadow so white-on-white doesn't wash out */
  transition: border-color .25s ease, box-shadow .25s ease;
}
.navbar.scrolled { border-bottom-color: var(--border-soft); box-shadow: var(--shadow-md); }

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 60px; width: auto; }

.nav-links {
  display: flex; gap: 4px; list-style: none;
  margin: 0 auto;
}
.nav-links a {
  padding: 10px 14px; border-radius: var(--r-pill);
  font-size: .95rem; font-weight: 500; color: var(--text-soft);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-social { display: flex; gap: 4px; }
.social-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mute); transition: background .15s ease, color .15s ease;
}
.social-icon:hover { background: var(--bg-soft); color: var(--rausch); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 10px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════ */
.hero {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px 100px;
  position: relative;
  background:
    radial-gradient(1200px 600px at 50% -10%, #fff5f7 0%, rgba(255,245,247,0) 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  overflow: hidden;
}
/* Landing-page background photo at 50% opacity (sits behind the content). */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("../assets/icons/web.jpg") center / cover no-repeat;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 860px; }
.hero-logo {
  display: block;
  margin: 0 auto 18px;
  width: 250px; max-width: 86vw;
  aspect-ratio: 1 / 1; height: auto;
  object-fit: contain;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rausch);
  background: #fff;
  border: 1px solid var(--border-soft);
  padding: 8px 16px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.02em;
  color: var(--text);
}
.hero h1 .accent { color: var(--rausch); }
.hero-tagline {
  margin: 22px auto 0; max-width: 620px;
  font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-soft); font-weight: 400;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }

.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  margin-top: 56px;
}
.hero-stats .hs { text-align: center; }
.hero-stats .hs-num { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.hero-stats .hs-lbl { font-size: .82rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-mute); font-size: .8rem; z-index: 2;
}
.scroll-cue svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(5px);} }

/* ════════════════════════════════════════════════════════════════
   SPECIES / COLLECTION
   ════════════════════════════════════════════════════════════════ */
.species-section { padding: 80px 0 96px; }
.section-header { text-align: center; margin-bottom: 14px; }
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em;
}
.section-sub { color: var(--text-mute); margin-top: 10px; font-size: 1.05rem; }

/* Airbnb-style horizontal category scroller */
.category-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 26px 4px 22px; margin: 0 -4px 8px;
  border-bottom: 1px solid var(--border-soft);
  scroll-snap-type: x proximity;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  padding: 8px 14px 12px; min-width: 88px;
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease, opacity .15s ease;
  scroll-snap-align: start;
}
.cat-tab:hover { color: var(--text); }
.cat-tab .cat-glyph { width: 30px; height: 30px; opacity: .75; transition: opacity .15s ease; }
.cat-tab .cat-glyph svg { width: 100%; height: 100%; display: block; }
.cat-tab:hover .cat-glyph { opacity: 1; }
.cat-tab .cat-label { font-size: .76rem; font-weight: 600; white-space: nowrap; }
.cat-tab .cat-count { display: none; }
.cat-tab.active { color: var(--text); border-bottom-color: var(--text); }
.cat-tab.active .cat-glyph { opacity: 1; }

/* Parent-category tab with a dropdown of child sub-categories */
.cat-tab-parent { position: relative; flex: 0 0 auto; scroll-snap-align: start; }
.cat-tab-parent .cat-chevron {
  display: inline-block; margin-left: 6px; font-size: .82em; opacity: .7;
  transition: transform .18s ease;
}
.cat-tab-parent.open .cat-chevron { transform: rotate(180deg); }
.cat-tab--parent { /* layout inherits from .cat-tab */ }
.cat-tab-parent.active > .cat-tab--parent {
  color: var(--text); border-bottom-color: var(--text);
}
.cat-tab-parent.active > .cat-tab--parent .cat-glyph { opacity: 1; }
.cat-dropdown {
  position: absolute; top: calc(100% - 1px); left: 50%; transform: translate(-50%, 8px);
  background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 230px; z-index: 50;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.cat-tab-parent.open .cat-dropdown {
  opacity: 1; pointer-events: auto; transform: translate(-50%, 4px);
}
.cat-drop-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px;
  background: none; border: none; cursor: pointer;
  border-radius: var(--r-sm); color: var(--text);
  font: inherit; text-align: left;
}
.cat-drop-item:hover { background: var(--bg-soft); }
.cat-drop-item.active { background: var(--bg-soft); font-weight: 700; }
.cat-drop-item .cd-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
}
.cat-drop-item .cd-label { flex: 1; font-size: .92rem; }
.cat-drop-item .cd-count {
  font-size: .75rem; color: var(--text-mute); font-variant-numeric: tabular-nums;
  background: var(--bg-soft); padding: 2px 8px; border-radius: var(--r-pill);
}
.cat-drop-item.active .cd-count { background: #fff; }

/* category meta bar above the grid */
.cat-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin: 28px 0 22px;
}
.cat-meta-bar .cmb-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.cat-meta-bar .cmb-right { display: flex; align-items: center; gap: 10px; }
.chip {
  font-size: .8rem; font-weight: 600; color: var(--text-soft);
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  padding: 6px 12px; border-radius: var(--r-pill);
}
.chip--moq { color: var(--text); }

/* Product grid */
.species-grid {
  display: grid; gap: 28px 22px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.species-card {
  cursor: pointer; background: var(--surface);
  border-radius: var(--r-md);
  animation: cardIn .4s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: translateY(0);} }

.card-image {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-md);
  overflow: hidden; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.species-card:hover .card-image { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.card-image .glyph-tile { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.card-image .glyph-tile svg { width: 46%; height: 46%; }
.card-image .card-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Snakes & reptiles are long/landscape — show the whole animal (fit) instead
   of cropping. The card frame stays square & responsive; --bg-soft fills the
   letterbox. */
.species-card[data-cat="venomous-snakes"] .card-photo,
.species-card[data-cat="mild-snakes"] .card-photo,
.species-card[data-cat="reptiles-lizards"] .card-photo { object-fit: contain; padding: 6px; }

.card-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.92); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.card-badge.lvl-venomous { color: var(--venomous-col); }
.card-badge.lvl-caution  { color: var(--caution-col); }
.card-badge.lvl-mild     { color: var(--mild-col); }
.card-badge.lvl-none     { color: var(--safe-col); }

.card-body { padding: 12px 4px 4px; }
.card-common { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-scientific { font-size: .9rem; font-style: italic; color: var(--text-mute); margin-top: 2px; }
.card-hint { display: inline-block; margin-top: 8px; font-size: .85rem; font-weight: 600; color: var(--rausch); }

.empty-note { text-align: center; color: var(--text-mute); padding: 60px 0; grid-column: 1/-1; }

/* ════════════════════════════════════════════════════════════════
   PRODUCT POPUP
   ════════════════════════════════════════════════════════════════ */
.species-popup {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.species-popup.active { opacity: 1; pointer-events: auto; }
.popup-card {
  position: relative; background: #fff; border-radius: var(--r-lg);
  width: 100%; max-width: 540px; padding: 0; overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.98); transition: transform .22s ease;
}
.species-popup.active .popup-card { transform: translateY(0) scale(1); }
.popup-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.95); border: 1px solid var(--border-soft);
  font-size: 1rem; cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.popup-close:hover { background: var(--bg-soft); }
.popup-badge {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: 5px 12px; border-radius: var(--r-pill); margin-bottom: 12px;
  background: var(--bg-soft);
}
.popup-badge.lvl-venomous { color: var(--venomous-col); background: #fbe9e4; }
.popup-badge.lvl-caution  { color: var(--caution-col); background: #fcf3df; }
.popup-badge.lvl-mild     { color: var(--mild-col); background: #fbf2d8; }
.popup-badge.lvl-none     { color: var(--safe-col); background: #e8f3e9; }
.popup-cta { margin-top: 22px; }
.popup-cta .btn-wholesale { width: 100%; }

/* ── Rich (two-column) species popup ─────────────────────────── */
.popup-card.popup-card--rich {
  max-width: 960px;
  width: 96vw;
  max-height: 92vh;
  overflow: hidden;
  text-align: left;
}
.rich-popup {
  display: flex;
  height: 100%;
  max-height: 92vh;
  min-height: 540px;
}
.rich-left {
  flex: 0 0 56%;
  padding: 28px 28px 28px 32px;
  overflow-y: auto;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) transparent;
}
.rich-left::-webkit-scrollbar { width: 6px; }
.rich-left::-webkit-scrollbar-track { background: transparent; }
.rich-left::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 3px; }
.rich-right {
  flex: 0 0 44%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--border-soft);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.rich-right-top {
  flex: 0 0 50%;
  min-height: 0;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  position: relative;
}
.rich-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Snakes & reptiles: fit the whole animal in the popup photo panel, not crop. */
.rich-popup[data-cat="venomous-snakes"] .rich-photo,
.rich-popup[data-cat="mild-snakes"] .rich-photo,
.rich-popup[data-cat="reptiles-lizards"] .rich-photo { object-fit: contain; }
.rich-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.rich-glyph svg { width: 60%; height: 60%; max-width: 180px; max-height: 180px; }
.rich-right-bottom {
  flex: 1 1 50%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #fff;
  border-radius: 0 0 var(--r-lg) 0;
  overflow: hidden;
}
.rich-right-bottom .map-section-label {
  margin: 0 0 10px;
  padding: 0;
  border-top: none;
  text-align: center;
  width: 100%;
}
.rich-right-bottom .th-map-svg {
  width: auto;
  height: 100%;
  max-height: 100%;
  flex: 0 1 auto;
}
.rich-common {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 6px 0 4px;
  line-height: 1.22;
}
.rich-scientific {
  font-style: italic;
  font-size: 0.98rem;
  color: var(--text-mute);
  margin: 0 0 18px;
}
.rich-facts { display: flex; flex-direction: column; }
.fact-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
  padding: 14px 0 6px;
  border-top: 1px solid var(--border-soft);
  margin-top: 6px;
}
.fact-section-label:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}
.fact-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.fact-row:last-child { border-bottom: none; }
.fact-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  margin-top: 2px;
  opacity: 0.9;
}
.fact-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 2px;
  font-weight: 600;
}
.fact-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
}
.map-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
.data-coming-soon {
  background: var(--bg-soft);
  border: 1px dashed var(--border-soft);
  border-radius: var(--r-md);
  padding: 18px 20px;
  text-align: center;
  margin-top: 8px;
}
.dcs-icon { font-size: 1.6rem; margin-bottom: 6px; line-height: 1; }
.dcs-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}
.dcs-text {
  font-size: 0.85rem;
  color: var(--text-mute);
  line-height: 1.5;
}
.map-coming-soon {
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}
.th-map-svg { display: block; }
.origin-note-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10px 14px; height: 100%;
}
.origin-note-wrap .map-section-label { border-top: none; padding-top: 0; margin-bottom: 12px; }
.origin-note-text {
  font-size: .9rem; color: var(--text-mute); line-height: 1.5;
}

/* Rich popup — tablet & below: stack image+map above the info */
@media (max-width: 760px) {
  .popup-card.popup-card--rich { max-height: 94vh; overflow-y: auto; }
  .rich-popup { flex-direction: column; min-height: auto; max-height: none; }
  .rich-right {
    flex: 0 0 auto;
    border-left: none;
    border-bottom: 1px solid var(--border-soft);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    order: -1;
    flex-direction: row;
  }
  .rich-right-top {
    flex: 1 1 55%;
    height: 240px;
    border-bottom: none;
    border-right: 1px solid var(--border-soft);
  }
  .rich-right-bottom {
    flex: 1 1 45%;
    height: 240px;
    padding: 12px;
    border-radius: 0;
  }
  .rich-right-bottom .th-map-svg { height: 100%; max-height: 100%; }
  .rich-left {
    flex: 1 1 auto;
    max-height: none;
    overflow: visible;
    padding: 22px 22px 26px;
  }
}

/* Rich popup — phone: full-sheet, photo stacked above map */
@media (max-width: 560px) {
  .species-popup { padding: 0; align-items: stretch; }
  .popup-card.popup-card--rich {
    width: 100%;
    max-width: none;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .rich-right { flex-direction: column; border-radius: 0; }
  .rich-right-top {
    flex: 0 0 auto;
    height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .rich-right-bottom {
    flex: 0 0 auto;
    height: auto;
    padding: 14px;
  }
  .rich-right-bottom .th-map-svg {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 320px;
  }
  .popup-card--rich .popup-close {
    position: fixed;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    width: 40px; height: 40px;
  }
}

/* ════════════════════════════════════════════════════════════════
   CONTENT SECTIONS
   ════════════════════════════════════════════════════════════════ */
.content-section { padding: 84px 0; }
.alt-section { background: var(--bg-soft); }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; margin-top: 36px; }
.col-text p { color: var(--text-soft); margin-bottom: 18px; font-size: 1.05rem; }
.col-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-block {
  background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-md);
  padding: 24px 20px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--rausch); }
.stat-lbl { font-size: .85rem; color: var(--text-mute); margin-top: 6px; }

.ethics-grid, .contact-grid { display: grid; gap: 24px; margin-top: 40px; }
.ethics-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ethics-card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-md);
  padding: 28px 24px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
}
.ethics-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ethics-icon {
  width: 50px; height: 50px; border-radius: 14px; background: #fff0f3; color: var(--rausch);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 16px;
}
.ethics-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.ethics-card p { color: var(--text-soft); font-size: .98rem; }

.steps { display: grid; gap: 16px; margin-top: 40px; max-width: 900px; }
.step { display: flex; gap: 20px; align-items: flex-start; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.step-num { font-size: 1.3rem; font-weight: 800; color: var(--rausch); min-width: 40px; }
.step-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.step-body p { color: var(--text-soft); font-size: .98rem; }

.contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.contact-details { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 26px; box-shadow: var(--shadow-sm); }
.contact-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.contact-row:last-of-type { border-bottom: none; }
.contact-lbl { color: var(--text-mute); }
.contact-val { font-weight: 600; text-align: right; }
.contact-social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); font-size: .9rem; font-weight: 600; }
.social-pill:hover { background: var(--bg-soft); }
.contact-cta-box { background: var(--text); color: #fff; border-radius: var(--r-md); padding: 32px 28px; }
.contact-cta-box h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.contact-cta-box p { color: rgba(255,255,255,0.8); margin-bottom: 20px; }
.contact-cta-box .btn-wholesale { background: var(--rausch); }
.legal-note { font-size: .82rem; color: rgba(255,255,255,0.55); margin-top: 16px; }

/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */
.footer { background: var(--navy); color: #DCE2EC; border-top: 3px solid var(--gold); padding: 56px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; align-items: start; }
.footer-brand img { height: 80px; }
.footer-tagline { color: #AEB7C7; margin-top: 12px; font-size: .95rem; max-width: 320px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #C7CEDB; font-size: .95rem; }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 8px; }
.footer-social .social-icon { color: #C7CEDB; }
.footer-social .social-icon:hover { background: rgba(255,255,255,0.12); color: var(--gold); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.14); }
.footer-legal { font-size: .82rem; color: #98A2B4; }
.footer-copy { font-size: .82rem; color: #98A2B4; margin-top: 8px; }

/* ════════════════════════════════════════════════════════════════
   SIGNUP MODAL
   ════════════════════════════════════════════════════════════════ */
.signup-overlay {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(18,18,20,0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.signup-overlay.active { opacity: 1; pointer-events: auto; }
.signup-modal {
  position: relative; background: #fff; border-radius: var(--r-lg);
  width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0,0,0,0.30); border-top: 4px solid var(--rausch);
  transform: translateY(14px) scale(.99); transition: transform .24s ease;
}
.signup-overlay.active .signup-modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--border-soft); background: #fff; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--text-mute);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); border-color: var(--border); }

/* Header zone */
.modal-head { padding: 32px 36px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-eyebrow {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rausch); background: rgba(var(--rausch-rgb),0.10);
  padding: 5px 11px; border-radius: var(--r-pill); margin-bottom: 14px;
}
.modal-title { font-size: 1.55rem; font-weight: 800; line-height: 1.15; color: var(--text); }
.modal-sub { color: var(--text-mute); margin: 8px 0 0; font-size: .95rem; }

.signup-form { padding: 26px 36px 34px; }
.signup-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.form-group { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-size: .82rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.req { color: var(--rausch); }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=tel],
.form-group input[type=search], .signup-form input[type=search] {
  font-family: var(--font-body); font-size: .98rem; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-soft); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-group input::placeholder, .signup-form input::placeholder { color: var(--text-mute); }
.form-group input:focus, .signup-form input:focus {
  outline: none; border-color: var(--rausch); background: #fff; box-shadow: 0 0 0 3px rgba(var(--rausch-rgb),0.12);
}

/* Legal confirmation rows sit in tinted panels so they read as intentional */
.form-check { flex-direction: row; margin-bottom: 12px; }
.check-label {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer; width: 100%;
  background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  padding: 13px 15px; transition: border-color .15s ease, background .15s ease;
}
.check-label:hover { border-color: var(--border); }
.check-label:has(input:checked) { border-color: var(--rausch); background: rgba(var(--rausch-rgb),0.05); }
.check-label input { margin: 1px 0 0; width: 20px; height: 20px; accent-color: var(--rausch); flex: 0 0 auto; cursor: pointer; }
.check-text { font-size: .86rem; line-height: 1.45; color: var(--text-soft); }
.check-box { display: none; }

.country-picker { position: relative; }
.country-list {
  border: 1px solid var(--border); border-radius: var(--r-sm); margin-top: 6px;
  max-height: 200px; overflow-y: auto; background: #fff; box-shadow: var(--shadow-md);
}
.country-item {
  display: block; width: 100%; text-align: left; padding: 11px 14px; background: none; border: none;
  font-family: var(--font-body); font-size: .92rem; cursor: pointer; color: var(--text);
}
.country-item:hover, .country-item.selected { background: var(--bg-soft); }
.country-item.selected { font-weight: 700; color: var(--rausch); }
.country-empty { padding: 12px 14px; color: var(--text-mute); font-size: .9rem; }
.country-chosen { margin-top: 8px; font-size: .88rem; color: var(--text-soft); }
.country-chosen strong { color: var(--text); }

.signup-error { color: var(--venomous-col); font-size: .88rem; min-height: 1.2em; margin: 4px 0 10px; }
.btn-submit { width: 100%; margin-top: 6px; padding: 15px; font-size: 1.02rem; border-radius: var(--r-sm); }
.signup-success { text-align: center; padding: 44px 36px; }
.signup-success h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.signup-success h3::before {
  content: '✓'; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(46,125,50,0.12); color: var(--safe-col); font-size: 1.6rem;
}
.signup-success p { color: var(--text-soft); margin-bottom: 24px; line-height: 1.55; }

/* ─── Floating access button ───────────────────────────────── */
.float-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 1500;
  display: flex; align-items: center; gap: 8px;
  background: var(--rausch); color: #fff; border: none; cursor: pointer;
  padding: 14px 20px; border-radius: var(--r-pill); font-family: var(--font-body);
  font-weight: 700; font-size: .95rem; box-shadow: 0 8px 24px rgba(var(--rausch-rgb),0.35);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.float-btn:hover { background: var(--rausch-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(var(--rausch-rgb),0.45); }

/* ─── Signup modal — mobile (bottom-sheet) ─────────────────── */
@media (max-width: 640px) {
  .signup-overlay { padding: 0; align-items: flex-end; }
  .signup-modal {
    max-width: none; max-height: 94vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .modal-head { padding: 26px 22px 18px; }
  .modal-title { font-size: 1.3rem; }
  .modal-sub { font-size: .9rem; }
  .signup-form { padding: 20px 22px 28px; }
  .signup-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .signup-success { padding: 36px 22px; }
  .modal-close { top: 12px; right: 12px; }
  .float-btn { bottom: 16px; right: 16px; padding: 12px 18px; }
}

/* ─── Protection overlay (kept from backend RPC) ───────────── */
.protection-overlay { font-family: var(--font-body) !important; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    transform: none; background: #fff; border-bottom: 1px solid var(--border-soft);
    padding: 12px 24px 20px; gap: 2px; box-shadow: var(--shadow-md); margin: 0;
  }
  .nav-toggle { display: flex; }
  .nav-social { display: none; }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container, .navbar { padding-left: 20px; padding-right: 20px; }
  .nav-logo img { height: 50px; }
  .btn-label-full { display: none; }
  .btn-label-short { display: inline; }
  .hero-stats { gap: 24px; }
  .col-stats { grid-template-columns: 1fr 1fr; }
  .signup-form .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .species-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
}

/* ════════════════════════════════════════════════════════════════
   COLLECTION PAGE (collection.html)
   Left category menu + global search + all categories visible.
   ════════════════════════════════════════════════════════════════ */
.nav-links a.active { color: var(--text); font-weight: 700; }

.collection-page { padding: calc(var(--nav-h) + 28px) 0 96px; }
.collection-head { text-align: center; margin-bottom: 8px; }
.collection-head .section-sub { max-width: 640px; margin-left: auto; margin-right: auto; }

/* Search bar */
.collection-search {
  position: relative; max-width: 620px; margin: 24px auto 0;
}
.collection-search .cs-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-mute); pointer-events: none;
}
.collection-search input {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 15px 46px 15px 50px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: #fff; color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.collection-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.collection-search input:focus {
  outline: none; border-color: var(--rausch);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
}
.collection-search .cs-clear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: var(--bg-soft); color: var(--text-mute);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.collection-search .cs-clear:hover { background: var(--border-soft); color: var(--text); }

/* Sidebar + main layout */
.collection-layout {
  display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 40px;
  margin-top: 40px; align-items: start;
}
/* Grid/flex children must be allowed to shrink below their content width,
   otherwise a wide child blows the track out and causes horizontal scroll
   (and full-width square media) on mobile. */
.collection-main, .species-detail, .sd-media, .sd-info { min-width: 0; }
.collection-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.cat-menu { display: flex; flex-direction: column; gap: 2px; }
.cat-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  color: var(--text-soft); cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.cat-menu-item:hover { background: var(--bg-soft); color: var(--text); }
.cat-menu-item.active {
  background: var(--bg-soft); color: var(--text); font-weight: 700;
  border-color: var(--border-soft);
}
.cat-menu-item.is-empty { opacity: .4; }
.cat-menu-item .cmi-glyph { width: 26px; height: 26px; flex: 0 0 auto; }
.cat-menu-item .cmi-glyph svg { width: 100%; height: 100%; display: block; }
.cat-menu-item .cmi-label { flex: 1; font-size: .92rem; }
.cat-menu-item .cmi-count {
  font-size: .74rem; color: var(--text-mute); font-variant-numeric: tabular-nums;
  background: #fff; border: 1px solid var(--border-soft);
  padding: 2px 9px; border-radius: var(--r-pill);
}
.cat-menu-item.active .cmi-count { background: #fff; }

.collection-cat { scroll-margin-top: calc(var(--nav-h) + 16px); padding-top: 8px; }
.collection-cat + .collection-cat { margin-top: 44px; }
.collection-cat .cat-meta-bar { margin: 0 0 22px; }
.collection-empty { text-align: center; color: var(--text-mute); padding: 60px 0; font-size: 1.05rem; }

/* Landing: category tiles shown until a category is chosen */
.collection-lead { color: var(--text-mute); margin: -8px 0 22px; font-size: 1.02rem; }
.cat-landing-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.cat-tile {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--border-soft); border-radius: var(--r-md);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.cat-tile:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); border-color: var(--border); }
.cat-tile .ct-glyph { width: 40px; height: 40px; }
.cat-tile .ct-glyph svg { width: 100%; height: 100%; display: block; }
.cat-tile .ct-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.cat-tile .ct-count { color: var(--text-mute); font-size: .85rem; }

/* ════════════════════════════════════════════════════════════════
   STATIC SPECIES PAGE (/species/<slug>.html)
   ════════════════════════════════════════════════════════════════ */
.site-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 40px; background: #fff; border-bottom: 1px solid var(--border-soft);
}
.site-bar-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; }
.site-bar-logo img { height: 40px; width: auto; }
.site-bar-nav { display: flex; align-items: center; gap: 18px; }
.site-bar-nav a { color: var(--text-soft); font-weight: 600; }
.site-bar-nav a:hover { color: var(--text); }

/* Static pages sit under the fixed navbar — clear it. */
.species-page { padding-top: calc(var(--nav-h) + 10px); padding-bottom: 80px; }
.species-page .collection-layout { margin-top: 16px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--text-mute); font-weight: 600; }
.back-link:hover { color: var(--rausch); }

/* Species detail.
   The markup wraps the data in .sd-info and the photo+map in .sd-media.
   • Mobile/tablet: the two wrappers are dissolved with `display:contents`
     and the five blocks are re-sequenced with `order` to keep the original
     single-column reading order: name → photo → data → location map.
   • Desktop (≥1000px, grid override below): the wrappers become the two
     real columns — data on the left, photo with the map directly beneath
     it on the right. */
.species-detail { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.species-detail > .sd-info,
.species-detail > .sd-media { display: contents; }
.species-detail .sd-head    { order: 1; }
.species-detail .sd-photo   { order: 2; }
.species-detail .rich-facts { order: 3; }
.species-detail .sd-cta     { order: 4; }
.species-detail .sd-map     { order: 5; }
.sd-head .popup-badge { margin-bottom: 8px; }
.sd-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 4px; }
.sd-sci { color: var(--text-mute); font-style: italic; }
.sd-photo {
  aspect-ratio: 1 / 1; max-width: 480px; width: 100%; border-radius: var(--r-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-soft);
}
.sd-photo .sd-img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.sd-photo .glyph-tile { width: 100%; height: 100%; }
.sd-photo .glyph-tile svg { width: 46%; height: 46%; }
.sd-map { border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 16px; max-width: 460px; }
.sd-map .th-map-svg { width: 100%; max-width: 300px; margin: 8px auto 0; }
.sd-cta { margin-top: 4px; }

/* Desktop: restore the two real columns and clean three-column separation.
   Threshold is 1000px because the collection sidebar (248px) returns at
   >960px and the layout needs room for two columns beside it. */
@media (min-width: 1000px) {
  /* — Separator 1: left category menu | centre content —
     A full-height hairline between the sticky sidebar and the main column.
     Scoped with :has() so only species DETAIL pages get it, not the
     category-grid pages that share the .species-page/.collection-layout shell. */
  .species-page .collection-layout:has(.species-detail) { gap: 0; }
  .species-page .collection-layout:has(.species-detail) .collection-sidebar { padding-right: 34px; }
  .species-page .collection-layout:has(.species-detail) .collection-main {
    border-left: 1px solid var(--border-soft);
    padding-left: 34px;
  }

  /* — The species article becomes two columns — */
  .species-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    column-gap: 36px;
    align-items: start;
    max-width: 1100px;
  }
  /* Reinstate the wrappers as the two columns (override `display:contents`).
     `order` on the children still sequences correctly inside each wrapper.
     — Separator 2: centre data | right image+map —
     The divider lives on the data column and stretches to the full article
     height (align-self:stretch) so it never stops short, even when the photo
     +map column is shorter. */
  .species-detail > .sd-info {
    display: flex; flex-direction: column; gap: 22px;
    min-width: 0;
    align-self: stretch;
    border-right: 1px solid var(--border-soft);
    padding-right: 36px;
  }
  /* The media column stacks photo then map directly (map immediately under
     the photo) and sticks in view while the longer data column scrolls. */
  .species-detail > .sd-media {
    display: flex; flex-direction: column; gap: 16px;
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    align-self: start;
  }
  .sd-media .sd-photo, .sd-media .sd-map { max-width: none; width: 100%; }
}

/* Static category page header */
.cat-page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.cat-page-head .cph-glyph { width: 48px; height: 48px; flex: 0 0 auto; }
.cat-page-head .cph-glyph svg { width: 100%; height: 100%; display: block; }

/* Category icon PNGs (replaceable placeholders) inside menu / tiles / headers */
.cmi-glyph img, .ct-glyph img, .cph-glyph img {
  width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px;
}
.cat-page-head .section-title { text-align: left; }
.cat-page-head .section-sub { margin-top: 4px; }

@media (max-width: 760px) {
  .species-page { padding-top: calc(var(--nav-h) + 6px); }
  .species-detail { gap: 20px; }
  .sd-photo { max-width: 100%; }
  .sd-map { max-width: 100%; }
  .sd-map .th-map-svg { max-width: 260px; }
  .sd-title { font-size: 1.5rem; }
  .back-link { margin-bottom: 12px; }
}

@media (max-width: 960px) {
  /* Sidebar becomes a horizontal scroller pinned under the nav */
  .collection-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .collection-sidebar {
    position: sticky; top: var(--nav-h);
    background: var(--bg); z-index: 20;
    margin: 0 -20px; padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
  }
  .cat-menu {
    flex-direction: row; overflow-x: auto; scrollbar-width: none;
    gap: 6px; padding: 4px 20px;
  }
  .cat-menu::-webkit-scrollbar { display: none; }
  .cat-menu-item {
    flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--border-soft);
    border-radius: var(--r-pill);
  }
  .cat-menu-item .cmi-label { white-space: nowrap; }
  .cat-menu-item.is-empty { display: none; }
}

/* Collection — phone tuning */
@media (max-width: 640px) {
  .collection-page { padding-top: calc(var(--nav-h) + 14px); padding-bottom: 64px; }
  .collection-head .section-title { font-size: 1.6rem; }
  .collection-head .section-sub { font-size: .94rem; }
  .collection-search { margin-top: 18px; }
  .collection-search input { padding: 13px 42px 13px 44px; font-size: .95rem; }
  .collection-layout { margin-top: 20px; gap: 16px; }
  .collection-sidebar { margin: 0 -20px; }
  .cat-menu-item { padding: 9px 14px; }            /* larger tap target */
  .cat-landing-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-tile { padding: 16px 14px; gap: 8px; }
  .cat-tile .ct-glyph { width: 32px; height: 32px; }
  .cat-tile .ct-name { font-size: .96rem; }
  .cat-meta-bar { margin: 4px 0 18px; }
  .cat-meta-bar .cmb-title { font-size: 1.3rem; }
}
