@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=Archivo+Black&display=swap');

/* ==========================================================================
   Mayorista Centro — sistema de diseño compartido (tokens + componentes)
   Modo claro único. Sin dark mode por decisión de marca.
   ========================================================================== */

:root {
  /* Paleta */
  --verde-botella: #173F2C;
  --verde-botella-2: #12321F;
  --verde-accion: #2E7D4F;
  --verde-accion-osc: #266742;
  --verde-suave: #E7F0E9;
  --crema: #F6F2E9;
  --crema-2: #FCF9F2;
  --blanco: #FFFFFF;
  --tinta: #1C2B24;
  --tinta-2: #5C6B62;
  --tinta-3: #64716B;
  --linea: #E3DDD0;
  --linea-2: #F0EBE0;
  --ambar: #F0A72B;
  --ambar-osc: #8A5A08;
  --ambar-suave: #FBF3E0;
  --rojo-oferta: #C2402A;
  --rojo-suave: #FBEAE6;

  /* Estados de pedido */
  --est-nuevo: #1A6FB5;
  --est-nuevo-bg: #E6F0F9;
  --est-preparacion: #B07818;
  --est-preparacion-bg: #FBF1DE;
  --est-listo: #2E7D4F;
  --est-listo-bg: #E7F0E9;
  --est-entregado: #5C6B62;
  --est-entregado-bg: #ECEFEC;

  /* Radios */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Sombras: tintadas con el verde tinta, nunca negro puro */
  --sombra-1: 0 1px 2px rgba(23, 63, 44, .06), 0 1px 1px rgba(23, 63, 44, .04);
  --sombra-2: 0 2px 6px rgba(23, 63, 44, .07), 0 6px 16px rgba(23, 63, 44, .06);
  --sombra-3: 0 8px 24px rgba(23, 63, 44, .10), 0 2px 6px rgba(23, 63, 44, .06);
  --sombra-4: 0 18px 48px rgba(23, 63, 44, .18), 0 4px 12px rgba(23, 63, 44, .10);
  --sombra-int: inset 0 1px 0 rgba(255, 255, 255, .6);

  /* Espaciado */
  --e-1: 4px;
  --e-2: 8px;
  --e-3: 12px;
  --e-4: 16px;
  --e-5: 20px;
  --e-6: 24px;
  --e-7: 32px;
  --e-8: 40px;

  /* Movimiento */
  --t-rapida: 120ms cubic-bezier(.4, 0, .2, 1);
  --t: 170ms cubic-bezier(.4, 0, .2, 1);
  --t-lenta: 260ms cubic-bezier(.22, .8, .3, 1);

  /* Tipografía */
  --f-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  --f-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', 'Roboto Mono', monospace;

  --header-h: 60px;
}

/* ============================ Reset moderno ============================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul[class], ol[class] { list-style: none; }

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: var(--verde-accion); text-decoration: none; }
a:hover { text-decoration: underline; }

table { border-collapse: collapse; width: 100%; }

hr { border: 0; border-top: 1px solid var(--linea); margin: var(--e-5) 0; }

::selection { background: var(--verde-suave); color: var(--verde-botella); }

/* ============================= Tipografía =============================== */

.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.12;
}

h1, .t-h1 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
h2, .t-h2 { font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.2; letter-spacing: -.015em; }
h3, .t-h3 { font-family: var(--f-ui); font-weight: 700; font-size: 17px; line-height: 1.3; }
h4, .t-h4 { font-family: var(--f-ui); font-weight: 700; font-size: 15px; line-height: 1.35; }

.t-etiqueta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--tinta-2);
}

.t-sec { color: var(--tinta-2); }
.t-terc { color: var(--tinta-3); }
.t-chico { font-size: 13px; }
.t-mini { font-size: 12px; }
.t-mono { font-family: var(--f-mono); letter-spacing: .02em; }

/* Precios: siempre tabular */
.precio, .money, .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.precio-grande {
  font-family: var(--f-display);
  font-size: 20px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.precio-tachado {
  color: var(--tinta-3);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* ============================== Botones ================================= */

.btn {
  --btn-bg: var(--blanco);
  --btn-fg: var(--tinta);
  --btn-bd: var(--linea);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--f-ui);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t),
              box-shadow var(--t), transform var(--t-rapida);
  box-shadow: var(--sombra-1);
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--sombra-2); }
.btn:active { transform: translateY(0); box-shadow: var(--sombra-1); }

