/* ==========================================================================
   Masa Madre — Landing
   Desktop (≥1200px) replica el prototipo 1440×900.
   ========================================================================== */

:root {
  --white: #ffffff;
  --white-88: rgba(255, 255, 255, 0.88);
  --line-70: rgba(255, 255, 255, 0.7);
  --line-50: rgba(255, 255, 255, 0.5);
  --line-45: rgba(255, 255, 255, 0.45);
  --line-40: rgba(255, 255, 255, 0.4);
  --line-30: rgba(255, 255, 255, 0.3);
  --shade-18: rgba(0, 0, 0, 0.18);
  --shade-16: rgba(0, 0, 0, 0.16);

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Manrope", system-ui, sans-serif;

  --bg-duration: 0.6s;

  /* Layout desktop (valores del prototipo) */
  --pad-header: 56px;
  --pad-x: 72px;
  --col-l: 360px;
  --col-r: 250px;
  --stage-w: clamp(560px, calc(100vw - 640px), 760px); /* 760 en 1440; más chico en laptops */
  --stage-shift: 60px;  /* el pan está 60px a la derecha del centro */
  --h1: 60px;
  --price: 52px;
  --hero-min: 780px; /* alto mínimo del hero */
}

*,
*::before,
*::after { box-sizing: border-box; }

html { overflow-x: clip; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--white);
  background: #1c1410;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--white); }
a:hover { color: #f3e6d3; }

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 12px 18px; border-radius: 999px;
  background: var(--white); color: #3B2A20;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* --------------------------------------------------------------------------
   Page & hero background
   -------------------------------------------------------------------------- */
.page {
  position: relative;
  background-color: var(--bg);
  transition: background-color var(--bg-duration) ease;
}
.hero-section {
  position: relative;
  min-height: max(100svh, var(--hero-min));
  overflow: hidden;
}

.bg-word {
  position: absolute;
  left: 50%;
  top: calc(50% - min(18.05vw, 260px));
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: clamp(88px, 19.45vw, 280px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.0286em;
  color: var(--white);
  opacity: 0.07;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.icon-btn {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-45);
  background: transparent;
  color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.icon-btn--sm { width: 44px; height: 44px; border-color: var(--line-50); }
.socials .icon-btn { border-color: var(--line-40); }
.icon-btn:hover { background-color: rgba(255, 255, 255, 0.12); border-color: var(--white); color: var(--white); }

.pill-btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--bg-duration) ease, transform 0.2s ease;
}
.pill-btn:hover { color: var(--ink); transform: translateY(-1px); }
.pill-btn--header { gap: 8px; height: 46px; padding: 0 20px; font-size: 13px; }
.pill-btn--cta { align-self: flex-start; height: 48px; padding: 0 22px; font-size: 14px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: absolute;
  z-index: 10;
  left: var(--pad-header); right: var(--pad-header); top: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand__logo { display: block; height: 40px; width: auto; }
.brand--footer .brand__logo { height: auto; width: 340px; max-width: 100%; }

.site-nav {
  display: flex; gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background-color: var(--shade-18);
}
.site-nav__link {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.site-nav__link:hover { background-color: rgba(255, 255, 255, 0.12); color: var(--white); }
.site-nav__link.is-active { background-color: var(--white); color: var(--ink); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero__intro {
  position: absolute; z-index: 2;
  left: var(--pad-x);
  top: calc(50% - 200px);
  width: var(--col-l);
  display: flex; flex-direction: column; gap: 24px;
}

.carousel-controls { display: flex; align-items: center; gap: 10px; }
.counter { margin-left: 8px; font-size: 13px; font-weight: 600; letter-spacing: 2px; font-variant-numeric: tabular-nums; }

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--h1);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.025em;
}
.hero__title em { font-style: italic; }

.hero__desc { font-size: 15px; line-height: 1.6; color: var(--white-88); }

/* Stage (imagen del pan) */
.stage {
  --stage-h: calc(var(--stage-w) * 300 / 760);
  position: absolute; z-index: 1;
  margin: 0;
  left: calc(50% - var(--stage-w) / 2 + var(--stage-shift));
  top: calc(50% - var(--stage-h) / 2);
  width: var(--stage-w);
  height: var(--stage-h);
  touch-action: pan-y;
}
.stage__shadow {
  position: absolute;
  left: 12%; right: 12%; bottom: -22px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.35);
  filter: blur(22px);
}
.stage__track {
  position: absolute; inset: 0 0 auto 0;
  height: calc(var(--stage-w) * 270 / 760);
}
.stage__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  transform: rotate(-7deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35));
  user-select: none;
  -webkit-user-drag: none;
}

