/* ==========================================================================
   MultiExpressOnline - tema (rediseno visual y de usabilidad)
   Hoja unica: tokens, base, componentes, header, categorias, footer, listado,
   modal, carrito y checkout. Se carga DESPUES de las hojas existentes.

   Regla central: nada que no sea accionable puede parecer un boton.
     .mx-btn--primary    una accion principal por pantalla
     .mx-btn--secondary  accion alternativa
     .mx-btn--text       acciones menores (subrayadas)
     .mx-stepper         selector de cantidad
     .mx-option          tarjeta de seleccion (radio real)
     .mx-tag-offer       etiqueta de oferta (amarillo SOLO para etiquetas)
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca */
  --mx-red: #D3030B;
  --mx-red-dark: #A30008;
  --mx-wine: #8E0812;
  --mx-yellow: #FFD21F;
  --mx-yellow-ink: #3A2A00;

  /* Neutros */
  --mx-ink: #201A1A;
  --mx-muted: #6B6261;
  --mx-line: #E7E2DF;
  --mx-line-soft: #F0ECE9;
  --mx-line-strong: #CFC8C4;
  --mx-ground: #F6F4F2;
  --mx-surface: #FFFFFF;
  --mx-placeholder: #F3F0EE;
  --mx-selected-bg: #FFF4F3;
  --mx-line-firm: #8C8380;      /* borde de una opcion habilitada (3:1 sobre el fondo) */
  --mx-disabled-bg: #ECE8E5;    /* opcion sin disponibilidad */
  --mx-footer: #2A1E1E;

  /* Estado */
  --mx-green: #17753F;
  --mx-green-bg: #EAF6EE;       /* fondo de lo elegido / disponible */
  --mx-green-ink: #0F5C31;      /* texto sobre --mx-green-bg (6:1) */

  /* Forma */
  --mx-radius-sm: 10px;
  --mx-radius: 12px;
  --mx-radius-lg: 16px;
  --mx-container: 1288px;
  --mx-font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Alto de las barras inferiores fijas (celular) */
  --mx-bar-h: 78px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Figtree en todo el sitio (el body viejo usaba una fuente de respaldo) */
body { font-family: var(--mx-font); }

/* Fondo, tamano y color solo en las paginas redisenadas (body.mx-page) */
body.mx-page {
  margin: 0;
  background: var(--mx-ground);
  color: var(--mx-ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
.mx-page h1, .mx-page h2, .mx-page h3, .mx-page legend {
  font-family: var(--mx-font);
  color: var(--mx-ink);
}
.mx-page p { margin: 0; }
/* el footer queda al pie aunque la pagina sea corta */
body.mx-page { display: flex; flex-direction: column; min-height: 100vh; }
body.mx-page > main { flex: 1 0 auto; width: 100%; }
.mx-page img { max-width: 100%; }

/* Enlaces: rojo oscuro (se eliminan el azul y el naranja) */
a { color: var(--mx-red-dark); }
a:hover { color: var(--mx-red); }
.mx-link { color: var(--mx-red-dark); text-decoration: underline; }
.mx-link:hover { color: var(--mx-red); text-decoration: underline; }

/* Inputs: 16px minimo (evita el zoom de iOS) */
.mx-page input, .mx-page select, .mx-page textarea { font-size: 16px; font-family: var(--mx-font); }

.mx-muted { color: var(--mx-muted); }
.mx-num { font-variant-numeric: tabular-nums; }

/* Solo para lectores de pantalla */
.mx-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mx-container {
  width: 100%;
  max-width: var(--mx-container);
  margin: 0 auto;
  padding: 24px;
}
@media (max-width: 599px) {
  .mx-container { padding: 16px; }
}

/* Foco visible en todos los controles */
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--mx-ink);
  outline-offset: 2px;
}

/* ---------- 3. Sistema de acciones ---------- */

/* Boton base. Se califica con :is() para igualar la especificidad de las reglas
   viejas ".formP button" (que ponen width:100%, uppercase y padding:15px) y ganar
   por orden de carga. Las variantes llevan doble clase por lo mismo. */
