/* ============================================================
   AMERICAN BURGER — Estilos
   ============================================================ */

/* Tipografías de la marca: Kollektif (principal) y Playlist Script (slogan) */
@font-face {
  font-family: 'Kollektif'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/Kollektif.ttf') format('truetype');
}
@font-face {
  font-family: 'Kollektif'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('../fonts/Kollektif-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Playlist Script'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/PlaylistScript.otf') format('opentype');
}

:root {
  --negro: #111111;
  --negro-2: #1c1c1c;
  --blanco: #ffffff;
  --rojo: #e5202b;
  --rojo-osc: #c2141e;
  --amarillo: #ffc72c;
  --gris: #f3f3f3;
  --gris-2: #dcdcdc;
  --gris-txt: #5f5f5f;
  --wa: #128c4b;

  --f-titulo: 'Alfa Slab One', Georgia, serif;
  --f-script: 'Playlist Script', cursive;
  --f-texto: 'Kollektif', system-ui, -apple-system, sans-serif;

  --radio: 14px;
  --header-h: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 17px;
  line-height: 1.55;
  color: var(--negro);
  background: var(--blanco);
}

h1, h2, h3, h4, p, ol, ul, dl, dd, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.menu :focus-visible, .modal :focus-visible, .drawer :focus-visible { outline-color: var(--negro); }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--amarillo); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip:focus { left: 8px; }

.star { width: 1em; height: 1em; fill: var(--rojo); flex: none; }
.ico { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

.script { font-family: var(--f-script); font-size: 1.8rem; line-height: 1.2; }
.script.rojo { color: var(--rojo); }
.script.amarillo { color: var(--amarillo); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 800; font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 1rem; }
.btn-bloque { width: 100%; }
.btn-rojo { background: var(--rojo); color: var(--blanco); }
.btn-rojo:hover { background: var(--rojo-osc); }
.btn-amarillo { background: var(--amarillo); color: var(--negro); }
.btn-amarillo:hover { background: #ffd65c; }
.btn-linea { border-color: currentColor; color: var(--blanco); background: transparent; }
.btn-linea:hover { background: var(--blanco); color: var(--negro); border-color: var(--blanco); }
.btn-wa { background: var(--wa); color: var(--blanco); }
.btn-wa:hover { background: #0e7340; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--blanco); border-bottom: 3px solid var(--negro);
}
.header-in { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.logo { display: block; flex: none; }
.logo img { display: block; height: 52px; width: auto; }

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a {
  font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
  padding: 6px 0; border-bottom: 3px solid transparent;
}
.nav a:hover { border-color: var(--rojo); }

.cart-btn { position: relative; }
.cart-count {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--amarillo); color: var(--negro);
  display: inline-grid; place-items: center; font-size: .8rem;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 78% 45%, #3a0a0d 0, transparent 46%),
    var(--negro);
  color: var(--blanco); overflow: hidden;
}
.hero-in {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px;
  padding-block: 72px 80px;
}
.hero h1 {
  font-family: var(--f-titulo); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.04; letter-spacing: .005em;
}
.hero h1 em { font-style: normal; color: var(--amarillo); display: block; }
.hero-sub { margin-top: 20px; max-width: 34em; font-size: 1.1rem; color: #d9d9d9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-art { position: relative; max-width: 460px; width: 100%; justify-self: center; }
.burger { display: block; width: 100%; height: auto; }
.hero-art .star { position: absolute; }
.hero-art .s1 { width: 44px; height: 44px; top: 2%; left: 0; transform: rotate(-14deg); }
.hero-art .s2 { width: 26px; height: 26px; top: 20%; right: 2%; transform: rotate(12deg); }
.hero-art .s3 { width: 34px; height: 34px; bottom: 16%; left: -4%; transform: rotate(8deg); }
.sello {
  position: absolute; right: -2%; bottom: 4%;
  width: 124px; height: 124px; border-radius: 50%;
  background: var(--amarillo); color: var(--negro);
  display: grid; place-content: center; text-align: center; line-height: 1.05;
  transform: rotate(10deg); border: 4px solid var(--negro); box-shadow: 0 0 0 3px var(--amarillo);
}
.sello small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sello strong { font-family: var(--f-titulo); font-weight: 400; font-size: 2rem; }

/* ---------- Franja ---------- */
.franja { background: var(--rojo); color: var(--blanco); overflow: hidden; border-block: 3px solid var(--negro); }
.franja-in {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 12px 20px; white-space: nowrap;
  font-family: var(--f-titulo); font-size: 1.05rem; letter-spacing: .03em;
}
.franja .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--blanco); flex: none; }
.franja .punto:last-child { display: none; }

/* ---------- Secciones ---------- */
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2, .info h2 {
  font-family: var(--f-titulo); font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05;
}
.sec-head .script { margin-bottom: -4px; }

/* ---------- Menú ---------- */
.menu { background: var(--gris); padding-block: 72px 80px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.chip {
  padding: 9px 20px; border-radius: 999px; border: 2px solid var(--negro);
  background: var(--blanco); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; transition: background .15s, color .15s;
}
.chip:hover { background: var(--negro); color: var(--blanco); }

.cat + .cat { margin-top: 56px; }
.cat-head { margin-bottom: 22px; }
.cat-head h3 {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-titulo); font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.1;
}
.cat-head h3 .star { width: 22px; height: 22px; }
.cat-head h3::after { content: ''; flex: 1; height: 3px; background: var(--negro); }
.cat-nota {
  margin-top: 14px; padding: 12px 16px; border-radius: 10px;
  background: var(--amarillo); font-weight: 600; font-size: .95rem;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }

.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--blanco); border: 2px solid var(--negro); border-radius: var(--radio);
  padding: 20px; box-shadow: 4px 4px 0 var(--negro);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--rojo); }
