/* Carta pública — los colores vienen del tema de cada restaurante (variables CSS) */
:root {
  --bg: #0e0c0a; --surface: #1c1814; --text: #ece4d6; --muted: #9d9282; --accent: #b8975a;
  --line: color-mix(in srgb, var(--text) 13%, transparent);
  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 300 15px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.wrap { width: min(720px, 92%); margin-inline: auto; }
.hidden { display: none !important; }

/* Selector inicial de idioma */
.gate {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; text-align: center; animation: fade .4s ease;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg) 65%);
}
@keyframes fade { from { opacity: 0; } }
.gate-logo { width: 130px; height: 130px; object-fit: contain; border-radius: 50%; box-shadow: 0 0 0 1px var(--accent), 0 20px 40px rgba(0,0,0,.45); margin-bottom: 1.2rem; }
.gate-name { font: 500 2rem var(--font-title); margin-bottom: 1.8rem; }
.gate-langs { display: grid; gap: .6rem; width: min(320px, 100%); }
.gate-langs button {
  display: flex; align-items: center; gap: 1rem; padding: .95rem 1.2rem; background: color-mix(in srgb, var(--text) 3%, transparent);
  border: 1px solid var(--line); color: var(--text); font: 400 1.05rem var(--font-body); cursor: pointer; text-align: left; transition: .2s;
}
.gate-langs button:hover, .gate-langs button:focus-visible { border-color: var(--accent); outline: none; }
.gate-langs .fi { font-size: 1.4rem; border-radius: 2px; }
.gate-langs small { margin-left: auto; color: var(--muted); font-size: .7rem; letter-spacing: .15em; }

