/* ============================================================
   Verduras Frescas RD — sistema de diseño
   Local · artesanal · tonos tierra
   ============================================================ */

:root {
  /* Casa Viva palette */
  --hue: 145;
  --primary: #2d4a1f;             /* dark forest green (titles) */
  --primary-700: #1f3815;
  --primary-500: #3d6a2b;
  --primary-100: #c8dab1;
  --primary-050: #e8efd9;

  /* Section backgrounds */
  --bg-hero: #d8e6c4;             /* pastel mint green */
  --bg-cream: #f5f1e6;            /* cream main */
  --bg-sage: #a3b89c;             /* sage green (Rápido y Fácil) */
  --bg-sage-card: #ede7d6;        /* beige card inside sage */
  --bg-yellow: #e8c976;           /* warm yellow band */

  /* CTA accents */
  --accent: #d65a3a;              /* orange-red Pide Aquí */
  --accent-700: #b94824;
  --accent-100: #fbe5dc;
  --terracotta: #d65a3a;
  --terracotta-soft: #f1c9b8;
  --sun: #e8c976;
  --sun-soft: #f6e4b0;

  /* Neutros */
  --cream: #ffffff;
  --paper: #fafaf7;
  --paper-2: #ffffff;
  --ink: #1f2e15;                  /* very dark green/black */
  --ink-soft: #4a5447;
  --ink-mute: #7a8478;
  --line: #e4dfd1;
  --line-soft: #efeadc;

  /* Type */
  --font-display: "Poppins", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Inter", "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Density */
  --gap-1: 8px;
  --gap-2: 18px;
  --gap-3: 28px;
  --gap-4: 48px;
  --gap-5: 80px;
  --pad-card: 0;
  --pad-section: 96px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-2: 0 6px 22px -8px rgba(0, 0, 0, .12);
  --shadow-3: 0 24px 60px -24px rgba(0, 0, 0, .2);
}

[data-density="compact"] {
  --gap-3: 16px; --gap-4: 24px; --gap-5: 40px;
  --pad-card: 12px; --pad-section: 56px;
}
[data-density="amplio"] {
  --gap-3: 28px; --gap-4: 48px; --gap-5: 72px;
  --pad-card: 24px; --pad-section: 104px;
}

[data-radius="sharp"] {
  --r-sm: 2px; --r-md: 3px; --r-lg: 4px; --r-xl: 6px; --r-pill: 4px;
}

/* ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

::selection { background: var(--sun); color: var(--ink); }

/* ============================================================
   App shell
   ============================================================ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Header
   ============================================================ */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
}
.hdr-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  line-height: 1.05;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.brand > div { white-space: nowrap; flex-shrink: 0; font-size: 13px; letter-spacing: 0; }
.brand em { font-style: normal; color: var(--primary); display: block; }
.brand-mark {
  width: 36px; height: 42px;
  background: transparent;
  display: grid; place-items: center;
  color: var(--primary);
}
.brand small {
  display: none;
}
.nav {
  display: flex; gap: 36px; align-items: center;
  justify-self: center;
}
.nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 2px;
  position: relative;
  cursor: pointer;
  font-family: var(--font-ui);
}
.nav a:hover { color: var(--primary); }
.nav a[aria-current="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}
.nav a[aria-current="true"]::after { display: none; }
.hdr-tools { display: flex; align-items: center; gap: 16px; }
.search { display: none; }
.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  border: 0;
  background: transparent;
  border-radius: 0;
  display: grid; place-items: center;
  color: var(--ink);
}
.icon-btn:hover { color: var(--primary); background: transparent; border: 0; }
.cart-count {
  position: absolute;
  top: -2px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.hdr-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 28px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.hdr-cta:hover { background: var(--accent); color: #fff; }
.login {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ui);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  transition: transform .12s ease, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  font-family: var(--font-ui);
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-700); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: #fff; }

.btn-dark {
  background: var(--primary);
  color: #fff;
}
.btn-dark:hover { background: var(--primary-700); }

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-mute); }

