/* Fuente de Vida · colores de su marca (verde, lima, rojo) con estructura tipo mercado fresco */
:root {
  --ink: #183b2a;
  --muted: #60735f;
  --paper: #eef5df;
  --cream: #f7faef;
  --green: #00784a;
  --forest: #075234;
  --lime: #a7c521;
  --red: #e90019;
  --line: #dbe6cb;
  --display: "Fredoka", "Trebuchet MS", sans-serif;
  --script: "Yellowtail", cursive;
  --body: "DM Sans", system-ui, sans-serif;
  --r: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
.script { font-family: var(--script); font-weight: 400; color: var(--lime); letter-spacing: 0; display: inline-block; transform: rotate(-4deg); }

/* ---------- Carga ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--forest); transition: opacity .5s, visibility .5s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark { text-align: center; color: #fff; }
.loader .rays { width: 110px; margin: 0 auto -6px; overflow: visible; }
.loader .rays rect { transform-box: view-box; opacity: 0; animation: ray .45s cubic-bezier(.3,1.6,.5,1) forwards; }
.loader .rays rect:nth-child(1) { animation-delay: .1s }
.loader .rays rect:nth-child(2) { animation-delay: .2s }
.loader .rays rect:nth-child(3) { animation-delay: .3s }
.loader .rays rect:nth-child(4) { animation-delay: .4s }
.loader .rays rect:nth-child(5) { animation-delay: .5s }
@keyframes ray { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.loader-word { font: 700 2.6rem/1 var(--display); }
.loader-word em { font: 400 1.6rem var(--script); color: var(--lime); }

/* ---------- Barra ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--forest); color: #fff; transition: box-shadow .3s; }
body.scrolled .topbar { box-shadow: 0 6px 24px rgba(7, 82, 52, .25); }
.brand { display: flex; align-items: flex-end; gap: 2px; text-decoration: none; margin-right: auto; }
.brand-rays { width: 34px; color: var(--lime); margin-bottom: 14px; margin-right: -32px; transform: translateX(28px); }
.brand-word { font: 700 1.45rem/1 var(--display); }
.brand-word small { font: 400 1.05rem var(--script); color: var(--lime); }
.top-links { display: none; gap: 28px; font: 600 .95rem var(--display); letter-spacing: .04em; text-transform: uppercase; }
.top-links a { text-decoration: none; opacity: .9; }
.top-links a:hover { color: var(--lime); }

.zig-btn {
  --z: 5px;
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--lime); color: var(--forest); font: 700 .85rem var(--display); letter-spacing: .05em; text-transform: uppercase;
  padding: 12px 16px;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) 51% repeat-x;
          mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) 51% repeat-x;
  transition: transform .2s;
}
.zig-btn:hover { transform: rotate(-2deg) scale(1.04); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--forest); color: #fff; font-size: .78rem; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 6px; padding: 14px 22px; cursor: pointer; text-decoration: none; font: 700 .9rem var(--display); letter-spacing: .06em; text-transform: uppercase; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-green { background: var(--forest); color: #fff; }
.btn-green:hover { background: var(--green); }
.btn-lime { background: var(--lime); color: var(--forest); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Portada ---------- */
.hero { position: relative; min-height: min(86svh, 760px); display: flex; align-items: flex-end; overflow: hidden; background: var(--forest); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.08); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,82,52,.1) 20%, rgba(7,40,26,.82) 100%); }
.hero-copy { position: relative; padding: 0 16px 76px; max-width: 1180px; width: 100%; margin: 0 auto; color: #fff; }
.hero-place { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); font-weight: 700; font-size: .85rem; }
.hero h1 { font-size: clamp(2.7rem, 11vw, 6.2rem); color: #fff; -webkit-text-stroke: 0; text-shadow: 0 4px 0 var(--forest), 0 10px 30px rgba(0,0,0,.25); }
.hero h1 .script { font-size: 1.15em; color: var(--lime); margin: 0 .05em; text-shadow: 0 3px 0 var(--forest); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-edge { position: absolute; bottom: -1px; left: 0; width: 100%; height: 40px; fill: var(--paper); }

/* ---------- Estampillas (firma) ---------- */
.stamp {
  position: relative; margin: 0; padding: 12px;
  background: radial-gradient(circle, transparent 5px, #fff 5.5px) -8px -8px / 16px 16px;
  filter: drop-shadow(0 10px 18px rgba(24,59,42,.18));
}
.stamp img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Nosotros ---------- */
.about { display: grid; gap: 40px; padding: 56px 16px 40px; max-width: 1180px; margin: 0 auto; }
.kicker { margin: 0 0 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.about h2, .menu-head h2, .posters h2 { font-size: clamp(2.2rem, 8vw, 3.8rem); color: var(--forest); }
.about h2 .script, .menu-head h2 .script, .posters h2 .script { color: var(--green); font-size: 1.15em; }
.about-copy p { max-width: 46ch; color: var(--muted); font-size: 1.05rem; margin: 18px 0 24px; }
.about-stamps { position: relative; height: 380px; }
.about-stamps .stamp { position: absolute; width: 52%; aspect-ratio: 4/5; transition: transform .4s; }
.about-stamps .stamp:hover { transform: rotate(0) scale(1.04); z-index: 3; }
.s1 { left: 0; top: 20px; transform: rotate(-6deg); }
.s2 { right: 0; top: 0; transform: rotate(5deg); z-index: 2; }
.s3 { left: 26%; bottom: -10px; width: 44% !important; transform: rotate(-2deg); z-index: 1; }
.doodle { position: absolute; fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.leaf { width: 78px; right: 4%; bottom: 6px; z-index: 4; }

/* ---------- Menú ---------- */
.menu-wrap { padding: 32px 0 40px; }
.menu-head { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.menu-head > p { color: var(--muted); margin: 10px 0 16px; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 99px; padding: 0 16px; max-width: 460px; }
.search:focus-within { border-color: var(--green); }
.search svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.search input { border: 0; outline: 0; background: none; padding: 13px 0; width: 100%; font-size: 16px; }

.chips { position: sticky; top: 62px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 16px; margin-top: 18px; background: rgba(238,245,223,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; text-decoration: none; padding: 8px 15px; border-radius: 99px; border: 2px solid var(--forest); color: var(--forest); font: 600 .92rem var(--display); transition: background .2s, color .2s; }
.chips a.on, .chips a:hover { background: var(--forest); color: #fff; }

.menu-layout { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.cat { padding-top: 30px; }
.cat-title { display: flex; align-items: baseline; gap: 10px; font-size: 1.9rem; color: var(--forest); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 3px dotted var(--lime); }
.cat-title span { font: 700 .8rem var(--body); color: #fff; background: var(--green); border-radius: 99px; padding: 2px 9px; }
.grid { display: grid; gap: 14px; }

.item { position: relative; display: grid; grid-template-columns: 104px 1fr 48px; gap: 14px; align-items: center; background: var(--cream); border-radius: var(--r); padding: 12px; border: 2px solid transparent; transition: border-color .25s, box-shadow .25s; }
.item.in { border-color: var(--lime); box-shadow: 0 8px 22px rgba(167,197,33,.22); }
.item.pop .stamp.mini { animation: hop .4s ease; }
@keyframes hop { 40% { transform: rotate(0) scale(1.08); } }
.stamp.mini { padding: 8px; aspect-ratio: 1; background-size: 12px 12px; background-position: -6px -6px; background-image: radial-gradient(circle, transparent 3.5px, #fff 4px); transform: rotate(-3deg); }
.item:nth-child(even) .stamp.mini { transform: rotate(3deg); }
.tag { display: inline-block; font: 700 .7rem var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.item h4 { font-size: 1.15rem; margin: 2px 0 4px; color: var(--ink); }
.item p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price { display: block; margin-top: 6px; font: 700 1.3rem var(--display); color: var(--green); }
.add { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--forest); background: #fff; color: var(--forest); cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .2s, color .2s, transform .15s; }
.add svg { width: 22px; height: 22px; }
.add:active { transform: scale(.88); }
.item.in .add { background: var(--lime); border-color: var(--lime); color: var(--forest); }
.add-count { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--forest); color: #fff; font: 700 .75rem/22px var(--body); text-align: center; border: 2px solid var(--cream); }
.empty { color: var(--muted); padding: 20px 0; }

/* ---------- Barra de abajo (Mi pedido + apartados) ---------- */
.dock { position: fixed; z-index: 40; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 20px), 520px); display: flex; align-items: stretch; gap: 6px; padding: 6px; border-radius: 22px; background: var(--forest); box-shadow: 0 14px 34px rgba(7,40,26,.38); }
.dock svg { width: 22px; height: 22px; }
.dock-cart {
  --z: 4px;
  position: relative; flex: none; width: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; cursor: pointer; background: var(--lime); color: var(--forest); font: 700 .74rem var(--display); letter-spacing: .03em; text-transform: uppercase; border-radius: 16px; padding: 8px 4px;
}
.dock-cart.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.12) rotate(-3deg); } }
.dock-count { position: absolute; top: -8px; left: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 700 .78rem/24px var(--body); text-align: center; border: 2px solid var(--forest); }
.dock-links { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.dock-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 7px 2px; border-radius: 14px; text-decoration: none; color: rgba(255,255,255,.78); font: 600 .7rem var(--display); letter-spacing: .03em; text-transform: uppercase; transition: background .2s, color .2s; }
.dock-links a.on { background: rgba(167,197,33,.18); color: var(--lime); }

.toast { position: fixed; z-index: 45; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 84px); transform: translate(-50%, 20px); max-width: calc(100% - 32px); margin: 0; padding: 12px 18px; border-radius: 99px; background: #fff; color: var(--forest); font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 10px 26px rgba(7,40,26,.22); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hoja de Mi pedido ---------- */
.sheet { width: 100%; max-width: 560px; max-height: 92svh; margin: auto auto 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: var(--paper); color: var(--ink); overflow: hidden; }
.sheet[open] { display: flex; animation: up .35s cubic-bezier(.2,.9,.3,1); }
.sheet::backdrop { background: rgba(7,40,26,.55); backdrop-filter: blur(2px); }
@keyframes up { from { transform: translateY(100%); } }
.sheet-form { display: flex; flex-direction: column; width: 100%; max-height: 92svh; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 18px 14px; border-bottom: 1px solid var(--line); }
.sheet-kicker { margin: 0; font: 400 1.35rem/1 var(--script); color: var(--green); }
.sheet-title { font-size: 2rem; color: var(--forest); }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 2px solid var(--forest); background: #fff; color: var(--forest); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 6px 18px 12px; overscroll-behavior: contain; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-row img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.cart-info strong { display: block; font-size: .95rem; line-height: 1.25; }
.cart-info small { color: var(--muted); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty .icon-btn { width: 34px; height: 34px; }
.qty .icon-btn:last-child { background: var(--forest); color: #fff; }
.qty output { min-width: 18px; text-align: center; font-weight: 700; }
.cart-empty { color: var(--muted); padding: 18px 0; margin: 0; }
.cart-fields { padding-top: 8px; }
.field { display: block; border: 0; margin: 0 0 14px; padding: 0; }
.field-label { display: block; margin-bottom: 6px; font: 700 .78rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--forest); }
.field-label small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.field input, .field textarea { display: block; width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--green); }
.field-hint { display: block; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.field-error { display: block; color: var(--red); font-weight: 700; font-size: .84rem; margin-top: 4px; }
.field-error:empty { display: none; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; padding: 11px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; transition: all .2s; }
.opt input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--lime); }
.sheet-foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--cream); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 12px; font: 700 .85rem var(--body); letter-spacing: .1em; text-transform: uppercase; }
.cart-total strong { font: 700 1.9rem var(--display); letter-spacing: 0; color: var(--green); }
.send-btn { gap: 10px; padding: 16px; }
.send-btn svg { width: 20px; height: 20px; }
.cart-legal { margin: 10px 0 0; text-align: center; font-size: .78rem; color: var(--muted); }

/* ---------- Carteles ---------- */
.posters { max-width: 1180px; margin: 0 auto; padding: 40px 16px 64px; }
.poster-row { display: flex; gap: 22px; overflow-x: auto; padding: 26px 6px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.poster { flex: 0 0 82%; scroll-snap-align: center; aspect-ratio: 16/9; }
.poster:nth-child(1) { transform: rotate(-2deg); }
.poster:nth-child(2) { transform: rotate(1.5deg); }
.poster:nth-child(3) { transform: rotate(-1deg); }
.poster img { object-fit: contain; background: #fff; }

/* ---------- Franja ---------- */
.band { background: var(--forest); color: #fff; padding: 56px 16px 64px; text-align: center; position: relative; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 22px; background: radial-gradient(circle at 12px 0, transparent 12px, var(--forest) 12.5px) 0 0 / 24px 22px repeat-x; transform: rotate(180deg); }
.band-big { font: 700 clamp(2rem, 8vw, 4rem)/1.05 var(--display); margin: 0 0 34px; }
.band-big .script { font-size: 1.15em; }
.band-grid { display: grid; gap: 12px; max-width: 1000px; margin: 0 auto; }
.band-grid a { display: block; text-decoration: none; padding: 16px; border: 2px dashed rgba(167,197,33,.6); border-radius: 14px; font: 600 1.1rem var(--display); transition: background .2s; }
.band-grid a:hover { background: rgba(167,197,33,.15); }
.band-grid small { display: block; font: 700 .72rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); margin-bottom: 2px; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 16px 16px 110px; background: var(--lime); color: var(--forest); font-size: .85rem; font-weight: 700; }

/* ---------- Escritorio ---------- */
@media (min-width: 700px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .band-grid { grid-template-columns: repeat(4, 1fr); }
  .poster { flex-basis: 46%; }
}
@media (min-width: 1024px) {
  .topbar { padding: 12px 32px; }
  .top-links { display: flex; }
  .chips { top: 66px; justify-content: center; }
  .hero-copy { padding-bottom: 110px; }
  .about { grid-template-columns: 1fr 1.1fr; align-items: center; padding-top: 90px; }
  .about-stamps { height: 520px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .item { grid-template-columns: 1fr 48px; align-items: end; }
  .item .stamp.mini { grid-column: 1 / -1; aspect-ratio: 4/3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
