:root {
  --noche: #1E130C;
  --espresso: #2B1B11;
  --cafe: #6B3F22;
  --madera: #D9B98C;
  --crema: #F7EFE3;
  --papel: #FFFBF5;
  --oro: #D4A04C;
  --verde: #3E7D5A;
  --texto: #3A2414;
  --suave: #8A6A52;
  --nav-h: 70px;
  --r: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--crema);
  color: var(--texto);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
main { max-width: 560px; margin: 0 auto; }

.muestra {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(30,19,12,.75); color: var(--madera); backdrop-filter: blur(6px);
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px; border-radius: 99px; white-space: nowrap;
}

.view { display: none; }
.view.active { display: block; animation: entra .35s ease; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  min-height: 78vh; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(30,19,12,.25) 0%, rgba(30,19,12,.55) 45%, var(--noche) 100%), var(--img) center/cover;
  color: #fff; padding: 90px 22px 30px;
}
.hero-in { width: 100%; }
.estado { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 600; background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(6px); }
.punto { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); display: inline-block; }
.estado.cerrado .punto { background: #F87171; box-shadow: 0 0 0 4px rgba(248,113,113,.25); }
.logo { font-family: 'Cinzel Decorative', serif; font-size: clamp(2.8rem, 13vw, 4rem); letter-spacing: .06em; margin-top: 18px; line-height: 1; color: var(--madera); }
.tag { font-weight: 700; letter-spacing: .32em; text-transform: uppercase; font-size: .78rem; color: #fff; margin-top: 6px; }
.lema { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.35rem; line-height: 1.35; margin: 22px 0 24px; color: #F3E6D3; }
.acciones { display: flex; gap: 10px; }
.btn { border: 0; border-radius: 99px; padding: 14px 22px; font-weight: 700; font-size: .9rem; }
.btn.oro { background: var(--oro); color: var(--noche); box-shadow: 0 8px 20px rgba(212,160,76,.35); }
.btn.vidrio { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.btn.ancho { width: 100%; margin-top: 8px; }

/* ---------- Empresa ---------- */
.bloque { padding: 0 20px 30px; }
.rapidos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -22px 0 30px; position: relative; }
.rapido { background: var(--papel); border-radius: 16px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .68rem; font-weight: 600; color: var(--cafe); text-decoration: none; box-shadow: 0 6px 18px rgba(43,27,17,.12); }
.rapido svg, .nav svg, .entrada svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--verde); margin: 30px 0 8px; }
h2 { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 500; font-size: 1.7rem; color: var(--espresso); margin-bottom: 10px; line-height: 1.2; }
p { line-height: 1.65; }
.firma { color: var(--suave); font-style: italic; margin-top: 8px; font-size: .9rem; }

.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.cifras div { background: var(--espresso); color: var(--crema); border-radius: 14px; padding: 14px 8px; text-align: center; }
.cifras b { display: block; font-size: 1.35rem; color: var(--oro); }
.cifras span { font-size: .66rem; line-height: 1.3; display: block; margin-top: 4px; opacity: .85; }

.galeria { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 120px 120px; gap: 8px; }
.galeria img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.galeria img:first-child { grid-row: span 2; }

.resenas { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 10px; scrollbar-width: none; }
.resenas::-webkit-scrollbar { display: none; }
.resenas blockquote { flex: 0 0 80%; scroll-snap-align: center; background: var(--papel); border-radius: var(--r); padding: 18px; box-shadow: 0 4px 14px rgba(43,27,17,.07); }
.resenas p { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.02rem; }
.resenas cite { display: block; margin-top: 10px; font-style: normal; font-size: .75rem; color: var(--oro); font-weight: 600; }

.horario { list-style: none; background: var(--papel); border-radius: var(--r); padding: 4px 16px; }
.horario li { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #EFE2CF; font-size: .9rem; }
.horario li:last-child { border: 0; }
.horario li.hoy { color: var(--verde); font-weight: 700; }
.horario b { font-weight: 600; }
.direccion { font-size: .85rem; color: var(--suave); margin-top: 12px; }

/* ---------- Servicios ---------- */
.cabecera { position: sticky; top: 0; z-index: 10; background: var(--crema); padding: 50px 20px 12px; }
.chips { display: flex; gap: 8px; margin-top: 4px; }
.chip { border: 1px solid #DCC6A6; background: transparent; color: var(--cafe); border-radius: 99px; padding: 9px 16px; font-weight: 600; font-size: .85rem; }
.chip.activo { background: var(--espresso); color: var(--crema); border-color: var(--espresso); }
.tab { display: none; padding: 6px 20px 30px; }
.tab.activo { display: block; animation: entra .3s ease; }

.destacado { border-radius: 22px; min-height: 280px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  background: linear-gradient(180deg, transparent 30%, rgba(30,19,12,.92)), var(--img) center/cover; }
.sello { align-self: flex-start; background: var(--oro); color: var(--noche); font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding: 5px 10px; border-radius: 99px; margin-bottom: auto; }
.destacado h3 { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 500; font-size: 1.45rem; }
.destacado p { font-size: .85rem; opacity: .9; margin: 6px 0 10px; }
.destacado b { color: var(--oro); font-size: 1.1rem; }

.cat { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--verde); margin: 28px 0 12px; }
.platos { display: grid; gap: 10px; }
.plato { display: flex; gap: 12px; background: var(--papel); border-radius: 16px; padding: 10px; align-items: center; box-shadow: 0 3px 10px rgba(43,27,17,.06); }
.plato img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex: none; }
.plato h4 { font-size: .95rem; color: var(--espresso); }
.plato p { font-size: .78rem; line-height: 1.4; color: var(--suave); margin: 3px 0 5px; }
.plato b { color: var(--cafe); font-size: .9rem; }
.nota { font-size: .75rem; color: var(--suave); margin-top: 18px; text-align: center; }

.exp { border-radius: var(--r); min-height: 170px; margin-bottom: 12px; display: flex; align-items: flex-end; color: #fff;
  background: linear-gradient(90deg, rgba(30,19,12,.92) 20%, rgba(30,19,12,.25)), var(--img) center/cover; padding: 18px; }
.exp span { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--oro); font-weight: 700; }
.exp h3 { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 500; font-size: 1.4rem; margin: 4px 0; }
.exp p { font-size: .85rem; max-width: 80%; line-height: 1.45; opacity: .9; }