.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primario {
  --btn-bg: var(--verde-accion);
  --btn-fg: #fff;
  --btn-bd: var(--verde-accion);
}
.btn--primario:hover { --btn-bg: var(--verde-accion-osc); --btn-bd: var(--verde-accion-osc); }

.btn--oscuro {
  --btn-bg: var(--verde-botella);
  --btn-fg: #fff;
  --btn-bd: var(--verde-botella);
}
.btn--oscuro:hover { --btn-bg: var(--verde-botella-2); --btn-bd: var(--verde-botella-2); }

.btn--secundario {
  --btn-bg: var(--blanco);
  --btn-fg: var(--verde-botella);
  --btn-bd: var(--linea);
}
.btn--secundario:hover { --btn-bd: #CFC8B7; --btn-bg: #FFFDF8; }

.btn--peligro {
  --btn-bg: var(--rojo-oferta);
  --btn-fg: #fff;
  --btn-bd: var(--rojo-oferta);
}
.btn--peligro:hover { --btn-bg: #A33622; --btn-bd: #A33622; }

.btn--fantasma {
  --btn-bg: transparent;
  --btn-fg: var(--tinta-2);
  --btn-bd: transparent;
  box-shadow: none;
}
.btn--fantasma:hover { --btn-bg: var(--verde-suave); --btn-fg: var(--verde-botella); box-shadow: none; transform: none; }

.btn--ambar {
  --btn-bg: var(--ambar);
  --btn-fg: #43310B;
  --btn-bd: var(--ambar);
}
.btn--ambar:hover { --btn-bg: #E29A22; --btn-bd: #E29A22; }

.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-xs); }
.btn--sm svg { width: 15px; height: 15px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: var(--r-md); }
.btn--bloque { display: flex; width: 100%; }

.btn[disabled], .btn.is-deshabilitado, .btn[aria-disabled='true'] {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: saturate(.7);
}

.btn--cargando { pointer-events: none; position: relative; color: transparent; }
.btn--cargando::after {
  content: '';
  position: absolute;
  width: 17px; height: 17px;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mc-girar .7s linear infinite;
}

@keyframes mc-girar { to { transform: rotate(360deg); } }

/* Botón icónico cuadrado */
.btn-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  color: var(--tinta-2);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn-icono:hover { background: var(--verde-suave); color: var(--verde-botella); }
.btn-icono svg { width: 19px; height: 19px; }

/* =============================== Badges ================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--linea-2);
  color: var(--tinta-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge--sin-punto::before { display: none; }

.badge--nuevo { background: var(--est-nuevo-bg); color: var(--est-nuevo); }
.badge--preparacion { background: var(--est-preparacion-bg); color: var(--est-preparacion); }
.badge--listo { background: var(--est-listo-bg); color: var(--est-listo); }
.badge--entregado { background: var(--est-entregado-bg); color: var(--est-entregado); }

.badge--oferta {
  background: var(--rojo-oferta);
  color: #fff;
  height: 22px;
  letter-spacing: .07em;
}
.badge--oferta::before { display: none; }

.badge--stock {
  background: rgba(28, 43, 36, .78);
  color: #fff;
  backdrop-filter: blur(2px);
}
.badge--stock::before { display: none; }

.badge--ambar { background: var(--ambar-suave); color: var(--ambar-osc); }
.badge--contador {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--ambar);
  color: #3A2A07;
  font-size: 11px;
  justify-content: center;
}
.badge--contador::before { display: none; }

/* ================================ Chips ================================= */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips--envuelve { flex-wrap: wrap; overflow: visible; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--linea);
  border-radius: var(--r-pill);
  background: var(--blanco);
  color: var(--tinta-2);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
}

.chip:hover { background: var(--verde-suave); border-color: #CBDCD1; color: var(--verde-botella); }

.chip.is-activo {
  background: var(--verde-botella);
  border-color: var(--verde-botella);
  color: #fff;
  box-shadow: var(--sombra-2);
}

.chip__ico { font-size: 15px; line-height: 1; }

.chip__contador {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--linea-2);
  color: var(--tinta-2);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chip.is-activo .chip__contador { background: rgba(255, 255, 255, .2); color: #fff; }

/* ============================== Formularios ============================= */

.campo { display: block; margin-bottom: var(--e-4); }

.campo__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--tinta-2);
}

.campo__label .req { color: var(--rojo-oferta); }

.input, .textarea, .select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--linea);
  border-radius: var(--r-sm);
  background: var(--blanco);
  color: var(--tinta);
  font-size: 15px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  box-shadow: var(--sombra-1);
}

