/* ==========================================================================
   NoloCellar Design System
   Non-Alcoholic Wine Discovery Platform
   Version 1.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   Google Fonts
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400;1,9..40,500&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

/* ==========================================================================
   I. DESIGN TOKENS (Custom Properties)
   ========================================================================== */
:root {
  /* --- Colors ----------------------------------------------------------- */
  --color-primary-dark:     #1a1a2e;
  --color-secondary-dark:   #16213e;
  --color-card-bg:          #1e2a3a;
  --color-surface-raised:   #243347;

  --color-gold:             #c9a96e;
  --color-gold-hover:       #d4b87a;
  --color-gold-muted:       rgba(201, 169, 110, 0.35);
  --color-gold-subtle:      rgba(201, 169, 110, 0.15);
  --color-gold-faint:       rgba(201, 169, 110, 0.08);

  --color-text-primary:     #e8e4dc;
  --color-text-secondary:   #9a9590;
  --color-text-muted:       #6b6560;
  --color-text-inverse:     #1a1a2e;

  --color-success:          #7a9e7e;
  --color-error:            #c75a5a;

  --color-cat-red:          #8b3a3a;
  --color-cat-white:        #d4c5a0;
  --color-cat-rose:         #c77d8a;
  --color-cat-sparkling:    #a8c4d4;

  --color-border:           rgba(201, 169, 110, 0.15);
  --color-border-strong:    rgba(201, 169, 110, 0.30);

  /* --- Typography ------------------------------------------------------- */
  --font-display:           'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:              'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale – minor third (1.200) */
  --text-xs:                0.694rem;   /* ~11px */
  --text-sm:                0.833rem;   /* ~13px */
  --text-base:              1rem;       /* 16px  */
  --text-md:                1.125rem;   /* 18px  */
  --text-lg:                1.25rem;    /* 20px  */
  --text-xl:                1.5rem;     /* 24px  */
  --text-2xl:               1.875rem;   /* 30px  */
  --text-3xl:               2.25rem;    /* 36px  */
  --text-4xl:               3rem;       /* 48px  */
  --text-5xl:               3.75rem;    /* 60px  */

  --leading-tight:          1.2;
  --leading-snug:           1.35;
  --leading-normal:         1.6;
  --leading-relaxed:        1.75;

  --tracking-tight:        -0.02em;
  --tracking-normal:        0;
  --tracking-wide:          0.04em;
  --tracking-wider:         0.08em;
  --tracking-widest:        0.14em;

  /* --- Spacing ---------------------------------------------------------- */
  --space-2xs:              0.25rem;    /* 4px  */
  --space-xs:               0.5rem;     /* 8px  */
  --space-sm:               0.75rem;    /* 12px */
  --space-md:               1rem;       /* 16px */
  --space-lg:               1.5rem;     /* 24px */
  --space-xl:               2rem;       /* 32px */
  --space-2xl:              3rem;       /* 48px */
  --space-3xl:              4rem;       /* 64px */
  --space-4xl:              6rem;       /* 96px */
  --space-5xl:              8rem;       /* 128px */

  /* --- Layout ----------------------------------------------------------- */
  --max-width:              1280px;
  --max-width-narrow:       720px;
  --nav-height:             72px;
  --sidebar-width:          280px;

  /* --- Borders & Radii -------------------------------------------------- */
  --radius-sm:              4px;
  --radius-md:              8px;
  --radius-lg:              12px;
  --radius-xl:              16px;
  --radius-2xl:             24px;
  --radius-full:            9999px;

  /* --- Shadows ---------------------------------------------------------- */
  --shadow-sm:              0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md:              0 4px 12px rgba(0, 0, 0, 0.30);
  --shadow-lg:              0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-xl:              0 16px 50px rgba(0, 0, 0, 0.40);
  --shadow-gold:            0 4px 20px rgba(201, 169, 110, 0.15);
  --shadow-card-hover:      0 12px 40px rgba(0, 0, 0, 0.45);

  /* --- Transitions ------------------------------------------------------ */
  --ease-default:           cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:                cubic-bezier(0.4, 0, 1, 1);
  --ease-out:               cubic-bezier(0, 0, 0.2, 1);
  --duration-fast:          150ms;
  --duration-base:          200ms;
  --duration-slow:          350ms;

  /* --- Z-index scale ---------------------------------------------------- */
  --z-base:                 1;
  --z-dropdown:             100;
  --z-sticky:               200;
  --z-overlay:              300;
  --z-modal:                400;
  --z-toast:                500;
}