/* Shop column */
.hero__shop {
  position: absolute; z-index: 2;
  right: var(--pad-x);
  top: calc(50% - 200px);
  width: var(--col-r);
  display: flex; flex-direction: column; align-items: flex-end;
  text-align: right;
}
.product { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.product__name { margin: 0; font-weight: 400; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; opacity: 0.85; }
.product__price { font-family: var(--font-serif); font-size: var(--price); line-height: 1.05; font-weight: 600; }

.picker { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.picker--sizes { margin-top: 28px; }
.picker--breads { margin-top: 36px; }
.picker__label { font-size: 12px; letter-spacing: 1px; opacity: 0.85; }
.picker__options { display: flex; gap: 8px; }
.picker__options--breads {
  flex-direction: column; align-items: flex-end;
  /* Red de seguridad: con muchos panes la lista se desplaza dentro de su espacio
     en vez de pisar la fila de abajo (≈5 chips en 900px de alto, 4 en 780px) */
  max-height: calc(max(100svh, var(--hero-min)) / 2 - 175px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 4px 4px 6px;          /* espacio para el anillo de foco */
  margin: -4px -4px -4px -6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}
.picker__options--breads::-webkit-scrollbar { width: 6px; }
.picker__options--breads::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); border-radius: 999px; }
/* Degradado abajo cuando hay más chips escondidos */
.picker__options--breads.has-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}

.chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line-45);
  background-color: transparent;
  color: var(--white);
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.chip--size { min-width: 64px; }
.chip--bread { padding: 0 18px; }
.chip:hover { border-color: var(--white); }
.chip[aria-pressed="true"] {
  border-color: var(--white);
  background-color: var(--white);
  color: var(--ink);
  font-weight: 700;
}
.chip__dot {
  width: 12px; height: 12px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--white);
}
.chip[aria-pressed="true"] .chip__dot { border: 0; }

/* --------------------------------------------------------------------------
   Parte inferior del hero (redes, frase, "Siguiente")
   -------------------------------------------------------------------------- */
.hero-bottom {
  position: absolute; z-index: 2;
  left: var(--pad-x); right: var(--pad-x); bottom: 44px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
}
.socials { display: flex; gap: 10px; }
.tagline {
  position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--font-serif); font-size: 18px; font-style: italic;
  line-height: 1.35;
  opacity: 0.92;
  white-space: nowrap;
}

.next-card {
  width: 220px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--line-30);
  background-color: var(--shade-16);
  color: var(--white);
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.next-card:hover { border-color: var(--line-70); background-color: rgba(0, 0, 0, 0.24); }
.next-card__img { width: 92px; height: 40px; object-fit: contain; transform: rotate(-7deg); flex-shrink: 0; }
.next-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.next-card__kicker { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.8; }
.next-card__name { font-size: 13px; font-weight: 700; }

/* ==========================================================================
   Tablet grande 1024–1199: mismas 3 columnas, pan más chico y columnas más juntas
   ========================================================================== */
@media (max-width: 1199px) {
  :root {
    --pad-header: 40px;
    --pad-x: 40px;
    --col-l: 300px;
    --col-r: 220px;
    --stage-w: clamp(480px, 50vw, 600px);
    --stage-shift: 40px;
    --h1: 52px;
    --price: 46px;
  }
  .site-nav__link { padding: 0 16px; }
}

