/* Base layout + ordering UI. Each theme sets the variables in theme.css */
:root {
  --bg: #fff; --surface: #fff; --ink: #222; --muted: #666; --line: rgba(0,0,0,.1);
  --accent: #b3122e; --accent-ink: #fff; --gold: #c9a24a; --wa: #1fa855;
  --radius: 16px; --shadow: 0 10px 30px rgba(0,0,0,.12);
  --font-head: Georgia, serif; --font-body: system-ui, sans-serif;
  --drawer-bg: var(--surface); --snow: rgba(255,255,255,.85);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* nav */
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; border-radius: 2px; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 1rem 1.25rem 1.5rem; gap: .25rem !important; background: var(--surface); box-shadow: var(--shadow); display: none !important; }
  .nav-links.is-open { display: flex !important; }
  .nav-links a { padding: .6rem 0; }
}

/* menu */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 2rem; }
.filter { border: 1px solid var(--line); background: transparent; padding: .5rem 1.1rem; border-radius: 999px; cursor: pointer; font-size: .92rem; transition: .2s; }
.filter:hover { border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; position: relative; }
.card[hidden] { display: none; }
.card-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-badge { position: absolute; top: .75rem; left: .75rem; background: var(--accent); color: var(--accent-ink); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; font-weight: 600; }
.card-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card-title { font-size: 1.25rem; margin: .25rem 0 .4rem; }
.card-desc { font-size: .92rem; color: var(--muted); flex: 1; }
.card-price { font-weight: 600; margin-bottom: .75rem; font-size: .95rem; }
.card-actions { display: flex; gap: .5rem; }
.card-size { flex: 1; min-width: 0; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: transparent; }
.card-size option { color: #222; background: #fff; }
.btn-add { border: 0; background: var(--accent); color: var(--accent-ink); padding: .55rem 1rem; border-radius: 10px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: .2s; }
.btn-add:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-add.is-added { background: var(--wa); color: #fff; }
.card-ask { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; font-size: .85rem; color: var(--muted); text-decoration: none; }
.card-ask:hover { color: var(--wa); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 600; border: 0; cursor: pointer; transition: .25s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-ghost { border: 1px solid currentColor; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* floating cart */
.cart-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; display: flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: pointer; font-weight: 600; }
.cart-count { background: var(--accent-ink); color: var(--accent); min-width: 1.5rem; height: 1.5rem; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; padding: 0 .35rem; }
.cart-fab.has-items { animation: pop .4s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }
@media (max-width: 520px) { .cart-fab-label { display: none; } }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10,5,5,.5); z-index: 70; backdrop-filter: blur(3px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--drawer-bg); color: var(--ink); z-index: 80; transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.25); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.5rem; }
.drawer-close { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; }
.drawer-scroll { overflow-y: auto; padding: 1rem 1.4rem 2rem; flex: 1; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.cart-lines img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.line-info { display: flex; flex-direction: column; font-size: .9rem; line-height: 1.3; }
.line-info span { color: var(--muted); font-size: .82rem; }
.qty { display: flex; align-items: center; gap: .4rem; }
.qty button, .line-del { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; line-height: 1; }
.line-del { border: 0; font-size: 1.2rem; color: var(--muted); }
.cart-empty { color: var(--muted); font-style: italic; padding: 1rem 0; }
.cart-total { font-weight: 700; padding: .8rem 0 0; }
.order-form { margin-top: 1.4rem; display: grid; gap: .85rem; }
.order-form h3 { margin: 0; font-size: 1.15rem; }
.order-form label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; }
.order-form small { font-weight: 400; color: var(--muted); }
.order-form input, .order-form textarea { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.06); font-weight: 400; }
.order-form input::placeholder, .order-form textarea::placeholder { color: var(--muted); opacity: .7; }
.order-form [hidden] { display: none; }
.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.seg legend { font-size: .88rem; font-weight: 600; margin-bottom: .3rem; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; width: 0; }
.seg span { display: block; text-align: center; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-wa { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; padding: .95rem; border: 0; border-radius: 12px; background: var(--wa); color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; margin-top: .3rem; }
.btn-wa:hover { filter: brightness(1.07); }
.form-error { color: #d0342c; background: rgba(208,52,44,.08); padding: .5rem .75rem; border-radius: 8px; margin: 0; font-size: .88rem; }
.form-hint { font-size: .8rem; color: var(--muted); margin: 0; text-align: center; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 250%); visibility: hidden; background: #1d1d1d; color: #fff; padding: .7rem 1.2rem; border-radius: 999px; z-index: 90; font-size: .9rem; transition: transform .3s, visibility .3s; pointer-events: none; max-width: calc(100% - 2rem); }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

/* snow + reveal */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } * { transition: none !important; animation: none !important; } }

/* map */
.map-embed { width: 100%; border: 0; aspect-ratio: 16/10; border-radius: var(--radius); }
.wa-fallback { display: block; text-align: center; font-weight: 600; color: var(--wa); padding: .6rem; border: 1px dashed var(--wa); border-radius: 10px; text-decoration: none; }

/* brand logo */
.brand-img { height: 56px; width: auto; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.footer-logo { display: block; width: 150px; height: auto; margin: 0 auto 1rem; }
@media (max-width: 520px) { .brand-img { height: 46px; } }
