/* =========================================================================
   CHOCATA — Tienda: carrito y checkout
   Hoja aparte para no tocar style.css. Reutiliza sus tokens de color y ritmo.
   ========================================================================= */

/* ---------- Botón flotante ---------- */
.carrito-btn {
  position: fixed; right: clamp(1rem, 3vw, 2rem);
  bottom: calc(clamp(1rem, 3vw, 2rem) + 56px + .75rem);
  z-index: 90; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--cream);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .9);
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.carrito-btn:hover { transform: scale(1.07); border-color: var(--gold); }
.carrito-btn svg { width: 24px; height: 24px; }
.carrito-btn__n {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 100px;
  background: var(--gold); color: #17110D;
  font-size: .7rem; font-weight: 700; line-height: 22px; text-align: center;
  opacity: 0; transform: scale(.6); transition: all var(--mid) var(--ease);
}
.carrito-btn.tiene .carrito-btn__n { opacity: 1; transform: scale(1); }

/* ---------- Panel lateral ---------- */
.carrito { position: fixed; inset: 0; z-index: 210; display: none; }
.carrito.is-open { display: block; }
.carrito__velo {
  position: absolute; inset: 0; background: rgba(6, 4, 3, .8);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.carrito__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line-strong);
}
.carrito__cab {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--line);
}
.carrito__cab h2 { font-family: var(--display); font-size: 1.6rem; color: var(--cream); }
.carrito__cerrar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: transparent; border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--cream);
  transition: background var(--fast) var(--ease);
}
.carrito__cerrar:hover { background: rgba(248, 243, 235, .08); }
.carrito__cerrar svg { width: 17px; height: 17px; }

.carrito__lista {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 1.1rem 1.5rem; display: grid; gap: .8rem; align-content: start;
}
.carrito__vacio {
  color: var(--faint); font-size: .92rem; line-height: 1.7;
  text-align: center; padding: 3rem 1rem;
}

