/* Paleta El Mafer — sacada del logo */
:root {
  --brasa: #3a1e12;     /* café oscuro del letrero */
  --cacao: #5b2e1a;     /* café medio, delantal */
  --crema: #fbf3e6;     /* fondo, letras del letrero */
  --papel: #fffaf2;     /* tarjetas */
  --cacahuate: #e3b271; /* el personaje */
  --dorado: #f2b33d;    /* borde dorado / pollo dorado */
  --chile: #b8321f;     /* cinta roja "POLLO ASADO" */
  --fuego: #e8761c;     /* flama */
  --texto: #2a160d;
  --muted: #7a5a48;
  --ok: #2f8f4e;
  --radius: 18px;
  --shadow: 0 6px 20px rgb(58 30 18 / 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--texto);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}
h1, h2, .brand span { font-family: "Bowlby One", "Nunito", sans-serif; font-weight: 400; letter-spacing: 0.5px; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--brasa); margin: 0 0 16px; }
h3 { margin: 0; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: var(--brasa);
  border-bottom: 4px solid var(--dorado);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--crema); text-decoration: none; font-size: 1.3rem; }
.brand img { border-radius: 50%; background: #fff; object-fit: cover; }
.topbar nav { display: flex; gap: 16px; }
.topbar nav a { color: var(--crema); text-decoration: none; font-weight: 700; }
.topbar nav a:hover { color: var(--dorado); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 32px; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 40px 16px 24px;
}
.hero-logo { width: 100%; border-radius: 50%; mix-blend-mode: multiply; }
.eyebrow { color: var(--fuego); font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; margin: 8px 0 12px; color: var(--brasa); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 20px; padding: 6px 12px; border-radius: 999px; background: var(--papel); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status.is-open { color: var(--ok); }
.status.is-closed { color: var(--chile); }

.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 16px; border-radius: var(--radius);
  background: var(--papel); color: var(--texto);
  border: 3px solid transparent; box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}
.mode:hover { transform: translateY(-2px); }
.mode[aria-checked="true"] { border-color: var(--chile); background: #fff; }
.mode-icon { font-size: 2rem; }
.mode strong { display: block; font-size: 1.05rem; }
.mode small { color: var(--muted); }

/* ---------- Menú ---------- */
.menu, .location { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scrollbar-width: none; }
.chip {
  flex: none; padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--cacao); background: transparent; color: var(--cacao); font-weight: 700;
}
.chip[aria-selected="true"] { background: var(--cacao); color: var(--crema); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 20px; border-radius: var(--radius); background: var(--papel);
  box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s;
  animation: pop 0.25s ease-out both;
}
.card:hover { transform: translateY(-3px); }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.card-emoji {
  width: 64px; height: 64px; display: grid; place-items: center; font-size: 2.2rem;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--dorado), var(--cacahuate));
}
.tag {
  position: absolute; top: 14px; right: 14px;
  background: var(--chile); color: #fff; font-size: 0.75rem; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 800; font-size: 1.2rem; color: var(--chile); }
.price small { color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.btn-add {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--fuego); color: #fff; font-size: 1.5rem; font-weight: 800; line-height: 1;
}
.btn-add:hover { background: var(--chile); }

/* ---------- Ubicación ---------- */
.location-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
.branches { display: flex; flex-direction: column; gap: 12px; }
.branch {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 16px; border-radius: var(--radius); background: var(--papel); color: var(--texto);
  border: 3px solid transparent; box-shadow: var(--shadow);
}
.branch[aria-pressed="true"] { border-color: var(--dorado); background: #fff; }
.branch small { color: var(--muted); }
.branch a { color: var(--chile); font-weight: 800; text-decoration: none; margin-top: 4px; }
.location-side { display: flex; flex-direction: column; gap: 12px; }
.siguenos { padding: 16px; border-radius: var(--radius); background: var(--papel); box-shadow: var(--shadow); }
.siguenos h3 { font-size: 1rem; margin-bottom: 10px; }
.redes { display: flex; flex-wrap: wrap; gap: 8px; }
.red {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  background: #fff; color: var(--brasa); text-decoration: none; font-weight: 700; font-size: 0.9rem;
  border: 2px solid #ead8c3; transition: border-color 0.15s, color 0.15s;
}
.red:hover { border-color: var(--chile); color: var(--chile); }
.red-instagram svg { color: #e4405f; }
.red-facebook svg { color: #1877f2; }
.red-tiktok svg { color: #000; }
.redes-iconos { justify-content: center; margin-bottom: 8px; }
.redes-iconos .red { padding: 10px; }
#map { width: 100%; min-height: 340px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--papel); }

.footer { text-align: center; padding: 32px 16px 110px; color: var(--muted); }
.footer a { color: var(--chile); font-weight: 800; }

/* ---------- Botón flotante ---------- */
.cart-fab {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  width: min(520px, calc(100% - 32px)); padding: 14px 18px;
  border: 0; border-radius: 999px;
  background: var(--chile); color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: 0 10px 30px rgb(184 50 31 / 0.4);
}
.cart-fab span:nth-child(2) { flex: 1; text-align: left; }
.cart-count { background: var(--dorado); color: var(--brasa); border-radius: 999px; min-width: 28px; padding: 2px 8px; }
.cart-fab.bump { animation: bump 0.4s; }

/* ---------- Diálogos (hoja inferior en móvil) ---------- */
.sheet {
  width: min(520px, 100%); max-width: 100%; max-height: 92dvh; margin: auto auto 0; padding: 20px;
  border: 0; border-radius: 24px 24px 0 0; background: var(--crema); color: var(--texto);
}
.sheet::backdrop { background: rgb(42 22 13 / 0.55); }
.sheet[open] { animation: slide-up 0.25s ease-out; }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 24px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet h4 { margin: 16px 0 8px; color: var(--cacao); }
.muted { color: var(--muted); margin: 0; }
.icon-btn { border: 0; background: var(--papel); width: 36px; height: 36px; border-radius: 50%; font-size: 1rem; }

.mode-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--papel); border-radius: 999px; }
.mode-mini button { border: 0; padding: 10px; border-radius: 999px; background: none; font-weight: 800; color: var(--cacao); }
.mode-mini button[aria-checked="true"] { background: var(--chile); color: #fff; }

.options { display: grid; gap: 8px; }
.option {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--papel); border-radius: 12px; border: 2px solid transparent; cursor: pointer;
}
.option span { flex: 1; font-weight: 700; }
.option:has(input:checked) { border-color: var(--chile); background: #fff; }
.option input { accent-color: var(--chile); }
.size-row { cursor: default; padding: 6px 6px 6px 14px; }
.size-row b { margin-right: 4px; }
.size-row.on { border-color: var(--chile); background: #fff; }
.hint { margin: -4px 0 8px; font-size: 0.85rem; color: var(--muted); }

.qty-row { display: flex; gap: 12px; margin-top: 20px; }
.qty-row .btn-primary { flex: 1; }
.qty { display: flex; align-items: center; background: var(--papel); border-radius: 999px; }
.qty button { width: 40px; height: 44px; border: 0; background: none; font-size: 1.3rem; font-weight: 800; color: var(--chile); }
.qty output { min-width: 24px; text-align: center; font-weight: 800; }
.qty-sm button { width: 30px; height: 32px; font-size: 1.1rem; }

.btn-primary {
  padding: 14px 20px; border: 0; border-radius: 999px;
  background: var(--chile); color: #fff; font-weight: 800; font-size: 1rem;
}
.btn-primary:hover { background: #9a2817; }
.btn-primary:disabled { background: #c9b3a5; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 12px; }

/* ---------- Carrito ---------- */
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cart-list li { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--papel); border-radius: 12px; }
.cart-list .empty { justify-content: center; color: var(--muted); padding: 24px; }
.cart-emoji { font-size: 1.6rem; }
.cart-info { flex: 1; min-width: 0; }
.cart-info small { display: block; color: var(--muted); }

.checkout fieldset { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.checkout legend { font-weight: 800; color: var(--cacao); margin-bottom: 8px; }
.checkout label { display: grid; gap: 4px; font-weight: 700; font-size: 0.9rem; }
.checkout input, .checkout select, .checkout textarea {
  font: inherit; padding: 12px; border-radius: 12px;
  border: 2px solid #ead8c3; background: #fff; color: var(--texto);
}
.checkout input:focus, .checkout select:focus, .checkout textarea:focus { outline: none; border-color: var(--fuego); }
.pay-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: flex !important; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--papel); border: 2px solid transparent; cursor: pointer; }
.pill:has(input:checked) { border-color: var(--chile); background: #fff; }
.pill input { accent-color: var(--chile); }

.totals { margin-top: 16px; padding-top: 12px; border-top: 2px dashed #e2cdb5; display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 800; font-size: 1.25rem; color: var(--brasa); }
.note { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }
.incluye { margin: 4px 0 0; font-size: 0.85rem; color: var(--cacao); flex: none; }
.incluye b { color: var(--chile); }
.card .incluye { flex: none; }

@keyframes pop { from { opacity: 0; transform: scale(0.96); } }
@keyframes bump { 50% { transform: translateX(-50%) scale(1.06); } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 20px; }
  .hero-logo { max-width: 220px; margin: 0 auto; }
  .mode { flex-direction: column; text-align: center; gap: 4px; }
  .location-wrap { grid-template-columns: 1fr; }
  .topbar nav { gap: 12px; font-size: 0.9rem; }
}