.input::placeholder, .textarea::placeholder { color: var(--tinta-3); }

.input:hover, .textarea:hover, .select:hover { border-color: #CFC8B7; }

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--verde-accion);
  box-shadow: 0 0 0 3px rgba(46, 125, 79, .16);
}

.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B62' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.campo__ayuda { margin-top: 5px; font-size: 12.5px; color: var(--tinta-3); }

.campo.is-error .input,
.campo.is-error .textarea,
.campo.is-error .select { border-color: var(--rojo-oferta); background: #FFFBFA; }

.campo.is-error .campo__ayuda { color: var(--rojo-oferta); font-weight: 600; }

.campo--fila { display: flex; gap: var(--e-3); }
.campo--fila > * { flex: 1; }

/* Buscador con lupa */
.buscador { position: relative; }
.buscador .input { padding-left: 40px; }
.buscador__ico {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--tinta-3);
  pointer-events: none;
}

/* ============================= Radio cards ============================== */

.radio-cards { display: grid; gap: var(--e-3); }
.radio-cards--2 { grid-template-columns: repeat(2, 1fr); }

.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: 14px 15px;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-md);
  background: var(--blanco);
  cursor: pointer;
  transition: border-color var(--t), background var(--t), box-shadow var(--t), transform var(--t-rapida);
  box-shadow: var(--sombra-1);
}

.radio-card:hover { border-color: #CBDCD1; background: #FFFDF8; }

.radio-card input { position: absolute; opacity: 0; pointer-events: none; }

.radio-card__ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--verde-suave);
  color: var(--verde-botella);
  transition: background var(--t), color var(--t);
}
.radio-card__ico svg { width: 22px; height: 22px; }

.radio-card__txt { min-width: 0; display: block; }
.radio-card__titulo { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; }
.radio-card__sub { display: block; font-size: 12.5px; color: var(--tinta-2); margin-top: 2px; }

.radio-card__check {
  margin-left: auto;
  width: 20px; height: 20px;
  flex: none;
  border: 2px solid var(--linea);
  border-radius: 50%;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}

.radio-card:has(input:checked),
.radio-card.is-activa {
  border-color: var(--verde-accion);
  background: var(--verde-suave);
  box-shadow: 0 0 0 3px rgba(46, 125, 79, .12), var(--sombra-1);
}

.radio-card:has(input:checked) .radio-card__ico,
.radio-card.is-activa .radio-card__ico { background: var(--verde-accion); color: #fff; }

.radio-card:has(input:checked) .radio-card__check,
.radio-card.is-activa .radio-card__check {
  border-color: var(--verde-accion);
  background: var(--verde-accion);
  box-shadow: inset 0 0 0 3px var(--verde-suave);
}

.radio-card:has(input:focus-visible) { outline: 2px solid var(--verde-accion); outline-offset: 2px; }

/* Switch / toggle */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__pista {
  width: 42px; height: 24px;
  border-radius: var(--r-pill);
  background: #D6D0C2;
  position: relative;
  transition: background var(--t);
  flex: none;
}
.switch__pista::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sombra-1);
  transition: transform var(--t);
}
.switch input:checked + .switch__pista { background: var(--verde-accion); }
.switch input:checked + .switch__pista::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__pista { outline: 2px solid var(--verde-accion); outline-offset: 2px; }
.switch__txt { font-size: 13px; font-weight: 600; color: var(--tinta-2); }

/* =============================== Stepper ================================ */

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--linea);
  border-radius: var(--r-sm);
  background: var(--blanco);
  box-shadow: var(--sombra-1);
  overflow: hidden;
  user-select: none;
}

.stepper__btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--verde-botella);
  font-size: 18px;
  line-height: 1;
  transition: background var(--t), color var(--t);
}
.stepper__btn:hover { background: var(--verde-suave); }
.stepper__btn:active { background: #D8E6DC; }
.stepper__btn[disabled] { color: var(--tinta-3); opacity: .5; cursor: not-allowed; background: transparent; }
.stepper__btn svg { width: 15px; height: 15px; }

.stepper__valor {
  min-width: 40px;
  padding: 0 4px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--linea-2);
  border-right: 1px solid var(--linea-2);
  align-self: stretch;
  display: grid;
  place-items: center;
}

.stepper--lg .stepper__btn { width: 44px; height: 44px; font-size: 20px; }
.stepper--lg .stepper__valor { min-width: 56px; font-size: 17px; }

