/* Estilos del diseño Serra (mobile-first). Fuente: Poppins 400/500/600/700 de Google Fonts. */

  :root{
    --bg:#6b59a3; --bg-dark:#5a4991; --ink:#fff; --soft:rgba(255,255,255,.72);
    --rule:rgba(255,255,255,.35); --pill:#fff; --pill-ink:#5a4991; --wa:#25d366;
    --safe-b:env(safe-area-inset-bottom,0px); --safe-t:env(safe-area-inset-top,0px);
  }
  *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
  html{scroll-padding-top:64px}
  body{margin:0;background:var(--bg);color:var(--ink);font-family:Poppins,system-ui,sans-serif;-webkit-font-smoothing:antialiased;font-size:16px}
  button{font:inherit;color:inherit;cursor:pointer}
  .wrap{max-width:480px;margin:0 auto}

  /* ---------- Encabezado ---------- */
  .hero{padding:calc(20px + var(--safe-t)) 20px 18px;display:flex;align-items:center;gap:14px}
  .hero img{width:96px;height:auto;flex:none}
  .hero h1{margin:0;font-size:22px;line-height:1.15;font-weight:700}
  .hero p{margin:4px 0 0;font-size:13px;color:var(--soft);line-height:1.4}
  .hero .vig{display:inline-block;margin-top:8px;background:var(--pill);color:var(--pill-ink);font-size:12px;padding:2px 8px;border-radius:4px}
  .hero .vig b{font-weight:700}
  .hero .vig{margin-right:4px}
  .hero a.vig{text-decoration:none}

  /* ---------- Categorías (fijas arriba) ---------- */
  .cats{position:sticky;top:0;z-index:4;background:var(--bg);padding:10px 0;border-bottom:1px solid var(--rule)}
  .cats .in{display:flex;gap:8px;overflow-x:auto;padding:0 20px;scrollbar-width:none}
  .cats .in::-webkit-scrollbar{display:none}
  .cats a{flex:none;text-decoration:none;color:var(--ink);font-size:14px;font-weight:500;padding:8px 14px;border-radius:999px;border:1px solid var(--rule)}
  .cats a.on{background:var(--pill);color:var(--pill-ink);border-color:var(--pill)}

  /* ---------- Lista ---------- */
  .list{padding:4px 20px calc(110px + var(--safe-b))}
  section{padding-top:18px}
  h2{font-size:18px;font-weight:600;margin:0 0 4px}
  .item{padding:12px 0;border-bottom:1px solid rgba(255,255,255,.14)}
  .item:last-child{border-bottom:0}
  .l1{display:flex;align-items:center;gap:10px}
  .nm{font-size:16px;line-height:1.3}
  .dash{flex:1;height:1px;background:var(--rule);min-width:14px}
  .pr{flex:none;background:var(--pill);color:var(--pill-ink);font-weight:700;font-size:15px;padding:3px 10px;border-radius:5px}
  .l2{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px;min-height:40px}
  .un{font-size:13px;color:var(--soft)}
  .un b{color:var(--ink);font-weight:600}

  /* Botón agregar → contador */
  .ctl{flex:none}
  .addb{height:40px;padding:0 18px;border-radius:999px;border:1.5px solid var(--ink);background:transparent;font-weight:600;font-size:14px;display:flex;align-items:center;gap:6px}
  .addb:active{transform:scale(.96)}
  .stp{display:flex;align-items:center;height:40px;border-radius:999px;background:var(--pill);color:var(--pill-ink)}
  .stp button{width:44px;height:40px;border:0;background:none;color:var(--pill-ink);font-size:20px;font-weight:600;display:grid;place-items:center}
  .stp span{min-width:22px;text-align:center;font-weight:700}
  .stp svg{width:17px;height:17px}

  .foot{text-align:center;padding:26px 0 0;color:var(--soft);font-size:13px;line-height:1.6}
  .foot b{display:block;color:var(--ink);font-size:22px;margin-bottom:8px}

  /* ---------- Barra inferior ---------- */
  .bar{position:fixed;left:0;right:0;bottom:0;z-index:6;padding:10px 16px calc(10px + var(--safe-b));transform:translateY(120%);transition:transform .2s}
  .bar.show{transform:none}
  .bar button{width:100%;max-width:448px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;height:56px;padding:0 18px;border:0;border-radius:14px;background:var(--pill);color:var(--pill-ink);font-weight:700;font-size:16px;box-shadow:0 10px 30px rgba(20,10,50,.35)}
  .bar .n{background:var(--pill-ink);color:#fff;border-radius:8px;min-width:28px;height:28px;display:grid;place-items:center;font-size:14px}
  .bar .t{display:flex;align-items:center;gap:10px}

  /* ---------- Pantalla del pedido ---------- */
  .sheet{position:fixed;inset:0;z-index:10;background:var(--bg-dark);display:flex;flex-direction:column;transform:translateY(100%);transition:transform .25s ease}
  .sheet.show{transform:none}
  .sh{flex:none;display:flex;align-items:center;gap:8px;padding:calc(10px + var(--safe-t)) 10px 10px;border-bottom:1px solid rgba(255,255,255,.14)}
  .sh h3{margin:0;font-size:17px;flex:1;text-align:center;padding-right:44px}
  .back{width:44px;height:44px;border:0;background:none;display:grid;place-items:center}
  .back svg{width:24px;height:24px}
  .sb{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}
  .sb .wrap{padding:6px 20px 24px}
  .ci{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.14)}
  .ci .t{flex:1;font-size:15px;line-height:1.3}
  .ci .t small{display:block;color:var(--soft);font-size:13px}
  .ci .stp{height:36px}
  .ci .stp button{width:38px;height:36px}
  .sum{display:flex;justify-content:space-between;align-items:baseline;padding:16px 0 4px;font-size:15px;color:var(--soft)}
  .sum b{color:var(--ink);font-size:20px}
  .lbl{display:block;font-size:13px;color:var(--soft);margin:22px 0 8px}

  .chips button{height:48px;border-radius:12px;border:1.5px solid var(--rule);background:transparent;font-size:15px;font-weight:500}
  .chips button.on{background:var(--pill);color:var(--pill-ink);border-color:var(--pill);font-weight:600}
  .chips{display:flex;flex-wrap:wrap;gap:8px}
  .chips button{flex:1;min-width:120px}
  input,textarea{width:100%;font:inherit;font-size:16px;padding:13px 14px;border:2px solid transparent;border-radius:12px;background:#fff;color:#2a2340;outline:none}
  input:focus,textarea:focus{border-color:#c9bff0}
  input.bad{border-color:#ffb4b4}
  textarea{min-height:70px;resize:none}
  .keep{font-size:12px;color:var(--soft);margin-top:10px}
  .sf{flex:none;padding:12px 16px calc(12px + var(--safe-b));border-top:1px solid rgba(255,255,255,.14);background:var(--bg-dark)}
  .send{display:flex;align-items:center;justify-content:center;gap:10px;height:56px;border-radius:14px;background:var(--wa);color:#05391b;font-weight:700;font-size:16px;text-decoration:none;max-width:448px;margin:0 auto}
  .send svg{width:22px;height:22px}
  .hint{text-align:center;font-size:13px;color:#ffd9d9;min-height:18px;margin-bottom:8px}
  .empty{text-align:center;color:var(--soft);padding:40px 0}

  /* Enviado */
  .done{position:fixed;inset:0;z-index:12;background:var(--bg-dark);display:none;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}
  .done.show{display:flex}
  .done .ok{width:72px;height:72px;border-radius:50%;background:var(--wa);display:grid;place-items:center;margin-bottom:18px}
  .done h3{margin:0 0 8px;font-size:22px}
  .done p{margin:0 0 24px;color:var(--soft);font-size:15px;line-height:1.5;max-width:300px}
  .done .btn{height:52px;padding:0 26px;border-radius:14px;border:0;background:var(--pill);color:var(--pill-ink);font-weight:700;font-size:16px;margin-bottom:10px;min-width:240px}
  .done .ghost{background:transparent;color:var(--ink);border:1.5px solid var(--rule)}
[hidden]{display:none!important}