.btn-wa {
  background: #128c50;
  color: #fff;
}
.btn-wa:hover { background: #0f7644; }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ============================================================
   Sections / typography
   ============================================================ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--pad-section) 28px;
}
.section-tight { padding: 40px 28px; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
  display: inline-block;
}
.h-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}
.h-display em {
  font-style: normal;
  color: var(--primary);
  font-weight: 700;
}
.h-section {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 700;
}
.h-section em {
  font-style: normal;
  color: var(--primary);
  font-weight: 700;
}
.h-card {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.25;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 580px;
  text-wrap: pretty;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: var(--gap-4);
  flex-wrap: wrap;
}
.section-head .lead { max-width: 480px; font-size: 16px; }

/* ============================================================
   Hero (default — grid)
   ============================================================ */
.hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--gap-5);
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.hero-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-500); }
.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 36px;
}
.hero-media {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--primary-100);
}
.hero-stamp {
  position: absolute;
  top: 24px; left: 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.hero-stamp .dot { width: 8px; height: 8px; background: var(--terracotta); border-radius: 50%; }
.hero-tag {
  position: absolute;
  bottom: 24px; right: 24px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-md);
  padding: 14px 18px;
  max-width: 240px;
  font-size: 13px;
  line-height: 1.4;
}
.hero-tag b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 400; }

/* ============================================================
   Hero — Casa Viva (split: text + circle image, pastel mint bg)
   ============================================================ */
.hero-cv {
  position: relative;
  background: var(--bg-hero);
  overflow: hidden;
  padding: clamp(60px, 9vw, 120px) 0;
}
.hero-cv-inner {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: clamp(420px, 56vh, 560px);
}
.hero-cv-copy { display: flex; flex-direction: column; gap: 24px; max-width: 540px; }
.hero-cv-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  color: var(--primary);
  line-height: 1.05;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.hero-cv-title em {
  font-style: normal;
  color: var(--primary);
  font-weight: 700;
}
.hero-cv-lead {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}
.hero-cv-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.hero-cv-cta .btn { padding: 16px 40px; font-size: 16px; }

.hero-cv-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  max-width: 560px;
  justify-self: end;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.25);
}
.hero-cv-media .ph { filter: saturate(1.1); }
.hero-cv-media .ph-label { display: none; }
.hero-cv-shade { display: none; }

/* Cuando hay imagen custom del hero (set por appearance-apply.js) */
:root.has-hero-image .hero-cv {
  background: var(--hero-image) center/cover no-repeat, var(--bg-hero);
}
:root.has-hero-image .hero-cv::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(255,255,255,.65));
  pointer-events: none;
}
:root.has-hero-image .hero-cv-inner { position: relative; z-index: 1; }
:root.has-hero-image .hero-cv-media { display: none; }
:root.has-hero-image .hero-cv-inner { grid-template-columns: 1fr; max-width: 700px; }

/* Banner promocional sobre el header */
.promo-banner {
  display: flex; align-items: center; justify-content: center;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  text-align: center;
  position: relative;
  z-index: 11;
}
@media (max-width: 760px) {
  .promo-banner { font-size: 12px; padding: 8px 14px; }
}
.hero-cv .eyebrow { display: none; }
.hero-cv-meta { display: none; }
.hero-cv-cta .btn[style*="border"] { display: none; }

/* ============================================================
   Section helpers — Casa Viva (centered titles)
   ============================================================ */
.section-center {
  text-align: center;
}
.section-title {
  max-width: 720px;
  margin: 0 auto var(--gap-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.section-title .h-section { color: var(--primary); margin: 0; }
.section-sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 580px;
  line-height: 1.55;
}

/* ============================================================
   Banda amarilla con slogan
   ============================================================ */
.slogan-band {
  background: var(--bg-yellow);
  padding: clamp(60px, 9vw, 120px) 0;
}
.slogan-band-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 36px;
  text-align: center;
}
.slogan-text {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.2;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* ============================================================
   Hero categorías (3-up, estilo Casa Viva)
   ============================================================ */
.hero-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-2);
}
.hero-cat {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  text-align: center;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .2s ease;
  gap: 18px;
}
.hero-cat:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: none;
}
.hero-cat-media {
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
  border-radius: var(--r-lg);
  background: #efece2;
}
.hero-cat-body {
  padding: 0;
  display: flex; flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.hero-cat-body h4 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hero-cat-body p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 320px;
}
.hero-cat-arrow { display: none; }

