/* ============================================================
   JP Mix & Match · Estilos
   Cambia los colores y fuentes de toda la página aquí.
   ============================================================ */
:root {
  --verde: #1C3A21;
  --verde-2: #2F5A35;
  --dorado: #F6A31B;
  --crema: #FBF4E6;
  --crema-2: #FFF3D6;
  --beige: #EFE4CC;
  --arena: #E6D6B8;
  --arena-2: #C9B48E;
  --menta: #DCEBCB;
  --rosa: #F8D3C8;
  --rojo: #C2391F;
  --rojo-osc: #7A2414;
  --blanco: #FFFFFF;
  --off-bg: #F2EBDD;
  --off-txt: #5A4A2E;
  --f-titulo: 'Baloo 2', system-ui, sans-serif;
  --f-texto: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--crema); color: var(--verde); font-family: var(--f-texto); -webkit-font-smoothing: antialiased; }
a { color: var(--verde); text-decoration-color: var(--dorado); text-underline-offset: 3px; }
a:hover { color: var(--verde-2); }
button, input { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--dorado); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 800; margin: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: 1200px; width: 100%; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 3px solid var(--verde); font-family: var(--f-titulo); font-weight: 700; font-size: 17px; line-height: 1; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 20px; }
.btn-block { width: 100%; }
.btn-outline { background: var(--blanco); color: var(--verde); }
.btn-outline:hover { background: var(--crema-2); }
.btn-ghost { background: transparent; color: var(--verde); }
.btn-ghost:hover { background: var(--blanco); color: var(--verde); }
.btn-dark { background: var(--verde); color: var(--crema); }
.btn-dark:hover { color: var(--crema); }
.btn-gold { background: var(--dorado); color: var(--verde); font-weight: 800; }
.btn-gold:hover { color: var(--verde); }
.btn-off { background: var(--beige); color: var(--off-txt); cursor: not-allowed; }
/* Efectos de hover solo con mouse: en pantallas táctiles se quedan "pegados" */
@media (hover: hover) {
  .btn-pop:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--verde); }
  .btn-pop-big:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--verde); }
  .btn-pop-gold:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--dorado); }
  .opt:not(:disabled):hover { box-shadow: 4px 4px 0 var(--dorado); }
  .chip:hover { background: var(--rosa); }
}
.btn-pop { box-shadow: 4px 4px 0 var(--verde); }
.btn-pop:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--verde); }
.btn-pop-big { box-shadow: 5px 5px 0 var(--verde); }
.btn-pop-gold { box-shadow: 4px 4px 0 var(--dorado); }
.btn-pop-gold:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--dorado); }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--verde); background: var(--blanco); font-size: 20px; font-weight: 800; cursor: pointer; }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 20; background: var(--crema); border-bottom: 3px solid var(--verde); }
.header-inner { display: flex; align-items: center; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.header-logo { display: flex; }
.header-logo img { height: 60px; display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.nav-link:hover { background: var(--crema-2); }
#auth-slot { display: contents; }
.cart-btn { padding: 0 8px 0 18px; }
.cart-count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--dorado); color: var(--verde); display: grid; place-items: center; font-weight: 800; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px; border-radius: 999px; border: 2px solid var(--verde); background: var(--blanco); }
.user-avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--dorado); display: grid; place-items: center; font-family: var(--f-titulo); font-weight: 800; font-size: 17px; }
.user-name { font-weight: 800; font-size: 15px; }
.user-out { min-height: 36px; padding: 0 12px; border-radius: 999px; border: none; background: var(--beige); font-weight: 800; font-size: 13px; cursor: pointer; }

/* ---------- Portada ---------- */
.hero { padding-top: 56px; padding-bottom: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.pill-tag { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--menta); font-weight: 800; font-size: 14px; }
.hero h1 { font-size: clamp(46px, 7vw, 84px); line-height: .92; text-wrap: balance; }
.hero p { font-size: 19px; line-height: 1.55; margin: 0; max-width: 44ch; text-wrap: pretty; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-logo { background: var(--blanco); border: 3px solid var(--verde); border-radius: 32px; box-shadow: 10px 10px 0 var(--dorado); padding: 12px; transform: rotate(-2deg); }
.hero-logo img { width: 100%; display: block; }

/* ---------- Secciones ---------- */
.section { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 90px; }
.section-builder { padding-bottom: 80px; scroll-margin-top: 80px; }
.section h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1; }
.section-head { display: flex; flex-direction: column; gap: 6px; }
.section-head p { margin: 0; font-size: 17px; color: var(--verde-2); }