:is(a, button, input).mx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--mx-radius-sm);
  font-family: var(--mx-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.mx-btn.mx-btn--primary { background: var(--mx-red); color: #fff; border: 0; }
.mx-btn.mx-btn--primary:hover { background: var(--mx-red-dark); color: #fff; }

.mx-btn.mx-btn--secondary { background: var(--mx-surface); color: var(--mx-red-dark); border: 2px solid var(--mx-red); }
.mx-btn.mx-btn--secondary:hover { background: var(--mx-selected-bg); color: var(--mx-red-dark); }

.mx-btn.mx-btn--text {
  background: none;
  border: 0;
  padding: 0 10px;
  color: var(--mx-muted);
  font-weight: 600;
  text-decoration: underline;
}
.mx-btn.mx-btn--text:hover { color: var(--mx-red-dark); background: none; }
.mx-btn.mx-btn--text.mx-btn--accent { color: var(--mx-red-dark); }

.mx-btn.mx-btn--lg { min-height: 54px; font-size: 17px; border-radius: var(--mx-radius); }
.mx-btn.mx-btn--xl { min-height: 56px; font-size: 17px; border-radius: var(--mx-radius); }
.mx-btn.mx-btn--block { display: flex; width: 100%; }
.mx-btn[disabled], .mx-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Boton solo-icono (siempre con aria-label) */
:is(a, button).mx-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--mx-ink);
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
:is(a, button).mx-iconbtn:hover { background: var(--mx-placeholder); color: var(--mx-ink); }

/* Selector de cantidad */
.mx-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--mx-line-strong);
  border-radius: var(--mx-radius-sm);
  background: var(--mx-surface);
  overflow: hidden;
}
.mx-stepper :is(button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--mx-surface);
  color: var(--mx-ink);
  font-family: var(--mx-font);
  text-transform: none;
  cursor: pointer;
}
.mx-stepper :is(button):hover { background: var(--mx-placeholder); }
.mx-stepper :is(button)[disabled] { color: var(--mx-line-strong); cursor: not-allowed; background: var(--mx-surface); }
.mx-stepper :is(button):focus-visible { outline-offset: -3px; }
.mx-stepper__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 6px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--mx-line-soft);
  border-right: 1px solid var(--mx-line-soft);
}
.mx-stepper--lg :is(button) { width: 56px; height: 52px; min-width: 56px; }
.mx-stepper--lg .mx-stepper__value { min-width: 56px; font-size: 22px; font-weight: 800; }

/* Tarjeta de seleccion (direccion, horario, medio de pago) */
.mx-fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.mx-fieldset > legend {
  float: none;
  width: auto;
  padding: 0;
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}
.mx-options { display: flex; flex-direction: column; gap: 10px; }

