/* ════════════════════════════════════════════════════════════════
   MI PEDIDO · /css/pedido.css  (2026-09-26)
   Botón de la cabecera, panel lateral (escritorio) / hoja inferior
   (teléfono), botón «Agregar a mi pedido» y aviso breve.
   Todo va con prefijo .rs-ped- para no tocar estilos existentes.
   ════════════════════════════════════════════════════════════════ */

/* ── 1 · Cabecera: ocupa el lugar del bloque «Envíos a todo el Perú» ── */
#deliverybox .rs-ped-cab-item{ display:block; float:left; margin:0 auto; }
.rs-ped-head{
  display:flex; align-items:center; gap:0; height:42px; margin:0; padding:0 6px 0 0;
  background:none; border:0; border-radius:10px; color:#fff; font:inherit; cursor:pointer; text-align:left;
  -webkit-tap-highlight-color:transparent; transition:background .2s ease;
}
.rs-ped-head:hover{ background:rgba(255,255,255,.07); }
.rs-ped-head:hover p b{ color:#bdff06; }
.rs-ped-head:focus-visible{ outline:2px solid #bdff06; outline-offset:2px; }
.rs-ped-head .rs-ped-ico{ position:relative; display:grid; place-items:center; width:42px; height:42px; flex:none; color:#bdff06; }
.rs-ped-head .rs-ped-ico svg{ width:30px; height:30px; }
#deliverybox .rs-ped-head p{ float:none; display:block; padding:6px 6px 6px 4px; }
#deliverybox .rs-ped-head span{ float:none; margin:0; width:auto; display:inline; }
#deliverybox .rs-ped-head .rs-ped-ico{ display:grid; }
#deliverybox .rs-ped-head .rs-ped-badge{ display:block; }

.rs-ped-head p b{ font-weight:700; transition:color .2s ease; }
.rs-ped-badge{
  position:absolute; top:1px; right:0; min-width:17px; height:17px; padding:0 4px; box-sizing:border-box;
  border-radius:999px; background:#bdff06; color:#111; font:800 10.5px/17px system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  text-align:center; box-shadow:0 0 0 2px #000; transform:scale(.001); transition:transform .25s cubic-bezier(.3,1.6,.5,1);
}
.rs-ped-lleno .rs-ped-badge{ transform:none; }
.rs-ped-brinca .rs-ped-ico, .rs-ped-brinca.rs-ped-mini{ animation:rsPedBrinca .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes rsPedBrinca{ 0%{ transform:scale(1); } 35%{ transform:scale(1.22); } 100%{ transform:scale(1); } }

/* Teléfono (<480 px): main.css oculta #deliverybox. Se muestra solo
   «Mi pedido», compacto, junto al botón del menú. WhatsApp sigue como
   estaba en el teléfono (oculto en la cabecera). */
@media only screen and (max-width:479px){
  #deliverybox{ display:block !important; position:absolute; top:11px; right:54px; height:46px; z-index:5; }
  #deliverybox > span:not(.rs-ped-cab-item){ display:none !important; }
  #deliverybox .rs-ped-head{ flex-direction:column; justify-content:center; gap:1px; width:56px; height:46px; padding:0; border-radius:12px; }
  #deliverybox .rs-ped-head .rs-ped-ico{ width:30px; height:26px; }
  #deliverybox .rs-ped-head .rs-ped-ico svg{ width:24px; height:24px; }
  #deliverybox .rs-ped-head .rs-ped-badge{ top:-3px; right:-6px; }
  #deliverybox .rs-ped-head p{ padding:0; font-size:10px; line-height:12px; white-space:nowrap; text-align:center; }
  #deliverybox .rs-ped-head p b{ font-weight:600; }
  #deliverybox .rs-ped-head p br, #deliverybox .rs-ped-head p .rs-ped-l2,
  #deliverybox .rs-ped-head p [data-rs-pedido-n="par"]{ display:none; }
}
@media only screen and (max-width:349px){
  #deliverybox{ right:50px; }
  #deliverybox .rs-ped-head{ width:40px; }
  #deliverybox .rs-ped-head p{ display:none !important; }
}

/* Barra fija del teléfono (nav-movil.php): icono junto a «Menú» */
.rs-ped-mini{ display:none; }
@media (max-width:900px){
  .rs-navm .rs-ped-mini{
    position:relative; display:grid; place-items:center; width:42px; height:40px; margin-left:auto; margin-right:-6px; padding:0;
    border:0; border-radius:999px; background:transparent; color:#fff; cursor:pointer; -webkit-tap-highlight-color:transparent;
  }
  .rs-navm .rs-ped-mini svg{ width:23px; height:23px; }
  .rs-navm .rs-ped-mini:active{ background:rgba(255,255,255,.08); }
  .rs-navm .rs-ped-mini:focus-visible{ outline:2px solid #bdff06; outline-offset:2px; }
  .rs-navm .rs-ped-mini .rs-ped-badge{ top:3px; right:2px; box-shadow:0 0 0 2px #0c0c0c; }
}

/* ── 2 · Botón «Agregar a mi pedido» (debajo del botón de WhatsApp) ── */
.rs-ped-add{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:46px; margin:10px 0 0; padding:10px 16px;
  box-sizing:border-box; border:1.5px solid #1b1b1b; border-radius:12px; background:#fff; color:#1b1b1b;
  font:inherit; font-size:.95rem; font-weight:700; line-height:1.2; cursor:pointer; text-align:center;
  -webkit-tap-highlight-color:transparent; transition:background .15s ease, border-color .15s ease, transform .1s ease;
}
.rs-ped-add[hidden]{ display:none !important; }
.rs-ped-add:hover{ background:#f4f6ef; }
.rs-ped-add:active{ transform:scale(.985); }
.rs-ped-add:focus-visible{ outline:3px solid #7DC900; outline-offset:2px; }
.rs-ped-add svg{ flex:none; }
.rs-ped-add.es-ya{ border-color:#7DC900; background:#f5fbe8; color:#2f5200; }
.rs-ped-add.es-ya svg{ color:#4d8a00; }
.rs-ped-add u{ text-decoration:underline; text-underline-offset:2px; }
.rs-ped-add--osc{ background:transparent; border-color:rgba(255,255,255,.55); color:#fff; }
.rs-ped-add--osc:hover{ background:rgba(255,255,255,.08); border-color:#fff; }
.rs-ped-add--osc.es-ya{ background:rgba(189,255,6,.12); border-color:#bdff06; color:#e9ffb0; }
.rs-ped-add--osc.es-ya svg{ color:#bdff06; }
.rs-ped-add--linea{ display:inline-flex; width:auto; min-height:0; margin:0 0 0 10px; padding:11.5px 22px; border-radius:9px; font-size:.94rem; vertical-align:top; }
@media (max-width:560px){ .rs-ped-add--linea{ display:flex; width:100%; min-height:46px; margin:10px 0 0; border-radius:12px; } }
.rs-ped-add--modal{ min-height:44px; margin-top:8px; font-size:.92rem; }

/* ── 3 · Panel ── */
html.rs-ped-abierto, html.rs-ped-abierto body{ overflow:hidden !important; }
.rs-ped-velo{
  position:fixed; inset:0; z-index:2147483100; background:rgba(10,10,10,.5);
  opacity:0; visibility:hidden; transition:opacity .25s ease, visibility 0s linear .25s;
}
.rs-ped-velo.on{ opacity:1; visibility:visible; transition:opacity .25s ease; }
.rs-ped-panel{
  position:fixed; top:0; right:0; bottom:0; z-index:2147483101; box-sizing:border-box;
  display:flex; flex-direction:column; width:min(440px, 100vw); background:#f6f6f3; color:#1b1b1b;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; font-size:15px; line-height:1.4; text-align:left;
  transform:translateX(104%); visibility:hidden;
  transition:transform .32s cubic-bezier(.22,.61,.36,1), visibility 0s linear .32s;
  box-shadow:-24px 0 60px -24px rgba(0,0,0,.5);
}
.rs-ped-panel *{ box-sizing:border-box; }
.rs-ped-panel.on{ transform:none; visibility:visible; transition:transform .32s cubic-bezier(.22,.61,.36,1), visibility 0s; }
.rs-ped-panel.arrastre{ transition:none; }
.rs-ped-agarre{ display:none; }
.rs-ped-cab{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 18px 14px 22px; background:#fff; border-bottom:1px solid #ececec; }
.rs-ped-cab h2{ margin:0; padding:0; font-size:1.25rem; font-weight:800; letter-spacing:-.01em; color:#111; line-height:1.2; font-family:inherit; text-transform:none; }
.rs-ped-sub{ margin:2px 0 0; padding:0; font-size:.8rem; color:#777; }
.rs-ped-x{ flex:none; width:40px; height:40px; border-radius:50%; border:1px solid #e3e3e3; background:#fff; color:#111; font-size:24px; line-height:1; cursor:pointer; padding:0; }
.rs-ped-x:hover{ border-color:#111; }
.rs-ped-x:focus-visible, .rs-ped-panel button:focus-visible{ outline:3px solid #7DC900; outline-offset:2px; }
.rs-ped-cuerpo{ flex:1 1 auto; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; padding:14px 14px 18px; }

.rs-ped-item{ background:#fff; border:1px solid #e8e8e4; border-radius:14px; padding:14px 14px 12px; margin:0 0 10px; box-shadow:0 2px 10px rgba(0,0,0,.03); }
.rs-ped-item-cab{ display:flex; align-items:center; gap:10px; margin:0 0 8px; }
.rs-ped-item-cab h3{ margin:0; padding:0; font-size:.98rem; font-weight:800; line-height:1.25; color:#111; font-family:inherit; text-transform:none; letter-spacing:0; }
.rs-ped-num{ flex:none; display:grid; place-items:center; width:26px; height:26px; border-radius:8px; background:#111; color:#bdff06; font-size:.78rem; font-weight:800; }
.rs-ped-img{ flex:none; width:44px; height:44px; border-radius:10px; object-fit:cover; background:#f1f1f1; }
.rs-ped-det{ margin:0; padding:0; }
.rs-ped-fila{ display:flex; gap:10px; padding:3px 0; font-size:.84rem; line-height:1.35; }
.rs-ped-fila dt{ flex:0 0 76px; margin:0; color:#8a8a8a; font-weight:600; }
.rs-ped-fila dd{ flex:1 1 auto; min-width:0; margin:0; color:#222; overflow-wrap:anywhere; }
.rs-ped-fila dd.rs-ped-sola{ color:#555; }
.rs-ped-item-pie{ display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:10px; padding-top:10px; border-top:1px dashed #e4e4e0; flex-wrap:wrap; }
.rs-ped-item-tot b{ display:block; font-size:1.12rem; font-weight:800; color:#111; line-height:1.1; }
.rs-ped-sub-m{ display:block; margin-top:3px; font-size:.72rem; color:#8a8a8a; }
.rs-ped-item-acc{ display:flex; gap:6px; }
.rs-ped-item-acc button{ min-height:36px; padding:0 12px; border:1px solid #dcdcd6; border-radius:9px; background:#fff; color:#222; font:inherit; font-size:.8rem; font-weight:700; cursor:pointer; }
.rs-ped-item-acc button:hover{ border-color:#111; }
.rs-ped-item-acc .rs-ped-quitar{ color:#b3261e; }
.rs-ped-item-acc .rs-ped-quitar:hover{ border-color:#b3261e; background:#fff6f5; }
.rs-ped-info{ margin:12px 4px 0; padding:12px 14px; border-radius:12px; background:#fff; border:1px solid #e8e8e4; }
.rs-ped-info p{ margin:0; padding:0; font-size:.8rem; line-height:1.5; color:#444; }
.rs-ped-info b{ color:#111; }
.rs-ped-info a{ color:#2f5200; font-weight:700; text-decoration:underline; overflow-wrap:anywhere; }
.rs-ped-envio{ display:flex; align-items:center; justify-content:center; gap:7px; margin:0 0 10px; padding:0; font-size:.78rem; font-weight:600; color:#3b6d00; text-align:center; }
.rs-ped-envio svg{ flex:none; }
.rs-ped-aviso{ margin:12px 4px 0; padding:0; font-size:.74rem; line-height:1.5; color:#777; }

.rs-ped-vacio{ padding:44px 18px; text-align:center; color:#555; }
.rs-ped-vacio p{ margin:0 0 8px; padding:0; font-size:.9rem; line-height:1.5; }
.rs-ped-vacio p b{ color:#111; }
.rs-ped-vacio-ico{ display:inline-grid; place-items:center; width:64px; height:64px; margin-bottom:12px; border-radius:50%; background:#fff; border:1px solid #e8e8e4; color:#7DC900; }
.rs-ped-vacio-ico svg{ width:30px; height:30px; }
.rs-ped-btn2{ margin-top:10px; min-height:44px; padding:0 18px; border:1.5px solid #111; border-radius:11px; background:#fff; color:#111; font:inherit; font-size:.9rem; font-weight:700; cursor:pointer; }

.rs-ped-pie{ flex:none; padding:14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background:#fff; border-top:1px solid #e6e6e6; box-shadow:0 -10px 24px -18px rgba(0,0,0,.35); }
.rs-ped-pie[hidden]{ display:none; }
.rs-ped-tot{ margin:0 0 12px; padding:0; }
.rs-ped-tot div{ display:flex; justify-content:space-between; gap:10px; padding:2px 0; font-size:.86rem; color:#555; }
.rs-ped-tot dt, .rs-ped-tot dd{ margin:0; }
.rs-ped-tot .rs-ped-total{ margin-top:6px; padding-top:8px; border-top:2px solid #111; font-size:1rem; color:#111; font-weight:800; align-items:baseline; }
.rs-ped-tot .rs-ped-total dt{ text-transform:uppercase; font-size:.8rem; letter-spacing:.05em; }
.rs-ped-tot .rs-ped-total dd{ font-size:1.35rem; }
.rs-ped-enviar{
  display:flex; align-items:center; justify-content:center; gap:9px; width:100%; min-height:52px; padding:0 16px;
  border:0; border-radius:13px; background:#25D366; color:#0b2e16; font:inherit; font-size:1rem; font-weight:800; cursor:pointer;
  box-shadow:0 8px 20px -10px rgba(37,211,102,.9); transition:filter .15s ease, transform .1s ease;
}
.rs-ped-enviar:hover{ filter:brightness(1.05); }
.rs-ped-enviar:active{ transform:scale(.985); }
.rs-ped-seguir{ display:block; width:100%; margin-top:6px; min-height:40px; border:0; background:none; color:#555; font:inherit; font-size:.85rem; font-weight:600; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.rs-ped-seguir:hover{ color:#111; }

/* Teléfono: hoja inferior tipo app */
@media (max-width:640px){
  .rs-ped-panel{
    top:auto; left:0; right:0; width:100%; height:calc(100% - 44px); max-height:calc(100dvh - 44px);
    border-radius:20px 20px 0 0; transform:translateY(104%);
    box-shadow:0 -20px 50px -20px rgba(0,0,0,.5);
  }
  .rs-ped-agarre{ display:block; position:absolute; top:7px; left:50%; width:40px; height:4px; margin-left:-20px; border-radius:4px; background:#d6d6d6; z-index:2; }
  .rs-ped-cab{ padding:20px 14px 12px 18px; border-radius:20px 20px 0 0; }
  .rs-ped-cuerpo{ padding:12px 12px 16px; }
  .rs-ped-fila dt{ flex-basis:70px; }
  .rs-ped-pie{ padding:12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* ── 4 · Aviso breve ── */
.rs-ped-toast{
  position:fixed; left:50%; bottom:calc(18px + env(safe-area-inset-bottom, 0px)); z-index:2147483050;
  display:flex; align-items:center; gap:12px; max-width:calc(100vw - 24px); padding:10px 10px 10px 16px; box-sizing:border-box;
  background:#111; color:#fff; border-radius:14px; box-shadow:0 14px 34px -10px rgba(0,0,0,.55);
  font:600 .88rem/1.3 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  transform:translate(-50%, 140%); opacity:0; visibility:hidden; pointer-events:none;
  transition:transform .3s cubic-bezier(.22,.61,.36,1), opacity .3s ease, visibility 0s linear .3s;
}
.rs-ped-toast.sobre-panel{ z-index:2147483200; }
.rs-ped-toast.on{ transform:translate(-50%, 0); opacity:1; visibility:visible; pointer-events:auto; transition:transform .3s cubic-bezier(.22,.61,.36,1), opacity .3s ease; }
.rs-ped-toast span{ display:flex; align-items:center; gap:7px; white-space:nowrap; }
.rs-ped-toast span svg{ color:#bdff06; }
.rs-ped-toast button{ flex:none; min-height:36px; padding:0 12px; border:0; border-radius:10px; background:#bdff06; color:#111; font:inherit; font-weight:800; cursor:pointer; white-space:nowrap; }

@media (prefers-reduced-motion:reduce){
  .rs-ped-panel, .rs-ped-velo, .rs-ped-toast, .rs-ped-badge{ transition:none; }
  .rs-ped-brinca .rs-ped-ico, .rs-ped-brinca.rs-ped-mini{ animation:none; }
}
@media print{ .rs-ped-panel, .rs-ped-velo, .rs-ped-toast, .rs-ped-add{ display:none !important; } }
