/* ==========================================================================
   DRINKQ UI/UX POLISH — Layout, grids, cards, forms (CSS-only)
   Preserves all JS behavior; overrides visual/layout tokens only.
   ========================================================================== */

:root {
  --container-max: 1800px;
  --container-gutter: 0px; /* Sidebar handles its own padding */
  --grid-gap: 2rem;
  --grid-gap-lg: 3rem;
  --section-y: clamp(2rem, 4.5vw, 4rem);
  --section-y-tight: clamp(1.25rem, 2.5vw, 2.5rem);
  --sidebar-width: 280px;
  --card-radius: 12px;
  --select-chevron: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e4b382' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --border-soft: rgba(228, 179, 130, 0.1);
}

/* Premium typographic scale */
:root {
  --fs-h1: clamp(3rem, 8vw, 5.5rem);
  --fs-h2: clamp(2rem, 5vw, 3.25rem);
  --fs-h3: clamp(1.4rem, 2vw, 1.8rem);
  --fs-lead: 1.15rem;
  --measure: 65ch;
}

/* Cinematic Section Transitions */
.section--borders {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* Hero Display Refinement */
.museum-hero__title {
  text-transform: uppercase;
  font-weight: 800;
  line-height: 0.9;
}

.museum-hero__title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-primary);
  text-transform: none;
}

/* Editorial Typography */
.lead-editorial {
  font-size: var(--fs-lead);
  line-height: 1.7;
  max-width: var(--measure);
  opacity: 0.8;
}

/* Unified premium card overrides to ensure consistent museum visuals */
/* Note: Archive pages use .page-drinks/.page-ingredients scoped styles in archive.css */

/* Bento Explorer Layout Refinement */
.explorer-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 0;
  min-height: 100vh;
  border-top: 1px solid var(--border-soft);
}

.filter-panel {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  padding: 2.5rem 1.25rem;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-soft);
  border-radius: 0;
  max-width: none;
  width: var(--sidebar-width);
  z-index: 10;
}

.explorer-main {
  padding: 2.5rem 3rem;
  background: var(--bg-secondary);
}

/* Typography rhythm */
.museum-hero__title, .hero-display-title, .page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

/* Tighten container max-widths for balanced density */
.container { max-width: var(--container-max); }

@media (min-width: 1400px) {
  .container { max-width: var(--container-max); width: 100%; }
}

/* Reduce empty vertical whitespace where appropriate */
.section { padding-block: clamp(1.25rem, 3.5vw, 3rem); }
.section--tight { padding-block: clamp(1rem, 2.2vw, 1.75rem); }

/* Bento Spotlight Upgrade */
.spotlight--museum, 
.botanical-spotlight {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  min-height: 500px !important;
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--brand-primary) !important;
  border-radius: 12px !important;
  margin-bottom: 4rem !important;
  overflow: hidden !important;
  box-shadow: 0 50px 100px -20px rgba(0,0,0,0.7) !important;
}

.spotlight--museum img, 
.botanical-spotlight__visual img {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}