/* ==========================================================================
   Tablet 768–1023: pan arriba, columnas lado a lado debajo; menú hamburguesa
   ========================================================================== */
@media (max-width: 1023px) {
  :root {
    --pad-x: 40px;
    --stage-w: min(620px, calc(100vw - 80px), 130svh);
    --h1: 50px;
  }

  .site-header { position: relative; left: auto; right: auto; top: auto; padding: 28px var(--pad-x) 0; }
  .hero-section {
    min-height: auto;
    padding: 0 var(--pad-x) 40px;
    display: flex; flex-direction: column;
  }

  /* Menú desplegable */
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 12px); left: var(--pad-x); right: var(--pad-x);
    flex-direction: column; gap: 4px;
    padding: 8px;
    border-radius: 24px;
    background-color: rgba(20, 14, 10, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link { padding: 14px 18px; font-size: 15px; min-height: 44px; }

  .bg-word { top: 20px; }

  .hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(200px, 240px);
    grid-template-areas:
      "stage stage"
      "intro shop";
    column-gap: 40px;
    row-gap: 32px;
    margin-top: 40px;
  }
  .hero__intro, .hero__shop, .stage { position: relative; left: auto; right: auto; top: auto; }
  .hero__intro { grid-area: intro; width: auto; }
  .hero__shop { grid-area: shop; width: auto; }
  .picker__options--breads { max-height: 268px; }
  .stage { grid-area: stage; justify-self: center; }

  .hero-bottom {
    position: relative; left: auto; right: auto; bottom: auto;
    margin-top: auto;
    padding-top: 48px;
    align-items: center;
  }
  .tagline { position: static; transform: none; }
}

/* ==========================================================================
   Móvil <768: una columna
   ========================================================================== */
@media (max-width: 767px) {
  :root {
    --pad-x: 16px;
    --stage-w: min(calc(100vw - 48px), 560px, 120svh);
    --h1: clamp(40px, 11.5vw, 56px);
    --price: 44px;
  }

  .site-header { padding-top: 16px; }
  .hero-section { padding-bottom: 32px; }

  .brand__logo { height: 32px; }
  .brand--footer .brand__logo { height: auto; width: 300px; }
  .header-actions .pill-btn--header, .header-actions .bag { display: none; }

  .bg-word { top: 250px; }

  /* Aplanar columnas para reordenar */
  .hero {
    display: flex; flex-direction: column;
    gap: 0;
    margin-top: 32px;
  }
  .hero__intro, .hero__shop { display: contents; }

  .carousel-controls { order: 1; }
  .hero__title { order: 2; margin-top: 20px; }
  .stage { order: 3; margin: 28px auto 36px; }
  .product { order: 4; align-items: flex-start; text-align: left; }
  .hero__desc { order: 5; margin-top: 12px; }
  .picker--sizes { order: 6; margin-top: 24px; }
  .pill-btn--cta { order: 7; margin-top: 24px; width: 100%; justify-content: center; height: 52px; font-size: 15px; }
  /* En celular no se muestra "Elige tu pan": se cambia de pan con las flechas o deslizando la foto */
  .picker--breads { display: none; }

  .picker { align-items: flex-start; }
  .picker--breads { align-self: stretch; }
  .picker__options--breads {
    flex-direction: row; align-items: center;
    max-height: none;
    overflow-x: auto; overflow-y: hidden;
    margin-block: 0;
    margin-inline: calc(var(--pad-x) * -1);
    padding: 2px var(--pad-x) 6px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--pad-x);
    scrollbar-width: none;
  }
  .picker__options--breads::-webkit-scrollbar { display: none; }
  .chip--bread { scroll-snap-align: start; }

  .hero-bottom { flex-direction: column; align-items: center; gap: 20px; padding-top: 40px; }
  .next-card { display: none; }
}

