/* La 3ra · Tortas ahogadas — estilos */
:root {
  --yellow: #FFD417;
  --yellow-soft: #FFE873;
  --cream: #FFF7DA;
  --red: #D8202B;
  --red-dark: #A9151E;
  --ink: #2B0D0B;
  --white: #fff;
  --wa: #25D366;
  --radius: 18px;
  --shadow: 5px 5px 0 var(--ink);
  --font-display: 'Lilita One', Impact, 'Arial Black', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 72px);
}
html.modal-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 400; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .02em; line-height: 1.1;
  padding: 12px 20px; border-radius: 999px;
  border: 3px solid var(--ink); background: var(--yellow); color: var(--ink);
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-white { background: #fff; }
.btn-wa { background: var(--wa); }
.btn-sm { padding: 8px 14px; font-size: .95rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }

.link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 800;
  text-decoration: underline; cursor: pointer; color: var(--red-dark);
}

.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink);
  font: 800 .8rem/18px var(--font-body); text-align: center;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--yellow); border-bottom: 4px solid var(--ink);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 78px; height: 52px; flex: none; }
.brand-text { font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.brand-text small {
  display: block; margin-top: 3px;
  font-family: var(--font-body); font-weight: 800; font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; opacity: .75;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav .link { font-weight: 800; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.nav .link:hover { background: rgba(43, 13, 11, .1); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--yellow);
  background-image: radial-gradient(rgba(43, 13, 11, .09) 2px, transparent 2.5px);
  background-size: 22px 22px;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
  gap: 24px; padding: 48px 0 84px;
}
.eyebrow {
  display: inline-block; transform: rotate(-2deg);
  background: var(--ink); color: var(--yellow);
  font-weight: 900; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 6.4rem); line-height: .92;
  margin: 18px 0 16px; color: var(--red);
  text-shadow:
    -3px -3px 0 #fff, 3px -3px 0 #fff, -3px 3px 0 #fff, 3px 3px 0 #fff,
    0 -3px 0 #fff, 0 3px 0 #fff, -3px 0 0 #fff, 3px 0 0 #fff;
  filter: drop-shadow(4px 5px 0 var(--ink));
}
.lead { font-size: 1.2rem; font-weight: 700; max-width: 36ch; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0 0; }
.tags li {
  background: #fff; border: 2px solid var(--ink); border-radius: 999px;
  padding: 3px 12px; font-weight: 800; font-size: .85rem;
}
.tags li:nth-child(odd) { transform: rotate(-2deg); }
.tags li:nth-child(even) { transform: rotate(2deg); }

.hero-art svg {
  width: 100%; height: auto; overflow: visible;
  filter: drop-shadow(8px 10px 0 rgba(43, 13, 11, .85));
  transform: rotate(-3deg);
  animation: bob 4.5s ease-in-out infinite;
}
@keyframes bob { 50% { transform: rotate(-1deg) translateY(-8px); } }

.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 40px; fill: var(--cream); }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--red); color: var(--yellow);
  border-block: 4px solid var(--ink);
  overflow: hidden; white-space: nowrap;
}
.marquee-track {
  display: inline-flex; padding: 12px 0;
  font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .05em;
  animation: scroll 32s linear infinite;
}
.marquee-track span { padding-right: 36px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1; margin: 0 0 6px; }
.section-note { margin: 0 0 24px; font-weight: 700; opacity: .85; }