/* ============================================================
   Rápido y Fácil (sage green section + beige cards)
   ============================================================ */
.rf-section {
  background: var(--bg-sage);
  border: 0;
}
.rf-section .h-section { color: var(--primary); }
.rf-section .eyebrow { color: var(--primary); opacity: 0.7; }
.rf-section .lead { color: var(--primary); opacity: 0.85; }
.rf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-2);
  margin-top: var(--gap-4);
}
.rf-card {
  background: var(--bg-sage-card);
  border: 0;
  border-radius: var(--r-lg);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.rf-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.rf-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.rf-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.rf-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: gap .15s;
  margin-top: 4px;
}
.rf-link:hover { gap: 14px; color: var(--accent-700); }
.rf-section .rf-end {
  text-align: center;
  margin-top: 56px;
}

/* ============================================================
   CTA cierre (frase Casa Viva)
   ============================================================ */
.cta-end {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 420px;
}
.cta-end-frame {
  position: absolute; inset: 0;
}
.cta-end-frame .ph { filter: brightness(0.55) saturate(1.1); }
.cta-end-body {
  position: relative;
  z-index: 2;
  padding: clamp(40px, 6vw, 72px);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  color: var(--cream);
}
.cta-end-body .h-section em { font-style: italic; }

/* Ticker (oculto en versión Casa Viva) */
.ticker { display: none; }
.ticker-track {
  display: flex; gap: 60px;
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 60px; }
.ticker-track i { font-style: normal; color: var(--terracotta); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Categorías
   ============================================================ */
.cats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap-2);
}
.cat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--primary-500); background: var(--paper-2); }
.cat-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-pill);
  background: var(--primary-100);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  color: var(--primary);
}
.cat-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0;
  font-weight: 400;
}
.cat-card .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}

/* ============================================================
   Product grid + cards
   ============================================================ */
.prod-grid {
  display: grid;
  gap: var(--gap-2);
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
}
@media (max-width: 1100px) { .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px)  { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.prod-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s ease;
  position: relative;
}
.prod-card:hover {
  transform: translateY(-4px);
  border: 0;
  box-shadow: none;
}
.prod-media {
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
  background: #efece2;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 0;
}
.prod-card-meta { display: none; }
.prod-card .h-card {
  cursor: pointer;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}
.prod-card .h-card:hover { color: var(--accent); }
.prod-card .price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0;
  margin-top: 0;
  gap: 8px;
}
.price {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0;
}
.price .unit {
  font-size: 11px;
  color: var(--ink-mute);
  margin-left: 2px;
}
.prod-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.prod-meta .prod-origin { color: var(--ink-soft); }
.prod-meta .prod-unit { color: var(--ink-mute); }
.add-btn {
  appearance: none;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 11px 14px;
  height: auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
  width: 100%;
}
.add-btn:hover { background: var(--accent-700); }
.add-btn.added { background: var(--primary); }

.prod-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  z-index: 1;
}

/* Product placeholder (SVG patterned) */
.ph {
  width: 100%; height: 100%;
  position: relative;
  background-size: cover; background-position: center;
}
.ph-photo {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.ph-stripes {
  position: absolute; inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 8px,
    rgba(0,0,0,0.05) 8px 9px
  );
}
.ph-label {
  position: absolute;
  left: 12px; bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* ============================================================
   Filtros / chips
   ============================================================ */
.filter-bar {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: var(--gap-3);
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.filter-bar .search { flex: 1; max-width: 360px; min-width: 200px; }
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--primary-500); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.filter-result {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  margin-left: auto;
}

/* ============================================================
   Benefits
   ============================================================ */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-2);
  margin-top: var(--gap-4);
}
.benefit {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.benefit .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--terracotta);
  letter-spacing: 0.15em;
}
.benefit h5 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  margin: 6px 0 4px;
  line-height: 1.1;
}
.benefit p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   Testimonios
   ============================================================ */