/* ==========================================================================
   PARTE 2 — Tienda, carrito, cómo pedir, nosotros y footer
   ========================================================================== */
:root {
  --cream: #F4EDE3;
  --sand: #EADFCF;
  --text: #2A1E17;
  --muted: #5E4E43;
  --accent: #8A3A14;
  --dark: #2A1E17;
  --sec-pad-y: 112px;
  --sec-pad-x: 72px;
  --title: 56px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id], footer[id] { scroll-margin-top: 16px; }

button.pill-btn { border: 0; cursor: pointer; font-family: inherit; }

/* Bolsa del header con contador */
.bag { position: relative; }
.bag__count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.bag__count[hidden] { display: none; }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.2); }
  65% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
.is-bump { animation: bump 0.45s ease; }

/* Secciones */
.section {
  padding: var(--sec-pad-y) var(--sec-pad-x);
  background-color: var(--cream);
  color: var(--text);
}
.section__inner { max-width: 1296px; margin: 0 auto; }
.section a:not([class]) { color: var(--text); }

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--center { text-align: center; }
.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--title);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section-title em { font-style: italic; }
.section-title--center { text-align: center; }

.section :focus-visible,
.site-footer :focus-visible { outline-color: var(--text); }
.cart :focus-visible, .site-footer :focus-visible { outline-color: var(--cream); }

/* ---------------- Tienda ---------------- */
.shop__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}
.shop__head .section-title { max-width: 720px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.filter-chip {
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(42, 30, 23, 0.25);
  background: transparent; color: var(--text);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-chip:hover { border-color: var(--text); }
.filter-chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--cream); }

.shop__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}
.shop__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.shop__grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop__empty { padding: 48px 0; color: var(--muted); text-align: center; }

