/* Fokus Jr.'s public menu. A surface of the lead's own customers, not a COB: it shares the brand, day and night and
   the floor (contrast, keyboard, no sideways page scroll at 320 px), not the COB's composition. Colors and type come
   from /marca.css, lifted from the lead's token file; this file holds no color of its own. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--color-superficie); color: var(--color-texto); font-family: var(--font-cuerpo); font-size: 1rem; line-height: 1.5; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-acento); outline-offset: 2px; border-radius: 6px; }

.salto { position: absolute; left: -9999px; }
.salto:focus { left: 12px; top: 12px; z-index: 30; background: var(--color-superficie-alta); padding: 8px 12px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Head: the brand, on its own color ---------- */
.cabeza { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: var(--color-nav); color: var(--color-nav-texto); }
.cabeza__logo { height: 48px; width: auto; display: block; }
.tema { border: 1px solid color-mix(in srgb, var(--color-nav-texto) 45%, transparent); background: none; color: var(--color-nav-texto); border-radius: 999px; padding: 0 14px; min-height: 44px; font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.tema:active { background: color-mix(in srgb, var(--color-nav-texto) 14%, transparent); }

.pagina { max-width: 640px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) 120px max(16px, env(safe-area-inset-left)); }
.estado { padding: 32px 0; color: var(--color-texto-medio); }

.saludo { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.bajada { margin-top: 6px; color: var(--color-texto-medio); font-size: 0.9375rem; }

.campo { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.campo__etiqueta { font-size: 0.8125rem; font-weight: 500; color: var(--color-texto-medio); }
.campo__error { font-size: 0.8125rem; color: var(--color-negativo); }
.entrada { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--color-campo-borde); border-radius: 10px; background: var(--color-campo); font-size: 1rem; }
textarea.entrada { padding: 12px; min-height: 84px; resize: vertical; }
.entrada[aria-invalid="true"] { border-color: var(--color-negativo); }

/* ---------- Categories: a row that scrolls inside its own box, with a visible cue ---------- */
.categorias { position: sticky; top: 68px; z-index: 5; margin: 20px -16px 0; padding: 10px 16px; background: var(--color-superficie); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--color-borde); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.categoria { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-borde-fuerte); border-radius: 999px; background: none; font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.categoria[aria-current="true"] { background: var(--color-acento); border-color: var(--color-acento); color: var(--color-acento-texto); }

.seccion { padding-top: 28px; scroll-margin-top: 132px; }
.seccion__titulo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.seccion__cuenta { margin-top: 2px; font-size: 0.8125rem; color: var(--color-texto-medio); }

.producto { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--color-borde); }
.producto:last-child { border-bottom: 0; }
.producto__nombre { font-size: 1rem; font-weight: 600; }
.producto__marca { margin-left: 8px; font-size: 0.75rem; font-weight: 500; color: var(--color-acento-enlace); white-space: nowrap; }
.producto__texto { grid-column: 1; font-size: 0.875rem; color: var(--color-texto-medio); }
.producto__precio { grid-column: 1; margin-top: 4px; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.producto__accion { grid-column: 2; grid-row: 1 / span 3; align-self: center; }

.boton { min-height: 44px; padding: 0 16px; border: 1px solid var(--color-borde-fuerte); border-radius: 999px; background: none; font-size: 0.9375rem; font-weight: 600; cursor: pointer; transition: background-color 120ms ease-out, transform 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.boton:active { transform: scale(0.97); background: var(--color-superficie-sobre); }
.boton:disabled { cursor: not-allowed; color: var(--color-texto-tenue); transform: none; }
.boton--lleno { border-color: var(--color-acento); background: var(--color-acento); color: var(--color-acento-texto); }
.boton--lleno:active { background: var(--color-acento); }
.boton--lleno:disabled { background: var(--color-superficie-sobre); border-color: var(--color-borde); color: var(--color-texto-medio); }
.boton--icono { width: 44px; padding: 0; display: inline-grid; place-items: center; border-color: transparent; }
.boton--enlace { border: 0; padding: 0; min-height: 44px; color: var(--color-acento-enlace); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .boton { transition: background-color 120ms ease-out; } .boton:active { transform: none; } }

.piezas { display: inline-flex; align-items: center; border: 1px solid var(--color-borde-fuerte); border-radius: 999px; }
.piezas__boton { width: 44px; height: 44px; border: 0; background: none; border-radius: 999px; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.piezas__boton:active { background: var(--color-superficie-sobre); }
.piezas__cuenta { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- The order bar and the sheet ---------- */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; padding: 12px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--color-superficie) 86%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-top: 1px solid var(--color-borde); }
@media (prefers-reduced-transparency: reduce) { .barra { background: var(--color-superficie); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.barra__boton { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; max-width: 608px; margin: 0 auto; min-height: 52px; font-variant-numeric: tabular-nums; }

.hoja { margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92dvh; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--color-superficie-alta); color: var(--color-texto); }
@media (min-width: 700px) { .hoja { margin: auto; border-radius: 20px; } }
.hoja::backdrop { background: rgb(0 0 0 / 0.42); }
.hoja__marco { display: flex; flex-direction: column; max-height: 92dvh; }
.hoja__encabezado { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 20px; }
.hoja__encabezado h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.hoja__cuerpo { padding: 4px 20px 20px; overflow-y: auto; }
.hoja__pie { padding: 12px 20px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--color-borde); display: flex; flex-direction: column; gap: 8px; }
.hoja__pie .boton { width: 100%; min-height: 52px; }

.linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-borde); }
.linea__nombre { font-weight: 600; }
.linea__importe { color: var(--color-texto-medio); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.nota-total { font-size: 0.8125rem; color: var(--color-texto-medio); }

.tipos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
.tipo { min-height: 48px; padding: 0 6px; border: 1px solid var(--color-borde-fuerte); border-radius: 10px; background: none; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.tipo[aria-pressed="true"] { border-color: var(--color-acento); box-shadow: inset 0 0 0 1px var(--color-acento); color: var(--color-acento-enlace); }

.aviso { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 0.9375rem; }
.aviso--error { background: var(--color-negativo-suave); color: var(--color-texto); }
.aviso--error strong { color: var(--color-negativo); }

/* ---------- The order's status ---------- */
.seguimiento { margin-top: 16px; padding: 16px; border: 1px solid var(--color-borde-fuerte); border-radius: 14px; background: var(--color-superficie-alta); }
.seguimiento__titulo { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.seguimiento__folio { color: var(--color-texto-medio); font-size: 0.875rem; }
.pasos { display: grid; gap: 10px; margin-top: 14px; }
.paso { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; color: var(--color-texto-tenue); font-size: 0.9375rem; }
.paso__punto { width: 12px; height: 12px; margin: 0 4px; border-radius: 50%; border: 2px solid var(--color-borde-fuerte); }
.paso--hecho { color: var(--color-texto); }
.paso--hecho .paso__punto { border-color: var(--color-positivo); background: var(--color-positivo); }
.paso--ahora { color: var(--color-texto); font-weight: 600; }
.paso--ahora .paso__punto { border-color: var(--color-acento); box-shadow: 0 0 0 4px var(--color-positivo-suave); }
.seguimiento__pie { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 0.8125rem; color: var(--color-texto-medio); }

.pie { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--color-borde); font-size: 0.8125rem; color: var(--color-texto-medio); }
.pie p + p { margin-top: 4px; }