.testi-section { background: var(--primary-050); }
.testi-section .section { padding: var(--pad-section) 28px; }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-2);
  margin-top: var(--gap-4);
}
.testi {
  background: var(--paper-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--primary-100);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.testi-quote {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}
.testi-person {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto;
}
.avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--primary);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.testi-person .who {
  font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.2;
}
.testi-person .where {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================================
   Footer (estilo Casa Viva — blanco con íconos a color)
   ============================================================ */
.foot {
  background: #ffffff;
  color: var(--ink);
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
}
.foot-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 36px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--gap-4);
  align-items: center;
}
.foot-inner h6 { display: none; }
.foot-inner > div > a:not(.social) { display: none; }
.foot-inner a, .foot-inner p {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.foot-inner a:hover { color: var(--accent); }
.foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.foot-brand .foot-mark {
  width: 38px; height: 44px;
  color: var(--primary);
}
.foot-brand .h-section {
  display: none;
}
.foot-brand-text {
  display: flex; flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.15;
  color: var(--primary);
}
.foot-brand-text span { white-space: nowrap; }
.foot-center {
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
}
.foot-center b {
  display: block;
  font-weight: 500;
}
.socials {
  display: flex; gap: 14px;
  margin: 0;
  justify-self: end;
}
.socials a {
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  color: #fff;
  transition: opacity .15s;
  border: 0;
  cursor: pointer;
}
.socials a:hover { opacity: 0.8; border: 0; background: var(--so-bg, #333); }
.socials a.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.socials a.fb { background: #1877f2; }
.socials a.x  { background: #000; }
.socials a.yt { background: #ff0000; }
.socials a.tk { background: #000; }
.socials a.li { background: #0a66c2; }
.foot-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 22px 36px;
  font-size: 13px;
  color: var(--ink-mute);
  display: flex; justify-content: center;
  max-width: 1320px; margin: 0 auto;
  text-align: center;
}
.foot-bottom div { display: flex; gap: 18px; }

/* ============================================================
   Cart drawer
   ============================================================ */
.drawer-bg {
  position: fixed; inset: 0;
  background: rgba(43, 35, 22, 0.32);
  z-index: 100;
  backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideR {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(440px, 92vw);
  background: var(--cream);
  z-index: 101;
  display: flex; flex-direction: column;
  animation: slideR .28s cubic-bezier(.2,.8,.2,1);
  border-left: 1px solid var(--line);
}
@media (max-width: 640px) {
  .drawer {
    width: 100%;
    top: auto;
    height: 85vh;
    border-left: 0;
    border-top-left-radius: var(--r-xl);
    border-top-right-radius: var(--r-xl);
    animation: slideUp .3s cubic-bezier(.2,.8,.2,1);
  }
}
.drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer-hd h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.drawer-hd .count-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--primary-100);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.05em;
}
.close-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid; place-items: center;
}
.close-btn:hover { background: var(--paper-2); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.cart-item-img {
  width: 64px; height: 64px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--primary-050);
}
.cart-item-body { display: flex; flex-direction: column; gap: 6px; }
.cart-item-name {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}
.cart-item-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}
.qty {
  display: flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  overflow: hidden;
}
.qty button {
  appearance: none;
  background: transparent; border: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 16px;
  color: var(--ink);
}
.qty button:hover { background: var(--primary-050); color: var(--primary); }
.qty span {
  font-family: var(--font-mono);
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.cart-item-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  height: 100%; justify-content: space-between;
}
.cart-item .price { font-size: 14px; }
.x-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.x-btn:hover { color: var(--terracotta); }

.drawer-foot {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
  display: flex; flex-direction: column; gap: 14px;
}
.summary {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px;
}
.summary-row {
  display: flex; justify-content: space-between;
  color: var(--ink-soft);
}
.summary-row.total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-weight: 600;
}
.summary-row.total b {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
}
.note {
  background: var(--sun-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.5;
  border-left: 3px solid var(--sun);
}

/* Empty state */
.empty {
  padding: 60px 24px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.empty-ill {
  width: 120px; height: 120px;
  border-radius: var(--r-pill);
  background: var(--primary-050);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 64px;
  font-style: italic;
  color: var(--primary);
}
.empty h4 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 4px 0 0;
  font-weight: 400;
}
.empty p { color: var(--ink-soft); margin: 0; max-width: 280px; }

/* ============================================================
   WhatsApp floating
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 40;
  width: 60px; height: 60px;
  border-radius: var(--r-pill);
  background: #128c50;
  color: #fff;
  display: grid; place-items: center;
  border: 0;
  box-shadow: 0 12px 32px -8px rgba(18, 140, 80, .5);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float::after {
  content: ""; position: absolute; inset: -6px;
  border-radius: var(--r-pill);
  border: 2px solid #128c50;
  opacity: .3;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0% { transform: scale(0.85); opacity: .5; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* ============================================================
   Product detail
   ============================================================ */
.pdp {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap-5);
  align-items: start;
}
.pdp-media {
  aspect-ratio: 4/5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--primary-050);
}
.pdp-info { display: flex; flex-direction: column; gap: 22px; padding-top: 20px; }
.pdp-info .h-display { font-size: clamp(40px, 5vw, 64px); }
.pdp-price {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pdp-price .unit { font-size: 14px; font-weight: 500; color: var(--ink-mute); margin-left: 6px; }
.pdp-divider { border-top: 1px solid var(--line); padding-top: 22px; }
.pdp-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.pdp-row .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.pdp-row .v { color: var(--ink); font-weight: 500; }
.pdp-cta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.unit-select {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.unit-select button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-soft);
}
.unit-select button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ============================================================
   Cart full page
   ============================================================ */
.cart-page {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--gap-4);
  align-items: start;
}
.cart-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px 24px;
}
.cart-side {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column;
  gap: 18px;
  position: sticky; top: 100px;
}
.cart-side h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0;
  font-weight: 400;
}

