:root {
  --ink: #14231a;
  --muted: #566a5c;
  --bg: #f3f6f1;
  --surface: #ffffff;
  --line: #dfe7dc;
  --green: #0e7a22;
  --green-dark: #0a5d19;
  --green-bright: #1fa82a;
  --orange: #f28c00;
  --red: #d81e14;
  --yellow: #ffd400;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(20, 35, 26, .06), 0 6px 18px rgba(20, 35, 26, .07);
  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn[disabled] { background: #b9c4bb; color: #fff; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--green-dark); border: 2px solid var(--green); }

.icon-btn, .cart-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 0; color: var(--ink);
}
.cart-btn { background: var(--ink); color: #fff; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--yellow); color: var(--ink); font-size: .8rem; font-weight: 800;
  border: 2px solid #fff;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border: 2px solid var(--green); border-radius: 999px; background: #fff;
  color: var(--green-dark); font-weight: 700; font-size: .9rem;
}
.text-btn { background: none; border: 0; padding: 8px 0; color: var(--green-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cartel de promoción ---------- */
.announce {
  background: var(--red); color: #fff; text-align: center; font-weight: 700; font-size: .95rem; line-height: 1.3;
  padding: calc(8px + env(safe-area-inset-top, 0)) 16px 8px; text-wrap: balance;
}
.announce strong { font-weight: 800; }
.promo-note { background: #fff4d6; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-weight: 600; font-size: .92rem; }

/* ---------- Encabezado ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: env(safe-area-inset-top, 0) 0 10px;
}
.announce:not([hidden]) + .topbar { padding-top: 0; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { height: 34px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; }
.brand-text small { font-size: .72rem; font-weight: 700; color: var(--green); margin-top: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  background: var(--bg); border: 2px solid transparent; border-radius: 999px; color: var(--muted);
}
.search:focus-within { border-color: var(--green); background: #fff; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--muted); }

/* ---------- Banner con facetas ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--yellow); }
.mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.mesh polygon { opacity: 0; animation: facet .5s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes facet { from { opacity: 0; } to { opacity: 1; } }

.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 44px; min-height: 340px; }
.hero-copy { max-width: 560px; }
.hero h1 { font-weight: 800; font-size: clamp(2.2rem, 7vw, 3.9rem); letter-spacing: -.03em; text-wrap: balance; }
.hero p { margin: 14px 0 18px; font-size: 1.1rem; font-weight: 500; max-width: 34ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; }
.hero-tags li.hot { background: var(--ink); color: var(--yellow); }
.hero-tags li { background: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem; }

.hero-badge {
  flex: none; display: grid; place-items: center;
  width: 190px; height: 190px; background: #fff; border-radius: 44px;
  box-shadow: 0 14px 40px rgba(20, 35, 26, .25); transform: rotate(-4deg);
}
.hero-badge img { width: 130px; height: auto; }

/* ---------- Secciones ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.section-head h2 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.section-head .count { color: var(--muted); font-weight: 600; font-size: .95rem; }

.cats {
  display: flex; gap: 8px; overflow-x: auto; padding: 20px 16px 6px; margin: 0 -16px; scrollbar-width: none; scroll-padding-inline: 16px;
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }


/* ---------- Selector de vista ---------- */
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 2px; flex-wrap: wrap; }
.viewbar-count { color: var(--muted); font-weight: 600; font-size: .92rem; }
.vseg { display: inline-flex; padding: 4px; background: #fff; border: 2px solid var(--line); border-radius: 999px; }
.vseg button {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; font-weight: 700; font-size: .9rem; color: var(--muted);
}
.vseg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Encabezado de categoría ---------- */
.cat-head { display: flex; align-items: center; gap: 12px; margin: 30px 0 14px; }
.cat-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--tint, #fff0b3); font-size: 1.5rem; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.cat-head h2 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.cat-head .count { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .92rem; }
.sub-label { margin: 22px 0 8px; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* ---------- Lista de precios ---------- */
.plist { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; display: grid; }
.prow {
  display: grid; grid-template-columns: 52px 1fr auto; grid-template-areas: "ico main ctl" "ico price ctl";
  column-gap: 12px; align-items: center; padding: 12px 14px; box-shadow: 0 1px 0 var(--line); transition: background .15s;
}
.prow:hover { background: #f8fbf6; }
.prow-ico { grid-area: ico; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--tint, #fff0b3); font-size: 1.6rem; overflow: hidden; }
.prow-ico img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.prow-main { grid-area: main; min-width: 0; }
.prow-name { font-family: var(--font-body); font-weight: 700; font-size: .98rem; line-height: 1.25; }
.prow-sub { margin: 1px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow-price { grid-area: price; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.prow-price .price { font-size: 1.2rem; }
.price-line { display: flex; align-items: baseline; gap: 8px; }
.prow-ctl { grid-area: ctl; display: grid; place-items: center; }
.plus {
  display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--yellow); color: var(--ink); box-shadow: 0 3px 8px rgba(255, 190, 0, .45); transition: transform .12s, background .15s;
}
.plus:hover { background: #f5c800; }
.plus:active { transform: scale(.92); }
.stepper.sm { display: grid; grid-template-columns: 38px minmax(34px, auto) 38px; height: 42px; width: auto; }
.stepper.sm button { height: 42px; }
.stepper.sm span { padding: 0 2px; font-size: .92rem; white-space: nowrap; }
@media (min-width: 640px) {
  .plist.two { grid-template-columns: 1fr 1fr; }
  .plist.two .prow:nth-child(odd) { border-right: 1px solid var(--line); }
}
@media (min-width: 700px) {
  .prow { grid-template-columns: 52px 1fr 160px auto; grid-template-areas: "ico main price ctl"; }
  .prow-price { justify-content: flex-end; text-align: right; margin-top: 0; flex-direction: column; align-items: flex-end; gap: 0; }
}

/* ---------- Productos ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.tile { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--tint, #fff0b3); }
.tile .emoji { font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .12)); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; flex: 1; }
.card-name { font-weight: 700; font-size: .98rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-unit { color: var(--muted); font-size: .85rem; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.ctl { margin-top: auto; }

.add {
  width: 100%; height: 44px; border: 0; border-radius: 999px;
  background: var(--yellow); color: var(--ink); font-weight: 800;
}
.add:hover { background: #f5c800; }
.stepper {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px;
  border-radius: 999px; background: var(--green); color: #fff; overflow: hidden;
}
.stepper button { height: 44px; border: 0; background: transparent; color: #fff; font-size: 1.4rem; font-weight: 700; }
.stepper button:hover { background: var(--green-dark); }
.stepper span { text-align: center; font-weight: 800; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 6px; }


/* ---------- Descripción de producto ---------- */
.card-desc {
  margin: 4px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Dónde estamos ---------- */
.where { margin-top: 48px; padding: 8px 0 0; }
.where-grid { display: grid; gap: 20px; }
.where h2 { font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.03em; margin-bottom: 10px; }
.where-addr { margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; }
.where-hours { margin: 0 0 18px; color: var(--muted); font-weight: 500; }
.where-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map-box {
  position: relative; min-height: 300px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  background: #dfe9dc center / cover;
}
.map-box::before {
  content: "El mapa necesita conexión a internet. Tocá \"Cómo llegar\" para abrirlo en Google Maps.";
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-weight: 600;
}
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.f-slogan { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--yellow) !important; margin: 0 0 8px !important; }
@media (min-width: 800px) {
  .where-grid { grid-template-columns: 1fr 1.4fr; align-items: center; gap: 32px; }
  .map-box { min-height: 360px; }
}

/* ---------- Pie ---------- */
.footer { margin-top: 56px; background: #0b2e17; color: #e8f3ea; padding: 36px 0 calc(110px + env(safe-area-inset-bottom, 0)); }
.footer h2 { font-size: 1.4rem; margin-bottom: 10px; }
.footer p { margin: 4px 0; color: #c4d8c8; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #fff; font-weight: 700; padding: 8px 0; text-underline-offset: 3px; }
.footer .legal { margin: 24px auto 0 !important; font-size: .85rem; color: #9dbba4 !important; }

/* ---------- Flotantes ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0)); z-index: 15;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #1fa855; color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
body.has-cart .fab { bottom: calc(86px + env(safe-area-inset-bottom, 0)); }

.cartbar {
  position: fixed; left: 12px; right: 84px; bottom: calc(14px + env(safe-area-inset-bottom, 0)); z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 56px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.cartbar-label { flex: 1; text-align: left; }
#cartbar-count { background: var(--yellow); color: var(--ink); min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; }
#cartbar-total { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
body.has-cart .fab { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0)); }

/* ---------- Carrito ---------- */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(10, 30, 16, .55); }

.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh; height: 92dvh;
  margin: auto 0 0; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: #fff;
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.sheet-head h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 20px calc(24px + env(safe-area-inset-bottom, 0)); overscroll-behavior: contain; }

.lines { list-style: none; margin: 8px 0 20px; padding: 0; }
.line { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-emoji { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; font-size: 1.6rem; background: var(--tint, #fff0b3); }
.line-info { display: grid; gap: 6px; }
.line-top { display: flex; justify-content: space-between; gap: 10px; }
.line-name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.line-sub { color: var(--muted); font-size: .82rem; }
.line-total { font-weight: 800; white-space: nowrap; }
.line .stepper { width: 132px; height: 38px; grid-template-columns: 38px 1fr 38px; }
.line .stepper button { height: 38px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .field > legend { font-weight: 700; font-size: .92rem; padding: 0; }
.field input[type="text"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); }
fieldset.field { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: grid; place-items: center; min-height: 48px; padding: 8px 10px; text-align: center;
  border: 2px solid var(--line); border-radius: 14px; font-weight: 700; font-size: .92rem;
}
.seg input:checked + span { border-color: var(--green); background: #e6f4e8; color: var(--green-dark); }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }

.totals { background: var(--bg); border-radius: 16px; padding: 14px 16px; margin: 4px 0 16px; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; }
.totals .free { color: var(--green-dark); font-weight: 700; }
.totals .grand { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.notice { background: #fff4d6; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .92rem; font-weight: 500; }
.link-clear { display: block; margin: 14px auto 0; }

.done { text-align: center; padding: 36px 8px; }
.done .big { font-size: 3.4rem; }
.done h3 { font-size: 1.6rem; margin: 10px 0 8px; }
.done p { color: var(--muted); max-width: 36ch; margin: 0 auto 20px; }

/* ---------- Modal iOS ---------- */
.modal { max-width: min(92vw, 420px); border: 0; border-radius: 24px; padding: 24px; margin: auto; }
.modal h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.modal ol { padding-left: 20px; margin: 0 0 12px; display: grid; gap: 8px; }
.modal p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: #fff; font-weight: 600; text-align: center;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ---------- Ofertas de la semana (folletos) ---------- */
.promos {
  --fh: 360px; position: relative; color: #fff; padding: 34px 0 22px;
  background:
    radial-gradient(900px 300px at 90% -10%, rgba(255, 212, 0, .22), transparent 60%),
    linear-gradient(160deg, #0a3a1a 0%, #0e6b20 100%);
}
.promos::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 7px;
  background: linear-gradient(90deg, var(--yellow) 0 25%, var(--orange) 25% 50%, var(--red) 50% 75%, var(--green-bright) 75%);
}
.promos .section-head { margin: 0 0 14px; align-items: flex-end; }
.promos .section-head h2 { color: #fff; font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }
.promos .section-head .count { color: #c9ead0; }
.promos .text-btn { color: var(--yellow); margin-left: auto; }
.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px;
  padding: 12px 16px 48px; margin: 0 -16px -30px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.flyer {
  flex: none; height: var(--fh); aspect-ratio: 2 / 3; padding: 0; border: 3px solid #fff; border-radius: 20px; overflow: hidden;
  background: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .38); scroll-snap-align: start; cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}
.flyer:hover { transform: translateY(-4px); box-shadow: 0 20px 36px rgba(0, 0, 0, .45); }
.flyer img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rail-btn {
  display: none; position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); place-items: center; transform: translateY(-50%);
}
.rail-btn.prev { left: -20px; }
.rail-btn.next { right: -20px; }
.rail-btn[hidden] { display: none !important; }

.viewer { border: 0; padding: 0; background: transparent; width: min(92vw, 520px); max-height: 100dvh; margin: auto; overflow: visible; color: #fff; }
.viewer[open] { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: sheet-up .25s ease; }
.viewer::backdrop { background: rgba(8, 20, 12, .86); }
.viewer img { max-width: 100%; max-height: 70dvh; width: auto; height: auto; border-radius: 16px; background: #fff; }
.viewer p { margin: 0; text-align: center; font-weight: 600; max-width: 40ch; }
.viewer-bar { display: flex; align-items: center; gap: 10px; }
.viewer-bar .icon-btn, .viewer-close { background: #fff; }
.viewer-close { position: fixed; top: calc(12px + env(safe-area-inset-top, 0)); right: 12px; }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .cats { margin: 0; padding-left: 0; padding-right: 0; }
  .rail { margin: 0 -10px -30px; padding-left: 10px; padding-right: 10px; }
  .promos { --fh: 420px; }
}
@media (min-width: 900px) {
  .search { max-width: 560px; }
  .promos { --fh: 460px; }
  .rail-btn { display: grid; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero-inner { min-height: 400px; }
  .hero-badge { width: 260px; height: 260px; border-radius: 60px; }
  .hero-badge img { width: 180px; }
  .sheet {
    width: 460px; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 24px 0 0 24px;
  }
  .sheet[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
  .cartbar { left: auto; right: 84px; width: 360px; }
  .footer { padding-bottom: 110px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 420px) {
  .hero-inner { flex-direction: column; align-items: flex-start; padding-bottom: 150px; }
  .hero-badge { position: absolute; right: 16px; bottom: 20px; width: 112px; height: 112px; border-radius: 30px; }
  .hero-badge img { width: 76px; }
  .brand-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mesh polygon { animation: none; opacity: 1; }
  .sheet[open], .cart-count.bump, .viewer[open] { animation: none; }
  .toast { transition: none; }
}

/* ---------- Catálogo sin fotos: buscador y filtros ---------- */
.cat-intro { margin: 34px 0 14px; }
.cat-intro h2 { font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.1rem); letter-spacing: -.02em; }
.cat-intro p { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.finder { padding: 6px 0 8px; margin-bottom: 4px; }
.finder-search { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px; background: #fff; border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); color: var(--muted); }
.finder-search:focus-within { border-color: var(--green); color: var(--green); }
.finder-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.finder-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.sel { display: grid; gap: 2px; padding: 6px 12px 4px; background: #fff; border: 2px solid var(--line); border-radius: 14px; min-width: 0; }
.sel span { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sel select { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); height: 28px; outline: 0; text-overflow: ellipsis; }
.az { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.az::-webkit-scrollbar { display: none; }
.az button { flex: none; min-width: 38px; height: 36px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: .88rem; }
.az button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cats { padding-top: 8px; }
.fuzzy { margin: 14px 2px 8px; font-weight: 700; color: var(--muted); }
.more { display: grid; place-items: center; margin: 22px 0 8px; }
.prow { grid-template-columns: 1fr auto; grid-template-areas: "main ctl" "price ctl"; padding: 12px 16px; }
.prow-name { overflow-wrap: anywhere; }
.prow-price .price { font-size: 1.25rem; }
.line { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .prow { grid-template-columns: 1fr 120px auto; grid-template-areas: "main price ctl"; }
  .finder-row { grid-template-columns: 1fr 220px; }
}

/* ---------- Góndolas (inicio del catálogo) ---------- */
.gondola { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
.tile-cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; min-height: 132px; padding: 16px 14px 14px;
  border: 0; border-radius: 22px; background: var(--tint, #fff0b3); box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.tile-cat::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.tile-cat:hover { transform: translateY(-3px); }
.tile-cat:active { transform: scale(.97); }
.tc-ico { font-size: 2.3rem; line-height: 1; }
.tc-name { margin-top: auto; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; line-height: 1.15; letter-spacing: -.01em; position: relative; z-index: 1; }
.tc-n { font-size: .82rem; font-weight: 700; color: rgba(20, 35, 26, .6); position: relative; z-index: 1; }
.tile-all { background: var(--ink); color: #fff; }
.tile-all .tc-n { color: #c9ead0; }
.tile-all::after { background: rgba(255, 255, 255, .08); }
.finder-extra[hidden] { display: none; }
.viewbar .text-btn { font-weight: 800; }
@media (min-width: 700px) { .gondola { grid-template-columns: repeat(4, 1fr); gap: 16px; } .tile-cat { min-height: 160px; } }
@media (min-width: 1000px) { .gondola { grid-template-columns: repeat(5, 1fr); } }
#catalogo { scroll-margin-top: 130px; }

/* ---------- Ofertas con precio, horarios ---------- */
.btn-line { background: transparent; color: #fff; border: 2px solid #fff; }
.viewer-bar { flex-wrap: wrap; justify-content: center; }
.eta { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #eef7ec; color: var(--ink); font-size: .92rem; line-height: 1.35; }
.where-ship { margin: 14px 0 18px; display: grid; gap: 4px; }
.where-ship h3 { margin: 10px 0 2px; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.where-ship p, .where-ship li { margin: 0; color: var(--muted); font-weight: 600; font-size: .95rem; }
.where-ship ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }

/* ---------- Modo solo ofertas ---------- */
.sin-catalogo #catalogo, .sin-catalogo .topbar .search { display: none; }
.sin-catalogo .promos { padding-top: 28px; }

/* ---------- Pedido por escrito ---------- */
.ask { padding: 34px 0 10px; }
.ask-box { display: grid; gap: 16px; }
.ask-box > * { min-width: 0; }
.ask-text h2 { font-weight: 800; font-size: clamp(1.5rem, 5vw, 2rem); letter-spacing: -.02em; }
.ask-text p { margin: 6px 0 0; color: var(--muted); font-weight: 600; max-width: 46ch; }
.ask-form { display: grid; gap: 10px; padding: 16px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.ask-form textarea, .extra-field textarea { width: 100%; min-height: 92px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; font: inherit; resize: vertical; background: #fff; color: var(--ink); }
.ask-form textarea:focus, .extra-field textarea:focus { outline: 0; border-color: var(--green); }
.extra-field { margin-top: 6px; }
@media (min-width: 800px) { .ask-box { grid-template-columns: 1fr 1.2fr; align-items: center; gap: 32px; } }