.stepper--sm .stepper__btn { width: 28px; height: 28px; }
.stepper--sm .stepper__valor { min-width: 32px; font-size: 13.5px; }

.stepper.is-vacio .stepper__valor { color: var(--tinta-3); }

/* ================================ Cards ================================= */

.card {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  box-shadow: var(--sombra-1);
  transition: box-shadow var(--t), border-color var(--t), transform var(--t-rapida);
}

.card--clic { cursor: pointer; }
.card--clic:hover { box-shadow: var(--sombra-3); border-color: #D8D1C1; transform: translateY(-2px); }

.card__cabecera {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: 14px 18px;
  border-bottom: 1px solid var(--linea-2);
}
.card__cuerpo { padding: 18px; }
.card__pie {
  padding: 14px 18px;
  border-top: 1px solid var(--linea-2);
  background: #FDFCF8;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* Panel/sección genérica */
.seccion { margin-bottom: var(--e-7); }
.seccion__titulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--e-3);
  margin-bottom: var(--e-4);
}

/* ================================ Tablas ================================ */

.tabla-wrap {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  overflow: auto;
  box-shadow: var(--sombra-1);
}

.tabla { width: 100%; font-size: 14px; }

.tabla thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #FBF8F1;
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--tinta-2);
  border-bottom: 1px solid var(--linea);
  white-space: nowrap;
}

.tabla tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--linea-2);
  vertical-align: middle;
}

.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr { transition: background var(--t); }
.tabla tbody tr:hover { background: #FBFAF5; }

.tabla .num, .tabla .der { text-align: right; font-variant-numeric: tabular-nums; }
.tabla__total td { font-weight: 700; background: #FBF8F1; border-top: 1px solid var(--linea); }

/* =============================== Toasts ================================= */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--r-md);
  background: var(--verde-botella);
  color: #F3F7F4;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--sombra-4);
  animation: mc-toast-in 240ms cubic-bezier(.22, .9, .3, 1);
}

.toast.is-saliendo { animation: mc-toast-out 200ms ease forwards; }

.toast__ico {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.toast__ico svg { width: 14px; height: 14px; }

.toast__txt { min-width: 0; }
.toast__txt b { display: block; font-weight: 700; }
.toast__txt span { display: block; font-weight: 500; opacity: .8; font-size: 12.5px; }

.toast--ok .toast__ico { background: var(--verde-accion); }
.toast--error { background: #5A241A; }
.toast--error .toast__ico { background: var(--rojo-oferta); }
.toast--aviso .toast__ico { background: var(--ambar); color: #43310B; }

@keyframes mc-toast-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mc-toast-out {
  to { opacity: 0; transform: translateY(10px) scale(.98); }
}

/* ========================= Overlay, modal, sheet ======================== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(18, 34, 26, .48);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-lenta), visibility var(--t-lenta);
}
.overlay.is-abierto { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  z-index: 900;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  transform: translate(-50%, -46%) scale(.98);
  opacity: 0;
  visibility: hidden;
  background: var(--blanco);
  border-radius: var(--r-xl);
  box-shadow: var(--sombra-4);
  transition: opacity var(--t-lenta), transform var(--t-lenta), visibility var(--t-lenta);
}
.modal.is-abierto { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.modal__cabecera {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: 18px 20px 12px;
}
.modal__cuerpo { padding: 0 20px 20px; }
.modal__pie {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--linea-2);
  background: #FDFCF8;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.modal__pie .btn { flex: 1; }

/* Los paneles deslizantes (sheet desde abajo / lateral desde la derecha) viven en
   tienda.css como .det y .cart: ahí están sus únicas definiciones. */

/* ============================ Estados vacíos ============================ */

.vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--e-3);
  padding: 48px 24px;
  color: var(--tinta-2);
}
.vacio__ico {
  display: grid;
  place-items: center;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--verde-suave);
  color: var(--verde-botella);
}
.vacio__ico svg { width: 32px; height: 32px; }
.vacio__titulo { font-family: var(--f-display); font-size: 17px; color: var(--tinta); }
.vacio p { max-width: 34ch; font-size: 13.5px; }

/* ============================== Skeletons =============================== */

.sk {
  position: relative;
  overflow: hidden;
  background: #ECE7DC;
  border-radius: var(--r-sm);
}
.sk::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: translateX(-100%);
  animation: mc-sk 1.15s ease-in-out infinite;
}
@keyframes mc-sk { to { transform: translateX(100%); } }