/* ---------- Etiquetas ---------- */
.tag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.tag-gold { background: var(--dorado); color: var(--verde); }
.tag-veg { background: var(--menta); color: var(--verde); }
.tag-hot { background: var(--rosa); color: var(--rojo-osc); }
.tag-off { background: var(--beige); color: var(--off-txt); }

/* ---------- Favoritos ---------- */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--blanco); border: 3px solid var(--verde); border-radius: 24px; box-shadow: 6px 6px 0 var(--dorado); }
.card.is-off { opacity: .65; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card h3 { font-size: 26px; line-height: 1.05; }
.card-price { font-family: var(--f-titulo); font-weight: 800; font-size: 22px; white-space: nowrap; }
.card-desc { margin: 0; font-size: 15px; line-height: 1.5; color: var(--verde-2); flex: 1; }
.card .tag { padding: 4px 12px; font-size: 13px; }

/* ---------- Armador ---------- */
.builder { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.builder-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; }
.step-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px; border: 2px solid var(--arena-2); background: transparent; color: var(--verde-2); font-weight: 800; font-size: 14px; cursor: pointer; }
.step-dot { width: 30px; height: 30px; border-radius: 999px; background: var(--beige); color: var(--verde-2); display: grid; place-items: center; }
.step-btn.is-done { border-color: var(--verde); background: var(--blanco); color: var(--verde); }
.step-btn.is-done .step-dot { background: var(--verde); color: var(--dorado); }
.step-btn.is-active { border-color: var(--verde); background: var(--verde); color: var(--crema); }
.step-btn.is-active .step-dot { background: var(--dorado); color: var(--verde); }
.step-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.step-head-text { display: flex; flex-direction: column; gap: 4px; }
.step-num { font-size: 14px; font-weight: 800; color: var(--verde-2); }
.step-head h3 { font-size: 34px; line-height: 1; }
.step-hint { font-size: 15px; color: var(--verde-2); }
.counter { padding: 8px 14px; border-radius: 999px; background: var(--menta); font-weight: 800; font-size: 14px; }
.counter.is-limit { background: var(--rosa); color: var(--rojo-osc); }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; min-height: 80px; background: var(--blanco); border: 3px solid var(--verde); border-radius: 18px; cursor: pointer; transition: box-shadow .15s, background .15s; }
.opt.is-selected { background: var(--crema-2); box-shadow: 4px 4px 0 var(--dorado); }
.opt:disabled { background: var(--off-bg); border-style: dashed; opacity: .6; cursor: not-allowed; }
.opt-img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.swatch { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--verde); flex: none; }
.swatch-none { border-style: dashed; }
.opt-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.opt-body strong { font-family: var(--f-titulo); font-weight: 700; font-size: 18px; line-height: 1.1; }
.opt-price { font-size: 13px; font-weight: 700; color: var(--verde-2); }
.opt-desc { font-size: 13px; line-height: 1.35; color: var(--verde-2); }
.opt-body .tag { margin-top: 4px; }
.check { width: 30px; height: 30px; border-radius: 999px; background: var(--verde); color: var(--dorado); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.prot2 { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--crema-2); border: 3px solid var(--verde); border-radius: 18px; box-shadow: 4px 4px 0 var(--dorado); }
.prot2 .group-label { font-family: var(--f-titulo); font-weight: 700; font-size: 18px; line-height: 1.2; }
.prot2 small { font-weight: 700; opacity: .8; }
.builder-nav { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.builder-nav .btn { min-height: 52px; padding: 0 22px; }
.btn-next { margin-left: auto; font-size: 18px; }

/* ---------- Visualizador ---------- */
.preview { flex: 1 1 340px; min-width: 0; position: sticky; top: 96px; display: flex; flex-direction: column; background: var(--blanco); border: 3px solid var(--verde); border-radius: 28px; box-shadow: 8px 8px 0 var(--dorado); overflow: hidden; }
.preview-stage { background: var(--crema-2); border-bottom: 3px solid var(--verde); min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 28px 16px 18px; position: relative; }
.size-badge { position: absolute; top: 14px; left: 16px; padding: 4px 12px; border-radius: 999px; background: var(--verde); color: var(--crema); font-weight: 800; font-size: 13px; }
.stack { width: 250px; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; transform-origin: 50% 100%; }
.layer { display: flex; justify-content: space-evenly; position: relative; }
.layer img { width: 100%; display: block; }
.layer-slab { width: 100%; border: 3px solid var(--verde); }
.layer-dot { border-radius: 999px; border: 3px solid var(--verde); margin-top: -4px; }
.plate { width: 88%; height: 12px; margin-top: 6px; border-radius: 999px; background: var(--arena); }
.preview-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.eyebrow { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--verde-2); }
.summary-base { font-family: var(--f-titulo); font-weight: 700; font-size: 19px; line-height: 1.2; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 6px 0 12px; border-radius: 999px; border: 2px solid var(--verde); background: var(--blanco); font-weight: 700; font-size: 14px; cursor: pointer; }
.chip-x { width: 24px; height: 24px; border-radius: 999px; background: var(--beige); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.chips-empty { font-size: 14px; color: var(--verde-2); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px dashed var(--arena); padding-top: 14px; font-weight: 800; }
.total { display: inline-block; font-family: var(--f-titulo); font-weight: 800; font-size: 36px; line-height: 1; }
.toast { text-align: center; font-weight: 800; font-size: 14px; color: var(--verde-2); }

/* ---------- Pie ---------- */
.footer { margin-top: auto; background: var(--verde); color: var(--crema); }
.footer-inner { padding-top: 28px; padding-bottom: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { font-family: var(--f-titulo); font-weight: 700; font-size: 18px; }

/* ---------- Ventanas (pedido y login) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
/* Una columna de hasta 440 px: sin esto la ventana se encoge al ancho de su contenido */
.overlay-center { z-index: 60; display: grid; grid-template-columns: minmax(0, 440px); place-items: center; justify-content: center; padding: 20px; }
.overlay-center .login { width: 100%; }
.scrim { position: absolute; inset: 0; background: rgba(20, 36, 22, .55); }
.drawer-panel { position: relative; width: min(460px, 100%); height: 100%; overflow-y: auto; background: var(--crema); border-left: 3px solid var(--verde); display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 3px solid var(--verde); }
.drawer-head h2 { font-size: 28px; }
.drawer-body { padding: 20px; display: flex; flex-direction: column; gap: 22px; }
.drawer-empty { padding: 40px 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.drawer-empty p { margin: 0; font-size: 17px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: flex; gap: 12px; padding: 14px; background: var(--blanco); border: 3px solid var(--verde); border-radius: 18px; }
.cart-item-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.cart-item-info strong, .cart-item-side strong { font-family: var(--f-titulo); font-size: 18px; line-height: 1.1; }
.cart-item-info span { font-size: 13px; line-height: 1.45; color: var(--verde-2); }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.link-danger { min-height: 32px; padding: 0 10px; border: none; background: transparent; font-weight: 800; font-size: 13px; color: var(--rojo); cursor: pointer; text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 15px; }
.input { min-height: 50px; padding: 0 14px; border-radius: 14px; border: 3px solid var(--verde); background: var(--blanco); font-family: var(--f-texto); font-size: 16px; font-weight: 400; }
.input.is-error { border-color: var(--rojo); }
.input:disabled { background: var(--off-bg); border-style: dashed; color: var(--off-txt); cursor: not-allowed; }
.field-err { font-size: 13px; font-weight: 700; color: var(--rojo); }
.field-hint { font-size: 13px; font-weight: 600; color: var(--verde-2); }

/* ---------- Cuenta opcional y Mis pedidos ---------- */
.link-btn { padding: 0; border: none; background: none; font: inherit; font-weight: 800; color: var(--verde); text-decoration: underline; text-decoration-color: var(--dorado); text-underline-offset: 3px; cursor: pointer; }
.guest-note { padding: 12px 14px; border-radius: 16px; background: var(--menta); font-size: 14px; line-height: 1.5; }
.login-forgot { align-self: center; min-height: 44px; font-size: 14px; }
.user-mine { background: var(--crema-2); }
button.user-avatar { border: none; color: var(--verde); cursor: pointer; padding: 0; }
.mine-account { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 2px dashed var(--arena-2); font-size: 14px; color: var(--verde-2); overflow-wrap: anywhere; }
.mine-empty { margin: 0; font-size: 16px; color: var(--verde-2); }
.mine-list { display: flex; flex-direction: column; gap: 14px; }
.mine-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--blanco); border: 3px solid var(--verde); border-radius: 20px; }
.mine-card.is-off { opacity: .7; border-style: dashed; }
.mine-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mine-code { display: block; font-family: var(--f-titulo); font-size: 24px; line-height: 1; }
.mine-date { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--verde-2); }
.mine-badge { flex: none; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--verde); font-weight: 800; font-size: 13px; }
.mine-nuevo { background: var(--dorado); }
.mine-preparando { background: var(--menta); }
.mine-listo { background: var(--verde); color: var(--crema); }
.mine-entregado { background: var(--beige); color: var(--off-txt); border-color: var(--arena-2); }
.mine-cancelado { background: var(--rosa); color: var(--rojo-osc); border-color: var(--rojo-osc); }
.mine-status { margin: 0; font-size: 14px; font-weight: 700; }
.mine-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mine-items li { display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-titulo); font-weight: 700; font-size: 16px; line-height: 1.2; }
.mine-items small { display: block; font-family: var(--f-texto); font-weight: 400; font-size: 13px; color: var(--verde-2); }
.mine-items b { white-space: nowrap; }
.mine-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 2px dashed var(--arena); font-size: 14px; }
.mine-foot .btn { min-height: 44px; font-size: 15px; }