/* ============================================================
   Forms
   ============================================================ */
.form {
  display: flex; flex-direction: column;
  gap: 16px;
}
.field {
  display: flex; flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
  color: var(--ink);
  outline: 0;
  transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary-500);
  background: var(--paper);
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(43, 35, 22, 0.4);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  background: var(--cream);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  animation: pop .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-hd {
  padding: 28px 32px 12px;
  display: flex; justify-content: space-between; align-items: start;
}
.modal-hd h3 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0;
  font-weight: 400;
}
.modal-body { padding: 12px 32px 28px; }
.modal-foot { padding: 16px 32px 28px; display: flex; gap: 12px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-4);
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.info-card {
  display: flex; gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
}
.info-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--primary-100);
  color: var(--primary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.info-card h5 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 400;
}
.info-card p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.info-card a { color: var(--primary); text-decoration: none; font-weight: 500; }
.map {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--primary-050);
  border: 1px solid var(--line);
  position: relative;
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.map-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -100%);
}
.map-pin .dot {
  width: 18px; height: 18px;
  background: var(--terracotta);
  border-radius: 50%;
  border: 4px solid var(--cream);
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.map-pin .label {
  position: absolute;
  bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--r-md);
}
.map-paths {
  position: absolute; inset: 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .cart-page { grid-template-columns: 1fr; }
  .cart-side { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; text-align: center; }
  .foot-brand { justify-content: center; }
  .foot-center { text-align: center; }
  .socials { justify-self: center; justify-content: center; }
  .nav { display: none; }
  .search { width: 180px; }
  .hero-cats { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .rf-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .hero-cv-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero-cv-copy { align-items: center; }
  .hero-cv-cta { justify-content: center; }
  .hero-cv-media { max-width: 380px; margin: 0 auto; justify-self: center; }
  .hdr-cta { display: none; }
}
@media (max-width: 640px) {
  .hdr-inner { grid-template-columns: 1fr auto; padding: 12px 18px; gap: 12px; }
  .search { display: none; }
  .section { padding: 56px 18px; }
  .hero { padding: 36px 18px 56px; }
  .hero-cv-inner { padding: 0 18px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; padding: 56px 18px 24px; }
  .foot-bottom { flex-direction: column; gap: 12px; padding: 22px 18px; }
  .h-display { font-size: 44px; }
  .brand small { display: none; }
  .hero-cv-title { font-size: 60px; }
  .rf-card { padding: 28px 22px; }
  .cta-end-body { padding: 36px 22px; }
}