.reserva { background: var(--papel); border-radius: 22px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 6px 20px rgba(43,27,17,.08); }
.reserva label { display: grid; gap: 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--suave); }
.reserva input, .reserva select { font: 500 16px 'Montserrat', sans-serif; padding: 12px; border: 1px solid #E3D1B6; border-radius: 12px; background: #fff; color: var(--texto); width: 100%; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contador { display: flex; align-items: center; justify-content: space-between; border: 1px solid #E3D1B6; border-radius: 12px; background: #fff; padding: 4px; }
.contador button { width: 44px; height: 40px; border: 0; border-radius: 10px; background: var(--crema); color: var(--cafe); font-size: 1.3rem; }
.contador output { font-size: 1.1rem; color: var(--texto); }

/* ---------- Chat ---------- */
#chat.active { display: flex; flex-direction: column; height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom)); }
.chat-cab { display: flex; gap: 12px; align-items: center; padding: 48px 20px 14px; background: var(--espresso); color: var(--crema); }
.chat-cab b { display: block; }
.chat-cab span { font-size: .75rem; opacity: .8; display: flex; align-items: center; gap: 6px; }
.chat-cab .punto { width: 7px; height: 7px; box-shadow: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--madera); color: var(--espresso); display: grid; place-items: center; font-family: 'Cinzel Decorative', serif; font-size: 1.2rem; }
.mensajes { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; }
.msg { max-width: 84%; padding: 11px 15px; border-radius: 18px; line-height: 1.5; font-size: .92rem; white-space: pre-line; animation: entra .25s ease; }
.msg.bot { background: var(--papel); align-self: flex-start; border-bottom-left-radius: 5px; box-shadow: 0 2px 8px rgba(43,27,17,.06); }
.msg.yo { background: var(--cafe); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.msg img { border-radius: 12px; margin-top: 8px; width: 100%; height: 130px; object-fit: cover; }
.escribiendo { display: flex; gap: 4px; padding: 15px 16px; }
.escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--suave); animation: rebota 1s infinite; }
.escribiendo i:nth-child(2) { animation-delay: .15s; } .escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes rebota { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.sugerencias { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.sugerencias::-webkit-scrollbar { display: none; }
.sugerencias button { flex: none; border: 1px solid #DCC6A6; background: var(--papel); color: var(--cafe); border-radius: 99px; padding: 8px 14px; font-size: .8rem; font-weight: 600; }
.entrada { display: flex; gap: 8px; padding: 0 16px 12px; }
.entrada input { flex: 1; padding: 13px 16px; border-radius: 99px; border: 1px solid #DCC6A6; font: 16px 'Montserrat', sans-serif; background: #fff; }
.entrada button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--oro); color: var(--noche); display: grid; place-items: center; flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: rgba(30,19,12,.96); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(217,185,140,.18);
}
.nav button { flex: 1; border: 0; background: none; color: var(--madera); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .7rem; font-weight: 600; opacity: .55; position: relative; transition: opacity .2s; }
.nav button.activo { opacity: 1; color: var(--oro); }
.nav button.activo::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--oro); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--espresso); color: var(--crema); padding: 12px 18px; border-radius: 14px; font-size: .82rem; width: max-content; max-width: calc(100% - 32px); text-align: center; transition: .3s; z-index: 40; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