.product-card {
  display: flex; flex-direction: column;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(42, 30, 23, 0.06), 0 12px 32px rgba(42, 30, 23, 0.06);
}
.product-card[hidden] { display: none; }
.product-card__media {
  position: relative;
  height: 200px;
  background-color: var(--card);
  display: grid; place-items: center;
  overflow: hidden;
}
.product-card__word {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif); font-weight: 600;
  font-size: 104px; line-height: 1; letter-spacing: -0.03em;
  color: var(--white); opacity: 0.08;
  white-space: nowrap;
  pointer-events: none;
}
.product-card__img {
  position: relative;
  width: 100%;
  transform: rotate(-7deg);
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.3));
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
}
.product-card:hover .product-card__img { transform: rotate(-3deg) scale(1.06); }
.product-card__body {
  flex: 1;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 22px 24px;
}
.product-card__name {
  margin: 0;
  font-family: var(--font-serif); font-size: 22px; font-weight: 600; line-height: 1.2;
}
.product-card__desc { flex: 1; font-size: 13px; line-height: 1.55; color: var(--muted); }
.product-card__sizes { display: flex; gap: 8px; margin-top: 4px; }
.size-chip {
  min-width: 64px; height: 44px; padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(42, 30, 23, 0.2);
  background: transparent; color: var(--text);
  font-size: 13px; font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.size-chip:hover { border-color: var(--text); }
.size-chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--cream); }
.product-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px;
}
.product-card__price { font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.add-btn {
  height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px;
  background-color: var(--card); color: var(--white);
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.add-btn:hover { filter: brightness(1.12); }
.add-btn:active { transform: scale(0.97); }
.add-btn[hidden], .stepper[hidden] { display: none; }
.stepper {
  display: inline-flex; align-items: center;
  height: 44px;
  border-radius: 999px;
  background-color: var(--card); color: var(--white);
}
.stepper__btn {
  width: 42px; height: 44px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--white);
  font-size: 20px; line-height: 1;
}
.stepper__btn:hover { background-color: rgba(255, 255, 255, 0.14); }
.stepper__qty { min-width: 22px; text-align: center; font-size: 14px; font-weight: 700; }
.product-card :focus-visible { outline-color: var(--text); }

.product-card--placeholder {
  min-height: 360px;
  background: transparent;
  box-shadow: none;
  border: 2px dashed rgba(42, 30, 23, 0.25);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-size: 20px;
  color: var(--muted);
}

/* ---------------- Carrito ---------------- */
.cart {
  position: sticky; top: 24px;
  padding: 28px;
  border-radius: 28px;
  background-color: var(--dark);
  color: var(--white);
}
.cart__handle, .cart__close { display: none; }
.cart__head { display: flex; align-items: baseline; gap: 12px; }
.cart__title { margin: 0; font-family: var(--font-serif); font-size: 28px; font-weight: 400; }
.cart__title:focus { outline: none; }
.cart__count { margin-left: auto; font-size: 13px; opacity: 0.75; }

.cart__empty { padding: 36px 0 20px; text-align: center; }
.cart__empty[hidden] { display: none; }
.cart__empty svg { opacity: 0.55; margin: 0 auto; display: block; }
.cart__empty p { margin-top: 12px; font-size: 14px; opacity: 0.8; }

.cart__list { list-style: none; margin: 18px 0 0; padding: 0; }
.cart__list[hidden] { display: none; }
.cart-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cart-line:first-child { border-top: 0; }
.cart-line__thumb {
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  display: grid; place-items: center;
}
.cart-line__thumb img { width: 140%; max-width: none; transform: rotate(-7deg); }
.cart-line__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-line__name { font-size: 14px; font-weight: 700; }
.cart-line__meta { font-size: 12px; opacity: 0.75; }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-line__total { font-family: var(--font-serif); font-size: 16px; font-weight: 600; }
.mini-stepper {
  display: inline-flex; align-items: center;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}
.mini-stepper__btn {
  position: relative;
  width: 30px; height: 30px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--white);
  font-size: 16px; line-height: 1;
}
.mini-stepper__btn::after { content: ""; position: absolute; inset: -7px; } /* área táctil de 44px */
.mini-stepper__btn:hover { background-color: rgba(255, 255, 255, 0.14); }
.mini-stepper__qty { min-width: 20px; text-align: center; font-size: 13px; font-weight: 700; }