.card h4 { font-family: var(--f-titulo); font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.card p { color: var(--gris-txt); font-size: 1rem; flex: 1; }
.card-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.precio { font-weight: 800; font-size: 1.35rem; }

/* ---------- Cómo pedir ---------- */
.pasos { background: var(--amarillo); padding-block: 72px; }
.pasos .script { color: var(--rojo); }
.pasos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pasos-grid li {
  background: var(--blanco); border: 2px solid var(--negro); border-radius: var(--radio);
  padding: 26px 22px; box-shadow: 4px 4px 0 var(--negro);
}
.num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--rojo); color: var(--blanco);
  font-family: var(--f-titulo); font-size: 1.4rem; margin-bottom: 14px;
}
.pasos-grid h3 { font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.pasos-grid p { color: #3a3a3a; font-size: .95rem; }
.aviso {
  margin-top: 26px; padding: 16px 20px; border-radius: var(--radio);
  background: var(--negro); color: var(--blanco); text-align: center; font-size: .97rem;
}
.aviso strong { color: var(--amarillo); }

/* ---------- Ubicación ---------- */
.info { background: var(--negro); color: var(--blanco); padding-block: 72px; }
.info-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.datos { display: grid; gap: 18px; margin-top: 26px; }
.datos dt {
  font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--amarillo);
}
.datos dd { font-size: 1.15rem; font-weight: 600; }
.info-cta { display: grid; gap: 14px; justify-items: stretch; }

/* ---------- Footer ---------- */
.footer { background: var(--negro-2); color: #bdbdbd; padding-block: 32px; border-top: 3px solid var(--rojo); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer .logo img { height: 52px; }
.copy { font-size: .85rem; text-align: right; }
.copy small { font-size: .75rem; opacity: .75; }
body:has(.barra-pedido:not([hidden])) .footer { padding-bottom: 96px; }

/* ---------- Barra flotante de pedido ---------- */
.barra-pedido {
  position: fixed; z-index: 15; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(520px, 100% - 24px); min-height: 56px; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--rojo); color: var(--blanco); border: 2px solid var(--negro); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); cursor: pointer; font-weight: 600;
}
.barra-pedido strong { font-weight: 800; }

/* ---------- Diálogos ---------- */
dialog { border: 0; padding: 0; color: var(--negro); background: var(--blanco); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }

.cerrar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none;
  background: var(--gris); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.cerrar:hover { background: var(--gris-2); }