/* ---------- Top del campus ---------- */
.card-rank { flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--verde); color: var(--dorado); display: grid; place-items: center; font-family: var(--f-titulo); font-weight: 800; font-size: 20px; }
.card-rank.is-first { background: var(--dorado); color: var(--verde); border: 3px solid var(--verde); }
.card-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.card-title h3 { overflow-wrap: anywhere; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 700; color: var(--verde-2); }
.card-sales { color: var(--verde); font-weight: 800; }
.top-empty { grid-column: 1 / -1; margin: 0; padding: 22px; border: 3px dashed var(--arena-2); border-radius: 24px; font-size: 16px; color: var(--verde-2); }
.group { display: flex; flex-direction: column; gap: 10px; }
.group-label { font-weight: 800; font-size: 15px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 16px; border: 3px solid var(--verde); background: var(--blanco); text-align: left; cursor: pointer; }
.choice.is-on { background: var(--crema-2); box-shadow: 4px 4px 0 var(--dorado); }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-text strong { font-family: var(--f-titulo); font-weight: 700; font-size: 17px; line-height: 1.1; }
.choice-text span { font-size: 13px; color: var(--verde-2); }
.choice-fee { font-family: var(--f-titulo); font-weight: 800; font-size: 17px; white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--verde); background: var(--blanco); font-weight: 800; font-size: 14px; cursor: pointer; }
.pill.is-on { background: var(--verde); color: var(--crema); }
.totals { display: flex; flex-direction: column; gap: 6px; border-top: 2px dashed var(--arena-2); padding-top: 16px; }
.totals-row { display: flex; justify-content: space-between; font-size: 15px; }
.totals-final { align-items: baseline; margin-top: 4px; font-weight: 800; }
.cart-total { display: inline-block; font-family: var(--f-titulo); font-weight: 800; font-size: 34px; }