/* ==========================================================================
   II. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-lg));
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-primary-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-default);
}

a:hover {
  color: var(--color-gold-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
}

::selection {
  background-color: var(--color-gold-muted);
  color: var(--color-text-primary);
}

::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}


/* ==========================================================================
   III. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.heading-1, .heading-2, .heading-3,
.heading-4, .heading-5, .heading-6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-gold);
}

h1, .heading-1 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

h2, .heading-2 {
  font-size: var(--text-3xl);
}

h3, .heading-3 {
  font-size: var(--text-2xl);
}

h4, .heading-4 {
  font-size: var(--text-xl);
}

h5, .heading-5 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-normal);
}

h6, .heading-6 {
  font-size: var(--text-md);
  letter-spacing: var(--tracking-normal);
}

.text-display {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.text-overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold);
}

.text-body {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}

.text-body--secondary {
  color: var(--color-text-secondary);
}

.text-small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.text-caption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
}

.text-italic {
  font-style: italic;
}

.text-gold {
  color: var(--color-gold);
}

p + p {
  margin-top: var(--space-md);
}


/* ==========================================================================
   IV. LAYOUT
   ========================================================================== */

/* --- Container ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* --- Grid system -------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid--auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* --- Flex helpers -------------------------------------------------------- */
.flex {
  display: flex;
}

.flex--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex--between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex--column {
  display: flex;
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

.flex--gap-xs  { gap: var(--space-xs); }
.flex--gap-sm  { gap: var(--space-sm); }
.flex--gap-md  { gap: var(--space-md); }
.flex--gap-lg  { gap: var(--space-lg); }
.flex--gap-xl  { gap: var(--space-xl); }

/* --- Section spacing ---------------------------------------------------- */
.section {
  padding-block: var(--space-3xl);
}

.section--lg {
  padding-block: var(--space-4xl);
}

.section--sm {
  padding-block: var(--space-2xl);
}

.section__header {
  margin-bottom: var(--space-2xl);
}

.section__title {
  margin-bottom: var(--space-xs);
}

.section__subtitle {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  max-width: 560px;
}

/* --- Main content with sidebar ------------------------------------------ */
.layout-sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-xl);
  align-items: start;
}


/* ==========================================================================
   V. NAVIGATION
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--nav-height);
  background-color: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  transition: opacity var(--duration-base) var(--ease-default);
}

.nav__logo:hover {
  opacity: 0.85;
  color: var(--color-gold);
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  color: var(--color-gold);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding-block: var(--space-xs);
  transition: color var(--duration-base) var(--ease-default);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: width var(--duration-base) var(--ease-default);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-gold);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
}

.nav__toggle-bar {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  transition: transform var(--duration-base) var(--ease-default);
}

.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: transform var(--duration-base) var(--ease-default);
}

.nav__toggle-bar::before { top: -7px; }
.nav__toggle-bar::after  { bottom: -7px; }


/* ==========================================================================
   VI. HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  padding-block: var(--space-4xl);
  overflow: hidden;
  background-color: var(--color-secondary-dark);
}

.hero--full {
  min-height: calc(100vh - var(--nav-height));
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.95) 0%,
    rgba(22, 33, 62, 0.85) 40%,
    rgba(30, 42, 58, 0.75) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero__overline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.hero__title em {
  font-style: italic;
  color: var(--color-gold);
}

.hero__description {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Decorative accent line */
.hero__accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gold-subtle) 20%,
    var(--color-gold-muted) 50%,
    var(--color-gold-subtle) 80%,
    transparent
  );
}


/* ==========================================================================
   VII. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75em 1.75em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--duration-base) var(--ease-default),
    color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default),
    transform var(--duration-fast) var(--ease-default);
}

.btn:active {
  transform: scale(0.97);
}

/* Primary – gold bg, dark text */
.btn--primary {
  background-color: var(--color-gold);
  color: var(--color-text-inverse);
  border-color: var(--color-gold);
}

.btn--primary:hover {
  background-color: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  box-shadow: var(--shadow-gold);
  color: var(--color-text-inverse);
}