.spotlight--museum > div, 
.botanical-spotlight > div {
  padding: 4rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.catalog-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 3rem !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Make masonry/catalog grids align to a symmetric center column flow */
.catalog-grid,
.catalog-grid--masonry {
  display: grid;
  justify-items: stretch;
  align-content: start;
}

/* Responsive Grids */
@media (max-width: 1024px) {
  .museum-stats__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .museum-stats__grid {
    grid-template-columns: 1fr !important;
  }
  .museum-hero__grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    text-align: center;
  }
  .museum-hero__copy {
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  .museum-hero__visual {
    order: -1;
    max-width: 480px;
    margin-inline: auto;
  }
  .quick-finder {
      margin-inline: auto;
  }
  .hero-quick-links {
      justify-content: center;
      margin-left: 0;
  }
  .hero-actions {
      justify-content: center;
  }
}

/* Fix Description Visibility */
.encyclopedia-entry .entry-desc {
  color: var(--text-secondary);
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 1rem;
}

body.light-mode .encyclopedia-entry .entry-desc {
  color: var(--text-secondary); /* This should be dark in light mode */
}
@media (prefers-reduced-motion: reduce) {
  .encyclopedia-entry, .encyclopedia-entry .entry-media img { transition: none !important; }
}

@media (min-width: 1440px) {
  :root {
    --container-max: 1760px;
  }
}

@media (min-width: 1920px) {
  :root {
    --container-max: 1920px;
    --grid-gap: 1.5rem;
  }
}

@media (min-width: 2560px) {
  :root {
    --container-max: 2200px;
    --grid-gap: 1.625rem;
  }
}

/* ---------- Container & page shell ---------- */

.container,
.page-shell {
  width: min(var(--container-max), 100% - var(--container-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.container--wide {
  width: min(calc(var(--container-max) + 120px), 100% - var(--container-gutter));
}

/* ---------- Section rhythm ---------- */

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: var(--section-y-tight);
}

.museum-hero {
  min-height: min(88vh, 820px);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.museum-stats,
.museum-categories,
.museum-discovery,
.museum-journey {
  padding-block: var(--section-y-tight);
}

.museum-section-head {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

/* ---------- Catalog grids (archive, search, mood) ---------- */

.catalog-grid,
.catalog-grid--compact,
.catalog-grid--masonry {
  display: grid;
  gap: var(--grid-gap);
}

.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.catalog-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.catalog-grid--masonry {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--grid-gap);
}

@media (min-width: 1280px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .catalog-grid--masonry {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (min-width: 1600px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .catalog-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .catalog-grid--masonry {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (min-width: 1920px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .catalog-grid--masonry {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (min-width: 2560px) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

/* ---------- Card system: equal height, clamped copy, aligned CTAs ---------- */

.encyclopedia-entry {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  border-radius: var(--card-radius);
}

.encyclopedia-entry .entry-media {
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.encyclopedia-entry .entry-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  padding: 1rem 1.125rem 1.125rem;
  min-height: 0;
}

.encyclopedia-entry .entry-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, var(--text-tertiary));
  margin: 0;
  line-height: 1.4;
}

.encyclopedia-entry .entry-content h3 {
  font-size: clamp(1.05rem, 1.2vw, 1.35rem);
  line-height: 1.2;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.encyclopedia-entry .entry-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.6em * 3);
}

.encyclopedia-entry .entry-tags {
  margin: 0.25rem 0 0;
  min-height: 1.75rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.encyclopedia-entry .entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.encyclopedia-entry .button--small {
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
}

.catalog-grid--compact .encyclopedia-entry .entry-media {
  aspect-ratio: 16 / 10;
}

.catalog-grid--compact .encyclopedia-entry .entry-desc {
  -webkit-line-clamp: 2;
  min-height: calc(1.6em * 2);
}

/* ---------- Featured editorial grid — dense, full-width ---------- */

.editorial-magazine {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  grid-auto-flow: dense;
  gap: var(--grid-gap-lg);
  width: 100%;
  align-items: start;
}

.section--editorial-lines {
  position: relative;
}

.section--editorial-lines::before,
.section--editorial-lines::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
}

.section--editorial-lines::before {
  left: 10%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(228, 179, 130, 0.16), transparent 75%);
}

.section--editorial-lines::after {
  left: 20%;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(228, 179, 130, 0.18), transparent 80%);
}

/* Size modifiers for encyclopedia-entry cards */
.encyclopedia-entry--xl,
.encyclopedia-entry--l {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 0;
}

.encyclopedia-entry--xl {
  grid-column: span 8;
}

.encyclopedia-entry--l {
  grid-column: span 4;
}

.encyclopedia-entry--m {
  grid-column: span 4;
  min-height: 0;
}

.encyclopedia-entry--s,
.encyclopedia-entry--xs {
  grid-column: span 4;
  min-height: 0;
}

.encyclopedia-entry--xl .entry-content {
  padding: 1.5rem 1.5rem 1.25rem;
}

.encyclopedia-entry--l .entry-content {
  padding: 1.35rem 1.35rem 1.15rem;
}

.encyclopedia-entry--s .entry-content,
.encyclopedia-entry--xs .entry-content {
  padding: 1rem 1rem 1rem;
}

.encyclopedia-entry--xl .entry-content h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

.encyclopedia-entry--xs .entry-content h3 {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
}

.encyclopedia-entry .entry-media {
  transition: transform 300ms ease, filter 300ms ease;
}

.encyclopedia-entry:hover .entry-media {
  transform: scale(1.01);
}

.encyclopedia-entry .entry-tags {
  min-height: 2rem;
}

.encyclopedia-entry--xl .entry-media,
.encyclopedia-entry--l .entry-media {
  aspect-ratio: 16 / 10;
}

@media (max-width: 1600px) {
  .editorial-magazine {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .encyclopedia-entry--xl,
  .encyclopedia-entry--l {
    grid-column: span 10;
  }

  .encyclopedia-entry--m,
  .encyclopedia-entry--s,
  .encyclopedia-entry--xs {
    grid-column: span 5;
  }
}

@media (max-width: 1200px) {
  .editorial-magazine {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .encyclopedia-entry--xl,
  .encyclopedia-entry--l {
    grid-column: span 8;
  }

  .encyclopedia-entry--m,
  .encyclopedia-entry--s,
  .encyclopedia-entry--xs {
    grid-column: span 4;
  }
}

@media (max-width: 900px) {
  .editorial-magazine {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--grid-gap);
  }

  .encyclopedia-entry--xl,
  .encyclopedia-entry--l,
  .encyclopedia-entry--m,
  .encyclopedia-entry--s,
  .encyclopedia-entry--xs {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 480px) {
  .editorial-magazine {
    grid-template-columns: 1fr;
  }

  .encyclopedia-entry--xl,
  .encyclopedia-entry--l,
  .encyclopedia-entry--m,
  .encyclopedia-entry--s,
  .encyclopedia-entry--xs {
    grid-column: 1 / -1;
  }
}

/* ---------- Category explorer — denser tiles ---------- */

.museum-categories__grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--grid-gap);
}

.museum-category {
  min-height: clamp(112px, 11vw, 160px);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm, 12px);
}

.museum-category__label {
  font-size: clamp(0.95rem, 1vw, 1.05rem);
}

.museum-category__count {
  font-size: 0.65rem;
  margin-top: 0.25rem;
}

@media (max-width: 1200px) {
  .museum-categories__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .museum-categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .museum-category {
    min-height: 100px;
  }
}

/* ---------- Archive explorer layout ---------- */

.explorer-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 0;
  align-items: start;
}

.filter-panel {
  width: 100%;
  max-width: var(--sidebar-width);
  padding: 1.25rem;
  gap: 1.125rem;
  border-radius: var(--radius-md, 16px);
  top: calc(var(--header-h, 88px) + 1rem);
}

.filter-panel__group {
  gap: 0.5rem;
}

.result-toolbar {
  margin-bottom: 1.25rem;
  padding: 0.875rem 1.25rem;
  gap: 1rem;
  border: 1px solid var(--border-soft, var(--border-light));
  background: var(--panel-base, var(--bg-card));
  border-radius: var(--radius-sm, 12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-badges .chip {
  background: rgba(228, 179, 130, 0.08);
  border: 1px solid rgba(228, 179, 130, 0.18);
  color: var(--text-primary);
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.section--editorial-lines {
  position: relative;
  overflow: hidden;
}

.section--editorial-lines::before,
.section--editorial-lines::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
}

.section--editorial-lines::before {
  left: 10%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(228, 179, 130, 0.16), transparent 70%);
}

.section--editorial-lines::after {
  left: 20%;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(228, 179, 130, 0.18), transparent 80%);
}

.spotlight--museum {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(280px, 1fr);
  margin-bottom: 1.75rem;
  min-height: min(360px, 42vw);
}

.explorer-main {
  min-width: 0;
}

@media (max-width: 1024px) {
  .explorer-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    max-width: none;
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.125rem;
  }

  .filter-panel__head {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .filter-panel {
    grid-template-columns: 1fr;
  }
}

/* ---------- Premium dark select (sidebar + forms) ---------- */

.select,
.filter-panel .select,
.quick-finder__select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.7rem 2.75rem 0.7rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  background-color: rgba(8, 6, 5, 0.55);
  border: 1px solid var(--border-strong, rgba(228, 179, 130, 0.16));
  border-radius: 10px;
  cursor: pointer;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1rem;
  transition:
    border-color 200ms var(--ease-premium, ease),
    background-color 200ms var(--ease-premium, ease),
    box-shadow 200ms var(--ease-premium, ease);
}

.select:hover,
.filter-panel .select:hover,
.quick-finder__select:hover {
  border-color: rgba(228, 179, 130, 0.35);
  background-color: rgba(228, 179, 130, 0.06);
}

.select:focus,
.filter-panel .select:focus,
.quick-finder__select:focus {
  outline: none;
  border-color: var(--accent-primary, var(--brand-primary));
  box-shadow: 0 0 0 3px rgba(228, 179, 130, 0.14);
}

.select option {
  background-color: #120f0d;
  color: var(--text-primary);
}

.quick-finder__select-wrapper {
  position: relative;
}

.quick-finder__select {
  width: auto;
  min-width: 9.5rem;
  border-radius: 999px;
  padding: 0.55rem 2.25rem 0.55rem 1rem;
  background-size: 0.75rem;
  background-position: right 0.75rem center;
}

/* ---------- Unified search bars ---------- */

.quick-finder {
  max-width: min(920px, 100%);
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft, var(--border-light));
  background: var(--panel-base, rgba(18, 14, 12, 0.75));
  box-shadow: var(--shadow-md);
}

.quick-finder__inner {
  gap: 0.35rem;
}

.quick-finder__input {
  padding: 0.75rem 0.5rem;
  font-size: 0.9375rem;
}

.quick-finder .button,
.quick-finder .button--search-submit {
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.page-hero .quick-finder {
  border-radius: var(--radius-md, 16px);
  padding: 0.75rem;
  flex-wrap: wrap;
}

.page-hero .quick-finder .input--large {
  flex: 1 1 220px;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 6, 5, 0.45);
  padding: 0.75rem 1rem;
}

.page-hero .quick-finder .input--large:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(228, 179, 130, 0.12);
}