.delivery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin-top: 20px;
  padding: 4px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.08);
}
.segment {
  min-height: 56px;
  padding: 10px 12px;
  border: 0; border-radius: 16px;
  background: transparent; color: var(--white);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  text-align: left;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.segment__label { font-size: 13px; font-weight: 700; }
.segment__meta { font-size: 12px; opacity: 0.75; }
.segment[aria-pressed="true"] { background-color: var(--cream); color: var(--text); }
.segment[aria-pressed="true"] .segment__meta { opacity: 1; color: var(--muted); }

.cart__totals { margin: 20px 0 0; }
.cart__totals > div { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 14px; }
.cart__totals dt { opacity: 0.75; }
.cart__totals dd { margin: 0; font-weight: 600; }
.cart__totals .cart__grand {
  margin-top: 8px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.cart__grand dt { opacity: 1; font-weight: 700; }
.cart__grand dd { font-family: var(--font-serif); font-size: 30px; }

.checkout {
  width: 100%; height: 52px;
  margin-top: 20px;
  border: 0; border-radius: 999px;
  background-color: var(--cream); color: var(--text);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.checkout:hover:not(:disabled) { filter: brightness(0.95); }
.checkout:disabled { opacity: 0.4; cursor: not-allowed; }
.cart__note { margin-top: 14px; font-size: 12px; line-height: 1.5; opacity: 0.75; text-align: center; }

/* Barra y panel móvil (ocultos en desktop) */
.cart-bar, .sheet-backdrop { display: none; }

/* ---------------- Cómo pedir ---------------- */
.steps { background-color: var(--sand); }
.steps .section-title { margin-bottom: 56px; }
.steps__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
.step {
  padding: 36px 32px 40px;
  border-radius: 28px;
  background-color: var(--cream);
}
.step__num {
  display: block;
  margin-bottom: 24px;
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 88px; line-height: 1;
}
.step__title { margin: 0 0 10px; font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.step__text { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------------- Nosotros ---------------- */
.about__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center;
}
.about__media {
  height: 560px;
  border-radius: 32px;
  background-color: #3B2A20;
  overflow: hidden;
  display: grid; place-items: center;
}
.about__media img {
  width: 112%; max-width: none;
  transform: rotate(-7deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35));
}
.about__text > p:not(.eyebrow) { margin-top: 20px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.about__text .section-title { margin-bottom: 8px; }
.dark-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px; margin-top: 32px;
  border-radius: 999px;
  background-color: var(--dark); color: var(--cream);
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.dark-btn:hover { color: var(--cream); transform: translateY(-1px); }

/* ---------------- Footer / Contacto ---------------- */
.site-footer {
  padding: 96px var(--sec-pad-x) 40px;
  background-color: var(--dark);
  color: var(--cream);
  overflow: hidden;
}
.site-footer a { color: var(--cream); text-underline-offset: 3px; }
.site-footer a:hover { color: #ffffff; }
.site-footer a[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; text-decoration: none; }
.footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer__phrase { margin-top: 20px; font-family: var(--font-serif); font-style: italic; font-size: 18px; line-height: 1.4; opacity: 0.9; }
.footer__title {
  margin: 0 0 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(244, 237, 227, 0.65);
}
.footer__list { list-style: none; margin: 0; padding: 0; font-style: normal; font-size: 15px; line-height: 1.7; }
.footer__list a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__hours { margin-top: 12px; }
.footer__word {
  margin: 72px 0 24px;
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(32px, 12.5vw, 190px);
  line-height: 0.9; letter-spacing: -0.02em;
  text-align: center; white-space: nowrap;
  color: var(--cream); opacity: 0.08;
  user-select: none;
}
.footer__legal {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 237, 227, 0.15);
  font-size: 13px; opacity: 0.75;
}

/* ---------------- Tablet: tienda en 2 columnas, carrito debajo ---------------- */
@media (max-width: 1199px) {
  :root { --sec-pad-y: 88px; --sec-pad-x: 40px; --title: 46px; }
  .shop__layout { grid-template-columns: minmax(0, 1fr); }
  .shop__grid, .shop__grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart { position: static; }
  .steps__list { gap: 16px; }
  .step { padding: 28px 24px 32px; }
  .step__num { font-size: 72px; }
  .about__grid { gap: 48px; }
  .about__media { height: 440px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1023px) {
  .shop__head { flex-direction: column; align-items: flex-start; }
  .filters { justify-content: flex-start; }
  .steps__list { grid-template-columns: minmax(0, 1fr); }
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .about__media { height: 400px; }
}

/* ---------------- Móvil ---------------- */
@media (max-width: 767px) {
  :root { --sec-pad-y: 72px; --sec-pad-x: 16px; --title: 36px; }
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

  .shop__head { margin-bottom: 32px; }
  .shop__grid, .shop__grid:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .product-card--placeholder { min-height: 160px; }

  .about__media { height: 280px; border-radius: 28px; }

  .site-footer { padding-top: 72px; }
  .footer__cols { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .footer__word { margin-top: 48px; }
  .footer__legal { flex-direction: column; gap: 6px; }

  /* Barra fija "Ver pedido" */
  .cart-bar {
    position: fixed; z-index: 40;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    height: 56px; padding: 0 22px;
    border: 0; border-radius: 999px;
    background-color: var(--dark); color: var(--white);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1.5px rgba(255, 255, 255, 0.28);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; font-weight: 600;
  }
  .cart-bar__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
  .cart-bar__sep { opacity: 0.5; }
  .cart-bar__total { font-family: var(--font-serif); font-size: 17px; font-weight: 600; }
  .cart-bar:focus-visible { outline-color: var(--dark); }
  .cart-bar > * { white-space: nowrap; }

  /* El carrito es un panel que sube desde abajo */
  .cart {
    position: fixed; z-index: 60;
    left: 0; right: 0; bottom: 0; top: auto;
    max-height: 88svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0.35s;
  }
  .cart.is-open { transform: translateY(0); visibility: visible; transition: transform 0.35s cubic-bezier(.2, .8, .2, 1); }
  .cart__handle { display: block; width: 40px; height: 4px; margin: 0 auto 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); }
  .cart__head { align-items: center; }
  .cart__close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
    background: transparent; color: var(--white);
  }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.5); }
  .sheet-backdrop[hidden] { display: none; }
  body.has-sheet { overflow: hidden; }
}

/* ==========================================================================
   Movimiento reducido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  :root { --bg-duration: 0s; }
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .pill-btn:hover, .dark-btn:hover { transform: none; }
  .product-card:hover .product-card__img { transform: rotate(-7deg); }
}

/* Elementos que se ocultan según la configuración (data.js) */
.delivery[hidden], .filters[hidden], .pickup-info[hidden], .cart__totals > div[hidden] { display: none; }
.pickup-info {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 2px;
}

/* Dirección de entrega (envío en la GAM) */
.cart__address { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cart__address[hidden] { display: none; }
.cart__address-label { font-size: 13px; font-weight: 700; }
.cart__address-input {
  width: 100%; min-height: 84px; resize: vertical;
  padding: 12px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.25); border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.06); color: var(--white);
  font: inherit; font-size: 16px; line-height: 1.45; /* 16px: iPhone no hace zoom al escribir */
}
.cart__address-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.cart__address-input:focus { outline: none; border-color: var(--cream); background-color: rgba(255, 255, 255, 0.1); }
.cart__address-input[aria-invalid="true"] { border-color: #f08a78; }
.cart__address-hint { font-size: 12px; line-height: 1.5; opacity: 0.75; }

/* Mensajes del carrito */
.cart__error, .cart__done {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.5;
}
.cart__error { background-color: rgba(214, 76, 56, 0.18); color: #ffd9d2; }
.cart__done { background-color: rgba(244, 237, 227, 0.12); color: var(--cream); }
.cart__error[hidden], .cart__done[hidden] { display: none; }

/* Pan agotado */
.product-card.is-soldout .product-card__media { filter: grayscale(0.6); }
.product-card.is-soldout .product-card__img { opacity: 0.7; }
.add-btn:disabled {
  background-color: transparent;
  color: var(--muted);
  border: 1.5px dashed rgba(42, 30, 23, 0.3);
  cursor: not-allowed;
  filter: none;
}

/* ==========================================================================
   Pantallas grandes (>1440px): el hero se alinea con el contenido centrado de las secciones
   ========================================================================== */
@media (min-width: 1441px) {
  :root {
    /* Mismo borde que las secciones de abajo (contenido de 1296px centrado); en 1440 da los 72px del diseño */
    --pad-header: calc((100vw - 1296px) / 2 - 16px);
    --pad-x: calc((100vw - 1296px) / 2);
  }
}

/* Laptops con pantalla baja (ventana del navegador de 660–779px): el hero entra completo sin cortar la fila de abajo */
@media (min-width: 1024px) and (max-height: 779px) {
  :root { --hero-min: 660px; }
  .site-header { top: 24px; }
}

/* Barra "Ver pedido": solo aparece cuando el carrito tiene panes */
.cart-bar[hidden] { display: none !important; }
@media (max-width: 767px) {
  body { padding-bottom: 0; }
  body.has-cart-bar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
/* Celulares angostos (320–359px): la barra entra en una sola línea */
@media (max-width: 359px) {
  .cart-bar { gap: 6px; padding: 0 16px; font-size: 13px; }
  .cart-bar__label { gap: 6px; }
  .cart-bar__total { font-size: 16px; }
}
