/* Papacamper XXL · dirección «Horno»: verde botella del logo, amarillo, titulares redondos. Móvil primero. */
:root{
  --verde:#022817; --verde2:#0d3a24; --verde3:#174a30; --amarillo:#fdea3b; --crema:#fff8d9; --ladrillo:#9a4a22;
  --ok:#5fd068; --error:#ffb4a8;
  --f-titulo:"Lilita One","Arial Rounded MT Bold",system-ui,sans-serif;
  --f-texto:"Figtree",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --gutter:max(16px, env(safe-area-inset-left, 0px));
  --gutter-r:max(16px, env(safe-area-inset-right, 0px));
  color-scheme:dark;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--verde);color:var(--crema);font-family:var(--f-texto);font-size:15px;line-height:1.45;min-height:100vh;padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
img{max-width:100%;display:block}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
:focus-visible{outline:3px solid var(--amarillo);outline-offset:2px}
[hidden]{display:none!important}
body.bloq{overflow:hidden}

/* Cabecera fija: marca, modo y categorías */
.top{position:sticky;top:0;z-index:20;background:var(--verde);padding:calc(10px + env(safe-area-inset-top,0px)) var(--gutter-r) 8px var(--gutter);box-shadow:0 6px 14px rgba(0,0,0,.25)}
.brand{display:flex;align-items:center;gap:10px}
.logo{width:44px;height:44px;border-radius:50%;border:2px solid var(--amarillo);object-fit:cover;flex:none;background:var(--verde2)}
.brand-tx{min-width:0}
.brand h1{margin:0;font:400 21px/1 var(--f-titulo);color:var(--amarillo);letter-spacing:.01em}
.estado{margin:3px 0 0;font-size:12.5px;opacity:.85}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ok);margin-right:6px;vertical-align:1px}
.estado.cerrado .dot{background:var(--error)}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--verde2);border-radius:12px;padding:3px;margin-top:10px}
.seg button{font-size:13.5px;font-weight:700;padding:8px 4px;border-radius:9px}
.seg button[aria-checked="true"]{background:var(--amarillo);color:var(--verde)}
.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:10px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter));padding:0 var(--gutter-r) 2px var(--gutter)}
.chips::-webkit-scrollbar{display:none}
.chips a{flex:none;font-size:13px;font-weight:700;padding:7px 12px;border-radius:999px;border:1.5px solid rgba(253,234,59,.35);text-decoration:none;color:var(--crema);white-space:nowrap}
.chips a.on{background:var(--amarillo);color:var(--verde);border-color:var(--amarillo)}