/* Secondary – outlined gold */
.btn--secondary {
  background-color: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn--secondary:hover {
  background-color: var(--color-gold-faint);
  border-color: var(--color-gold-hover);
  color: var(--color-gold-hover);
}

/* Ghost – no border, subtle hover */
.btn--ghost {
  background-color: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
  padding-inline: var(--space-md);
}

.btn--ghost:hover {
  background-color: var(--color-gold-faint);
  color: var(--color-gold);
}

/* Size modifiers */
.btn--sm {
  font-size: var(--text-xs);
  padding: 0.6em 1.25em;
}

.btn--lg {
  font-size: var(--text-base);
  padding: 1em 2.25em;
}

/* Icon-only button */
.btn--icon {
  padding: 0.6em;
  border-radius: var(--radius-md);
}

.btn--icon svg {
  width: 20px;
  height: 20px;
}

/* Disabled state */
.btn:disabled,
.btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}


/* ==========================================================================
   VIII. WINE CARDS
   ========================================================================== */
.wine-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition:
    transform var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default);
}

.wine-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-strong);
}

.wine-card__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(
    180deg,
    rgba(22, 33, 62, 0.6) 0%,
    rgba(30, 42, 58, 0.3) 100%
  );
  overflow: hidden;
}

.wine-card__image img {
  max-height: 100%;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
  transition: transform var(--duration-slow) var(--ease-out);
}

.wine-card:hover .wine-card__image img {
  transform: scale(1.04);
}

.wine-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-lg);
  gap: var(--space-xs);
}

.wine-card__brand {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wine-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wine-card__name a {
  color: inherit;
  text-decoration: none;
}

.wine-card__name a:hover {
  color: var(--color-gold);
}

/* Stretched link – makes the whole card clickable */
.wine-card__name a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.wine-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.wine-card__price {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.wine-card__price-currency {
  font-size: var(--text-sm);
  font-weight: 500;
}


/* ==========================================================================
   IX. RATING DISPLAY
   ========================================================================== */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.rating__score {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.rating__score--sm {
  font-size: var(--text-lg);
}

.rating__score--lg {
  font-size: var(--text-4xl);
}

.rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.rating__star {
  width: 16px;
  height: 16px;
  color: var(--color-gold);
}

.rating__star--empty {
  color: var(--color-text-muted);
  opacity: 0.3;
}

.rating__star--half {
  position: relative;
  color: var(--color-text-muted);
  opacity: 0.3;
}

.rating__star--half::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  color: var(--color-gold);
}

.rating__count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Large rating circle (detail page) */
.rating-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 3px solid var(--color-gold);
  background-color: var(--color-gold-faint);
}

.rating-circle__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.rating-circle__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}


/* ==========================================================================
   X. CATEGORY BADGES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.3em 0.85em;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
}

.badge--red {
  background-color: rgba(139, 58, 58, 0.2);
  color: var(--color-cat-red);
  border: 1px solid rgba(139, 58, 58, 0.3);
}

.badge--white {
  background-color: rgba(212, 197, 160, 0.12);
  color: var(--color-cat-white);
  border: 1px solid rgba(212, 197, 160, 0.25);
}

.badge--rose {
  background-color: rgba(199, 125, 138, 0.15);
  color: var(--color-cat-rose);
  border: 1px solid rgba(199, 125, 138, 0.3);
}

.badge--sparkling {
  background-color: rgba(168, 196, 212, 0.12);
  color: var(--color-cat-sparkling);
  border: 1px solid rgba(168, 196, 212, 0.25);
}

.badge--gold {
  background-color: var(--color-gold-faint);
  color: var(--color-gold);
  border: 1px solid var(--color-gold-subtle);
}

.badge--success {
  background-color: rgba(122, 158, 126, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(122, 158, 126, 0.25);
}


/* ==========================================================================
   XI. ABV RIBBON / OVERLAY BADGE
   ========================================================================== */
.ribbon {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.35em 0.75em;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--color-success);
  background-color: rgba(122, 158, 126, 0.15);
  border: 1px solid rgba(122, 158, 126, 0.3);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ribbon--gold {
  color: var(--color-gold);
  background-color: rgba(201, 169, 110, 0.15);
  border-color: var(--color-gold-subtle);
}


/* ==========================================================================
   XII. WINE DETAIL PAGE
   ========================================================================== */
.wine-detail {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: var(--space-3xl);
  align-items: start;
  padding-block: var(--space-2xl);
}

.wine-detail__image-col {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xl));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  background: linear-gradient(
    180deg,
    var(--color-secondary-dark) 0%,
    var(--color-card-bg) 100%
  );
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  min-height: 480px;
}