/* Cabecera */
.head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: .8rem; }
.head-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; box-shadow: 0 0 0 1px var(--accent); }
.name { font: 600 1.25rem/1.1 var(--font-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: .7rem; color: var(--muted); letter-spacing: .06em; }
.lang-select { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .6rem; }
.lang-select .fi { border-radius: 2px; }
.lang-select select { background: transparent; color: var(--text); border: 0; font: 400 .8rem var(--font-body); cursor: pointer; }
.lang-select select option { background: var(--surface); }
.search { width: 100%; margin: .8rem 0 .6rem; padding: .65rem .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 300 .95rem var(--font-body); border-radius: 2px; }
.search:focus { outline: none; border-color: var(--accent); }
.search::placeholder { color: var(--muted); }
.tabs { display: flex; gap: 1.3rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; background: none; border: 0; border-bottom: 1px solid transparent; color: var(--muted); cursor: pointer;
  padding: .45rem 0 .75rem; font: 400 .7rem var(--font-body); letter-spacing: .15em; text-transform: uppercase; white-space: nowrap;
}
.tabs button.on { color: var(--accent); border-color: var(--accent); }

/* Filtros */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; padding: 1.1rem 0 .2rem; }
.chip { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: .3rem .8rem; font: 400 .74rem var(--font-body); cursor: pointer; }
.chip.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Platos */
.sec { padding: 1.5rem 0 .4rem; }
.sec h2 { font: italic 500 1.8rem var(--font-title); color: var(--accent); margin-bottom: .3rem; }
.dish { display: flex; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.dish-img { width: 84px; height: 84px; object-fit: cover; flex: none; border-radius: 2px; }
.dish-body { flex: 1; min-width: 0; }
.dish-top { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.dish h3 { font: 600 1.25rem/1.25 var(--font-title); }
.price { font: 500 1.2rem var(--font-title); color: var(--accent); white-space: nowrap; }
.dish p { color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .45rem; }
.tag { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .5rem; color: var(--muted); }
.tag.vegan, .tag.veg { color: #9fb38a; border-color: rgba(159,179,138,.35); }
.tag.gf { color: #cdb27e; border-color: rgba(205,178,126,.35); }
.tag.spicy { color: #c98a74; border-color: rgba(201,138,116,.35); }
.tag.star { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tag.new { border-color: var(--accent); color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 3rem 0; }
.loading { height: 3px; width: 40%; margin: 3rem auto; background: var(--accent); animation: load 1s ease-in-out infinite alternate; }
@keyframes load { to { width: 70%; opacity: .4; } }
.foot { text-align: center; color: var(--muted); font-size: .76rem; padding: 2.5rem 0 4rem; }
.foot p + p { margin-top: .4rem; }

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

/* Cabecera: acciones */
.head-actions { display: flex; align-items: center; gap: .5rem; }
.agenda-link { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .4rem .3rem .75rem; font-size: .75rem; }
.agenda-link b { background: var(--accent); color: var(--bg); border-radius: 999px; min-width: 1.4rem; height: 1.4rem; display: grid; place-items: center; font-size: .68rem; }

/* Promociones y menús del día */
.specials h2 { font-style: normal; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.special-grid { display: grid; gap: .8rem; }
.special { display: flex; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); overflow: hidden; border-radius: 3px; }
.special img { width: 34%; max-width: 160px; object-fit: cover; flex: none; }
.special-body { padding: 1rem 1.1rem; flex: 1; min-width: 0; }
.special-top { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.special-when { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.special-when .live { color: #d0644a; margin-right: .5rem; font-weight: 600; }
.special-price { font: 600 1.35rem var(--font-title); color: var(--accent); white-space: nowrap; }
.special h3 { font: 600 1.35rem/1.2 var(--font-title); margin: .15rem 0 .3rem; }
.special p { color: var(--muted); font-size: .86rem; }
.special.daily { border-left: 3px solid var(--accent); }
.specials.later .special { opacity: .82; border-color: var(--line); }
.specials.later .special h3 { font-size: 1.15rem; }
.foot .credits a { color: var(--muted); font-size: .7rem; }
/* Platos con foto: imagen a la derecha, más grande */
.dish { align-items: flex-start; }
.dish-img { order: 2; width: 96px; height: 96px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.special img { max-width: 140px; }
@media (min-width: 640px) { .dish-img { width: 112px; height: 112px; } }

/* ---------- Portada ---------- */
.hero { margin-top: 1rem; min-height: 170px; border-radius: 10px; background: center/cover no-repeat var(--surface); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.05) 70%); }
.hero-in { position: relative; padding: 1rem 1.1rem; color: #fff; width: 100%; }
.hero-tag { font: italic 500 1.35rem/1.25 var(--font-title); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero-links { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.hero-links a { color: #fff; text-decoration: none; font-size: .72rem; padding: .28rem .7rem; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); }
@media (min-width: 640px) { .hero { min-height: 230px; } }

/* ---------- Recomendados ---------- */
.recs h2 { font-style: normal; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.rec-row { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; margin-inline: -4%; padding-inline: 4%; scrollbar-width: none; }
.rec-row::-webkit-scrollbar { display: none; }
.rec { position: relative; flex: none; width: 168px; scroll-snap-align: start; background: var(--surface); border-radius: 10px; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.rec img { width: 100%; height: 120px; object-fit: cover; display: block; }
.rec-body { padding: .6rem .7rem .75rem; }
.rec h3 { font: 600 1.02rem/1.2 var(--font-title); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.rec .price { font-size: 1rem; }
.rec .add { position: absolute; top: 88px; right: .5rem; }

/* ---------- Platos: pie con etiquetas y botón + ---------- */
.dish { cursor: pointer; }
.dish:focus-visible, .rec:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dish-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; }
.add { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 2.1rem; height: 2.1rem; padding: 0 .55rem; margin-top: .45rem; border-radius: 999px; border: 1px solid var(--accent); background: var(--bg); color: var(--accent); font: 500 1.15rem/1 var(--font-body); cursor: pointer; transition: transform .15s; }
.add:active { transform: scale(.92); }
.add.on { background: var(--accent); color: var(--bg); font-size: .95rem; }
.add.on b { font-size: .8rem; }

/* ---------- Barra «Mi pedido» ---------- */
.order-bar { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: min(440px, 92%); display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--bg); font: 500 .95rem var(--font-body); cursor: pointer; box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: up .25s ease; }
.order-bar b { margin-left: auto; font-weight: 600; }
.ob-count { background: var(--bg); color: var(--accent); border-radius: 999px; min-width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: .8rem; font-weight: 600; }
@keyframes up { from { transform: translate(-50%, 120%); } }
body:has(.order-bar:not(.hidden)) .foot { padding-bottom: 7rem; }

/* ---------- Hoja inferior ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { position: relative; width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: var(--bg); color: var(--text); border-radius: 18px 18px 0 0; padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); animation: sheet .28s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px rgba(0,0,0,.4); }
@keyframes sheet { from { transform: translateY(100%); } }
@media (min-width: 640px) { .sheet-bg { align-items: center; } .sheet { border-radius: 16px; } }
.sheet-x { position: absolute; top: .7rem; right: .7rem; z-index: 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 1rem; cursor: pointer; }
.sheet-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.sheet-body { padding: 1.3rem 1.3rem .4rem; }
.sheet-body h3 { font: 600 1.6rem/1.2 var(--font-title); }
.sheet-body p { color: var(--muted); margin: .5rem 0 .6rem; }
.sheet-title { margin-bottom: 1rem; padding-right: 2.5rem; }
.btn-main { display: block; width: 100%; margin-top: 1.2rem; padding: .95rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--bg); font: 600 .95rem var(--font-body); cursor: pointer; }
.btn-main.wa { background: #25d366; color: #fff; }
.btn-link { display: block; margin: .9rem auto 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font: 400 .85rem var(--font-body); cursor: pointer; }
.muted-s { color: var(--muted); font-size: .85rem; margin-top: .8rem; }
.olist { border-top: 1px solid var(--line); }
.ol { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ol-name { font: 600 1.05rem/1.2 var(--font-title); }
.ol-name small { display: block; font: 300 .75rem var(--font-body); color: var(--muted); }
.ol-sum { font: 500 1rem var(--font-title); color: var(--accent); min-width: 4.5rem; text-align: right; }
.qty { display: flex; align-items: center; gap: .5rem; }
.qty button { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1rem; cursor: pointer; }
.ol-total { display: flex; justify-content: space-between; align-items: baseline; padding: .9rem 0 0; font-size: .85rem; color: var(--muted); }
.ol-total b { font: 600 1.5rem var(--font-title); color: var(--text); }
.ol-note { display: grid; gap: .3rem; font-size: .78rem; color: var(--muted); margin-top: 1rem; }
.ol-note textarea { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; font: 300 .9rem var(--font-body); resize: vertical; }

/* ---------- Avisos ---------- */
.ctoast { position: fixed; left: 50%; top: 1rem; transform: translate(-50%, -150%); z-index: 80; background: var(--text); color: var(--bg); padding: .55rem 1rem; border-radius: 999px; font-size: .82rem; transition: transform .25s; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctoast.show { transform: translate(-50%, 0); }
.foot .powered a { color: var(--muted); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; opacity: .7; }
.brand { flex: 1; }
.brand > div { min-width: 0; }
.head-actions { flex: none; }
.ctoast { transform: translate(-50%, calc(-100% - 2rem)); }
.sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-select select { width: 3.1rem; }
@media (max-width: 400px) { .lang-select .fi { display: none; } .agenda-link { padding-left: .6rem; } }
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: .4rem; }
.notfound h1 { font: 500 2rem var(--font-title); color: var(--accent); }
.notfound p { color: var(--muted); }
.nf-hint { font-size: .85rem; margin-top: 1rem; }

/* Portada tipo revista: nombre grande sobre la foto */
.hero { min-height: 240px; border-radius: 14px; }
.hero::before { background: linear-gradient(to top, rgba(0,0,0,.82) 5%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.05)); }
.hero-in { padding: 1.3rem 1.2rem 1.15rem; }
.hero-name { font: 600 clamp(2rem, 9vw, 2.9rem)/1.02 var(--font-title); letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0,0,0,.45); margin-bottom: .25rem; }
.hero-tag { font-size: 1.1rem; opacity: .92; }
.hero-name::after { content: ""; display: block; width: 42px; height: 2px; background: var(--accent); margin-top: .55rem; border-radius: 2px; }
@media (min-width: 640px) { .hero { min-height: 300px; } }
