/* ==========================================================================
   Can Garriga - Premium Organic Broth
   Theme: Natural, Artisanal, Premium
   Palette: Warm Earth Tones (Cream, Olive, Terracotta)
   Typography: Editorial Serif + Modern Sans
   ========================================================================== */

/* --- Variables --- */
:root {
  /* Palette */
  --bg: #ffffff;
  --ink: #0b1220;         /* Dark/Black text */
  --muted: #556277;       /* Muted text */
  --paper: #ffffff;       /* Card background */
  --cream: #fbf7f0;       /* Section background */
  --sand: #f3efe7;        /* Subtle secondary background */
  --olive: #3c4a3f;       /* Brand primary */
  --olive-light: #e8ede9; /* Light olive tint */
  --accent: #b36a2e;      /* Terracotta/Rust (Buttons/Highlights) */
  --accent-hover: #9c5a24;
  
  /* UI Elements */
  --border: rgba(11, 18, 32, 0.08);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  
  --max-width: 1280px;
  --header-height: 80px;
}

/* --- Typography --- */
@font-face {
  font-family: "CG Serif";
  src: url("/fonts/CGSerif-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CG Sans";
  src: url("/fonts/CGSans-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-serif: "CG Serif", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-sans: "CG Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[lang="ko"] body {
  font-family: "Noto Sans KR", "CG Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[lang="ar"] body {
  font-family: "Noto Sans Arabic", "CG Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* --- Typography Utilities --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400; /* Editorial feel */
  line-height: 1.1;
  margin: 0 0 1rem 0;
  color: var(--ink);
}

.display {
  font-size: clamp(3.5rem, 5vw, 5.5rem);
  letter-spacing: -0.02em;
  font-weight: 400;
}

.display-sm {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  letter-spacing: -0.01em;
}

.h1 { font-size: 3rem; }
.h2 { font-size: clamp(2rem, 3vw, 2.5rem); }
.h3 { font-size: 1.75rem; }
.h4 { font-size: 1.5rem; }

.kicker {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 2rem;
  font-weight: 400;
}

.text-center { text-align: center; }
.muted { color: var(--muted); }

.muted a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.muted a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

/* --- Prose (long-form content) --- */
.prose {
  max-width: 78ch;
  margin: 0 auto;
}

.prose h1, .prose h2, .prose h3 {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.prose p {
  margin: 0 0 1rem 0;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 2vw, 2.1rem);
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.prose ul, .prose ol {
  padding-left: 1.2rem;
  margin: 0 0 1rem 0;
}

.prose li {
  margin: 0.4rem 0;
}

.prose strong {
  font-weight: 700;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

/* --- Manifest page --- */
.manifest-hero {
  padding-top: calc(var(--header-height) + 3rem);
}

.manifest-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.manifest-hero-media {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  max-width: min(560px, 100%);
  justify-self: end;
}

.manifest-hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.manifest-hero-media:hover img {
  transform: scale(1.02);
}

.manifest-hero-caption {
  padding: 0.9rem 1.25rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
}

@media (max-width: 1024px) {
  .manifest-hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .manifest-hero { padding-top: calc(var(--header-height) + 2rem); }
  .manifest-hero-media { justify-self: start; }
}

/* --- Food Service page --- */
.food-service-hero {
  padding-top: calc(var(--header-height) + 3rem);
}

.food-service-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, min(38vw, 420px));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.food-service-hero-copy .lead {
  max-width: 100%;
}

.prose.prose--food-service-hero {
  max-width: 100%;
  margin: 0;
}

.food-service-hero-media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  justify-self: end;
  width: 100%;
  max-width: 420px;
}

.food-service-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.food-service-hero-media:hover img {
  transform: scale(1.02);
}

@media (max-width: 1024px) {
  .food-service-hero { padding-top: calc(var(--header-height) + 2rem); }
  .food-service-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .food-service-hero-media {
    justify-self: center;
    max-width: min(420px, 72vw);
  }
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.section-tight { padding: 4rem 0; }
.section-loose { padding: 8rem 0; }

.section-cream {
  background-color: var(--cream);
}

.section-olive {
  background-color: var(--olive);
  color: #fff;
}
.section-olive .muted { color: rgba(255,255,255,0.7); }
.section-olive h1, .section-olive h2 { color: #fff; }

.grid {
  display: grid;
  gap: 2rem;
}

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

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .display { font-size: 3rem; }
  .section { padding: 4rem 0; }
}

/* --- Components: Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(179, 106, 46, 0.39);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 106, 46, 0.23);
}

.btn-secondary {
  background-color: white;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-text {
  background: none;
  color: var(--ink);
  padding: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}
.btn-text:hover { color: var(--accent); }

/* --- Components: Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: transparent;
  transition: transform 0.3s ease;
  overflow: visible;
  isolation: isolate;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle-icon {
  width: 24px;
  height: 18px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-icon > span {
  display: block;
  width: 24px;
  height: 2px;
  background: #000000;
  border-radius: 2px;
}

.nav-toggle img {
  display: block;
  filter: brightness(0);
}

/* Language dropdown (wrapper must not shrink in header flex row) */
.nav-lang {
  flex-shrink: 0;
  min-width: max-content;
}

.lang-dropdown {
  position: relative;
  flex-shrink: 0;
  overflow: visible;
}

.lang-details {
  position: relative;
  flex-shrink: 0;
  width: max-content;
  overflow: visible;
}

.lang-details__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem 0.35rem 0.4rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink, #1a1a1a);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.lang-details__summary::-webkit-details-marker {
  display: none;
}

.lang-details__summary::marker {
  content: "";
}

.lang-details__summary::after {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-inline-start: 0.05rem;
  border-left: 2.5px solid transparent;
  border-right: 2.5px solid transparent;
  border-top: 3px solid rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.lang-details[open] .lang-details__summary::after {
  transform: rotate(180deg);
}

.lang-details__summary:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.lang-details__code {
  flex-shrink: 0;
  min-width: 1.5rem;
  text-align: start;
}

.lang-details__name {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-details__option.is-active .lang-details__name {
  color: var(--ink);
}

.lang-details__list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  position: absolute;
  inset-inline-start: auto;
  inset-inline-end: 0;
  top: calc(100% + 0.35rem);
  min-width: 12.5rem;
  width: max-content;
  max-width: min(90vw, 18rem);
  max-height: min(70vh, 22rem);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  z-index: 300;
}

.lang-details__list > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-details__option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.lang-details__option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.lang-details__option.is-active {
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

/* Language list inside mobile drawer (all locales visible, no <details>) */
.nav-mobile-lang {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.lang-drawer__label {
  margin: 0 0 0.85rem 0;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lang-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(11, 18, 32, 0.1);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-drawer__link:hover {
  border-color: rgba(11, 18, 32, 0.18);
  background: rgba(11, 18, 32, 0.04);
}

.lang-drawer__link.is-active {
  border-color: rgba(11, 18, 32, 0.2);
  background: rgba(11, 18, 32, 0.07);
}

.lang-drawer__code {
  min-width: 1.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lang-drawer__name {
  margin-inline-start: auto;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.lang-drawer__link.is-active .lang-drawer__code,
.lang-drawer__link.is-active .lang-drawer__name {
  color: var(--ink);
}

/* Mobile Nav
   backdrop-filter on the same stacking element as the drawer breaks text painting in Chromium
   (blank white panel). Blur lives on ::behind; panel is a separate layer on top. */
.nav-mobile {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 10000;
  display: none;
}
.nav-mobile[hidden] { display: none; }
.nav-mobile:not([hidden]) { display: block; }

.nav-mobile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav-mobile-inner {
  position: relative;
  z-index: 1;
  /* ~90% opaque white */
  background: rgba(255, 255, 255, 0.9);
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  width: 80%;
  max-width: 400px;
  margin-left: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 48px rgba(11, 18, 32, 0.2);
}

.nav-mobile-top {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* Scrollable region: menu + idiomes (abans es tallava el bloc inferior sense scroll) */
.nav-mobile-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.nav-mobile-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  flex-shrink: 0;
}

.nav-mobile .lang-drawer__list {
  gap: 0.3rem;
}

.nav-mobile .lang-drawer__link {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  /* Was .lang-switch (wrong class); duplicate header <details> broke mobile lang UX */
  .header-inner > .nav-lang {
    display: none;
  }
}

/* --- Components: Hero --- */
.hero-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  color: var(--ink);
  padding-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  direction: ltr;
}

/* Keep hero motion independent from page writing direction (LTR/RTL). */
.carousel-track {
  direction: ltr;
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-track img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-transform: translate3d(calc(var(--hero-item-offset, 0%) - var(--hero-slide-offset, 0%)), 0, 0);
  transform: translate3d(calc(var(--hero-item-offset, 0%) - var(--hero-slide-offset, 0%)), 0, 0);
  -webkit-transition: -webkit-transform 0.55s ease-in-out;
  transition: transform 0.55s ease-in-out;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center;
  object-position: center;
}

.hero-full.is-reduced-motion .carousel-track img {
  -webkit-transition: none;
  transition: none;
}

.hero-carousel-dots {
  margin-top: 2rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Small visual dots, ~44px touch target (WCAG); no numbers — active = filled black */
.chip.chip--carousel {
  position: relative;
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chip.chip--carousel:hover {
  transform: none;
  border-color: transparent;
}

.chip.chip--carousel:focus {
  outline: none;
}

.chip.chip--carousel:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.chip.chip--carousel::after {
  content: "";
  display: block;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid var(--ink);
  background-color: transparent;
  -webkit-transition: background-color 0.2s ease, border-color 0.2s ease, -webkit-transform 0.2s ease;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chip.chip--carousel:hover::after {
  -webkit-transform: scale(1.2);
  transform: scale(1.2);
}

.chip.chip--carousel[aria-pressed="true"]::after {
  background-color: #000;
  border-color: #000;
}


/* Overlay gradient for text readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 1;
}

/* --- Components: Cards (Product, Story) --- */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card.section-olive {
  background: var(--olive);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--sand);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.product-price {
  font-weight: 700;
  color: var(--olive);
  margin-top: 0.5rem;
  display: block;
}

/* --- Products list (retail) --- */
.products-page {
  background:
    radial-gradient(1200px 560px at 100% -80px, rgba(179, 106, 46, 0.12), transparent 65%),
    radial-gradient(900px 460px at -10% 12%, rgba(60, 74, 63, 0.09), transparent 70%),
    var(--bg);
}

.products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.page-title {
  margin-bottom: 0.75rem;
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
}

.page-lede {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.products-retail-note {
  margin-top: 1rem;
  color: var(--olive);
  font-size: 0.93rem;
  font-weight: 600;
}

.products-head-actions .btn {
  white-space: nowrap;
}

.products-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.products-filters {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.products-filters::-webkit-scrollbar {
  height: 8px;
}

.products-filters::-webkit-scrollbar-thumb {
  border-radius: var(--radius-pill);
  background: rgba(85, 98, 119, 0.28);
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.chip:hover {
  border-color: rgba(60, 74, 63, 0.35);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--olive);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(60, 74, 63, 0.24);
}

.products-search {
  position: relative;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  padding: 0.72rem 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

.input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--olive) 46%, var(--border));
  box-shadow: 0 0 0 4px rgba(60, 74, 63, 0.1);
}

.products-count {
  margin: 0 0 1rem 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

.product-card {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(60, 74, 63, 0.22);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 4.8;
  background: linear-gradient(145deg, #f6f2ea 0%, #eee8dd 100%);
  overflow: hidden;
}

.product-badge {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  left: 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(60, 74, 63, 0.92);
  color: #fff;
  padding: 0.26rem 0.62rem;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product-media img,
.product-media-fallback {
  width: 100%;
  height: 100%;
}

.product-media img {
  object-fit: cover;
  transition: transform 0.42s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.045);
}

.product-media-fallback {
  background:
    radial-gradient(circle at 18% 18%, rgba(179, 106, 46, 0.5), transparent 45%),
    radial-gradient(circle at 82% 82%, rgba(60, 74, 63, 0.45), transparent 48%),
    #ece7dd;
}

.product-body {
  padding: 1.05rem 1.1rem 1.2rem;
  display: grid;
  gap: 0.65rem;
}

.product-name {
  margin: 0;
  font-size: clamp(1.1rem, 1.5vw, 1.32rem);
  line-height: 1.2;
}

.product-short {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.52;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  border: 1px solid rgba(60, 74, 63, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: var(--olive);
  border-radius: var(--radius-pill);
  padding: 0.26rem 0.56rem;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 650;
}

.product-link {
  margin-top: 0.2rem;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.products-empty {
  margin: 1.25rem 0 0;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(85, 98, 119, 0.35);
  background: rgba(251, 247, 240, 0.65);
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .products-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .products-toolbar {
    grid-template-columns: 1fr;
  }

  .products-head-actions .btn {
    width: 100%;
  }

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

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Components: Benefits --- */
.benefit-item {
  text-align: center;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block; /* Make sure anchor behaves like block */
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.benefit-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Components: Footer --- */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Tally --- */
.tally iframe {
  border-radius: var(--radius);
  background: transparent;
}