.wine-detail__bottle {
  max-height: 400px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
}

.wine-detail__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.wine-detail__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.wine-detail__brand {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.wine-detail__name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

.wine-detail__rating {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-block: var(--space-sm);
}

.wine-detail__description {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 600px;
}

/* Detail page sections */
.wine-section {
  padding-block: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.wine-section__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
}


/* ==========================================================================
   XIII. TASTE PROFILE SLIDERS (Vivino-style)
   ========================================================================== */
.taste-profile {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.taste-slider {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.taste-slider__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.taste-slider__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  min-width: 60px;
}

.taste-slider__label:last-child {
  text-align: right;
}

.taste-slider__track {
  position: relative;
  height: 6px;
  background-color: rgba(201, 169, 110, 0.1);
  border-radius: var(--radius-full);
  overflow: visible;
}

.taste-slider__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold-subtle), var(--color-gold-muted));
  border-radius: var(--radius-full);
  /* width set inline via style attribute */
}

.taste-slider__marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background-color: var(--color-gold);
  border: 3px solid var(--color-card-bg);
  box-shadow: 0 0 0 2px var(--color-gold-muted), var(--shadow-sm);
  /* left position set inline */
}


/* ==========================================================================
   XIV. FLAVOR TAGS
   ========================================================================== */
.flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.flavor-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.4em 0.9em;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  background-color: var(--color-gold-faint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition:
    background-color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default),
    color var(--duration-base) var(--ease-default);
}

.flavor-tag:hover {
  background-color: var(--color-gold-subtle);
  border-color: var(--color-border-strong);
  color: var(--color-gold);
}

.flavor-tag__icon {
  font-size: var(--text-base);
  line-height: 1;
}


/* ==========================================================================
   XV. FOOD PAIRING GRID
   ========================================================================== */
.food-pairings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--space-md);
}

.food-pairing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  background-color: var(--color-gold-faint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition:
    background-color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default),
    transform var(--duration-base) var(--ease-default);
}

.food-pairing:hover {
  background-color: var(--color-gold-subtle);
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

.food-pairing__icon {
  font-size: var(--text-2xl);
  line-height: 1;
}

.food-pairing__label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: var(--tracking-wide);
}


/* ==========================================================================
   XVI. BRAND CARDS
   ========================================================================== */
.brand-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition:
    transform var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default);
}

.brand-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}

.brand-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background-color: var(--color-gold-faint);
  border: 1px solid var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-xs);
}

.brand-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}

.brand-card__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-card__country {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.brand-card__country-flag {
  font-size: var(--text-base);
  line-height: 1;
}

.brand-card__count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}


/* ==========================================================================
   XVII. SEARCH BAR
   ========================================================================== */
.search {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: var(--space-md);
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color var(--duration-base) var(--ease-default);
}

.search__input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-md) 0 calc(var(--space-md) + 18px + var(--space-sm));
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-secondary-dark);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default),
    background-color var(--duration-base) var(--ease-default);
}

.search__input:hover {
  border-color: var(--color-border-strong);
}

.search__input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-faint);
  background-color: var(--color-card-bg);
}

.search__input:focus ~ .search__icon {
  color: var(--color-gold);
}

.search__clear {
  position: absolute;
  top: 50%;
  right: var(--space-sm);
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: color var(--duration-base) var(--ease-default);
}

.search__clear:hover {
  color: var(--color-text-primary);
}

.search__input:not(:placeholder-shown) ~ .search__clear {
  display: flex;
}

/* Nav-embedded variant */
.search--nav {
  max-width: 260px;
}

.search--nav .search__input {
  height: 38px;
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background-color: rgba(22, 33, 62, 0.6);
}


/* ==========================================================================
   XVIII. FILTER SIDEBAR
   ========================================================================== */
.filter-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: calc(100vh - var(--nav-height) - var(--space-xl));
  overflow-y: auto;
  padding-right: var(--space-xs);
}

/* Thin custom scrollbar */
.filter-sidebar::-webkit-scrollbar {
  width: 4px;
}

.filter-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: var(--radius-full);
}

.filter-group {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.filter-group:last-child {
  border-bottom: none;
}

.filter-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-block: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.filter-group__toggle-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform var(--duration-base) var(--ease-default);
}

.filter-group--collapsed .filter-group__toggle-icon {
  transform: rotate(-90deg);
}

.filter-group__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-sm);
}