.search-museum-hero .quick-finder {
  margin-top: 1.5rem;
}

/* ---------- Chips, badges, buttons alignment ---------- */

.chip,
.chip--luxury {
  font-size: 0.75rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.chip-row {
  gap: 0.4rem;
}

.button,
.icon-button {
  border-radius: 10px;
}

.button--luxury {
  letter-spacing: 0.06em;
}

.view-toggle {
  padding: 0.2rem;
  gap: 0.15rem;
}

.view-toggle .icon-button {
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  border-radius: 999px;
}

/* ---------- Hero & discovery layout balance ---------- */

.museum-hero__grid,
.page-hero__grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.museum-discovery__layout {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.museum-stats__grid {
  gap: var(--grid-gap);
}

.museum-stat {
  padding: clamp(1.125rem, 2vw, 1.5rem);
}

.discovery-scroll .encyclopedia-entry {
  flex: 0 0 min(260px, 72vw);
  min-height: 300px;
  max-width: 280px;
}

/* ---------- Museum journey & quote spacing ---------- */

.museum-journey__track {
  margin-top: 2rem;
}

.museum-quote {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

/* ---------- Responsive page heroes ---------- */

@media (max-width: 900px) {
  .museum-hero__grid,
  .page-hero__grid,
  .museum-discovery__layout {
    grid-template-columns: 1fr;
  }

  .museum-hero {
    min-height: auto;
  }

  .museum-hero__visual {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-gutter: 1rem;
  }

  .encyclopedia-entry .entry-content {
    padding: 0.875rem 1rem 1rem;
  }

  .result-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toggle {
    width: 100%;
  }

  .view-toggle .icon-button {
    flex: 1;
  }
}

/* ---------- Detail page layout refinements ---------- */

.detail-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.detail-media {
  position: sticky;
  top: calc(var(--header-h, 88px) + 2rem);
  align-self: start;
  max-width: 100%;
}

.detail-media img {
  width: 100%;
  height: auto;
  border-radius: var(--card-radius);
}

.detail-main {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.detail-grid--premium {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: clamp(1.75rem, 3vw, 3.5rem);
}

.detail-sidebar-facts {
  max-width: 100%;
  min-width: 0;
}

.detail-tabs-container {
  min-width: 0;
}

.detail-tab-content .detail-card {
  padding: 1.5rem 0;
}

@media (max-width: 1024px) {
  .detail-layout,
  .detail-grid--premium {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  .detail-media {
    position: static;
  }
}

/* ---------- Light mode select contrast ---------- */

body.light-mode .select,
body.light-mode .filter-panel .select,
body.light-mode .quick-finder__select {
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-panel input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent-primary, var(--brand-primary));
  cursor: pointer;
}

.filter-label--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  cursor: pointer;
}
@media (min-width: 1600px) {
  .container,
  .page-shell {
    width: min(1800px, calc(100vw - 80px));
  }
}

/* ---------- Luxury Beverage Encyclopedia: polish overlays ---------- */

.editorial-magazine {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 2rem);
  align-items: start;
}

.editorial-magazine > .encyclopedia-entry {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
  /* Reset to standard grid item (archive.css handles sizing) */
  grid-column: span 1 !important;
  grid-row: span 1 !important;
}

.encyclopedia-entry--xl {
  grid-column: span 8;
  grid-row: span 2;
}

.encyclopedia-entry--l {
  grid-column: span 4;
  grid-row: span 2;
}

.encyclopedia-entry--m,
.encyclopedia-entry--s,
.encyclopedia-entry--xs {
  grid-column: span 4;
}

@media (max-width: 1280px) {
  .editorial-magazine {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .encyclopedia-entry--xl,
  .encyclopedia-entry--l,
  .encyclopedia-entry--m,
  .encyclopedia-entry--s,
  .encyclopedia-entry--xs {
    grid-column: span 6 !important;
    grid-row: auto !important;
  }
}

@media (max-width: 900px) {
  .editorial-magazine {
    grid-template-columns: 1fr;
  }

  .encyclopedia-entry--xl,
  .encyclopedia-entry--l,
  .encyclopedia-entry--m,
  .encyclopedia-entry--s,
  .encyclopedia-entry--xs {
    grid-column: span 1 !important;
  }
}

.catalog-grid.curated-catalog-grid {
  gap: clamp(1.25rem, 2vw, 2rem);
}

.explorer-layout {
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 0;
}

.spotlight--museum {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(228, 179, 130, 0.14);
  background: rgba(12, 9, 6, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
}

.spotlight--museum img {
  transition: transform 1s ease, opacity 320ms ease;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.spotlight--museum:hover img {
  transform: scale(1.04);
}

.spotlight--museum > div {
  padding: clamp(2rem, 4vw, 3.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.botanical-spotlight {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1.5rem, 2.5vw, 2rem);
  align-items: stretch;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: rgba(12, 10, 8, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

.botanical-spotlight__visual img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
}

.botanical-spotlight > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.botanical-region {
  min-height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  transition: background 320ms ease, border-color 320ms ease, transform 320ms ease, box-shadow 320ms ease, color 320ms ease;
}

.botanical-region:hover,
.botanical-region.is-active {
  background: rgba(228, 179, 130, 0.16);
  border-color: rgba(228, 179, 130, 0.35);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.botanical-region:focus-visible {
  outline: 3px solid rgba(228, 179, 130, 0.4);
  outline-offset: 3px;
}

.hero-actions {
  gap: 1rem;
}

.hero-actions .button {
  width: auto;
  min-width: 180px;
}

.hero-badges .chip {
  padding: 0.5rem 1.1rem;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .explorer-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .botanical-spotlight,
  .spotlight--museum {
    grid-template-columns: 1fr;
  }

  .botanical-spotlight,
  .spotlight--museum {
    gap: 1.5rem;
  }
}

/* ==========================================================================
   COMPACT ARCHIVE OVERRIDE
   Applies to: .page-drinks, .page-ingredients
   Enforces compact-only archive mode — no grid toggle, no editorial cards.
   CSS-only. No HTML or JS changes.
   ========================================================================== */

/* ── 1. HIDE VIEW TOGGLE (Grid / List buttons are unnecessary in compact mode) */
.page-drinks .view-toggle,
.page-ingredients .view-toggle,
.page-drinks .result-toolbar .view-toggle,
.page-ingredients .result-toolbar .view-toggle,
.page-drinks .archive-meta-strip .view-toggle,
.page-ingredients .archive-meta-strip .view-toggle {
  display: none !important;
}

/* ── 2. FORCE COMPACT GRID — Override all existing auto-fill layouts */
.page-drinks .catalog-grid,
.page-drinks .catalog-grid--masonry,
.page-drinks .catalog-grid--compact,
.page-drinks .archive-grid,
.page-ingredients .catalog-grid,
.page-ingredients .catalog-grid--masonry,
.page-ingredients .catalog-grid--compact,
.page-ingredients .archive-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
  align-items: start !important;
}

/* ── 3. RESPONSIVE BREAKPOINTS */
@media (max-width: 1400px) {
  .page-drinks .catalog-grid,
  .page-drinks .catalog-grid--masonry,
  .page-drinks .catalog-grid--compact,
  .page-drinks .archive-grid,
  .page-ingredients .catalog-grid,
  .page-ingredients .catalog-grid--masonry,
  .page-ingredients .catalog-grid--compact,
  .page-ingredients .archive-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .page-drinks .catalog-grid,
  .page-drinks .catalog-grid--masonry,
  .page-drinks .catalog-grid--compact,
  .page-drinks .archive-grid,
  .page-ingredients .catalog-grid,
  .page-ingredients .catalog-grid--masonry,
  .page-ingredients .catalog-grid--compact,
  .page-ingredients .archive-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.875rem !important;
  }
}

@media (max-width: 540px) {
  .page-drinks .catalog-grid,
  .page-drinks .catalog-grid--masonry,
  .page-drinks .catalog-grid--compact,
  .page-drinks .archive-grid,
  .page-ingredients .catalog-grid,
  .page-ingredients .catalog-grid--masonry,
  .page-ingredients .catalog-grid--compact,
  .page-ingredients .archive-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* ── 4. COMPACT CARD — Enforce compact proportions regardless of JS toggle state */
.page-drinks .encyclopedia-entry,
.page-ingredients .encyclopedia-entry {
  /* Kill the aggressive translateY hover lift — too dramatic for archive density */
  contain: layout style !important;
}

.page-drinks .encyclopedia-entry:hover,
.page-ingredients .encyclopedia-entry:hover {
  transform: translateY(-4px) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

/* Thumbnail: compact ratio, no giant hero images */
.page-drinks .encyclopedia-entry .entry-media,
.page-ingredients .encyclopedia-entry .entry-media {
  aspect-ratio: 3 / 2 !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.page-drinks .encyclopedia-entry .entry-media img,
.page-ingredients .encyclopedia-entry .entry-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 400ms cubic-bezier(0.2, 0.9, 0.2, 1) !important;
}

.page-drinks .encyclopedia-entry:hover .entry-media img,
.page-ingredients .encyclopedia-entry:hover .entry-media img {
  transform: scale(1.05) !important;
}

/* Card body — tighter padding for density */
.page-drinks .encyclopedia-entry .entry-content,
.page-ingredients .encyclopedia-entry .entry-content {
  padding: 0.875rem 1rem 1rem !important;
  gap: 0.375rem !important;
}

/* Meta (region, category) — compact label style */
.page-drinks .encyclopedia-entry .entry-meta,
.page-ingredients .encyclopedia-entry .entry-meta {
  font-size: 0.68rem !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

/* Name heading — readable but compact */
.page-drinks .encyclopedia-entry .entry-content h3,
.page-ingredients .encyclopedia-entry .entry-content h3 {
  font-size: 1rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  font-weight: 700 !important;
  -webkit-line-clamp: 2 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Short description — 2 lines max, small size */
.page-drinks .encyclopedia-entry .entry-desc,
.page-ingredients .encyclopedia-entry .entry-desc {
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
  -webkit-line-clamp: 2 !important;
  min-height: 0 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
}

/* Tags row — single line, no wrapping */
.page-drinks .encyclopedia-entry .entry-tags,
.page-ingredients .encyclopedia-entry .entry-tags {
  flex-wrap: nowrap !important;
  overflow: hidden !important;
  min-height: 0 !important;
  margin: 0 !important;
  gap: 0.35rem !important;
}

.page-drinks .encyclopedia-entry .entry-tags .chip,
.page-ingredients .encyclopedia-entry .entry-tags .chip {
  font-size: 0.65rem !important;
  padding: 0.2rem 0.55rem !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* CTA actions — tighter spacing */
.page-drinks .encyclopedia-entry .entry-actions,
.page-ingredients .encyclopedia-entry .entry-actions {
  padding-top: 0.5rem !important;
  margin-top: auto !important;
  gap: 0.375rem !important;
}

.page-drinks .encyclopedia-entry .button--small,
.page-ingredients .encyclopedia-entry .button--small {
  font-size: 0.68rem !important;
  padding: 0.375rem 0.75rem !important;
  min-height: 0 !important;
  letter-spacing: 0.04em !important;
}

/* ── 5. KILL EDITORIAL CARD SIZING (--xl, --l, --m overrides) */
.page-drinks .encyclopedia-entry--xl,
.page-drinks .encyclopedia-entry--l,
.page-drinks .encyclopedia-entry--m,
.page-drinks .encyclopedia-entry--s,
.page-drinks .encyclopedia-entry--xs,
.page-ingredients .encyclopedia-entry--xl,
.page-ingredients .encyclopedia-entry--l,
.page-ingredients .encyclopedia-entry--m,
.page-ingredients .encyclopedia-entry--s,
.page-ingredients .encyclopedia-entry--xs {
  grid-column: span 1 !important;
  grid-row: span 1 !important;
}

/* ── 6. FILTER PANEL — Premium vertical sidebar */
.page-drinks .filter-panel,
.page-ingredients .filter-panel,
.page-drinks .archive-filter-panel,
.page-ingredients .archive-filter-panel {
  background: rgba(10, 7, 5, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(228, 179, 130, 0.12) !important;
  border-radius: 14px !important;
  padding: 1.5rem 1.25rem !important;
  position: sticky !important;
  top: calc(var(--header-h, 88px) + 1rem) !important;
  height: max-content !important;
  overflow-y: auto !important;
  max-height: calc(100vh - var(--header-h, 88px) - 2rem) !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(228, 179, 130, 0.2) transparent !important;
}

/* Filter group labels */
.page-drinks .filter-label,
.page-ingredients .filter-label {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: rgba(228, 179, 130, 0.6) !important;
  margin-bottom: 0.375rem !important;
  display: block !important;
}

/* Filter selects */
.page-drinks .filter-panel .select,
.page-drinks .archive-filter-panel select,
.page-drinks .archive-filter-group select,
.page-ingredients .filter-panel .select,
.page-ingredients .archive-filter-panel select,
.page-ingredients .archive-filter-group select {
  font-size: 0.8rem !important;
  padding: 0.5rem 2rem 0.5rem 0.75rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(228, 179, 130, 0.15) !important;
  background-color: rgba(6, 4, 3, 0.7) !important;
  color: var(--text-primary) !important;
  width: 100% !important;
  transition: border-color 200ms ease !important;
}

.page-drinks .filter-panel .select:focus,
.page-drinks .archive-filter-panel select:focus,
.page-ingredients .filter-panel .select:focus,
.page-ingredients .archive-filter-panel select:focus {
  border-color: rgba(228, 179, 130, 0.45) !important;
  outline: none !important;
}

/* Filter panel groups / fieldsets */
.page-drinks .filter-panel__group,
.page-drinks .archive-filter-group,
.page-ingredients .filter-panel__group,
.page-ingredients .archive-filter-group {
  border: none !important;
  margin: 0 0 1.125rem 0 !important;
  padding: 0 !important;
}

/* Filter panel header row */
.page-drinks .filter-panel__head,
.page-drinks .archive-filter-panel__head,
.page-ingredients .filter-panel__head,
.page-ingredients .archive-filter-panel__head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid rgba(228, 179, 130, 0.1) !important;
  padding-bottom: 0.875rem !important;
  margin-bottom: 1.125rem !important;
}

.page-drinks .filter-panel__head strong,
.page-drinks .archive-filter-panel__head strong,
.page-ingredients .filter-panel__head strong,
.page-ingredients .archive-filter-panel__head strong {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--brand-primary) !important;
}

/* Mood chip-row in filter */
.page-drinks .filter-panel .chip-row,
.page-drinks .archive-filter-panel .chip-row,
.page-ingredients .filter-panel .chip-row,
.page-ingredients .archive-filter-panel .chip-row {
  flex-wrap: wrap !important;
  gap: 0.375rem !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.page-drinks .filter-panel .chip,
.page-drinks .archive-filter-panel .chip,
.page-ingredients .filter-panel .chip,
.page-ingredients .archive-filter-panel .chip {
  font-size: 0.68rem !important;
  padding: 0.25rem 0.6rem !important;
  cursor: pointer !important;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease !important;
}

.page-drinks .filter-panel .chip.is-active,
.page-drinks .archive-filter-panel .chip.is-active,
.page-ingredients .filter-panel .chip.is-active,
.page-ingredients .archive-filter-panel .chip.is-active {
  background: rgba(228, 179, 130, 0.15) !important;
  border-color: rgba(228, 179, 130, 0.45) !important;
  color: var(--brand-primary) !important;
}

/* ── 7. RESULT / META TOOLBAR */
.page-drinks .result-toolbar,
.page-drinks .archive-meta-strip,
.page-ingredients .result-toolbar,
.page-ingredients .archive-meta-strip {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  background: rgba(10, 7, 5, 0.6) !important;
  border: 1px solid rgba(228, 179, 130, 0.1) !important;
  border-radius: 10px !important;
  padding: 0.625rem 1.125rem !important;
  margin-bottom: 1.25rem !important;
  gap: 1rem !important;
}

.page-drinks .result-toolbar p,
.page-drinks .archive-meta-strip p,
.page-ingredients .result-toolbar p,
.page-ingredients .archive-meta-strip p {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  margin: 0 !important;
}

/* ── 8. SPOTLIGHT — Compact, not dominant */
.page-drinks .spotlight {
  min-height: 0 !important;
  max-height: 320px !important;
  margin-bottom: 1.5rem !important;
  border-radius: 14px !important;
}

.page-drinks .spotlight img {
  min-height: 0 !important;
  max-height: 320px !important;
  aspect-ratio: 16 / 9 !important;
}

/* ── 9. MOBILE: filter panel goes flat on small screens */
@media (max-width: 1024px) {
  .page-drinks .filter-panel,
  .page-drinks .archive-filter-panel,
  .page-ingredients .filter-panel,
  .page-ingredients .archive-filter-panel {
    position: static !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 1rem !important;
    border-radius: 12px !important;
  }

  .page-drinks .filter-panel__head,
  .page-drinks .archive-filter-panel__head,
  .page-ingredients .filter-panel__head,
  .page-ingredients .archive-filter-panel__head {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 540px) {
  .page-drinks .filter-panel,
  .page-drinks .archive-filter-panel,
  .page-ingredients .filter-panel,
  .page-ingredients .archive-filter-panel {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   HOMEPAGE UI/UX CSS LAYOUT AUDIT & REFACTOR OVERRIDES
   ========================================================================== */

/* 1. Global Layout System - Consistent Max Width */
.page-home .container {
  width: 100% !important;
  max-width: 1400px !important;
  margin-inline: auto !important;
  padding-inline: 32px !important;
}

/* 2. Reduce Hero Section Height by 20% & 3. Reduce Whitespace */
.page-home .museum-hero {
  min-height: min(70vh, 650px) !important;
  padding-block: clamp(2rem, 4vw, 3.5rem) !important;
  display: flex !important;
  align-items: center !important;
}

.page-home .section {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) !important;
}

.page-home .section--tight, 
.page-home .museum-categories,
.page-home .museum-discovery,
.page-home .museum-journey {
  padding-block: clamp(1rem, 2vw, 1.5rem) !important;
}

/* Move statistics cards closer to hero section */
.page-home .museum-stats {
  padding-top: 0 !important;
  margin-top: -3.5rem !important;
  position: relative;
  z-index: 10;
}

/* Make footer 50% shorter */
.page-home .site-footer {
  padding-block: 2rem 1.5rem !important;
}

.page-home .site-footer__grid {
  gap: 1.5rem !important;
  align-items: center;
}

/* Ensure stats grid is 4 columns desktop, 2 tablet, 1 mobile */
.page-home .museum-stats__grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.25rem !important;
}

@media (max-width: 1024px) {
  .page-home .museum-stats__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .page-home .museum-stats__grid {
    grid-template-columns: 1fr !important;
  }
}