.mx-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  margin: 0;
  padding: 14px 16px;
  background: var(--mx-surface);
  border: 2px solid var(--mx-line-firm);
  border-radius: var(--mx-radius);
  color: var(--mx-ink);
  cursor: pointer;
  position: relative;
}
.mx-option input[type="radio"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--mx-green);
  cursor: pointer;
}
.mx-option__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mx-option__title { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.mx-option__sub { font-size: 15px; color: var(--mx-muted); line-height: 1.3; }
.mx-option__ok,
.mx-option.is-disabled .mx-option__sub,
.mx-option:has(input:disabled) .mx-option__sub {
  align-self: flex-start;
  margin-top: 2px;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.mx-option__ok { background: var(--mx-green-bg); color: var(--mx-green-ink); }
.mx-option__flag {
  display: none;
  flex: 0 0 auto;
  color: var(--mx-green-ink);
  font-size: 15px;
  font-weight: 700;
}
.mx-option__flag::before { content: "\2713\00a0"; }
.mx-option__aside { flex: 0 0 auto; color: var(--mx-ink); display: inline-flex; }

.mx-option.is-selected,
.mx-option:has(input:checked) {
  border-color: var(--mx-green);
  background: var(--mx-green-bg);
}
.mx-option.is-selected .mx-option__ok,
.mx-option:has(input:checked) .mx-option__ok { background: var(--mx-surface); }
.mx-option.is-selected .mx-option__flag,
.mx-option:has(input:checked) .mx-option__flag { display: inline; }

.mx-option:has(input:focus-visible) { outline: 3px solid var(--mx-ink); outline-offset: 2px; }

.mx-option.is-disabled,
.mx-option:has(input:disabled) {
  background: var(--mx-disabled-bg);
  border: 2px dashed var(--mx-line-strong);
  cursor: not-allowed;
}
.mx-option.is-disabled .mx-option__title,
.mx-option:has(input:disabled) .mx-option__title { color: var(--mx-muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.mx-option.is-disabled .mx-option__sub,
.mx-option:has(input:disabled) .mx-option__sub { background: #DAD4D0; color: #4A4240; }
.mx-option.is-disabled input { cursor: not-allowed; }

/* Etiqueta de oferta: plana, sin sombra */
.mx-tag-offer {
  display: inline-block;
  padding: 3px 8px;
  background: var(--mx-yellow);
  color: var(--mx-yellow-ink);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .03em;
  text-transform: uppercase;
  box-shadow: none;
}

/* Precios */
.mx-price { font-variant-numeric: tabular-nums; }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   4. Header, menu hamburguesa, barra inferior del carrito
   ========================================================================== */
.mx-header {
  position: relative;
  z-index: 20;
  background: var(--mx-surface);
  border-bottom: 1px solid var(--mx-line);
  text-align: left;
}
.mx-header__in {
  max-width: var(--mx-container);
  margin: 0 auto;
  padding: 10px 16px 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-areas: "menu logo acct" "search search search";
  gap: 8px;
  align-items: center;
}
.mx-header__menu { grid-area: menu; }
.mx-header__logo { grid-area: logo; justify-self: center; display: inline-flex; align-items: center; min-height: 44px; }
.mx-header__logo img { display: block; width: 108px; height: auto; }

/* Buscador: input de 48px pegado a un boton rojo de 56x48 */
.mx-search { grid-area: search; position: relative; display: flex; align-items: stretch; margin: 0; min-width: 0; }
.mx-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid var(--mx-line-strong);
  border-right: 0;
  border-radius: var(--mx-radius) 0 0 var(--mx-radius);
  background: var(--mx-surface);
  color: var(--mx-ink);
  font-size: 16px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.mx-search input[type="search"]::placeholder { color: var(--mx-muted); opacity: 1; }
:is(button).mx-search__btn {
  flex: 0 0 56px;
  width: 56px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0 var(--mx-radius) var(--mx-radius) 0;
  background: var(--mx-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
:is(button).mx-search__btn:hover { background: var(--mx-red-dark); }

/* Sugerencias del buscador (las arma suggesstion.php) */
.mx-search #suggesstion-box { position: absolute; top: 100%; left: 0; right: 0; z-index: 60; margin-top: 6px; }
.mx-search #country-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  width: auto;
  float: none;
  position: static;
  background: var(--mx-surface);
  border: 1px solid var(--mx-line-strong);
  border-radius: var(--mx-radius);
}
.mx-search #country-list li { margin: 0; padding: 0; background: none; border: 0; border-radius: 8px; font-size: 16px; }
.mx-search #country-list li:hover { background: var(--mx-placeholder); }
.mx-search #country-list li a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--mx-ink); text-decoration: none; }

/* Cuenta: solo icono en celular, icono + texto en escritorio */
.mx-header__acct {
  grid-area: acct;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--mx-radius-sm);
  color: var(--mx-ink);
  font-weight: 600;
  text-decoration: none;
}
.mx-header__acct:hover { background: var(--mx-placeholder); color: var(--mx-ink); }
.mx-header__acct span {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* Boton "Ver carrito" del header (escritorio); en celular lo reemplaza la barra inferior */
:is(a).mx-header__cart { grid-area: cart; display: none; }
.mx-header__total { font-weight: 800; }

.mx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--mx-red-dark);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.mx-pill[hidden] { display: none; }

@media (min-width: 900px) {
  .mx-header__in {
    padding: 14px 24px;
    grid-template-columns: 44px auto minmax(0, 1fr) auto auto;
    grid-template-areas: "menu logo search acct cart";
    gap: 16px;
  }
  .mx-header__logo img { width: 128px; }
  .mx-header__acct { padding: 0 12px; }
  .mx-header__acct span { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
  :is(a).mx-header__cart { display: inline-flex; min-height: 48px; padding: 0 18px; }
}

/* Carrito y checkout: un solo boton rojo relleno por pantalla -> el del header pasa a secundario */
.mx-header--flow .mx-btn.mx-header__cart { background: var(--mx-surface); color: var(--mx-red-dark); border: 2px solid var(--mx-red); }
.mx-header--flow .mx-btn.mx-header__cart:hover { background: var(--mx-selected-bg); color: var(--mx-red-dark); }
.mx-header--flow .mx-header__cart .mx-pill { background: var(--mx-red); color: #fff; }

/* Menu hamburguesa: lista con filas de 48px. Panel lateral a todo el alto en celular. */
.mx-menu[hidden], .mx-menu-backdrop[hidden] { display: none; }
.mx-menu-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(32, 26, 26, .45); }
.mx-menu {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86vw, 330px);
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--mx-line);
  text-align: left;
  padding-bottom: env(safe-area-inset-bottom);
}
.mx-menu__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--mx-line-soft); }
.mx-menu__title { font-size: 18px; font-weight: 800; }
.mx-menu__list { list-style: none; margin: 0; padding: 8px 0; }
.mx-menu__list li { margin: 0; }
.mx-menu__sep { border-top: 1px solid var(--mx-line-soft); margin-top: 8px !important; padding-top: 8px; }
.mx-menu__list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 20px;
  background: #fff;
  color: var(--mx-ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.mx-menu__list a:hover { background: var(--mx-placeholder); color: var(--mx-ink); }
.mx-menu__list .mx-icon { color: var(--mx-muted); flex: 0 0 auto; }
body.mx-menu-open { overflow: hidden; }

@media (min-width: 900px) {
  /* escritorio: lista desplegada debajo del boton, sin sombra */
  .mx-menu-backdrop { background: transparent; }
  .mx-menu {
    top: 72px;
    bottom: auto;
    left: max(24px, calc((100vw - var(--mx-container)) / 2 + 24px));
    width: 310px;
    max-height: calc(100vh - 88px);
    border: 1px solid var(--mx-line-strong);
    border-radius: var(--mx-radius);
  }
  .mx-menu__head { display: none; }
}

/* Barra inferior fija con el carrito (celular) */
.mx-cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--mx-surface);
  border-top: 1px solid var(--mx-line);
  text-align: left;
}
.mx-cartbar__btn { flex: 1 1 auto; }
.mx-cartbar__total { flex: 0 0 auto; font-size: 21px; font-weight: 800; }
@media (min-width: 900px) { .mx-cartbar { display: none; } }

/* ==========================================================================
   5. Categorias (chips con scroll horizontal)
   ========================================================================== */
.mx-cats { background: var(--mx-surface); border-bottom: 1px solid var(--mx-line); text-align: left; }
.mx-cats__in { max-width: var(--mx-container); margin: 0 auto; padding: 10px 16px 8px; }
.mx-cats__list {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 0 6px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--mx-line-strong) transparent;
}
.mx-cats__list li { flex: 0 0 auto; margin: 0; }
.mx-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--mx-line-strong);
  border-radius: 999px;
  background: var(--mx-surface);
  color: var(--mx-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.mx-chip:hover { background: var(--mx-placeholder); color: var(--mx-ink); }
.mx-chip[aria-current="page"] { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }
@media (min-width: 600px) { .mx-cats__in { padding-left: 24px; padding-right: 24px; } }

/* ==========================================================================
   6. Footer
   ========================================================================== */
.mx-footer { margin-top: 32px; background: var(--mx-footer); color: #EDE7E4; font-size: 14px; line-height: 1.5; text-align: left; }
.mx-footer__in {
  max-width: var(--mx-container);
  margin: 0 auto;
  padding: 28px 16px 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.mx-footer h2 { margin: 0 0 4px; color: #fff; font-family: var(--mx-font); font-size: 15px; font-weight: 700; }
.mx-footer ul { list-style: none; margin: 0; padding: 0; }
.mx-footer li { margin: 0; }
.mx-footer a { display: inline-flex; align-items: center; min-height: 44px; color: #EDE7E4; text-decoration: underline; }
.mx-footer a:hover { color: #fff; }
.mx-footer a.mx-footer__hl { color: var(--mx-yellow); font-weight: 600; }
.mx-footer a.mx-footer__hl:hover { color: #fff; }
.mx-footer :focus-visible { outline-color: #fff; }
.mx-footer__legal { margin-top: 8px; font-size: 14px; color: #EDE7E4; }
.mx-footer .mx-footer__copy { margin: 0; max-width: var(--mx-container); padding: 12px 16px 24px; color: #CFC4C0; font-size: 14px; }
@media (min-width: 600px) { .mx-footer__in { padding-left: 24px; padding-right: 24px; } .mx-footer .mx-footer__copy { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 600px) {
  .mx-footer__in { grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 36px; }
  .mx-footer .mx-footer__copy { margin-left: auto; margin-right: auto; }
}
/* que la barra fija no tape el final de la pagina */
@media (max-width: 899px) {
  .mx-footer--bar { padding-bottom: calc(var(--mx-bar-h) + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   7. Listado de productos (results_search.php)
   ========================================================================== */
.mx-banner { margin: 0 0 20px; border-radius: var(--mx-radius-lg); overflow: hidden; background: #CFE7F3; }
.mx-banner .carousel-item img { display: block; width: 100%; height: auto; max-height: 96px; object-fit: cover; }
@media (min-width: 600px) {
  .mx-banner .carousel-item img { max-height: 160px; }
}

.mx-listhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 16px; }
.mx-listhead h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.15; }
.mx-listhead__count { color: var(--mx-muted); font-size: 16px; }
@media (max-width: 599px) { .mx-listhead h1 { font-size: 22px; } }

.mx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 599px) {
  .mx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.mx-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-line);
  border-radius: 14px;
}
@media (max-width: 599px) { .mx-card { padding: 10px; } }

.mx-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--mx-placeholder);
  border-radius: var(--mx-radius-sm);
  overflow: hidden;
  cursor: pointer;
}
@media (max-width: 599px) { .mx-card__media { aspect-ratio: 4 / 3; } }
.mx-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}
.mx-card__media .mx-tag-offer { position: absolute; top: 8px; left: 8px; z-index: 1; }

.mx-card__name {
  flex: 1 1 auto;
  margin: 0;
  min-height: 2.6em;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
/* El precio es texto: sin fondo, sin borde, sin sombra */
.mx-card__price { margin: 0; color: var(--mx-ink); font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 599px) { .mx-card__price { font-size: 20px; } }

.mx-empty { padding: 40px 16px; text-align: center; }
.mx-empty__title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

/* ==========================================================================
   8. Modal "Agregar al carrito"  (unica sombra permitida del sitio)
   Escritorio: dialogo centrado 720px, imagen 280x280 + contenido.
   Celular: hoja inferior a todo el ancho.
   ========================================================================== */
.mx-modal .modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 720px;
  min-height: calc(100% - 2rem);
  margin: 1rem auto;
}
.mx-modal .modal-content.mx-modal__content {
  position: relative;
  width: 100%;
  padding: 28px;
  background: var(--mx-surface);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(32, 26, 26, .35);
  text-align: left;
  color: var(--mx-ink);
}
.mx-modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--mx-placeholder); }
.mx-modal__body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }

.mx-modal__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 280px;
  background: var(--mx-placeholder);
  border-radius: var(--mx-radius);
  overflow: hidden;
}
/* cec5.js fija max-width/max-height en linea: se pisan con !important */
.mx-modal .imagepreview { display: block; width: 100%; height: 100%; max-width: 100% !important; max-height: 100% !important; object-fit: contain; padding: 8px; }

.mx-modal__info { display: flex; flex-direction: column; min-width: 0; }
.mx-modal__title {
  margin: 0 48px 6px 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mx-modal__desc { margin: 0 0 10px; color: var(--mx-muted); font-size: 14px; line-height: 1.4; }
.mx-modal__desc:empty, .mx-modal__desc[hidden] { display: none; }
.mx-modal__price { margin: 0 0 18px; display: flex; align-items: baseline; gap: 8px; }
.mx-modal__price #mxPrice { font-size: 30px; font-weight: 800; line-height: 1.1; }
.mx-modal__unit { color: var(--mx-muted); font-size: 16px; font-weight: 500; }

.mx-modal__qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.mx-modal__qtylabel { font-size: 17px; font-weight: 700; }
.mx-modal__max { margin: 0 0 12px; color: var(--mx-muted); font-size: 14px; }
.mx-modal__max strong { color: var(--mx-ink); }

.mx-modal__add { justify-content: space-between; margin-top: 6px; padding: 0 20px; }
.mx-modal__addlabel { display: inline-flex; align-items: center; gap: 10px; }
.mx-modal__subtotal { font-size: 19px; font-weight: 800; }
.mx-modal .closebtn { margin-top: 6px; }

@media (max-width: 599px) {
  .mx-modal .modal-dialog { align-items: flex-end; min-height: 100%; margin: 0; max-width: none; }
  .mx-modal .modal-content.mx-modal__content {
    max-height: 94vh;
    overflow-y: auto;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }
  .mx-modal__body { grid-template-columns: 1fr; gap: 14px; }
  .mx-modal__media { width: 100%; height: 220px; }
  .mx-modal__title { font-size: 20px; }
  .mx-modal__close { top: 10px; right: 10px; }
}

/* Encuesta de datos (se muestra a usuarios con sesion en el listado): mismos botones del sistema */
#survey_1 .modal-content { border: 0; border-radius: 20px; overflow: hidden; background: var(--mx-surface) !important; }
#survey_1 .modal-body { background: var(--mx-surface) !important; padding: 20px !important; }
#survey_1 .btn-success, #survey_1 .btn-info {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--mx-radius-sm);
  background: var(--mx-red) !important; color: #fff !important; font-weight: 700;
}
#survey_1 .btn-success:hover, #survey_1 .btn-info:hover { background: var(--mx-red-dark) !important; }

/* ==========================================================================
   9. Pasos del checkout (includes/mx_steps.php) y cabecera de pagina
   ========================================================================== */
.mx-stepsbar { background: var(--mx-surface); border-bottom: 1px solid var(--mx-line); text-align: left; }
.mx-stepsbar__in { max-width: var(--mx-container); margin: 0 auto; padding: 12px 16px; }

/* celular: barra de 4 segmentos + "Paso N de 4" */
.mx-steps { display: none; }
.mx-stepsm__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mx-stepsm__bar span { height: 5px; border-radius: 3px; background: var(--mx-line); }
.mx-stepsm__bar span.is-done { background: var(--mx-green); }
.mx-stepsm__bar span.is-current { background: var(--mx-ink); }
.mx-stepsm__text { margin: 8px 0 0; color: var(--mx-muted); font-size: 14px; font-weight: 600; }

@media (min-width: 900px) {
  .mx-stepsbar__in { padding: 14px 24px; }
  .mx-stepsm { display: none; }
  .mx-steps { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
  .mx-steps li { display: flex; align-items: center; margin: 0; color: var(--mx-muted); font-size: 15px; font-weight: 600; }
  .mx-steps li + li::before { content: ""; width: 44px; height: 2px; margin: 0 12px; background: var(--mx-line-strong); }
  .mx-steps li.is-done + li::before, .mx-steps li.is-current + li::before { background: var(--mx-line-strong); }
  .mx-steps__item { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; }
  a.mx-steps__item { color: var(--mx-ink); }
  a.mx-steps__item:hover .mx-steps__label { text-decoration: underline; }
  .mx-steps__dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--mx-line-strong); background: var(--mx-surface);
    color: var(--mx-muted); font-size: 14px; font-weight: 700; line-height: 1;
  }
  .mx-steps li.is-done .mx-steps__dot { background: var(--mx-green); border-color: var(--mx-green); color: #fff; }
  .mx-steps li.is-current .mx-steps__dot { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }
  .mx-steps li.is-current { color: var(--mx-ink); font-weight: 800; }
  .mx-steps li.is-done { color: var(--mx-ink); }
}

/* "Volver" / "Seguir comprando" + titulo */
.mx-pagehead { display: flex; align-items: center; gap: 4px; margin: 0 0 12px; }
.mx-pagehead h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; }
.mx-back { padding: 0 10px 0 6px; }
.mx-back__txt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.mx-keep { margin: -8px 0 4px -10px; }
@media (min-width: 900px) {
  .mx-pagehead { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 16px; }
  .mx-pagehead h1 { font-size: 28px; }
  .mx-back { margin-left: -10px; }
  .mx-back__txt { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
}

/* ==========================================================================
   10. Carrito (my_cart.php) y resumen / barra de accion (tambien del checkout)
   ========================================================================== */
.mx-cart { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.mx-cart__list { flex: 1 1 340px; min-width: 0; }

.mx-lines { margin: 0; padding: 0; list-style: none; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius-lg); }
.mx-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "img main total" "img step remove";
  gap: 8px 12px;
  align-items: center;
  margin: 0;
  padding: 14px;
  border-top: 1px solid var(--mx-line-soft);
}
.mx-line:first-child { border-top: 0; }
.mx-line.is-removing { opacity: .45; }
.mx-line__img { grid-area: img; align-self: start; width: 44px; height: 44px; object-fit: contain; background: var(--mx-placeholder); border-radius: 8px; }
.mx-line__main { grid-area: main; min-width: 0; }
.mx-line__name { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.mx-line__unit { margin: 2px 0 0; color: var(--mx-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.mx-line__step { grid-area: step; justify-self: start; }
.mx-line__total { grid-area: total; justify-self: end; margin: 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mx-line__remove { grid-area: remove; justify-self: end; }
@media (min-width: 600px) {
  .mx-line { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 16px; }
  .mx-line__img { width: 64px; height: 64px; }
}
@media (min-width: 1180px) {
  .mx-line { grid-template-columns: 64px minmax(0, 1fr) auto 96px auto; grid-template-areas: "img main step total remove"; gap: 16px; }
  .mx-line__img { align-self: center; }
}

.mx-summary {
  flex: 0 0 320px;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--mx-surface);
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius-lg);
}
.mx-summary__rows { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.mx-summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.mx-summary__row dt { font-weight: 400; color: var(--mx-ink); }
.mx-summary__row dd { margin: 0; font-weight: 700; white-space: nowrap; }
.mx-summary__free { color: var(--mx-green); }
.mx-summary__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--mx-line); font-size: 18px; font-weight: 700; }
.mx-summary__total strong { font-size: 28px; font-weight: 800; line-height: 1.1; }
.mx-summary__empty { align-self: center; }
.mx-summary__sec { margin: 0; }

/* Accion principal: dentro del resumen en escritorio, barra inferior fija en celular */
.mx-actionbar__total { display: none; }
.mx-btn.is-loading, .mx-btn[aria-disabled="true"] { opacity: .65; pointer-events: none; }
@media (max-width: 599px) {
  .mx-summary { flex: 1 1 100%; position: static; }
  .mx-summary__total { display: none; }
  .mx-actionbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--mx-surface);
    border-top: 1px solid var(--mx-line);
  }
  .mx-actionbar__total { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; font-size: 15px; font-weight: 600; }
  .mx-actionbar__total strong { font-size: 22px; font-weight: 800; }
}

.mx-empty--card { max-width: 480px; margin: 0 auto; padding: 32px 20px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius-lg); }
.mx-empty--card .mx-btn { margin-top: 16px; }

/* Dialogo chico (confirmar vaciar carrito) */
.mx-modal--sm .modal-dialog { max-width: 440px; }
.mx-modal--sm .mx-modal__title { margin-bottom: 8px; }
.mx-modal--sm .mx-modal__desc { margin-bottom: 18px; font-size: 16px; }

/* ==========================================================================
   11. Checkout: direccion, horario, pago
   ========================================================================== */
.mx-checkout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.mx-checkout__main { flex: 1 1 340px; min-width: 0; }
.mx-checkout .mx-summary { flex: 0 0 320px; }
@media (max-width: 599px) {
  .mx-checkout .mx-summary { flex: 1 1 100%; }
  /* sin renglones (pago, cambio de horario) la tarjeta solo aloja la barra inferior fija */
  .mx-checkout .mx-summary--solo { padding: 0; border: 0; background: none; }
}

.mx-option__title--time { font-size: 19px; font-weight: 700; }
.mx-add { margin: 4px 0 20px; }

/* Lo ya elegido: icono + valor + "Cambiar" */
.mx-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 8px 10px 14px;
  background: var(--mx-green-bg);
  border: 1.5px solid var(--mx-green);
  border-radius: var(--mx-radius);
}
.mx-chosen__icon { flex: 0 0 auto; display: inline-flex; color: var(--mx-green); }
.mx-chosen__body { flex: 1 1 auto; min-width: 0; }
.mx-chosen__label { margin: 0; color: var(--mx-muted); font-size: 13px; font-weight: 600; }
.mx-chosen__value { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mx-chosen__sub { margin: 0; color: var(--mx-muted); font-size: 14px; }
.mx-chosen + .mx-chosen { margin-top: 0; }
.mx-pagehead + .mx-chosen, .mx-chosen:last-of-type { margin-bottom: 20px; }
.mx-pagehead + .mx-chosen:not(:last-of-type) { margin-bottom: 10px; }

.mx-help { margin: 20px 0 0; color: var(--mx-muted); font-size: 14px; }
.mx-error { margin: 0 0 12px; padding: 10px 14px; color: var(--mx-red-dark); background: var(--mx-selected-bg); border: 1.5px solid var(--mx-red); border-radius: var(--mx-radius-sm); font-weight: 600; }
.mx-error[hidden] { display: none; }
.mx-help { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; }
.mx-help a { display: inline-flex; align-items: center; min-height: 44px; }

/* ==========================================================================
   12. Modal de ingreso / registro (includes/login_modal.php) y encuesta
   ========================================================================== */
#loginModal .mx-modal__title { margin-bottom: 6px; }
.mx-login__pending { margin: 0 0 12px; color: var(--mx-ink); font-size: 15px; font-weight: 600; }

.mx-tabs { display: flex; gap: 8px; margin: 8px 0 16px; padding: 0; border: 0; list-style: none; }
.mx-tabs .nav-item { margin: 0; }
.mx-tabs .nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--mx-surface);
  border: 1.5px solid var(--mx-line-strong);
  border-radius: 999px;
  color: var(--mx-ink);
  font-weight: 600;
  text-decoration: none;
}
.mx-tabs .nav-link:hover { background: var(--mx-placeholder); border-color: var(--mx-line-strong); color: var(--mx-ink); }
.mx-tabs .nav-link.active { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }

.mx-label { display: block; margin: 0 0 4px; color: var(--mx-ink); font-size: 15px; font-weight: 700; }
.mx-modal .form-control,
.mx-auth .form-control,
.mx-form .form-control {
  height: 48px;
  margin: 0 0 14px;
  padding: 0 14px;
  border: 1.5px solid var(--mx-line-strong);
  border-radius: var(--mx-radius);
  color: var(--mx-ink);
  font-size: 16px;
  box-shadow: none;
}
.mx-modal .form-control:focus,
.mx-auth .form-control:focus,
.mx-form .form-control:focus { border-color: var(--mx-ink); box-shadow: none; }
.mx-login__submit { margin-top: 4px; }
.mx-login__terms { margin: 14px 0 0; color: var(--mx-muted); font-size: 14px; }
.mx-login__links { list-style: none; margin: 0; padding: 0; }
.mx-login__links li { margin: 0; }
.mx-login__links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
#survey_1 .form-control { height: 48px; border: 1.5px solid var(--mx-line-strong); border-radius: var(--mx-radius); font-size: 16px; box-shadow: none; }
#survey_1 .form-control:focus { border-color: var(--mx-ink); box-shadow: none; }
#survey_1 label { font-weight: 700; }

/* ==========================================================================
   13. Confirmar pago (confirm_cash_bank.php)
   ========================================================================== */