.filter-group--collapsed .filter-group__body {
  display: none;
}

/* Filter option (checkbox style) */
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-2xs) 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--duration-base) var(--ease-default);
}

.filter-option:hover {
  color: var(--color-text-primary);
}

.filter-option__checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background-color: transparent;
  flex-shrink: 0;
  transition:
    background-color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default);
}

.filter-option--active .filter-option__checkbox {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
}

.filter-option--active .filter-option__checkbox::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 6L5 8.5L9.5 3.5' stroke='%231a1a2e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.filter-option__count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Filter active tag / clear */
.filter-active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding-bottom: var(--space-sm);
}

.filter-active-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.25em 0.6em;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-gold);
  background-color: var(--color-gold-faint);
  border: 1px solid var(--color-gold-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-default);
}

.filter-active-tag:hover {
  background-color: var(--color-gold-subtle);
}

.filter-active-tag__remove {
  font-size: var(--text-base);
  line-height: 1;
  opacity: 0.6;
}


/* ==========================================================================
   XIX. BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  padding-block: var(--space-md);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumbs__item a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-default);
}

.breadcrumbs__item a:hover {
  color: var(--color-gold);
}

.breadcrumbs__separator {
  color: var(--color-text-muted);
  opacity: 0.4;
  font-size: var(--text-xs);
  margin-inline: var(--space-2xs);
  user-select: none;
}

.breadcrumbs__item--current {
  color: var(--color-text-secondary);
}


/* ==========================================================================
   XX. PRICE DISPLAY
   ========================================================================== */
.price {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2xs);
}

.price__main {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}

.price__main--lg {
  font-size: var(--text-3xl);
}

.price__currency {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.price__range {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 400;
}

.price__original {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.price__discount {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-success);
}


/* ==========================================================================
   XXI. PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding-block: var(--space-xl);
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    background-color var(--duration-base) var(--ease-default),
    color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default);
}

.pagination__item:hover {
  background-color: var(--color-gold-faint);
  color: var(--color-gold);
  border-color: var(--color-border);
}

.pagination__item--active {
  background-color: var(--color-gold);
  color: var(--color-text-inverse);
  font-weight: 600;
  border-color: var(--color-gold);
}

.pagination__item--active:hover {
  background-color: var(--color-gold-hover);
  color: var(--color-text-inverse);
  border-color: var(--color-gold-hover);
}

.pagination__item--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wider);
}

/* Prev / Next arrows */
.pagination__arrow {
  font-size: var(--text-base);
}


/* ==========================================================================
   XXII. FOOTER
   ========================================================================== */
.footer {
  background-color: var(--color-secondary-dark);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-3xl) var(--space-xl);
  margin-top: var(--space-4xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-2xl);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-gold);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 280px;
}

.footer__column-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-default);
}

.footer__link:hover {
  color: var(--color-gold);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition:
    color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default),
    background-color var(--duration-base) var(--ease-default);
}

.footer__social-link:hover {
  color: var(--color-gold);
  border-color: var(--color-gold-subtle);
  background-color: var(--color-gold-faint);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
}


/* ==========================================================================
   XXIII. FORMS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-input {
  width: 100%;
  height: 44px;
  padding-inline: var(--space-md);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-secondary-dark);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-faint);
}

.form-select {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 var(--space-xl) 0 var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-secondary-dark);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239a9590' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
}

.form-select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-faint);
}


/* ==========================================================================
   XXIV. UTILITIES
   ========================================================================== */

/* Spacing */
.mt-xs  { margin-top: var(--space-xs); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs  { margin-bottom: var(--space-xs); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Text alignment */
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Dividers */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-border) 20%,
    var(--color-border) 80%,
    transparent
  );
  border: none;
  margin-block: var(--space-lg);
}

.divider--gold {
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gold-subtle) 20%,
    var(--color-gold-muted) 50%,
    var(--color-gold-subtle) 80%,
    transparent
  );
}

/* Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ==========================================================================
   XXV. ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in {
  animation: fadeIn var(--duration-slow) var(--ease-out) both;
}

.animate-fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

.animate-slide-down {
  animation: slideDown var(--duration-base) var(--ease-out) both;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-card-bg) 25%,
    var(--color-surface-raised) 50%,
    var(--color-card-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: var(--radius-sm);
}

.skeleton--text {
  height: 1em;
  margin-bottom: var(--space-xs);
}

.skeleton--title {
  height: 1.5em;
  width: 70%;
  margin-bottom: var(--space-sm);
}

.skeleton--image {
  height: 280px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   XXVI. RESPONSIVE
   ========================================================================== */

