.wrap { max-width: 720px; margin: 0 auto; }

/* Cabecera */
.hero { color: #fff; position: relative; overflow: hidden; }
.hero.has-cover { background: #0c0c10; }
.hero-slides { position: absolute; inset: 0; overflow: hidden; }
.slide {
  position: absolute; inset: 0; background: center 60% / cover no-repeat;
  opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 6s ease-out;
}
.slide.on { opacity: 1; transform: scale(1); }
.hero.has-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgb(0 0 0 / .45) 0%, rgb(0 0 0 / 0) 28%, rgb(0 0 0 / .25) 58%, var(--bg) 100%);
}
.hero.has-cover .hero-inner { min-height: min(58svh, 520px); padding-bottom: 22px; z-index: 2; }
.hero.has-cover h1 { color: #fff; }
.hero-inner {
  position: relative; max-width: 720px; margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 20px 34px;
  min-height: 260px; display: flex; flex-direction: column;
}
.hero-top { display: flex; justify-content: flex-end; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border-radius: 999px; background: rgb(20 20 28 / .35); color: #fff; font-weight: 600; font-size: .92rem;
  border: 1px solid rgb(255 255 255 / .28);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.pill .flag { font-size: 1.15rem; line-height: 1; }
.hero h1 {
  margin: auto 0 0; padding-top: 40px; font-size: clamp(3rem, 16vw, 5.2rem); line-height: .9;
  letter-spacing: -.045em; font-weight: 800; font-variation-settings: 'opsz' 96;
  text-wrap: balance; text-shadow: 0 2px 30px rgb(0 0 0 / .35);
}
.hero.has-cover p { color: color-mix(in srgb, var(--ink) 92%, transparent); text-shadow: 0 1px 14px rgb(0 0 0 / .3); }
.hero p { margin: 12px 0 0; font-size: 1.05rem; opacity: .92; max-width: 34ch; }
.table-badge {
  display: inline-flex; margin-top: 16px; align-self: flex-start; padding: 5px 12px; border-radius: 999px;
  background: var(--albero); color: #16182A; font-weight: 700; font-size: .9rem;
}
.skeleton-line { margin-top: auto; height: 48px; width: 70%; border-radius: 12px; background: rgb(255 255 255 / .2); }

/* Barra fija: buscador, alérgenos y categorías */
.toolbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.toolbar.stuck { border-bottom-color: var(--line); }
.toolbar-row { display: flex; gap: 8px; padding: 12px 16px 8px; max-width: 720px; margin: 0 auto; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px;
  background: var(--cal); border: 1px solid var(--line); border-radius: 14px;
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; }
.search svg { flex: none; color: var(--ink-3); }
.filter-btn {
  position: relative; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--cal);
  border: 1px solid var(--line); display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem;
}
.filter-btn.on { background: var(--ink); color: var(--cal); border-color: var(--ink); }
.filter-btn .count {
  min-width: 20px; height: 20px; border-radius: 10px; background: var(--albero); color: #16182A;
  font-size: .75rem; display: grid; place-items: center; padding: 0 5px;
}

main { padding: 0 16px calc(120px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }

.notice {
  margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--albero-soft);
  font-size: .92rem; display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.notice button { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Menú del día: bloque albero */
.daily {
  margin-top: 18px; padding: 20px; border-radius: var(--radius-m); color: var(--ink);
  display: flex; flex-direction: column; gap: 6px;
  background: color-mix(in srgb, var(--brand) 14%, var(--cal)); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.daily h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.1; }
.daily p { margin: 0; font-size: .95rem; max-width: 46ch; }
.daily .big-price { margin-top: 6px; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--brand); }
.daily p { color: var(--ink-2); }

/* Recomendados: carrusel de fotos grandes */
.featured { margin-top: 28px; }
.featured h2, .section h2 { font-size: 1.6rem; letter-spacing: -.025em; line-height: 1.1; margin: 0 0 14px; font-weight: 750; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto;
  margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none;
  scroll-padding-inline: 16px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 600px) { .rail { grid-auto-columns: 38%; } }
.feat {
  scroll-snap-align: start; text-align: left; border-radius: var(--radius-m); overflow: hidden;
  background: var(--cal); display: flex; flex-direction: column;
}
.feat .photo { aspect-ratio: 4 / 5; border-radius: 0; font-size: 4.5rem; }
.feat .meta { padding: 10px 12px 12px; }
.feat strong { display: block; font-size: 1.02rem; line-height: 1.2; }
.feat span { color: var(--ink-2); font-size: .9rem; }

/* Secciones y platos */
.section { padding-top: 34px; scroll-margin-top: 120px; }
.section h2 { display: flex; align-items: baseline; gap: 10px; }
.section h2 small { font-size: .9rem; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.list { background: var(--cal); border-radius: var(--radius-m); padding: 0 14px; }
.dish {
  display: grid; grid-template-columns: 1fr 104px; gap: 14px; padding: 16px 0; width: 100%; text-align: left;
  border-bottom: 1px solid var(--line); align-items: start;
}
.dish:last-child { border-bottom: 0; }
.dish h3 { margin: 0; font-size: 1.08rem; line-height: 1.22; letter-spacing: -.01em; font-weight: 650; }
.dish .desc {
  margin: 5px 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prices { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 9px; font-size: .95rem; }
.prices b { font-weight: 700; }
.prices span { color: var(--ink-3); font-size: .85rem; margin-right: 3px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; align-items: center; }
.allergen-dots { display: inline-flex; gap: 2px; font-size: .95rem; }
.tag {
  font-size: .78rem; font-weight: 650; padding: 2px 8px; border-radius: 999px;
  background: var(--tint); color: var(--brand);
}
.tag.vegan, .tag.veg { background: color-mix(in srgb, var(--hoja) 14%, var(--cal)); color: var(--hoja); }
.tag.chef { background: var(--albero-soft); color: #7A5600; }
:root[data-theme="dark"] .tag.chef { color: var(--albero); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.chef { color: var(--albero); } }

.thumb { position: relative; }
.photo {
  width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--tint);
  display: grid; place-items: center; font-size: 2.6rem;
}
/* Las fotos de comida suelen tener el plato en la mitad inferior: recortamos hacia ahí */
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; }
.add-btn {
  position: absolute; right: -6px; bottom: -6px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--cal); color: var(--brand); font-size: 1.5rem; font-weight: 500; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 3px 12px -3px rgb(0 0 0 / .35);
  border: 1px solid var(--line);
}
.add-btn .n {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center;
}
.empty { text-align: center; color: var(--ink-2); padding: 50px 20px; }

/* Pie: reseña e información */
.review {
  margin-top: 40px; padding: 22px; border-radius: var(--radius-m); color: #fff; position: relative; overflow: hidden;
}
.review h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.review p { margin: 6px 0 16px; opacity: .92; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px;
  border-radius: 14px; font-weight: 700; text-decoration: none; font-size: 1rem;
}
.btn.light { background: #fff; color: #16182A; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { background: var(--bg); color: var(--ink); }
.btn.block { width: 100%; }
.info-list { margin-top: 14px; background: var(--cal); border-radius: var(--radius-m); padding: 4px 16px; }
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; text-decoration: none; }
.info-row:last-child { border-bottom: 0; }
.info-row .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.info-row div { flex: 1; min-width: 0; }
.info-row small { display: block; color: var(--ink-3); font-size: .85rem; }
.info-row strong { font-weight: 600; overflow-wrap: anywhere; }
.info-row .act { font-weight: 700; color: var(--brand); font-size: .92rem; white-space: nowrap; }
.foot-note { text-align: center; color: var(--ink-3); font-size: .85rem; margin-top: 22px; }
.foot-note a { color: var(--ink-2); }

/* Barra flotante de la selección */
.order-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  width: min(560px, calc(100% - 28px)); height: 60px; border-radius: 20px; background: var(--ink); color: var(--cal);
  display: flex; align-items: center; gap: 12px; padding: 0 10px 0 18px; box-shadow: var(--shadow-float);
  animation: rise .3s cubic-bezier(.2,.9,.25,1);
}
.order-bar .qty { background: var(--albero); color: #16182A; border-radius: 10px; min-width: 30px; height: 30px; display: grid; place-items: center; font-weight: 800; }
.order-bar .lbl { flex: 1; min-width: 0; display: grid; text-align: left; font-weight: 750; line-height: 1.15; white-space: nowrap; }
.order-bar .lbl small { font-size: .75rem; font-weight: 600; opacity: .7; overflow: hidden; text-overflow: ellipsis; }
.order-bar .go { flex: none; background: var(--brand); color: #fff; height: 42px; padding: 0 14px; border-radius: 13px; font-weight: 700; white-space: nowrap; display: grid; place-items: center; }
@media (max-width: 380px) { .order-bar .go { font-size: .9rem; padding: 0 12px; } }

/* Detalle del plato */
.detail-photo { margin: -10px -20px 18px; aspect-ratio: 1; max-height: 56dvh; width: calc(100% + 40px); background: var(--tint); display: grid; place-items: center; font-size: 5rem; position: relative; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; }
.detail-photo .icon-btn { position: absolute; top: 14px; right: 14px; background: rgb(255 255 255 / .92); color: #16182A; }
.sheet:has(.detail-photo) .sheet-handle { display: none; }
.sheet:has(.detail-photo) { padding-top: 10px; }
.detail h2 { margin: 0; font-size: 1.75rem; letter-spacing: -.025em; line-height: 1.1; }
.detail .full-desc { color: var(--ink-2); margin: 10px 0 0; font-size: 1.02rem; }
.size-list { margin-top: 18px; display: grid; gap: 8px; }
.size {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--bg);
}
.size > div:first-child { flex: 1; }
.size .lbl { font-weight: 600; }
.size .amt { font-weight: 800; font-size: 1.1rem; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--cal); border-radius: 12px; padding: 3px; }
.stepper button { width: 38px; height: 38px; border-radius: 10px; font-size: 1.3rem; font-weight: 600; display: grid; place-items: center; }
.stepper button.plus { background: var(--brand); color: #fff; }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; }
.allergen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 10px; }
.allergen-item { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg); font-size: .92rem; font-weight: 550; }
.block-title { font-size: 1rem; margin: 24px 0 0; font-weight: 700; }
.muted { color: var(--ink-3); font-size: .88rem; margin: 10px 0 0; }

/* Idiomas */
.lang-list { display: grid; gap: 8px; }
.lang-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--bg); font-size: 1.08rem; font-weight: 600; text-align: left; }
.lang-opt .flag { font-size: 1.6rem; }
.lang-opt.sel { background: var(--brand); color: #fff; }
.lang-opt .tick { margin-left: auto; }

/* Filtro de alérgenos */
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.toggle-card {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg);
  font-weight: 600; text-align: left; border: 2px solid transparent; font-size: .95rem; line-height: 1.2;
}
.toggle-card .ico { font-size: 1.3rem; }
.toggle-card[aria-pressed="true"] { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--cal)); }
.toggle-card[aria-pressed="true"] .name { text-decoration: line-through; text-decoration-thickness: 2px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; position: sticky; bottom: -24px; background: var(--cal); padding: 12px 0 4px; }
.sheet-actions .btn { flex: 1; }