.sk--txt { height: 11px; margin: 7px 0; border-radius: var(--r-pill); }
.sk--tile { aspect-ratio: 1; border-radius: var(--r-md); }

/* ============================ Barra de progreso ========================= */

.progreso {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--linea-2);
  overflow: hidden;
}
.progreso__barra {
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--verde-accion);
  transition: width 320ms cubic-bezier(.22, .8, .3, 1), background var(--t);
}
.progreso.is-completo .progreso__barra { background: var(--verde-accion); }
.progreso--ambar .progreso__barra { background: var(--ambar); }

/* ============================== Aviso / nota ============================ */

.aviso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--ambar-suave);
  border: 1px solid #F0E3C4;
  color: #6A4E12;
  font-size: 13px;
  line-height: 1.45;
}
.aviso svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.aviso--verde { background: var(--verde-suave); border-color: #CFE1D5; color: #235C3C; }
.aviso--rojo { background: var(--rojo-suave); border-color: #F0D4CD; color: #8C2E1D; }

/* ============================== Accesibilidad =========================== */

:focus-visible {
  outline: 2px solid var(--verde-accion);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================== Scrollbars ============================== */

* {
  scrollbar-width: thin;
  scrollbar-color: #CFC8B7 transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #D8D1C1;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: #BCB3A0; background-clip: content-box; }

/* ============================== Utilidades ============================== */

.u-fila { display: flex; align-items: center; }
.u-col { display: flex; flex-direction: column; }
.u-entre { justify-content: space-between; }
.u-centro { justify-content: center; }
.u-al-inicio { align-items: flex-start; }
.u-envuelve { flex-wrap: wrap; }
.u-crece { flex: 1; min-width: 0; }
.u-auto { margin-left: auto; }

.u-g1 { gap: 4px; } .u-g2 { gap: 8px; } .u-g3 { gap: 12px; }
.u-g4 { gap: 16px; } .u-g5 { gap: 20px; } .u-g6 { gap: 24px; }

.u-mt1 { margin-top: 4px; } .u-mt2 { margin-top: 8px; } .u-mt3 { margin-top: 12px; }
.u-mt4 { margin-top: 16px; } .u-mt5 { margin-top: 20px; } .u-mt6 { margin-top: 24px; }
.u-mb2 { margin-bottom: 8px; } .u-mb3 { margin-bottom: 12px; } .u-mb4 { margin-bottom: 16px; }

.u-der { text-align: right; }
.u-izq { text-align: left; }
.u-cen { text-align: center; }
.u-nowrap { white-space: nowrap; }
.u-1linea { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-2lineas {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.oculto { display: none !important; }
.u-relativo { position: relative; }

.u-contenedor { width: min(1180px, 100% - 32px); margin-inline: auto; }
.u-divisor { height: 1px; background: var(--linea); margin: var(--e-4) 0; }

/* Importes ocultos por el toggle "ojo" del panel */
.montos-ocultos .money {
  color: transparent !important;
  position: relative;
  user-select: none;
}
.montos-ocultos .money::after {
  content: '•••••';
  position: absolute;
  inset: 0;
  display: block;
  text-align: inherit;
  line-height: inherit;
  color: var(--tinta-3);
  letter-spacing: .06em;
}
/* contenedores flex: el monto va a la derecha aunque no herede text-align */
.montos-ocultos .totales__fila .money::after,
.montos-ocultos .totales__total .money::after { text-align: right; }

/* Ilustraciones de producto */
.mc-svg { display: block; width: 100%; height: auto; }

/* ====================== Objetivos táctiles (dedo) ======================= */
/* En pantallas táctiles los controles chicos suben al mínimo cómodo (~44px):
   el − / + de la card es LA interacción de la tienda y en la grilla de 2 columnas
   dos steppers quedan muy cerca. El ícono no cambia, sólo el área tocable. */
@media (pointer: coarse) {
  .stepper__btn { width: 44px; height: 44px; }
  .stepper--sm .stepper__btn { width: 38px; height: 38px; }
  .stepper--sm .stepper__valor { min-width: 36px; }
  .btn-icono { width: 44px; height: 44px; }
  .chip { height: 42px; }

  /* iOS Safari hace zoom automático al enfocar un campo con fuente < 16px */
  .input, .textarea, .select { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Fotos reales de producto (fotos.js): mismo comportamiento que .mc-svg,
   recorte centrado y fondo crema mientras carga */
.mc-foto { object-fit: cover; background: #F6F2E9; }