/* --- 1280px: Large desktops --------------------------------------------- */
@media (max-width: 1280px) {
  .container {
    padding-inline: var(--space-lg);
  }

  .footer__grid {
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: var(--space-xl);
  }
}

/* --- 1024px: Small desktops / large tablets ----------------------------- */
@media (max-width: 1024px) {
  :root {
    --nav-height: 64px;
  }

  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .layout-sidebar {
    grid-template-columns: 240px 1fr;
    gap: var(--space-lg);
  }

  .wine-detail {
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: var(--space-2xl);
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .text-display {
    font-size: var(--text-4xl);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* --- 768px: Tablets ----------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  h1, .heading-1 { font-size: var(--text-3xl); }
  h2, .heading-2 { font-size: var(--text-2xl); }
  h3, .heading-3 { font-size: var(--text-xl); }

  .hero {
    min-height: 400px;
    padding-block: var(--space-3xl);
  }

  .hero--full {
    min-height: auto;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__description {
    font-size: var(--text-base);
  }

  .text-display {
    font-size: var(--text-3xl);
  }

  /* Nav collapses to hamburger */
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-lg);
    background-color: var(--color-primary-dark);
    border-top: 1px solid var(--color-border);
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-default);
    z-index: var(--z-overlay);
    overflow-y: auto;
  }

  .nav--open .nav__links {
    transform: translateX(0);
  }

  .nav__link {
    width: 100%;
    padding-block: var(--space-md);
    font-size: var(--text-md);
    border-bottom: 1px solid var(--color-border);
  }

  .nav__link::after {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  /* Grid adjustments */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--auto-fill,
  .grid--auto-fit {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  /* Sidebar collapses */
  .layout-sidebar {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
    max-height: none;
    padding-right: 0;
  }

  /* Wine detail stacks */
  .wine-detail {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .wine-detail__image-col {
    position: static;
    min-height: 320px;
  }

  /* Footer stacks */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  /* Section spacing reduces */
  .section {
    padding-block: var(--space-2xl);
  }

  .section--lg {
    padding-block: var(--space-3xl);
  }

  /* Pagination */
  .pagination {
    gap: var(--space-2xs);
  }

  .pagination__item {
    min-width: 36px;
    height: 36px;
  }
}

/* --- 480px: Mobile ------------------------------------------------------ */
@media (max-width: 480px) {
  :root {
    --nav-height: 56px;
  }

  html {
    font-size: 15px;
  }

  .container {
    padding-inline: var(--space-md);
  }

  h1, .heading-1 { font-size: var(--text-2xl); }
  h2, .heading-2 { font-size: var(--text-xl); }

  .hero {
    min-height: 340px;
    padding-block: var(--space-2xl);
  }

  .hero__title {
    font-size: var(--text-2xl);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .text-display {
    font-size: var(--text-2xl);
  }

  /* Cards go full width */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .grid--auto-fill,
  .grid--auto-fit {
    grid-template-columns: 1fr;
  }

  /* Wine card adjustments */
  .wine-card__image {
    height: 240px;
  }

  .wine-card__body {
    padding: var(--space-md);
  }

  /* Wine detail */
  .wine-detail__image-col {
    min-height: 260px;
    padding: var(--space-lg);
  }

  .wine-detail__bottle {
    max-height: 280px;
  }

  .wine-detail__name {
    font-size: var(--text-2xl);
  }

  /* Rating circle smaller */
  .rating-circle {
    width: 80px;
    height: 80px;
  }

  .rating-circle__value {
    font-size: var(--text-2xl);
  }

  /* Food pairings */
  .food-pairings {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Brand card stacks */
  .brand-card {
    padding: var(--space-md);
  }

  /* Search full width */
  .search,
  .search--nav {
    max-width: 100%;
  }

  /* Breadcrumbs wrap */
  .breadcrumbs {
    font-size: var(--text-xs);
  }

  /* Price */
  .price__main--lg {
    font-size: var(--text-2xl);
  }

  /* Pagination compact */
  .pagination__item {
    min-width: 32px;
    height: 32px;
    font-size: var(--text-xs);
  }

  /* Buttons full width on mobile */
  .btn--mobile-full {
    width: 100%;
  }
}