/* Selección / vista para el camarero */
.order-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-item div { flex: 1; min-width: 0; }
.order-item strong { display: block; line-height: 1.2; }
.order-item small { color: var(--ink-3); }
.order-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; padding: 16px 0 4px; }
.hint { background: var(--tint); border-radius: 14px; padding: 12px 14px; font-size: .95rem; margin-bottom: 8px; }
.waiter { background: #fff; color: #16182A; }
.waiter .sheet-handle { display: none; }
.waiter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.waiter-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0 18px; }
.waiter-row { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 2px dashed #D9DBE4; font-size: 1.4rem; line-height: 1.2; }
.waiter-row .q { font-weight: 800; min-width: 2.2ch; color: var(--brand); }
.waiter-row .n { flex: 1; font-weight: 650; }
.waiter-row .s { display: block; font-size: 1rem; color: #6A6D82; font-weight: 500; margin-top: 3px; }
.waiter-flag { font-size: 1rem; font-weight: 600; color: #6A6D82; }

/* Reservas */
.hero-cta {
  align-self: flex-start; margin-top: 18px; height: 48px; padding: 0 22px; border-radius: 14px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 70%, #000);
}
.bk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.bk-field { display: grid; gap: 6px; margin-top: 14px; min-width: 0; }
.bk-field > span { font-weight: 650; font-size: .92rem; }
.bk-input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 1rem; outline: 0;
}
.bk-input:focus { border-color: var(--brand); }
textarea.bk-input { resize: vertical; }
.bk-people { background: var(--bg); height: 48px; }
.bk-people button:disabled { opacity: .35; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.time-grid button { height: 44px; border-radius: 12px; background: var(--bg); font-weight: 650; border: 2px solid transparent; font-variant-numeric: tabular-nums; }
.time-grid button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bk-error { color: var(--danger); font-weight: 600; margin: 14px 0 0; }
.btn:disabled { opacity: .5; }
.booked { text-align: center; padding: 10px 0 18px; }
.booked-ico { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-size: 2rem; font-weight: 800; background: color-mix(in srgb, var(--hoja) 18%, var(--cal)); color: var(--hoja); }
.booked p { margin: 6px 0 0; }


/* Categorías: cuadrícula con foto + sección actual en la barra fija */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
@media (max-width: 599px) { .cat-tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat-tile {
  position: relative; height: 86px; border-radius: 14px; overflow: hidden; text-align: left;
  background: var(--tint) center 60% / cover no-repeat; color: #fff; padding: 10px 12px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; isolation: isolate;
}
.cat-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / .05), rgb(0 0 0 / .7)); }
.cat-tile:not([style])::before { background: color-mix(in srgb, var(--brand) 70%, #000); }
.cat-name { font-weight: 750; font-size: 1.02rem; line-height: 1.1; text-shadow: 0 1px 8px rgb(0 0 0 / .4); }
.cat-count { font-size: .8rem; font-weight: 700; background: rgb(255 255 255 / .22); backdrop-filter: blur(6px); border-radius: 999px; padding: 2px 8px; }
.cat-row { padding-top: 0; padding-bottom: 10px; }
.cat-current {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 12px;
  background: var(--cal); border: 1px solid var(--line); font-weight: 650; text-align: left; min-width: 0;
}
.cat-current b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.cat-current .caret { color: var(--ink-3); }
.burger { width: 16px; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; flex: none; }
.cat-list { display: grid; gap: 6px; }
.cat-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--bg); text-align: left; font-size: 1.05rem; }
.cat-opt b { flex: 1; font-weight: 650; }
.cat-opt small { color: var(--ink-3); font-weight: 600; }
.cat-opt.sel { background: var(--brand); color: #fff; }
.cat-opt.sel small { color: rgb(255 255 255 / .8); }

/* Volver arriba: dentro de la barra fija, junto a la sección actual. Aparece al bajar y no tapa nada */
.to-top {
  flex: none; width: 0; height: 40px; margin-left: -8px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; color: var(--ink); background: var(--cal); border: 1px solid transparent;
  opacity: 0; transition: width .25s, margin .25s, opacity .2s, border-color .25s;
}
.to-top.show { width: 44px; margin-left: 0; opacity: 1; border-color: var(--line); }
