:root {
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --text-light: #9b9b9b;
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --line: #e5e5e5;
    --accent: #ffe152;
    --accent-dark: #ffd800;
    --accent-warm: #f5d000;
    --listed-bg: #ffe152;
    --listed-text: #4a3a00;
    --new-bg: #c41e3a;
    --new-text: #ffffff;
    --rtd-bg: #2563eb;
    --rtd-text: #ffffff;
    --coming-bg: #f5f5f5;
    --coming-text: #6b6b6b;
    --nonalc-bg: #16a34a;
    --nonalc-text: #ffffff;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    background: var(--bg);
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; text-decoration: none; }

  /* ─── Header ─── */
  .topbar {
    border-bottom: 1px solid var(--line);
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .brand-mark {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 16px;
  }
  .topnav {
    display: flex;
    gap: 28px;
    font-size: 14px;
    font-weight: 500;
  }
  .topnav a {
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
  }
  .topnav a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
  }
  .topnav a:hover { color: var(--text); }

  /* ─── Hero ─── */
  .hero {
    padding: 64px 32px 48px;
    max-width: 1280px;
    margin: 0 auto;
  }
  .hero h1 {
    font-weight: 300;
    font-size: 56px;
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  .hero h1 strong {
    font-weight: 700;
    background: linear-gradient(transparent 65%, var(--accent) 65%);
    padding: 0 4px;
  }
  .hero-meta {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
  }
  .hero-meta span::before {
    content: "·";
    margin-right: 24px;
    color: var(--text-light);
  }
  .hero-meta span:first-child::before { content: ""; margin: 0; }

  /* ─── Filter bar ─── */
  .filter-bar {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 16px 32px;
    background: var(--bg-soft);
    position: sticky;
    top: 60px;
    z-index: 90;
  }
  .filter-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .filter-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 8px;
  }
  .chip {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
  }
  .chip:hover {
    border-color: var(--text);
    color: var(--text);
  }
  .chip.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
  }
  .chip-divider {
    width: 1px;
    height: 20px;
    background: var(--line);
    margin: 0 4px;
  }

  /* ─── Country anchor nav ─── */
  .country-nav {
    max-width: 1280px;
    margin: 32px auto 0;
    padding: 0 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    font-size: 13px;
  }
  .country-nav a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 6px 0;
  }
  .country-nav a:hover {
    color: var(--text);
  }
  .country-nav .count {
    color: var(--text-light);
    font-weight: 400;
    font-size: 12px;
  }

  /* ─── Country sections ─── */
  .country-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 32px 32px;
  }
  .country-header {
    font-weight: 300;
    font-size: 42px;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 16px;
  }
  .country-count {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0;
  }

  /* ─── Brand block ─── */
  .brand-block {
    margin-top: 32px;
  }
  .brand-header {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--text);
    text-transform: uppercase;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .brand-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
  }

  /* ─── Cards grid ─── */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  @media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 640px) {
    .cards-grid { grid-template-columns: 1fr; }
  }

  /* ─── Product card ─── */
  .card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    gap: 16px;
    position: relative;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .card:hover {
    border-color: var(--text);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  }
  .bottle {
    flex-shrink: 0;
    width: 80px;
    height: 140px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
  }
  .bottle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .product-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text);
  }
  .meta-row {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
  }
  .meta-row .sku {
    color: var(--text-light);
  }
  .prices {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .price {
    flex: 1;
  }
  .price-label {
    display: block;
    font-size: 10px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
  }
  .price-value {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .awards {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: auto;
  }
  .awards li {
    list-style: none;
    padding-left: 16px;
    position: relative;
    margin-top: 3px;
  }
  .awards li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 1px 1px rgba(0,0,0,.15) inset;
  }
  .awards li.award-gold::before    { background: linear-gradient(135deg, #fdd835 0%, #d4a017 100%); }
  .awards li.award-silver::before  { background: linear-gradient(135deg, #e0e0e0 0%, #9e9e9e 100%); }
  .awards li.award-bronze::before  { background: linear-gradient(135deg, #d68b5e 0%, #8a4f2a 100%); }
  .awards li.award-honor::before   { background: #cfd8dc; border: 1px solid #b0bec5; }

  /* ─── Badges ─── */
  .badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
  }
  .badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
    line-height: 1;
  }
  .badge-listed { background: var(--listed-bg); color: var(--listed-text); }
  .badge-new    { background: var(--new-bg);    color: var(--new-text); }
  .badge-rtd    { background: var(--rtd-bg);    color: var(--rtd-text); }
  .badge-nonalc { background: var(--nonalc-bg); color: var(--nonalc-text); }
  .badge-coming { background: var(--coming-bg); color: var(--coming-text); border: 1px solid var(--line); }

  /* ─── Footer ─── */
  footer {
    margin-top: 96px;
    border-top: 1px solid var(--line);
    padding: 48px 32px 64px;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: 13px;
  }
  .footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
  }
  @media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr; }
  }
  .footer-col h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 700;
  }
  .footer-col p {
    line-height: 1.6;
  }
  .footer-col a:hover { color: var(--text); text-decoration: underline; }

  /* sketch annotation */
  .sketch-banner {
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    color: var(--text);
    padding: 8px 32px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-align: center;
  }

  /* ─── Mobile polish (≤640px) ─── */
  @media (max-width: 640px) {
    .topbar { padding: 14px 16px; }
    .brand-mark { font-size: 14px; }
    .topnav { gap: 16px; font-size: 13px; }
    .hero { padding: 40px 16px 32px; }
    .hero h1 { font-size: 36px; }
    .hero-meta { font-size: 12px; gap: 12px; }
    .hero-meta span::before { margin-right: 12px; }
    .filter-bar { padding: 12px 16px; top: 50px; overflow-x: auto; }
    .filter-inner { flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
    .filter-inner::-webkit-scrollbar { height: 0; }
    .chip { font-size: 12px; padding: 5px 12px; flex-shrink: 0; }
    .filter-label { display: none; }
    .country-nav {
      padding: 0 16px;
      gap: 4px 12px;
      font-size: 12px;
      overflow-x: auto;
      flex-wrap: nowrap;
      white-space: nowrap;
      -webkit-overflow-scrolling: touch;
    }
    .country-nav::-webkit-scrollbar { height: 0; }
    .country-section { padding: 40px 16px 24px; }
    .country-header { font-size: 28px; flex-direction: column; align-items: flex-start; gap: 4px; }
    .country-count { font-size: 12px; }
    .brand-block { margin-top: 24px; }
    .brand-header { font-size: 12px; margin-bottom: 16px; }
    .card { padding: 16px; gap: 12px; }
    .bottle { width: 64px; height: 110px; }
    .product-name { font-size: 14px; }
    .meta-row { font-size: 10px; }
    .price-value { font-size: 15px; }
    .awards { font-size: 10.5px; }
    .badges { top: 8px; right: 8px; }
    .badge { font-size: 8.5px; padding: 2.5px 6px; }
    footer { padding: 32px 16px 48px; margin-top: 64px; }
    .sketch-banner { padding: 6px 16px; font-size: 11px; }
  }

  /* ─── Mid-mobile (641–768px) ─── */
  @media (min-width: 641px) and (max-width: 768px) {
    .hero h1 { font-size: 44px; }
    .country-header { font-size: 34px; }
  }

/* LTO overlay — current period stays red; upcoming period gets amber so the
   two periods are visually distinct during the LEAD_DAYS overlap window. */
.badge-lto { background: #c41e3a; color: #fff; }
.card-lto { border-color: #c41e3a; }
.badge-lto-upcoming { background: #d97706; color: #fff; }
.card-lto-upcoming { border-color: #d97706; }
.price-was { color: var(--text-light); text-decoration: line-through; font-weight: 400; font-size: 13px; }
.price-sale { color: #c41e3a; font-weight: 700; }
.brand-mark a { color: inherit; }

/* Clearance badge */
.badge-clearance { background: #ea580c; color: #fff; }

/* Incoming badge (auto-detected from Products tab Global Status) */
.badge-incoming { background: #475569; color: #fff; }

/* Coming Soon badge (manual master `badges` value, e.g. announced products
   not yet landed). Distinct from INCOMING which is auto-detected. */
.badge-coming-soon { background: #64748b; color: #fff; }

/* Independent Bottlers — bottom-of-page section on AB only. Lists brands we
   carry but don't itemize on the portfolio because they turn over too fast.
   Larger type + logo grid for visibility. */
.indie-bottlers { max-width: 1200px; margin: 56px auto 40px; padding: 36px 32px; border-top: 1px solid var(--line); }
.indie-bottlers h2 { margin: 0 0 10px; font-size: 32px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.indie-bottlers .indie-note { margin: 0 0 28px; color: var(--text-muted); font-size: 18px; font-style: italic; }
.indie-bottlers .indie-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
/* Each tile is a transparent column: white-bordered frame on top with just
   the logo, brand-name caption sitting OUTSIDE the frame below. */
.indie-bottlers .indie-item { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.indie-bottlers .indie-frame { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 18px; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.indie-bottlers .indie-frame img { max-width: 100%; max-height: 90px; object-fit: contain; display: block; }
/* Per-brand sizing — Living Souls' default (max-height 90px) works as-is;
   AD Rattray fills the frame; Duncan Taylor + Whisky Age fill ~80%. */
.indie-bottlers .ib-adr .indie-frame img        { max-height: 110px; max-width: 100%; }
.indie-bottlers .ib-duncan .indie-frame img     { max-height: 95px;  max-width: 90%;  }
.indie-bottlers .ib-whiskyage .indie-frame img  { max-height: 95px;  max-width: 90%;  }
.indie-bottlers .ib-lbd .indie-frame img        { max-height: 90px;  max-width: 95%;  }
.indie-bottlers .ib-uncharted .indie-frame img  { max-height: 110px; max-width: 100%; }
/* Brand name caption sits below the frame on transparent background. */
.indie-bottlers .indie-brand-name { color: var(--text); font-size: 16px; font-weight: 600; text-align: center; line-height: 1.2; letter-spacing: 0.02em; }

/* Non-alcoholic badge — the rendered class is .badge-non-alcoholic
   (from the "Non-Alcoholic" badge text), which the base .badge-nonalc rule
   doesn't cover, so style it explicitly. */
.badge-non-alcoholic { background: #16a34a; color: #fff; }

/* Stocked Spec badge (Listings XPST, non-archived) — teal. */
.badge-stocked-spec { background: #0f766e; color: #fff; }

/* Spirit Release badge (BCL Fall/Spring Spirit Release listings) — indigo. */
.badge-spirit-release { background: #3730a3; color: #fff; }

/* Limited-edition badge: red text on white with a red outline, so it reads as
   "limited" and stays distinct from the solid-red LTO badge. */
.badge-limited { background: #fff; color: #c41e3a; border: 1px solid #c41e3a; }

/* Smooth, clearly-visible jumps to brand/section anchors. */
html { scroll-behavior: smooth; }
/* Brand/section jump targets: offset the scroll so the header clears the sticky
   page header + the (two-row) filter bar when jumping. */
.brand-block, .country-section { scroll-margin-top: 170px; }

/* Category ordering note (e.g. Bitters direct-order line). */
.cat-note { font-size: 13px; color: var(--text-light); margin: -4px 0 18px; }
.cat-note a { color: var(--text); text-decoration: underline; }

/* Hero "Download PDF" links. */
.pdf-links a { text-decoration: underline; }

/* Search box in the sticky filter bar — sits on its own row ABOVE the chips.
   The wrapper takes a full flex row (forces the line break); the input inside is
   capped to a sensible width, left-aligned, sized to match chip height.
   Live-filters cards by product name/brand/SKU. */
.search-row { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.search-box { width: 320px; max-width: 100%; font-family: inherit;
              font-size: 13px; font-weight: 500; line-height: 1.5; padding: 6px 14px;
              border: 1px solid var(--line); border-radius: 999px;
              color: var(--text); background: #fff; }
.search-box:focus { outline: none; border-color: var(--text); }
.search-box::placeholder { color: var(--text-light); font-weight: 400; }

/* Status filter chips (LISTED / LIMITED / LTO) echo their badge colours so they
   stand out from the plain category/badge chips on the search row. */
.chip[data-filter="badge:LISTED"]  { background: #fff8d6; border-color: #e6cf3a; color: #6b5600; }
.chip[data-filter="badge:LIMITED"] { background: #fff;    border-color: #c41e3a; color: #c41e3a; }
.chip[data-filter="lto"]           { background: #c41e3a; border-color: #c41e3a; color: #fff; }
.chip[data-filter="badge:LISTED"].active  { background: #ffe152; border-color: #ffe152; color: #4a3a00; }
.chip[data-filter="badge:LIMITED"].active { background: #c41e3a; border-color: #c41e3a; color: #fff; }
.chip[data-filter="lto"].active           { background: #8e1422; border-color: #8e1422; color: #fff; }

/* "Sold as single bottle" note (rendered when units_per_case == 1) */
.single-bottle { font-size: 11px; color: var(--text-light); font-style: italic; margin: -4px 0 8px 0; letter-spacing: 0.04em; }

/* Badges sit in normal flow above the product name, so they can never
   overlap the card text (was absolute-positioned in the top-right corner). */
.badges { position: static; flex-direction: row; flex-wrap: wrap;
          align-items: center; gap: 4px; margin-bottom: 6px; }

/* NEW badge: violet so it stays visually distinct from the red LTO badge.
   Overrides the --new-bg defined in sketch.html. */
:root { --new-bg: #7c3aed; --new-text: #ffffff; }

/* Darken the muted/light grey text site-wide for better legibility.
   Overrides the lighter values defined in sketch.html. */
:root { --text-muted: #555555; --text-light: #707070; }

/* Group-by toggle (in the hero) — switches between by-country and
   by-category portfolio views. */
.view-toggle {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff;
}
.view-toggle-label { color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.view-toggle-current { font-weight: 700; color: var(--text); }
.view-toggle-current::before { content: ""; }
.view-toggle-alt {
  color: var(--text-muted); font-weight: 500; padding-left: 10px;
  border-left: 1px solid var(--line);
}
.view-toggle-alt:hover { color: var(--text); }