.mx-notice { margin: 0 0 20px; padding: 16px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius); }
.mx-notice p { margin: 8px 0 0; font-size: 16px; line-height: 1.5; }
/* resalte amarillo plano (como la etiqueta de oferta) */
.mx-notice__label {
  display: inline-block;
  padding: 3px 8px;
  background: var(--mx-yellow);
  color: var(--mx-yellow-ink);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.mx-bank { margin: 0 0 20px; padding: 16px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius); }
.mx-bank h2 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.mx-bank dl { margin: 0; }
.mx-bank dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 10px 0; border-top: 1px solid var(--mx-line-soft); }
.mx-bank dl > div:first-child { border-top: 0; }
.mx-bank dt { margin: 0; color: var(--mx-muted); font-size: 15px; font-weight: 600; }
.mx-bank dd { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.mx-notice__wa { margin: 2px 0 -6px -10px; font-size: 17px; }

/* Resumen sin renglones (pago, confirmar pago): el total no lleva separador arriba */
.mx-summary--solo .mx-summary__total { padding-top: 0; border-top: 0; }
/* las tarjetas "lo que ya elegiste" se alinean con la columna principal cuando hay resumen al costado */
@media (min-width: 732px) { .mx-chosen { max-width: calc(100% - 344px); } }

/* ==========================================================================
   14. Ingresar / registrarse (index-m.php)
   ========================================================================== */
.mx-authbar { background: var(--mx-surface); border-bottom: 1px solid var(--mx-line); text-align: center; padding: 8px 16px; }
.mx-authbar a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.mx-authbar img { display: block; width: 132px; height: auto; }

.mx-auth__main { display: flex; justify-content: center; align-items: flex-start; }
.mx-auth__card { width: 100%; max-width: 480px; padding: 24px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius-lg); text-align: left; }
@media (max-width: 599px) { .mx-auth__card { padding: 20px 16px; } }
.mx-auth__card h1 { margin: 0 0 12px; font-size: 26px; font-weight: 800; line-height: 1.15; }
@media (max-width: 599px) { .mx-auth__card h1 { font-size: 22px; } }