/* ---------- Línea de pedido ---------- */
.linea {
  display: grid; gap: .35rem 1rem;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  grid-template-areas: 'txt total quitar' 'cant total quitar';
  align-items: center;
  padding: .9rem 1rem; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface-2);
}
.linea__txt { grid-area: txt; min-width: 0; }
.linea__txt b { display: block; font-size: .95rem; color: var(--cream); font-weight: 500; }
.linea__txt span { font-size: .8rem; color: var(--muted); }
.linea__cant { grid-area: cant; display: flex; align-items: center; gap: .3rem; }
.linea__cant button {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface-3); border: 1px solid var(--line);
  color: var(--cream); font-size: 1rem; line-height: 1;
  transition: border-color var(--fast) var(--ease);
}
.linea__cant button:hover { border-color: var(--gold); }
.linea__cant b {
  min-width: 30px; text-align: center; font-size: .9rem;
  color: var(--cream); font-variant-numeric: tabular-nums;
}
.linea__total {
  grid-area: total; font-family: var(--display); font-size: 1.15rem;
  color: var(--gold-soft); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.linea__quitar {
  grid-area: quitar; width: 28px; height: 28px; border: 0;
  background: transparent; color: var(--faint);
  display: grid; place-items: center; border-radius: 6px;
  transition: color var(--fast) var(--ease);
}
.linea__quitar:hover { color: var(--berry); }
.linea__quitar svg { width: 14px; height: 14px; }

/* ---------- Resumen ---------- */
.carrito__pie { padding: 1.2rem 1.5rem 1.5rem; border-top: 1px solid var(--line); display: grid; gap: .8rem; }
.carrito__fila { display: flex; align-items: baseline; justify-content: space-between; }
.carrito__fila span { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.carrito__fila b {
  font-family: var(--display); font-size: 1.9rem; color: var(--cream);
  font-weight: 500; font-variant-numeric: tabular-nums;
}
.carrito__envio { font-size: .78rem; color: var(--faint); line-height: 1.5; }
.carrito__pagar { width: 100%; }

/* ---------- Comprar desde la ficha ---------- */
.comprar { display: grid; gap: .8rem; }
.tallas { display: flex; flex-wrap: wrap; gap: .5rem; }
.talla {
  display: grid; gap: .15rem; text-align: left;
  padding: .6rem 1rem; min-height: 52px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: transparent; transition: all var(--fast) var(--ease);
}
.talla:hover { border-color: var(--line-strong); }
.talla[aria-pressed="true"] { border-color: var(--gold); background: rgba(242, 176, 30, .08); }
.talla span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.talla b { font-family: var(--display); font-size: 1.05rem; color: var(--cream); font-weight: 500; }
.talla[aria-pressed="true"] b { color: var(--gold-soft); }
.comprar__sin {
  font-size: .85rem; color: var(--faint);
  padding: .9rem 1.1rem; border: 1px dashed var(--line-strong); border-radius: var(--r-md);
}

/* ---------- Checkout ---------- */
.checkout { position: fixed; inset: 0; z-index: 220; display: flex; align-items: center; justify-content: center; padding: clamp(0px, 3vw, 2rem); }
.checkout__velo { position: absolute; inset: 0; background: rgba(6, 4, 3, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.checkout__panel {
  position: relative; z-index: 2; width: min(680px, 100%); max-height: 92svh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
}
.checkout__cab {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 1.6rem 1rem; position: sticky; top: 0;
  background: var(--surface); border-bottom: 1px solid var(--line); z-index: 2;
}
.checkout__cab h2 { font-family: var(--display); font-size: 1.7rem; color: var(--cream); margin-top: .5rem; }

.checkout__form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  padding: 1.4rem 1.6rem 1.7rem;
}
.campo { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.campo--ancho { grid-column: 1 / -1; }
.campo label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.campo label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  background: var(--surface-2); color: var(--cream);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; font-size: .95rem;
  transition: border-color var(--fast) var(--ease);
}
.campo textarea { min-height: 0; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--gold); }
.campo__ayuda { font-size: .72rem; color: var(--faint); }
.campo__error { font-size: .74rem; color: var(--berry); min-height: 0; }
.campo.tiene-error input, .campo.tiene-error select { border-color: var(--berry); }

.checkout__resumen {
  grid-column: 1 / -1; display: grid; gap: .5rem; margin-top: .3rem;
  padding: 1.1rem 1.2rem; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.checkout__linea { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; color: var(--muted); }
.checkout__linea b { color: var(--cream); font-weight: 500; font-variant-numeric: tabular-nums; }
.checkout__linea--envio b { color: var(--faint); font-weight: 400; }
.checkout__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-top: .7rem; margin-top: .2rem; border-top: 1px solid var(--line);
}
.checkout__total span { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.checkout__total b { font-family: var(--display); font-size: 1.7rem; color: var(--gold-soft); font-variant-numeric: tabular-nums; }

.envio-gratis { color: var(--leaf); font-weight: 600; }
.checkout__falta {
  font-size: .78rem; color: var(--gold); line-height: 1.5;
  padding-top: .2rem; border-top: 1px dashed var(--line);
}
.checkout__falta b { color: var(--gold-soft); font-weight: 600; }
.checkout__aviso { grid-column: 1 / -1; font-size: .85rem; color: var(--berry); min-height: 0; }
.checkout__aviso a { color: var(--gold); text-decoration: underline; }
.checkout__pagar { grid-column: 1 / -1; width: 100%; }
.checkout__pagar:disabled { opacity: .55; cursor: progress; }
.checkout__legal { grid-column: 1 / -1; font-size: .74rem; line-height: 1.6; color: var(--faint); }
.checkout__legal a { color: var(--muted); text-decoration: underline; }
.checkout__legal a:hover { color: var(--gold); }

@media (max-width: 600px) {
  .checkout { padding: 0; }
  .checkout__panel { max-height: 100svh; border-radius: 0; height: 100%; }
  .checkout__form { grid-template-columns: 1fr; }
  .carrito__panel { width: 100%; }
  .carrito-btn { width: 50px; height: 50px; bottom: calc(clamp(1rem, 3vw, 2rem) + 56px + .6rem); }
  .linea { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'txt quitar' 'cant total'; }
}

/* ---------- Combos ---------- */
.combos__grid {
  display: grid; gap: 1rem; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.combos__cargando { color: var(--faint); font-size: .9rem; grid-column: 1 / -1; text-align: center; }

.combo {
  position: relative; display: grid; gap: .9rem; align-content: start;
  padding: 1.6rem 1.5rem 1.5rem; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(160deg, rgba(248,243,235,.045), rgba(248,243,235,.012));
  transition: border-color .25s ease, transform .25s ease;
}
@media (hover: hover) {
  .combo:hover { border-color: var(--line-strong); transform: translateY(-3px); }
}
.combo--destacado { border-color: rgba(242,176,30,.34); }

.combo__ahorro {
  position: absolute; top: -.7rem; right: 1.2rem;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--gold); color: #17110D;
  font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.combo__kicker {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.combo__nombre {
  font-family: var(--display); font-size: 1.5rem; font-weight: 500; color: var(--cream); line-height: 1.15;
}
.combo__desc { font-size: .88rem; line-height: 1.65; color: var(--muted); }

.combo__trae { display: grid; gap: .45rem; padding-top: .2rem; }
.combo__trae li { display: grid; grid-template-columns: 16px 1fr; gap: .55rem; align-items: start; }
.combo__trae svg { width: 16px; height: 16px; color: var(--gold); margin-top: .18rem; }
.combo__trae span { font-size: .84rem; line-height: 1.5; color: var(--muted); }

.combo__precios {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem;
  margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.combo__cop { font-family: var(--display); font-size: 1.75rem; font-weight: 500; color: var(--gold-soft); }
.combo__antes { font-size: .92rem; color: var(--faint); text-decoration: line-through; }
.combo__peso { font-size: .74rem; color: var(--faint); letter-spacing: .06em; }
.combo__btn { width: 100%; justify-content: center; min-height: 46px; }
.combo__btn.is-listo { background: rgba(242,176,30,.14); color: var(--gold-soft); }

/* ---------- Sello de combo dentro del carrito ---------- */
.linea__sello {
  display: inline-block; margin-left: .35rem; padding: .1rem .38rem; border-radius: 5px;
  background: rgba(242,176,30,.16); color: var(--gold-soft);
  font-size: .62rem; font-style: normal; letter-spacing: .1em; text-transform: uppercase;
}
.linea__ahorro { display: block; font-size: .76rem; color: var(--gold); }

/* ---------- Pedido mínimo ---------- */
.carrito__minimo {
  display: grid; gap: .5rem; padding: .9rem 1rem; border-radius: 12px;
  border: 1px solid rgba(242,176,30,.28); background: rgba(242,176,30,.06);
}
.carrito__minimo b { font-size: .88rem; color: var(--gold-soft); font-weight: 500; }
.carrito__minimo span { font-size: .78rem; line-height: 1.55; color: var(--muted); }
.carrito__vercombos {
  justify-self: start; min-height: 44px; padding: 0 .2rem;
  background: none; border: 0; color: var(--gold); cursor: pointer;
  font: inherit; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px;
}
.carrito__pagar[disabled] { opacity: .45; cursor: not-allowed; }

.checkout__ahorro {
  margin-top: .6rem; font-size: .8rem; line-height: 1.6; color: var(--muted);
}
.checkout__ahorro b { color: var(--gold-soft); font-weight: 500; }

.combos__nota {
  margin-top: 2rem; text-align: center; font-size: .82rem; line-height: 1.7; color: var(--faint);
}
.combos__nota b { color: var(--muted); font-weight: 500; }

/* ---------- Medios de pago ---------- */
.medios { grid-column: 1 / -1; display: grid; gap: .7rem; }
.medios__titulo {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}
.medios__lista {
  display: grid; gap: .5rem; list-style: none; padding: 0; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.medio {
  display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto;
  gap: .1rem .6rem; align-items: center;
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 11px;
  background: rgba(248, 243, 235, .025);
}
.medio svg { grid-row: 1 / 3; width: 20px; height: 20px; color: var(--muted); }
.medio b { font-size: .85rem; font-weight: 500; color: var(--cream); }
.medio span { font-size: .72rem; color: var(--faint); line-height: 1.3; }
.medio--destacado { border-color: rgba(242, 176, 30, .32); background: rgba(242, 176, 30, .05); }
.medio--destacado svg { color: var(--gold); }
.medio--destacado b { color: var(--gold-soft); }

/* ---------- Nota de la causa en el carrito ---------- */
.carrito__causa {
  font-size: .74rem; line-height: 1.55; color: var(--gold-soft); opacity: .85;
  padding-top: .2rem; border-top: 1px dashed rgba(242, 176, 30, .25); margin-top: .2rem;
}

/* ---------- Cata, la asistente ---------- */
.bot-btn {
  position: fixed; left: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #17110D; border: 0;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .9);
  transition: transform var(--fast) var(--ease);
  cursor: pointer;
}
.bot-btn:hover { transform: scale(1.07); }
.bot-btn svg { width: 26px; height: 26px; }

/* El display de abajo le ganaba al atributo hidden y el panel nacía abierto:
   esta regla devuelve a hidden su autoridad. */
.bot[hidden] { display: none; }
.bot {
  position: fixed; left: clamp(.6rem, 2vw, 2rem); bottom: clamp(.6rem, 2vw, 2rem);
  z-index: 205; width: min(390px, calc(100vw - 1.2rem));
  display: flex; flex-direction: column; max-height: min(560px, 78svh);
  background: var(--surface, #171310); border: 1px solid var(--line-strong);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .95);
}
.bot__cab {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.1rem; border-bottom: 1px solid var(--line);
  background: rgba(242, 176, 30, .07);
}
.bot__cab b { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--cream); }
.bot__cab span { font-size: .72rem; color: var(--faint); }
.bot__cerrar {
  /* 44 px: el mínimo táctil real. A 32 px el dedo falla el botón y el panel
     parece que "no se puede cerrar". */
  display: grid; place-items: center; width: 44px; height: 44px;
  background: rgba(248, 243, 235, .05); border: 1px solid var(--line);
  border-radius: 10px; color: var(--cream); cursor: pointer; flex: 0 0 auto;
}
.bot__cerrar:hover { background: rgba(248,243,235,.08); color: var(--cream); }
.bot__cerrar svg { width: 18px; height: 18px; }

.bot__hilo {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: .6rem; align-content: start;
  padding: 1rem; scrollbar-width: thin;
}
.bot__msg {
  max-width: 88%; padding: .65rem .85rem; border-radius: 12px 12px 12px 4px;
  background: rgba(248, 243, 235, .06); border: 1px solid var(--line);
  font-size: .85rem; line-height: 1.6; color: var(--muted);
}
.bot__msg b { color: var(--cream); font-weight: 500; }
.bot__msg a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.bot__msg--mia {
  justify-self: end; border-radius: 12px 12px 4px 12px;
  background: rgba(242, 176, 30, .12); border-color: rgba(242, 176, 30, .25);
  color: var(--cream);
}
.bot__accion {
  display: block; margin-top: .6rem; padding: .5rem .8rem; border-radius: 9px;
  background: var(--gold); border: 0; color: #17110D !important;
  font: inherit; font-size: .8rem; font-weight: 600; text-align: center;
  text-decoration: none !important; cursor: pointer;
}

.bot__chips {
  display: flex; gap: .4rem; flex-wrap: wrap;
  padding: .6rem 1rem; border-top: 1px solid var(--line);
}
.bot__chip {
  padding: .4rem .7rem; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--line-strong);
  color: var(--muted); font: inherit; font-size: .74rem;
}
.bot__chip:hover { border-color: var(--gold); color: var(--gold-soft); }

.bot__form {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem;
  padding: .7rem 1rem 1rem;
}
.bot__form input {
  min-height: 44px; padding: 0 .9rem; border-radius: 10px;
  background: rgba(248, 243, 235, .05); border: 1px solid var(--line-strong);
  color: var(--cream); font: inherit; font-size: .88rem;
}
.bot__form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.bot__form .btn { min-height: 44px; padding: 0 1rem; }

/* ---------- Aviso de agregado al pedido ---------- */
.carrito-aviso {
  position: fixed; right: clamp(1rem, 3vw, 2rem);
  top: calc(var(--aviso-h, 0px) + 86px);
  z-index: 150; display: flex; align-items: center; gap: .6rem;
  padding: .65rem .9rem; border-radius: 12px;
  background: var(--surface, #171310); border: 1px solid rgba(242, 176, 30, .4);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .9);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: min(320px, calc(100vw - 2rem));
}
.carrito-aviso.es-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.carrito-aviso svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--gold); }
.carrito-aviso span { font-size: .82rem; color: var(--cream); line-height: 1.35; }
.carrito-aviso button {
  flex: 0 0 auto; min-height: 34px; padding: 0 .7rem; border-radius: 8px; cursor: pointer;
  background: var(--gold); border: 0; color: #17110D;
  font: inherit; font-size: .76rem; font-weight: 600;
}

/* Pulso del botón del carrito al agregar */
.carrito-btn.pulso { animation: carritoPulso .6s ease; }
@keyframes carritoPulso {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.22); border-color: var(--gold); }
}

/* Seguir comprando dentro del panel */
.carrito__seguir {
  width: 100%; min-height: 44px; margin-top: .1rem; cursor: pointer;
  background: none; border: 0; color: var(--muted);
  font: inherit; font-size: .82rem;
}
.carrito__seguir:hover { color: var(--gold-soft); }


/* ---------- Carrito en la barra de navegación ---------- */
.nav-carrito {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: none; border: 1px solid transparent; color: var(--cream);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav-carrito:hover { border-color: var(--line-strong); background: rgba(248, 243, 235, .05); }
.nav-carrito svg { width: 22px; height: 22px; }
.nav-carrito .carrito-btn__n {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--gold); color: #17110D;
  font-size: .66rem; font-weight: 700; line-height: 1;
  opacity: 0; transform: scale(.4);
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.nav-carrito.tiene .carrito-btn__n { opacity: 1; transform: scale(1); }
.nav-carrito.pulso { animation: carritoPulso .6s ease; }

/* ---------- Central de despachos ---------- */
/* hidden debe mandar sobre el display: la puerta desaparece al entrar. */
.admin-puerta[hidden], #tablero[hidden] { display: none; }
.admin-puerta { display: grid; gap: 1rem; max-width: 48ch; }
.admin-puerta p { font-size: .92rem; line-height: 1.7; color: var(--muted); }
.admin-puerta__fila { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.admin-puerta input {
  min-height: 48px; padding: 0 1rem; border-radius: 11px;
  background: rgba(248,243,235,.05); border: 1px solid var(--line-strong);
  color: var(--cream); font: inherit;
}
.admin-puerta input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.admin-puerta__error { font-size: .85rem; color: var(--berry); min-height: 1.2em; }

.admin-filtros { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.admin-filtro {
  padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--line-strong); color: var(--muted); font: inherit; font-size: .8rem;
}
.admin-filtro[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-soft); background: rgba(242,176,30,.08); }

.admin-lista { display: grid; gap: 1rem; }
.admin-vacio { color: var(--faint); font-size: .9rem; }
.admin-pedido {
  display: grid; gap: .55rem; padding: 1.2rem 1.3rem;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, rgba(248,243,235,.04), rgba(248,243,235,.01));
}
.admin-pedido[data-estado="REVISAR_MONTO"] { border-color: rgba(214,35,107,.5); }
.admin-pedido header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.admin-pedido time { font-size: .76rem; color: var(--faint); }
.admin-estado {
  padding: .28rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.admin-estado--ok { background: rgba(66,180,99,.15); color: #7fe0a0; }
.admin-estado--espera { background: rgba(242,176,30,.14); color: var(--gold-soft); }
.admin-estado--alerta { background: rgba(214,35,107,.16); color: #ff86b6; }
.admin-estado--gris { background: rgba(248,243,235,.08); color: var(--faint); }
.admin-ref { font-family: var(--display); font-size: 1.05rem; color: var(--cream); letter-spacing: .04em; }
.admin-lineas { display: grid; gap: .2rem; padding-left: 1.1rem; list-style: disc; }
.admin-lineas li { font-size: .88rem; color: var(--muted); }
.admin-lineas em { color: var(--faint); font-style: normal; }
.admin-total { font-size: .85rem; color: var(--muted); }
.admin-total b { color: var(--gold-soft); }
.admin-cliente { font-size: .88rem; line-height: 1.6; color: var(--muted); padding-top: .3rem; border-top: 1px dashed var(--line); }
.admin-cliente b { color: var(--cream); font-weight: 500; }
.admin-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.admin-acciones .btn { min-height: 42px; padding: .5rem 1rem; font-size: .72rem; }

/* ---------- Estadísticas y despacho ---------- */
.admin-stats {
  display: grid; gap: .6rem; margin-bottom: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.admin-stat {
  display: grid; gap: .15rem; padding: .9rem 1rem; border-radius: 13px;
  border: 1px solid var(--line); background: rgba(248,243,235,.03);
}
.admin-stat b { font-family: inherit; font-size: 1.15rem; color: var(--gold-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-stat span { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.admin-stat--pendiente { border-color: rgba(242,176,30,.4); }
.admin-stat--ancho { grid-column: span 2; }
.admin-estado--atencion { background: rgba(242,176,30,.2); color: var(--gold-soft); }

.admin-despachar {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem;
  padding-top: .5rem; border-top: 1px dashed var(--line); margin-top: .2rem;
}
.admin-despachar input {
  min-height: 44px; padding: 0 .9rem; border-radius: 10px;
  background: rgba(248,243,235,.05); border: 1px solid var(--line-strong);
  color: var(--cream); font: inherit; font-size: .85rem;
}
.admin-despachar input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.admin-despachar .btn { min-height: 44px; padding: .5rem 1rem; font-size: .7rem; }
.admin-guia { font-size: .84rem; color: #7fe0a0; padding-top: .3rem; }
.admin-guia b { font-weight: 600; }
@media (max-width: 480px) { .admin-despachar { grid-template-columns: 1fr; } }

/* ---------- Rótulo de envío (solo existe al imprimir) ---------- */
#rotulo { display: none; }

@media print {
  body.imprimiendo > :not(#rotulo) { display: none !important; }
  body.imprimiendo { background: #fff !important; }
  body.imprimiendo #rotulo { display: block; }

  .rotulo__marco {
    font-family: Arial, Helvetica, sans-serif; color: #000;
    border: 3px solid #000; border-radius: 6px;
    padding: 8mm; margin: 4mm auto 0; max-width: 130mm;
  }
  .rotulo__cabecera {
    display: flex; align-items: center; justify-content: space-between;
    gap: 6mm; margin: 0 0 4mm; padding-bottom: 3mm; border-bottom: 1px solid #000;
  }
  .rotulo__logo { height: 14mm; width: auto; }
  .rotulo__ref { font-size: 10pt; letter-spacing: 1px; margin: 0; }
  .rotulo__rol {
    font-size: 9pt; letter-spacing: 3px; text-transform: uppercase;
    margin: 0 0 1.5mm; font-weight: bold;
  }
  .rotulo__nombre { font-size: 20pt; font-weight: bold; margin: 0 0 1.5mm; }
  .rotulo__linea { font-size: 11pt; margin: 0 0 1.5mm; }
  .rotulo__direccion { font-size: 15pt; font-weight: bold; margin: 1mm 0; }
  .rotulo__ciudad {
    font-size: 17pt; font-weight: bold; text-transform: uppercase; margin: 0 0 2mm;
  }
  .rotulo__corte { border: 0; border-top: 1px dashed #000; margin: 4mm 0; }
  .rotulo__contenido { font-size: 9pt; margin: 2mm 0 0; color: #333; }
}

/* ---------- Control logístico: panel superior ---------- */
.admin-stats { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }
.log-grupo {
  display: grid; gap: .7rem; align-content: start;
  padding: 1rem 1.1rem; border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(248,243,235,.045), rgba(248,243,235,.01));
}
.log-grupo header { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.log-grupo h2 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.log-grupo header b { font-size: 1.3rem; color: var(--cream); font-weight: 600; font-variant-numeric: tabular-nums; }
.log-fichas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.log-ficha {
  display: grid; gap: .1rem; justify-items: start; text-align: left;
  min-height: 44px; padding: .6rem .7rem; border-radius: 12px; cursor: pointer;
  background: rgba(248,243,235,.03); border: 1px solid var(--line);
  color: var(--muted); font: inherit;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.log-ficha b { font-size: 1.35rem; font-weight: 600; line-height: 1.1; color: var(--cream); font-variant-numeric: tabular-nums; }
.log-ficha span { font-size: .72rem; font-weight: 500; color: var(--muted); }
.log-ficha small { font-size: .62rem; color: var(--faint); }
.log-ficha--verde b { color: #7fe0a0; }
.log-ficha--ambar b { color: var(--gold-soft); }
.log-ficha--roja b { color: #ff86b6; }
.log-ficha--roja:not(.log-ficha--vacia) { border-color: rgba(214,35,107,.5); background: rgba(214,35,107,.07); }
.log-ficha--ambar:not(.log-ficha--vacia) { border-color: rgba(242,176,30,.4); }
.log-ficha--vacia { opacity: .55; }
.log-ficha:hover { border-color: var(--line-strong); background: rgba(248,243,235,.06); }
.log-ficha[aria-pressed="true"] { border-color: var(--gold); background: rgba(242,176,30,.1); }
.log-ficha--dato { cursor: default; }
.log-ficha--dato:hover { border-color: var(--line); background: rgba(248,243,235,.03); }
.log-grupo--dinero { justify-items: start; }
.log-dinero { font-size: 1.5rem; font-weight: 600; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.log-enlace { font-size: .74rem; color: var(--faint); text-decoration: underline; text-underline-offset: 3px; }
.log-enlace:hover { color: var(--gold-soft); }

/* ---------- Control logístico: la tabla ---------- */
.log-caja { border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; background: rgba(248,243,235,.02); }
.log-tabla { width: 100%; border-collapse: collapse; font-size: .84rem; }
.log-tabla th {
  position: sticky; top: 0; text-align: left; white-space: nowrap;
  padding: .3rem .5rem; border-bottom: 1px solid var(--line-strong);
  background: #14100C;
}
.log-tabla th button {
  min-height: 40px; padding: .3rem .35rem; cursor: pointer;
  background: none; border: 0; color: var(--faint); font: inherit;
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
}
.log-tabla th button:hover { color: var(--gold-soft); }
.log-tabla th[aria-sort="ascending"] button, .log-tabla th[aria-sort="descending"] button { color: var(--gold-soft); }
.log-tabla td { padding: .68rem .85rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.log-fila { cursor: pointer; transition: background var(--fast) var(--ease); }
.log-fila:hover td { background: rgba(248,243,235,.04); }
.log-fila:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.log-fila[aria-expanded="true"] td { background: rgba(242,176,30,.05); border-bottom-style: dashed; }
/* Pendiente = titila; el color dice la urgencia (verde, ámbar, rojo). */
.log-fila--pendiente { --pulso: rgba(66, 180, 99, .95); }
.log-fila--enplazo { --pulso: rgba(242, 176, 30, .95); }
.log-fila--urgente { --pulso: rgba(214, 35, 107, .95); }
.log-fila--pendiente td:first-child { animation: logTitilarBarra 1.6s ease-in-out infinite; }
@keyframes logTitilarBarra {
  0%, 100% { box-shadow: inset 3px 0 0 var(--pulso); }
  50% { box-shadow: inset 3px 0 0 transparent; }
}
/* La tarjeta desplegada de un pedido por despachar titila en verde
   hasta que cambia de estado (al despacharlo se repinta y queda quieta). */
.log-detalle .admin-pedido[data-estado="APPROVED"] {
  border-style: solid;
  animation: logTitilarMarco 1.6s ease-in-out infinite;
}
@keyframes logTitilarMarco {
  0%, 100% { border-color: rgba(66, 180, 99, .75); }
  50% { border-color: rgba(66, 180, 99, .15); }
}
@media (prefers-reduced-motion: reduce) {
  .log-fila--pendiente td:first-child { animation: none; box-shadow: inset 3px 0 0 var(--pulso); }
  .log-detalle .admin-pedido[data-estado="APPROVED"] { animation: none; border-color: rgba(66, 180, 99, .6); }
}
.log-nombre { color: var(--cream); font-weight: 500; }
.log-num { text-align: right; font-variant-numeric: tabular-nums; }
.log-plata { color: var(--gold-soft); font-weight: 600; white-space: nowrap; }
.log-mas { width: 2.2rem; text-align: center; font-size: 1.15rem; color: var(--faint); }
.log-fila:hover .log-mas { color: var(--gold-soft); }
.log-tabla .admin-estado { white-space: nowrap; font-size: .64rem; padding: .24rem .6rem; }
.log-detalle > td { padding: .9rem; background: rgba(248,243,235,.02); }
.log-detalle .admin-pedido { border-style: dashed; }
.log-detalle[hidden] { display: none; }

@media (max-width: 640px) {
  .log-oc { display: none; }
  .log-tabla td { padding: .6rem .5rem; }
  .log-tabla { font-size: .78rem; }
  .log-fichas { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Estudio (edición de contenido) ---------- */
#taller[hidden] { display: none; }
#taller { display: grid; gap: 1.2rem; }
.est-carta {
  display: grid; gap: 1rem; padding: 1.3rem 1.4rem;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, rgba(248,243,235,.045), rgba(248,243,235,.01));
}
.est-carta__cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.est-carta__cabecera h2 { font-family: var(--display); font-size: 1.25rem; color: var(--cream); font-weight: 500; }
.est-carta__cabecera p { font-size: .82rem; color: var(--faint); margin-top: .15rem; }
.est-campos { display: grid; gap: .9rem; transition: opacity var(--fast) var(--ease); }
.est-dos { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.est-campo { display: grid; gap: .35rem; }
.est-campo > span {
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 600;
}
.est-campo em { font-style: normal; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.est-campo em.est-tope { color: #ff86b6; }
.est-campo input, .est-campo textarea {
  min-height: 46px; padding: .6rem .9rem; border-radius: 11px; resize: vertical;
  background: rgba(248,243,235,.05); border: 1px solid var(--line-strong);
  color: var(--cream); font: inherit; font-size: .9rem; line-height: 1.5;
}
.est-campo input:focus, .est-campo textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.est-interruptor { display: flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none; }
.est-interruptor input { position: absolute; opacity: 0; }
.est-interruptor i {
  width: 46px; height: 26px; border-radius: 999px; position: relative; flex: 0 0 auto;
  background: rgba(248,243,235,.12); border: 1px solid var(--line-strong);
  transition: background var(--fast) var(--ease);
}
.est-interruptor i::after {
  content: ''; position: absolute; top: 2px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--cream);
  transition: transform var(--fast) var(--ease);
}
.est-interruptor input:checked + i { background: rgba(66,180,99,.55); }
.est-interruptor input:checked + i::after { transform: translateX(19px); }
.est-interruptor input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.est-interruptor span { font-size: .78rem; color: var(--muted); min-width: 5.5ch; }

.est-previa { display: grid; gap: .4rem; }
.est-previa__titulo { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.est-previa__aviso {
  padding: .65rem 1rem; border-radius: 10px; text-align: center;
  background: linear-gradient(90deg, #E9A912, #F2B01E 45%, #D99C05);
  color: #241505; font-size: .88rem; line-height: 1.5; font-weight: 500;
}
.est-previa__aviso b { color: #101010; font-weight: 700; }
.est-previa__aviso u { font-weight: 700; text-underline-offset: 3px; }
.est-previa__hero {
  padding: 1.1rem 1.2rem; border-radius: 12px; display: grid; gap: .5rem;
  border: 1px dashed var(--line-strong); background: rgba(10,8,6,.5);
}
.est-previa__h1 { font-family: var(--display); font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--cream); line-height: 1.15; }
.est-previa__h1 em { color: var(--gold-soft); }
.est-previa__lede { font-size: .88rem; color: var(--muted); line-height: 1.6; }

.est-acciones { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.est-acciones .btn { min-height: 46px; }
.est-resultado { font-size: .85rem; color: #7fe0a0; }
.est-resultado--error { color: #ff86b6; }

@media (max-width: 560px) { .est-dos { grid-template-columns: 1fr; } }

/* ---------- Estudio: productos y precios ---------- */
.est-productos { display: grid; gap: .5rem; }
.est-producto {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(248,243,235,.03);
  transition: opacity var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.est-producto--oculto { opacity: .45; }
.est-producto--volando { opacity: .4; border-style: dashed; }
.est-producto--destino { border-color: var(--gold); }
.est-producto__fila {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem;
}
.est-producto__asa { cursor: grab; color: var(--faint); font-size: 1.1rem; padding: .3rem; }
.est-producto__nombre {
  flex: 1; min-height: 44px; text-align: left; cursor: pointer;
  background: none; border: 0; color: var(--cream); font: inherit; font-size: .92rem; font-weight: 500;
}
.est-producto__nombre:hover { color: var(--gold-soft); }
.est-producto__resumen { font-size: .7rem; color: var(--faint); white-space: nowrap; }
.est-producto__flechas { display: flex; gap: .2rem; }
.est-producto__flechas button {
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  background: none; border: 1px solid var(--line); color: var(--muted); font: inherit;
}
.est-producto__flechas button:hover { border-color: var(--gold); color: var(--gold-soft); }
.est-interruptor--mini i { width: 38px; height: 22px; }
.est-interruptor--mini i::after { width: 16px; height: 16px; }
.est-interruptor--mini input:checked + i::after { transform: translateX(15px); }
.est-producto__tallas {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem;
  padding: .7rem .9rem .9rem; border-top: 1px dashed var(--line);
}
.est-producto__tallas[hidden] { display: none; }
.est-talla { display: grid; gap: .25rem; }
.est-talla > span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.est-talla input {
  min-height: 44px; padding: .5rem .8rem; border-radius: 10px;
  background: rgba(248,243,235,.05); border: 1px solid var(--line-strong);
  color: var(--gold-soft); font: inherit; font-size: .95rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.est-talla input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.est-talla--editada input { border-color: var(--gold); }
.est-talla small { font-size: .66rem; color: var(--faint); min-height: 1em; }

/* Un producto oculto por la dueña desaparece de vitrina y carruseles. */
#grid .card[hidden], .benefit[hidden] { display: none; }
@media (max-width: 640px) {
  .est-producto__resumen { display: none; }
}

/* ---------- Estudio: imágenes y marca ---------- */
.est-ranuras {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.est-ranuras__titulo {
  grid-column: 1 / -1; margin-top: .6rem;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  padding-top: .8rem; border-top: 1px dashed var(--line);
}
.est-ranura {
  display: grid; gap: .6rem; padding: .7rem;
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(248,243,235,.03);
  transition: opacity var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.est-ranura--trabajando { opacity: .6; pointer-events: none; }
.est-ranura__marco {
  width: 100%; overflow: hidden; border-radius: 9px;
  background: repeating-conic-gradient(rgba(248,243,235,.05) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
  border: 1px solid var(--line);
}
/* La foto llena su marco sin deformarse: el recorte ya viene exacto. */
.est-ranura__marco img { width: 100%; height: 100%; object-fit: cover; display: block; }
.est-ranura__img--vacia { visibility: hidden; }
.est-ranura__cuerpo { display: grid; gap: .35rem; }
.est-ranura__titulo { font-size: .88rem; color: var(--cream); font-weight: 500; }
.est-ranura__nota { font-size: .68rem; color: var(--faint); line-height: 1.45; }
.est-ranura__acciones { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .2rem; }
.est-ranura__acciones .btn { min-height: 44px; padding: .5rem .9rem; font-size: .68rem; }
.est-ranura__elegir { position: relative; overflow: hidden; cursor: pointer; }
.est-ranura__archivo { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.est-ranura__aviso { font-size: .68rem; color: #7fe0a0; line-height: 1.4; min-height: 1em; }
.est-ranura__aviso--error { color: #ff86b6; }