/* ---------- Navegación de categorías ---------- */
.cat-nav {
  position: sticky; top: var(--header-h); z-index: 30;
  background: var(--cream); border-block: 3px solid var(--ink);
}
.cat-scroll {
  position: relative; display: flex; gap: 10px; overflow-x: auto;
  padding: 12px 0; scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.pill {
  flex: none; padding: 8px 16px; border-radius: 999px;
  border: 3px solid var(--ink); background: #fff;
  font-weight: 800; text-decoration: none; white-space: nowrap;
}
.pill:hover { background: var(--yellow-soft); }
.pill[aria-current="true"] { background: var(--red); color: #fff; }

/* ---------- Menú ---------- */
.cat-block { padding-top: 40px; }
.cat-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1; margin: 0;
}
.cat-emoji { font-size: 1.1em; }
.cat-note { margin: 6px 0 22px; font-weight: 700; opacity: .8; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px 22px; }

.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card.featured { background: #FFFBE8; }
.card.featured::before {
  content: '★ De la casa';
  position: absolute; top: -15px; left: 14px;
  background: var(--red); color: #fff;
  font-weight: 900; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border: 3px solid var(--ink); border-radius: 999px;
}
.card.has-photo { padding-top: 0; }
.card-photo {
  margin: -18px -18px 0; border-bottom: 3px solid var(--ink);
  border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0;
  overflow: hidden; aspect-ratio: 4 / 3; background: var(--yellow-soft);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.has-photo .card-head { padding-top: 14px; }
.card.featured.has-photo::before { top: 6px; left: 6px; z-index: 1; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card h4 { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; margin: 0; }
.card p { margin: 0; font-size: .95rem; opacity: .85; }
.price {
  flex: none; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 12px;
  padding: 2px 10px; transform: rotate(3deg);
}
.add-btn { margin-top: auto; width: 100%; }

.opt-group { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.opt-label { padding: 0; margin-bottom: 6px; font-weight: 900; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 6px 12px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  font-weight: 800; font-size: .9rem;
}
.chip input:checked + span { background: var(--ink); color: var(--yellow); }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }

.loading, .error-box { padding: 40px 0; font-weight: 800; text-align: center; }

/* ---------- Cómo pedir ---------- */
.how { background: var(--ink); color: var(--cream); }
.how .section-title { margin-bottom: 26px; color: var(--yellow); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--cream); border-radius: var(--radius); padding: 22px;
}
.step-num { display: block; font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: var(--red); }
.step-card h3 { font-family: var(--font-display); font-size: 1.6rem; margin: 6px 0; }
.step-card p { margin: 0; font-weight: 700; }

/* ---------- Visítanos ---------- */
.visit-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.info { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; }
.info li { display: flex; gap: 14px; align-items: flex-start; }
.info li > span { font-size: 1.6rem; line-height: 1.2; }
.info a { font-weight: 800; }
.sticker {
  display: grid; place-items: center; gap: 10px; text-align: center;
  background: var(--red); color: var(--yellow);
  border: 4px solid var(--ink); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink);
  padding: 44px 24px; transform: rotate(2deg);
}

.qr-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.qr-box {
  display: grid; place-items: center; gap: 12px;
  background: #fff; border: 4px solid var(--ink); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink);
  padding: 28px;
}
.qr-box img { width: 100%; max-width: 280px; height: auto; border-radius: 10px; }
.qr-url { font-family: var(--font-display); font-size: 1.1rem; margin: 0; }
.sticker-big { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.sticker-emoji { font-size: 2.6rem; letter-spacing: .1em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--red); color: #fff; border-top: 4px solid var(--ink); padding: 28px 0; }
.footer-inner { display: grid; justify-items: center; gap: 6px; text-align: center; }
.footer-logo { width: 96px; height: 64px; }
.site-footer p { margin: 0; font-weight: 700; font-size: .9rem; }
.site-footer .credit { opacity: .8; font-weight: 400; }

/* ---------- Dock móvil ---------- */
.dock { display: none; }

/* ---------- Carrito ---------- */
dialog.cart {
  margin: 0 0 0 auto; padding: 0;
  width: min(440px, 100%); max-width: 100%;
  height: 100dvh; max-height: 100dvh;
  border: 0; border-left: 4px solid var(--ink);
  background: var(--cream); color: var(--ink);
}
dialog.cart::backdrop { background: rgba(43, 13, 11, .6); }
.cart-inner { display: flex; flex-direction: column; height: 100%; }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--yellow); border-bottom: 4px solid var(--ink); padding: 14px 16px;
}
.cart-head h2 { font-family: var(--font-display); font-size: 1.7rem; margin: 0; }
.cart-body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-foot { background: var(--yellow-soft); border-top: 4px solid var(--ink); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; }

.empty { text-align: center; padding: 36px 8px; }
.empty p { margin: 4px 0; }
.empty-emoji { font-size: 3rem; }
.muted { opacity: .7; font-size: .9rem; }

.cart-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.cart-line {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 12px;
}
.cart-line-info { display: grid; gap: 2px; align-content: start; }
.cart-line-info .muted { display: block; }
.cart-line-side { display: grid; justify-items: end; align-content: space-between; gap: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.step {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--ink); background: var(--yellow);
  font: 900 1.1rem/1 var(--font-body); color: var(--ink);
}
.qty { min-width: 1.4em; text-align: center; font-weight: 900; }

.field { display: grid; gap: 6px; margin-top: 14px; font-weight: 800; }
.field input, .field textarea {
  width: 100%; font: 600 1rem var(--font-body); color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px;
}
.field textarea { resize: vertical; }
.fine { font-size: .85rem; opacity: .8; margin: 8px 0 0; }
.error { margin: 10px 0 0; min-height: 1.2em; font-weight: 800; color: var(--red-dark); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; max-width: calc(100% - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--yellow);
  border-radius: 999px; padding: 10px 18px; font-weight: 800; text-align: center;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
  .qr-grid { grid-template-columns: 1fr; text-align: center; }
  .qr-box { justify-self: center; }
}

@media (max-width: 760px) {
  .nav .link, .nav .cart-btn { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-art { order: -1; max-width: 300px; margin-inline: auto; }
  .brand-text { font-size: 1.15rem; }

  body { padding-bottom: 84px; }
  .dock {
    display: grid; grid-template-columns: 1fr 1.1fr 1.2fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--yellow); border-top: 4px solid var(--ink);
  }
  .toast { bottom: 100px; }
  dialog.cart { border-left: 0; }
}

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