.mx-perks { display: flex; flex-direction: column; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.mx-perks li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 600; }
.mx-perks .mx-icon { flex: 0 0 auto; color: var(--mx-green); }

.mx-auth .mx-error { margin-bottom: 14px; }
.mx-auth__alt { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mx-auth__or { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; color: var(--mx-muted); font-size: 14px; }
.mx-auth__or::before, .mx-auth__or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--mx-line); }
.mx-auth #install-button { margin-top: 12px; }

/* ==========================================================================
   15. Formulario de datos de entrega (get_address.php)
   ========================================================================== */
.mx-fields { max-width: 560px; }
.mx-field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.mx-field > legend { float: none; width: auto; padding: 0; margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.mx-field .form-control { margin-bottom: 0; }
.mx-hint { margin: 4px 0 0; color: var(--mx-muted); font-size: 14px; }
.mx-label small, .mx-hint-inline { color: var(--mx-muted); font-weight: 400; font-size: 14px; }

/* select.form-control de Bootstrap fija su alto con mas especificidad */
.mx-form select.form-control:not([size]):not([multiple]) { height: 48px; }

/* Telefono argentino: 0 + codigo de area + 15 + numero */
.mx-phone { display: flex; align-items: center; gap: 8px; }
.mx-phone__pre { flex: 0 0 auto; font-size: 18px; font-weight: 800; }
.mx-phone .form-control { min-width: 0; margin: 0; }
.mx-phone__area { flex: 0 0 96px; width: 96px; }
.mx-phone__num { flex: 1 1 auto; }
.mx-form input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.mx-form input[type="number"]::-webkit-outer-spin-button,
.mx-form input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* escritorio: DNI/CUIT y ciudad lado a lado, telefono debajo */
@media (min-width: 900px) {
  .mx-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; max-width: 760px; }
  .mx-fields .mx-field--wide, .mx-fields .mx-help { grid-column: 1 / -1; }
}