.done { padding: 40px 20px; display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
.ticket { width: 100%; max-width: 320px; background: var(--blanco); border: 3px solid var(--verde); border-radius: 24px; box-shadow: 8px 8px 0 var(--dorado); padding: 28px 20px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ticket-label { font-weight: 800; font-size: 14px; color: var(--verde-2); }
.ticket-no { font-family: var(--f-titulo); font-weight: 800; font-size: 64px; line-height: 1; }
.ticket-line { font-size: 15px; }
.done p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 32ch; }

.login { position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--crema); border: 3px solid var(--verde); border-radius: 28px; box-shadow: 8px 8px 0 var(--dorado); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.login-close { position: absolute; top: 14px; right: 14px; }
.login-logo { height: 86px; align-self: center; }
.login-head { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.login-head h2 { font-size: 30px; line-height: 1; }
.login-head p { margin: 0; font-size: 15px; color: var(--verde-2); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 999px; background: var(--beige); }
.seg { min-height: 44px; border-radius: 999px; border: none; background: transparent; font-weight: 800; font-size: 15px; cursor: pointer; }
.seg.is-on { background: var(--verde); color: var(--crema); }

/* ---------- Ajustes generales ---------- */
html.is-locked { overflow: hidden; }
.only-narrow { display: none; }
.stage-total { display: none; }
.steps { position: relative; }
.login { max-height: calc(100dvh - 40px); }

/* Objetivos táctiles de al menos 44 px en pantallas táctiles */
@media (pointer: coarse) {
  .chip { min-height: 44px; }
  .user-out, .link-danger { min-height: 44px; }
}

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }

  /* Encabezado en una sola fila */
  .header-inner { gap: 10px; }
  .header-logo img { height: 46px; }
  .nav { flex-wrap: nowrap; gap: 8px; }
  .nav-link { display: none; }
  .only-wide { display: none; }
  .only-narrow { display: inline; }
  .btn-login { padding: 0 14px; }
  .user-name { display: none; }
  /* En celular el avatar abre "Mis pedidos"; ahí mismo está "Cerrar sesión" */
  .user-mine, .user-logout { display: none; }
  .user-pill { min-height: 48px; padding: 0 5px; }
  button.user-avatar { width: 36px; height: 36px; }

  /* Portada más compacta */
  .hero { padding-top: 32px; gap: 28px; }
  .hero-actions .btn { flex: 1 1 200px; }
  .hero-logo { max-width: 240px; justify-self: center; border-radius: 24px; box-shadow: 6px 6px 0 var(--dorado); }
  .section { scroll-margin-top: 72px; }

  /* Armador: el sándwich va arriba y se queda visible mientras eliges */
  .builder { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; }
  .builder-main { flex: none; gap: 18px; }
  .preview { display: contents; }
  .preview-stage {
    order: -1; position: sticky; top: 76px; z-index: 10;
    min-height: 0; height: 168px; padding: 10px 12px 10px; overflow: hidden;
    border: 3px solid var(--verde); border-radius: 22px;
    /* El halo crema tapa lo que pasa por detrás mientras está fijo */
    box-shadow: 5px 5px 0 var(--dorado), 0 0 0 14px var(--crema);
  }
  .stack { zoom: .5; }
  .plate { width: 70%; height: 8px; margin-top: 4px; }
  .size-badge { top: 10px; left: 12px; }
  .stage-total { display: inline-block; position: absolute; top: 8px; right: 12px; padding: 2px 12px; border-radius: 999px; background: var(--blanco); border: 2px solid var(--verde); font-family: var(--f-titulo); font-weight: 800; font-size: 20px; line-height: 1.3; }
  .preview-body { background: var(--blanco); border: 3px solid var(--verde); border-radius: 22px; box-shadow: 5px 5px 0 var(--dorado); }

  /* Pasos en una fila deslizable */
  .steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-padding: 0 16px; }
  .steps::-webkit-scrollbar { display: none; }
  .step-btn { flex: none; }
  .step-head h3 { font-size: 28px; }

  .options { grid-template-columns: 1fr; gap: 10px; }
  .opt { min-height: 72px; padding: 10px 12px; }
  /* Botones de Anterior/Siguiente anclados abajo mientras su lugar no se ve */
  .builder-nav { position: sticky; bottom: 0; z-index: 9; margin: 0 -16px; padding: 10px 16px 12px; background: var(--crema); transition: box-shadow .2s; }
  .builder-nav.is-stuck { border-top: 3px solid var(--verde); box-shadow: 0 -6px 16px rgba(20, 36, 22, .12); }
  .builder-nav .btn { flex: 1 1 0; padding: 0 14px; white-space: nowrap; }
  .builder-nav #prev { flex: none; }
  .btn-next { font-size: 16px; }
  .total { font-size: 30px; }
}
