/* site-shared.css — Editorial Minimalist system, validated against the
   approved mockup. Sits on top of styles.css (which now owns the warm
   paper/ink palette directly — see the updated :root block there).
   One typeface throughout; restraint comes from spacing and scale, not
   from font-pairing or colored backgrounds. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&display=swap');

:root {
  --font-display: 'Newsreader', Georgia, serif;
}

body[data-family] {
  background: var(--bg-primary);
  font-family: var(--font-display);
}

/* ---------- Per-category accent ----------
   A single muted, desaturated color per category — used only for the
   masthead eyebrow, subcategory headings, the homepage index dot, and
   nothing else. It is never a background. */

[data-family="whisky"]    { --family-accent: #8B6B3D; }
[data-family="gin"]       { --family-accent: #5F6B52; }
[data-family="spirits"]   { --family-accent: #4A5A66; }
[data-family="shochu"]    { --family-accent: #7D7566; }
[data-family="liqueur"]   { --family-accent: #7A3B45; }
[data-family="wine"]      { --family-accent: #5C1A24; }
[data-family="beer"]      { --family-accent: #C48A2A; }
[data-family="tea"]       { --family-accent: #6E8A63; }
[data-family="coffee"]    { --family-accent: #6B4A32; }
[data-family="chocolate"] { --family-accent: #4A3423; }
[data-family="cocktails"] { --family-accent: #9C5B3C; }

/* Fix (carried over, still needed): styles.css's global h1/h2 rule applies
   uppercase + 0.15em tracking to every heading site-wide. These headings
   are set deliberately, not inherited. */
.site-nav-brand, .category-title, .subcategory-title,
.home-hero-title, .index-name {
  text-transform: none;
  letter-spacing: normal;
}

/* Native theme toggle button — rendered directly by nav.js, not adopted
   from elsewhere. Both icons sit in normal flow; whichever one matches the
   current theme is shown, the other is display:none. No position:absolute,
   no positioning-context dependency, nothing to break when moved into a
   flex layout. */
.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-btn-icon { width: 19px; height: 19px; fill: var(--text-primary); }
.theme-btn-icon.icon-sun { display: none; }
[data-theme="dark"] .theme-btn-icon.icon-sun { display: block; }
[data-theme="dark"] .theme-btn-icon.icon-moon { display: none; }

/* ---------- Nav ---------- */

#siteNav {
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.site-nav-brand {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-decoration: none;
}
.site-nav-links { display: none; gap: 26px; }
.site-nav-right { display: flex; align-items: center; gap: 4px; }
.site-nav-links::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border-color);
  margin-left: 18px;
}
.site-nav-link {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav-link:hover, .site-nav-link.current {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}
.site-nav-toggle { background: none; border: none; padding: 4px; cursor: pointer; }
.site-nav-toggle svg { width: 22px; height: 22px; fill: var(--text-primary); }

.site-nav-drawer {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.site-nav-drawer.open { transform: translateX(0); }
.site-nav-drawer-close { align-self: flex-end; background: none; border: none; padding: 8px; }
.site-nav-drawer-close svg { width: 22px; height: 22px; fill: var(--text-primary); }
.site-nav-drawer-links { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.site-nav-drawer-links a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--text-primary);
  text-decoration: none;
}

@media (min-width: 780px) {
  .site-nav-links { display: flex; align-items: center; }
  .site-nav-toggle { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 24px 80px;
  text-align: center;
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Category masthead (shared by every category page) ---------- */

.category-masthead {
  text-align: center;
  padding: 90px 24px 56px;
  border-bottom: 1px solid var(--border-color);
}
.category-eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--family-accent);
  margin-bottom: 18px;
}
.category-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(44px, 9vw, 72px);
  margin: 0 0 16px;
  color: var(--text-primary);
}
.category-intro {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.7;
}

.subcategory-title {
  max-width: 680px;
  margin: 56px auto 0;
  padding: 0 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--family-accent);
  scroll-margin-top: 120px;
}
.subcategory-title:first-of-type { margin-top: 40px; }

.empty-state, .loading-state {
  text-align: center;
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  padding: 60px 24px;
  font-size: 14px;
}

/* ---------- Expandable tasting notes — used by list/table/swatch layouts.
   The one-liner summary is what you actually glance at; full nose/palate/
   finish is one tap away for anyone who wants the depth. ---------- */

.notes-details {
  margin-top: 6px;
}
.notes-details summary {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.notes-details summary::-webkit-details-marker { display: none; }
.notes-details summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 3px solid var(--text-muted);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transition: transform 0.15s ease;
}
.notes-details[open] summary::before { transform: rotate(90deg); }
.notes-details span {
  display: block;
  font-style: italic;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}
.notes-details span b {
  font-style: normal;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--family-accent);
  margin-right: 5px;
}
.table-row .notes-details, .table-row .notes-details span { grid-column: 1 / -1; }

/* ============================================================
   Layout mode: LIST — whisky, gin, spirits, liqueur, beer, tea, coffee,
   chocolate. Numbered rows, dotted price leader, one-liner summary,
   tasting notes tucked behind a details reveal. Liqueur gets one small
   addition — a color dot showing the drink's actual color — rather than
   a whole separate grid system.
   ============================================================ */

.layout-list { max-width: 760px; margin: 0 auto; padding: 8px 24px 100px; }
.list-row { display: flex; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--border-color); }
.list-num {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 6px;
  flex-shrink: 0;
  width: 20px;
}
.list-body { flex: 1; min-width: 0; }
.list-top { display: flex; align-items: baseline; gap: 12px; }
.list-swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.list-name { font-size: 21px; font-weight: 400; color: var(--text-primary); }
.list-leader { flex: 1; border-bottom: 1px dotted var(--text-muted); margin-bottom: 6px; }
.list-price {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.list-meta {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 2px;
}
.list-summary { font-size: 14px; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }

/* ============================================================
   Layout mode: TABLE — wine, the one genuine structural exception.
   Same 760px reading width as list, so moving between category pages
   never causes the page to visibly resize.
   ============================================================ */

.layout-table { max-width: 760px; margin: 0 auto; padding: 8px 24px 100px; }
.table-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border-color);
}
.table-name { font-size: 20px; color: var(--text-primary); grid-column: 1; }
.table-price {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  grid-column: 2;
  align-self: start;
}
.table-meta {
  grid-column: 1 / -1;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--family-accent);
}
.table-notes { grid-column: 1 / -1; font-style: italic; font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; margin-top: 2px; }