.modal {
  width: min(480px, 100% - 24px); max-height: calc(100dvh - 24px);
  border-radius: 20px; border: 3px solid var(--negro);
}
.modal form { padding: 26px 24px 22px; display: grid; gap: 16px; }
.modal .cerrar { position: absolute; top: 14px; right: 14px; }
.modal h3 { font-family: var(--f-titulo); font-weight: 400; font-size: 1.7rem; line-height: 1.1; padding-right: 48px; }
.modal-desc { color: var(--gris-txt); font-size: .95rem; margin-top: -8px; }
#item-opciones { display: grid; gap: 16px; }
#item-opciones:empty { display: none; }
.modal-pie { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.modal-pie .btn { flex: 1; }

.campo { display: grid; gap: 8px; }
.campo > span, .campo > legend {
  font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 0;
}
.campo > legend { margin-bottom: 8px; }
.campo input[type='text'], .campo input[type='time'], .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 2px solid var(--negro); border-radius: 10px; background: var(--blanco); font-size: 1rem;
}
.campo textarea { resize: vertical; }
.campo input[type='time'] { margin-top: 10px; }

.opciones { display: flex; flex-wrap: wrap; gap: 10px; }
.opcion { position: relative; flex: 1 1 auto; cursor: pointer; }
.opcion input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opcion span {
  display: grid; place-items: center; min-height: 48px; padding: 8px 16px; text-align: center;
  border: 2px solid var(--negro); border-radius: 10px; font-weight: 700; font-size: .95rem;
}
.opcion input:checked + span { background: var(--negro); color: var(--blanco); }
.opcion input:focus-visible + span { outline: 3px solid var(--rojo); outline-offset: 2px; }

.cant {
  display: inline-flex; align-items: center; border: 2px solid var(--negro); border-radius: 999px; flex: none;
}
.cant button {
  width: 44px; height: 50px; border: 0; background: none; font-size: 1.4rem; font-weight: 700; cursor: pointer;
}
.cant output { min-width: 26px; text-align: center; font-weight: 800; }
.cant-sm button { width: 38px; height: 38px; font-size: 1.2rem; }

.ayuda { font-size: .87rem; color: var(--gris-txt); margin-top: 10px; }
.ayuda.centro { text-align: center; margin-top: 0; }

/* Drawer */
.drawer {
  margin: 0 0 0 auto; width: min(440px, 100%); height: 100dvh; max-height: 100dvh; max-width: 100%;
}
.drawer[open] { display: flex; flex-direction: column; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 3px solid var(--negro);
}
.drawer-head h3 { font-family: var(--f-titulo); font-weight: 400; font-size: 1.6rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px 28px; }

.vacio { display: grid; justify-items: center; gap: 16px; padding: 64px 0; text-align: center; font-weight: 600; }
.vacio .star { width: 48px; height: 48px; }

.linea {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--gris-2);
}
.linea-info { display: grid; gap: 2px; min-width: 0; }
.linea-info strong { font-weight: 800; }
.linea-info small { color: var(--gris-txt); font-size: .85rem; overflow-wrap: anywhere; }
.linea-info .precio { font-size: 1rem; }

.checkout { display: grid; gap: 18px; margin-top: 18px; }
.total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 18px; border-radius: 12px; background: var(--amarillo);
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.total strong { font-family: var(--f-titulo); font-weight: 400; font-size: 1.8rem; letter-spacing: 0; }
.enviado { padding: 14px 16px; border-radius: 12px; background: var(--gris); font-size: .92rem; text-align: center; }
.link { background: none; border: 0; padding: 0; color: var(--rojo); font-weight: 800; text-decoration: underline; cursor: pointer; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 40; left: 50%; top: calc(var(--header-h) + 14px);
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 24px); padding: 12px 20px; border-radius: 999px;
  background: var(--negro); color: var(--blanco); font-weight: 700; font-size: .92rem; text-align: center;
  border: 2px solid var(--amarillo); transition: opacity .2s, transform .2s;
}
.toast.ver { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .hero-in { grid-template-columns: 1fr; padding-block: 48px 56px; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { max-width: 320px; order: -1; }
  .pasos-grid, .info-in { grid-template-columns: 1fr; }
  .franja-in { justify-content: flex-start; }
}

@media (max-width: 520px) {
  :root { --header-h: 60px; }
  .wrap { width: calc(100% - 32px); }
  .logo img { height: 34px; }
  .cart-btn { padding-inline: 14px; min-height: 42px; }
  .cart-btn > span:not(.cart-count) { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }
  .sello { width: 100px; height: 100px; }
  .sello strong { font-size: 1.6rem; }
  .menu, .pasos, .info { padding-block: 52px; }
  .grid { grid-template-columns: 1fr; }
  .footer-in { flex-direction: column; text-align: center; }
  .copy { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
