/* Carrito lateral (boceto Carrito), grupos de artículos (ronda 10), selector de cantidad y acceso a la cuenta.
   Lo usan la tienda, el checkout y la página del pedido. */

/* ---------- carrito (panel lateral) ---------- */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(460px, 100%); height: 100%; max-height: none; max-width: none;
  margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-drawer);
}
.drawer[open] { display: flex; flex-direction: column; animation: slide-in 200ms ease-out; }
.drawer::backdrop { background: var(--scrim); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 800 20px/1.1 var(--font-display); text-transform: uppercase; }
.drawer-head h2 span { color: var(--accent); }
.drawer-list { flex: 1; overflow: auto; padding: 8px 24px; }

/* ---------- grupos: Para <nick> · En tu cuenta · Códigos de paVos · Otros ---------- */
.cart-group { display: flex; flex-direction: column; }
.cart-group + .cart-group { margin-top: 14px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 6px; }
.group-head .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.group-head .who .icon { color: var(--accent-strong); flex: none; }
.group-head b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-head .mail { font-weight: 700; overflow-wrap: anywhere; }
/* Códigos de paVos y cuentas: el título entero y la ayuda debajo */
.group-head.wrap-head { flex-wrap: wrap; justify-content: flex-start; row-gap: 2px; }
.group-head.wrap-head .help { flex-basis: 100%; padding-left: 26px; }
.group-head.wrap-head b { white-space: normal; }
.code-qty { white-space: nowrap; }
.platform-pill { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; }

/* ---------- filas ---------- */
.cart-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cart-row:last-child { border-bottom: 0; }
.mini.cart { width: 56px; height: 68px; }
.cart-row.gone { opacity: .75; }
.cart-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-row .name { font: 700 19px/1.1 var(--font-tight); }
.cart-row .type { font-size: 14px; color: var(--muted); }
.cart-row .vb-amount { font-size: 15px; color: var(--body); }
.cart-row .gone-note { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--bad); }
.cart-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-row .price { font: 800 19px var(--font-tight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-row .unit { font: 600 13px var(--font-tight); color: var(--muted); white-space: nowrap; }
.cart-row.gone .price { text-decoration: line-through; }

/* Selector "− cantidad +" (ronda 10): manuales y códigos, de 1 a 10. Botones de 40 px. */
.qty-step { display: inline-flex; align-items: center; align-self: flex-start; margin-top: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--paper); }
.qty-step button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); cursor: pointer; }
.qty-step button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-ink); }
.qty-step button:disabled { color: var(--line-strong); cursor: not-allowed; }
.qty-step output { min-width: 28px; text-align: center; font: 800 17px var(--font-tight); font-variant-numeric: tabular-nums; }

/* ---------- pie ---------- */
.drawer-foot { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--paper-soft); }
.drawer-foot .vb-line { font: 600 15px var(--font-tight); color: var(--body); }
.drawer-foot .line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-foot .total-label { font-weight: 600; font-size: 17px; }
.drawer-foot .notice-text { font-size: 14px; color: var(--muted); }
.drawer-foot .notice-text.bad { color: var(--bad); font-weight: 600; }
.drawer-foot .keep { align-self: center; font-weight: 600; font-size: 15px; color: var(--body); background: none; border: 0; text-decoration: underline; }
.mini-currency { height: 36px; padding: 0 12px; gap: 6px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: 700 14px var(--font-ui); display: inline-flex; align-items: center; }
.mini-currency + .currency-menu { top: auto; bottom: calc(100% + 8px); }
@media (max-width: 479px) {
  .drawer-head, .drawer-list { padding-left: 16px; padding-right: 16px; }
  .drawer-foot { padding: 16px; }
  .cart-row { gap: 10px; }
  .cart-row .mini { width: 60px; height: 74px; }
  .cart-row .name { font-size: 17px; }
}

/* ---------- contraseña con mostrar/ocultar (ventana "Acceso a tu cuenta de Epic" y "Paga tu pedido") ---------- */
.pass-wrap { position: relative; display: block; }
.pass-wrap .input { width: 100%; padding-right: 52px; }
.pass-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--body); cursor: pointer; }
.pass-toggle:hover { background: var(--accent-soft); color: var(--accent-ink); }
.choice .field { margin: 0; }
.fw-body .help.lock-note { display: flex; gap: 8px; align-items: flex-start; }
.fw-body .help.lock-note .icon { flex: none; color: var(--accent-strong); margin-top: 1px; }