/* Carta */
.carta{padding:6px var(--gutter-r) 0 var(--gutter);max-width:760px;margin:0 auto}
.cargando,.vacio{padding:60px 0;text-align:center;opacity:.8}
.cat{scroll-margin-top:170px;padding-top:18px}
.cat h2{margin:0 0 10px;font:400 24px/1.05 var(--f-titulo);color:var(--amarillo);text-wrap:balance}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (min-width:620px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.card{background:var(--verde2);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;text-align:left;min-width:0}
.card .im{aspect-ratio:3/2;background:var(--verde3)}
.card .im img{width:100%;height:100%;object-fit:cover}
.card .t{padding:8px 10px 10px;display:flex;flex-direction:column;gap:6px;flex:1}
.card b{font:400 16px/1.1 var(--f-titulo);overflow-wrap:anywhere}
.card .d{font-size:12px;opacity:.75;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card .row{display:flex;justify-content:space-between;align-items:center;margin-top:auto}
.card .pr{font-weight:800;font-size:14px;color:var(--amarillo)}
.card .pr small{font-weight:600;font-size:11px;opacity:.8;margin-right:2px;color:var(--crema)}
.plus{width:30px;height:30px;border-radius:50%;background:var(--amarillo);color:var(--verde);display:grid;place-items:center;font-weight:900;font-size:19px;line-height:1;flex:none}
.card.destacado{grid-column:1/-1}
.card.destacado .im{aspect-ratio:16/9}
.card.destacado b{font-size:21px}
.card .ya{position:relative}
.card .ya::after{content:attr(data-n);position:absolute;top:8px;right:8px;background:var(--amarillo);color:var(--verde);font-weight:800;font-size:12px;border-radius:999px;padding:2px 8px}

/* Barra del carrito y aviso de pedido en curso */
.cart-bar{position:fixed;z-index:25;left:max(12px, env(safe-area-inset-left,0px));right:max(12px, env(safe-area-inset-right,0px));bottom:calc(12px + env(safe-area-inset-bottom,0px));max-width:736px;margin:0 auto;background:var(--amarillo);color:var(--verde);border-radius:16px;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;font-weight:800;font-size:15.5px;box-shadow:0 8px 22px rgba(0,0,0,.4)}
.cart-bar .n{background:var(--verde);color:var(--amarillo);border-radius:999px;padding:1px 9px;margin-right:8px;font-size:13px}
.pedido-activo{display:block;margin:14px var(--gutter-r) 0 var(--gutter);background:var(--verde3);border:1.5px solid var(--amarillo);border-radius:14px;padding:12px 14px;color:var(--crema);text-decoration:none;font-weight:700;font-size:14px}
.pedido-activo b{color:var(--amarillo)}

/* Hojas (ficha, pedido, estado) */
.sheet-bg{position:fixed;inset:0;z-index:40;background:rgba(0,0,0,.55);display:flex;align-items:flex-end;justify-content:center;animation:fade .15s ease-out}
.sheet{background:var(--verde);width:100%;max-width:560px;max-height:94vh;border-radius:22px 22px 0 0;display:flex;flex-direction:column;overflow:hidden;animation:sube .2s ease-out}
.sheet.full{height:100%;max-height:100%;border-radius:0}
@media (min-width:620px){.sheet.full{height:94vh;border-radius:22px 22px 0 0}}
@keyframes sube{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.sheet,.sheet-bg{animation:none}}
.back{position:absolute;top:calc(12px + env(safe-area-inset-top,0px));left:12px;width:38px;height:38px;border-radius:50%;background:rgba(2,40,23,.8);color:var(--amarillo);display:grid;place-items:center;font-weight:900;font-size:24px;line-height:1}
.back.static{position:static;flex:none}
.f-img{position:relative;aspect-ratio:3/2;background:var(--verde3);flex:none}
.f-img img{width:100%;height:100%;object-fit:cover}
.f-body{padding:16px var(--gutter-r) 8px var(--gutter);overflow-y:auto;margin-top:-18px;background:var(--verde);border-radius:20px 20px 0 0;position:relative}
.f-body h2{margin:0;font:400 30px/1 var(--f-titulo);color:var(--amarillo);text-wrap:balance}
.f-desc{margin:6px 0 4px;font-size:14px;opacity:.85}
.f-desc:empty{display:none}
.lab{display:block;font-size:11.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;opacity:.75;margin:16px 0 7px}
.opt{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:12px 14px;border-radius:12px;border:1.5px solid rgba(253,234,59,.25);margin-bottom:8px;font-weight:700;font-size:15px;text-align:left}
.opt[aria-checked="true"]{border-color:var(--amarillo);background:rgba(253,234,59,.09)}
.opt .r{width:20px;height:20px;border-radius:50%;border:2px solid var(--amarillo);display:inline-block;vertical-align:-5px;margin-right:10px;flex:none}
.opt.multi .r{border-radius:6px}
.opt[aria-checked="true"] .r{background:radial-gradient(var(--amarillo) 45%,transparent 52%)}
.opt.multi[aria-checked="true"] .r{background:var(--amarillo)}
.opt .px{opacity:.9;white-space:nowrap}
textarea,.fld input{width:100%;background:var(--verde2);border:1.5px solid transparent;border-radius:12px;padding:11px 12px;font-size:16px;resize:none}
textarea:focus,.fld input:focus{border-color:var(--amarillo);outline:none}
textarea::placeholder,input::placeholder{color:rgba(255,248,217,.45)}
.f-foot,.p-foot{display:flex;gap:10px;padding:12px var(--gutter-r) calc(12px + env(safe-area-inset-bottom,0px)) var(--gutter);border-top:1px solid rgba(255,248,217,.08);flex:none}
.step{display:flex;align-items:center;gap:4px;background:var(--verde2);border-radius:14px;padding:0 4px}
.step button{width:38px;height:44px;font-size:22px;font-weight:800;color:var(--amarillo)}
.step span{min-width:22px;text-align:center;font-weight:800;font-size:17px}
.btn-amarillo{flex:1;background:var(--amarillo);color:var(--verde);border-radius:14px;padding:14px;font-weight:800;font-size:16px;text-align:center}
.btn-amarillo:disabled{opacity:.55;cursor:wait}
.btn-borde{flex:1;border:2px solid var(--amarillo);color:var(--amarillo);border-radius:14px;padding:13px;font-weight:800;font-size:16px}
.big{padding:16px}

.p-head{display:flex;align-items:center;gap:12px;padding:calc(12px + env(safe-area-inset-top,0px)) var(--gutter-r) 10px var(--gutter);flex:none}
.p-head h2{margin:0;font:400 26px/1 var(--f-titulo);color:var(--amarillo)}
.p-scroll{overflow-y:auto;flex:1;padding:0 var(--gutter-r) 16px var(--gutter)}
.linea{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px dashed rgba(255,248,217,.14)}
.linea .th{width:52px;height:52px;border-radius:10px;overflow:hidden;flex:none;background:var(--verde3)}
.linea .th img{width:100%;height:100%;object-fit:cover}
.linea .nm{flex:1;min-width:0;font-weight:700;font-size:14.5px;line-height:1.25}
.linea .nm small{display:block;font-weight:500;opacity:.72;font-size:12.5px}
.linea .der{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.linea .pr{font-weight:800;font-variant-numeric:tabular-nums}
.mini-step{display:flex;align-items:center;gap:2px;background:var(--verde2);border-radius:10px}
.mini-step button{width:30px;height:30px;font-weight:800;font-size:17px;color:var(--amarillo)}
.mini-step span{min-width:16px;text-align:center;font-weight:800;font-size:14px}
.sum{margin:10px 0 4px;font-size:14px;font-variant-numeric:tabular-nums}
.sum div{display:flex;justify-content:space-between;padding:3px 0}
.sum .tot{font:400 24px/1.2 var(--f-titulo);color:var(--amarillo);padding-top:6px}
.seg-form{margin:14px 0 4px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
@media (max-width:360px){.two{grid-template-columns:1fr}}
.fld{display:block;margin-top:10px}
.fld small{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.7;font-weight:800;margin:0 0 5px 2px}
.fld.mal input{border-color:var(--error)}
.zona{margin:6px 2px 0;font-size:12.5px;opacity:.75}
.when{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.when button{flex:none;font-size:13.5px;font-weight:700;padding:9px 13px;border-radius:10px;border:1.5px solid rgba(253,234,59,.3)}
.when button[aria-checked="true"]{background:var(--amarillo);color:var(--verde);border-color:var(--amarillo)}
.pago{margin:14px 2px 0;font-size:13px;opacity:.8}
.err{margin:12px 0 0;background:rgba(255,180,168,.14);border:1.5px solid var(--error);color:#ffe1dc;border-radius:12px;padding:10px 12px;font-size:14px;font-weight:600}

/* Estado del pedido */
.e-hero{text-align:center;padding:10px 0 6px}
.e-num{margin:0;font-size:12.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;opacity:.75}
.e-hero h3{margin:6px 0 4px;font:400 38px/1 var(--f-titulo);color:var(--amarillo)}
.e-hero p{margin:0;font-size:14px;opacity:.85}
.pasos{list-style:none;margin:16px 0;padding:0;display:grid;gap:10px}
.pasos li{display:flex;align-items:center;gap:12px;font-weight:700;opacity:.45}
.pasos li i{font-style:normal;width:28px;height:28px;border-radius:50%;border:2.5px solid var(--amarillo);display:grid;place-items:center;font-size:13px;font-weight:900;flex:none}
.pasos li.ok,.pasos li.ahora{opacity:1}
.pasos li.ok i{background:var(--amarillo);color:var(--verde)}
.pasos li.ahora i{animation:latido 1.4s ease-in-out infinite}
@keyframes latido{50%{box-shadow:0 0 0 6px rgba(253,234,59,.18)}}
@media (prefers-reduced-motion:reduce){.pasos li.ahora i{animation:none}}

.toast{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom,0px));background:var(--crema);color:var(--verde);font-weight:800;font-size:14px;padding:10px 16px;border-radius:999px;box-shadow:0 6px 16px rgba(0,0,0,.35);white-space:nowrap}
.pie{text-align:center;font-size:12px;opacity:.55;padding:28px 16px 0}
.pie a{color:inherit}

/* Escritorio: todo en la misma columna centrada que la carta */
.top>*{max-width:728px;margin-left:auto;margin-right:auto}
.top>.chips{margin-left:auto;margin-right:auto;padding:0 0 2px}
@media (max-width:760px){.top>.chips{margin:10px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter));padding:0 var(--gutter-r) 2px var(--gutter)}}
.pedido-activo{max-width:728px}
@media (min-width:760px){.pedido-activo{margin:14px auto 0}.card.destacado .im{aspect-ratio:21/9}}
.pronto{font:400 28px/1.1 var(--f-titulo);color:var(--amarillo);margin:0 0 8px}