/* Sin buscador (carrito y checkout): una sola fila, logo a la izquierda y cuenta/carrito a la derecha */
.mx-header--nosearch .mx-header__in { grid-template-areas: "menu logo acct"; padding-bottom: 10px; }
@media (min-width: 900px) {
  .mx-header--nosearch .mx-header__in { grid-template-areas: "menu logo . acct cart"; padding-bottom: 14px; }
}

/* ==========================================================================
   16. Pedido confirmado (order_review.php)
   ========================================================================== */
.mx-done { max-width: 640px; }
.mx-done__head { margin: 8px 0 20px; text-align: center; }
.mx-done__ok {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--mx-green); color: #fff;
}
.mx-done__head h1 { margin: 12px 0 4px; font-size: 26px; font-weight: 800; line-height: 1.2; }
.mx-done__lead { margin: 0; color: var(--mx-muted); font-size: 16px; }

.mx-receipt { margin: 0 0 20px; padding: 8px 16px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius); }
.mx-receipt dl { margin: 0; }
.mx-receipt dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--mx-line-soft); }
.mx-receipt dl > div:first-child { border-top: 0; }
.mx-receipt dt { flex: 0 0 auto; margin: 0; color: var(--mx-muted); font-size: 15px; font-weight: 600; }
.mx-receipt dd { margin: 0; min-width: 0; font-size: 16px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.mx-receipt__sub { display: block; color: var(--mx-muted); font-size: 14px; font-weight: 400; }
.mx-receipt__total dt { color: var(--mx-ink); font-size: 16px; font-weight: 800; }
.mx-receipt__total dd { font-size: 24px; font-weight: 800; }

.mx-done__thanks { margin: 4px 0 8px; text-align: center; font-size: 17px; font-weight: 700; }
.mx-done .mx-help { justify-content: center; text-align: center; margin-top: 4px; }
.mx-done__cta { margin-top: 20px; }
@media (min-width: 600px) {
  .mx-done__cta { max-width: 320px; margin-left: auto; margin-right: auto; }
}

/* ==========================================================================
   17. Retiro en sucursal (select_shift.php): datos de contacto del retiro
   ========================================================================== */
.mx-contact { margin: 0 0 20px; padding: 16px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius); }
.mx-contact__title { margin: 0 0 2px; font-size: 19px; font-weight: 800; line-height: 1.25; }
.mx-contact__hint { margin: 0 0 14px; }
.mx-contact .mx-fields { display: block; max-width: none; }
.mx-summary__note { margin: 8px 0 0; color: var(--mx-muted); font-size: 14px; line-height: 1.35; }
.mx-pickup-link { margin: 0 0 18px; padding: 12px 14px; background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius); font-size: 16px; line-height: 1.45; }
.mx-pickup-link .mx-btn { display: flex; width: fit-content; margin: 2px 0 -8px -10px; }
.mx-option__link { align-self: flex-start; margin: 2px 0 -8px -10px; }

/* ==========================================================================
   18. Cargando entre pasos (MX.busy en js/mx-ui.js)
   ========================================================================== */
.mx-busy {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, .82);
  animation: mx-fade-in .2s ease .15s both;   /* aparece a los 150 ms; los toques se bloquean desde el primero */
}
.mx-busy__box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  min-width: 200px; max-width: 300px; padding: 24px 28px;
  background: var(--mx-surface); border: 1px solid var(--mx-line); border-radius: var(--mx-radius-lg);
  text-align: center;
}
.mx-busy__text { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.mx-spinner {
  display: block; width: 44px; height: 44px;
  border: 5px solid var(--mx-line); border-top-color: var(--mx-red); border-radius: 50%;
  animation: mx-spin .8s linear infinite;
}
@keyframes mx-spin { to { transform: rotate(360deg); } }
@keyframes mx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .mx-busy { animation: none; }
  .mx-spinner { animation: none; border-right-color: var(--mx-red); }   /* sin giro: el texto avisa que esta cargando */
}
