/**
 * Checkout rediseñado — según mockup aprobado (racing disciplinado).
 * Solo contenido del checkout; el header del sitio NO se toca.
 * Tokens compartidos con el header racing: #E11414 / #F4C21B / #18181b.
 */

:root {
  --mhw-co-bg: #f4f4f6;
  --mhw-co-surface: #fff;
  --mhw-co-fieldbg: #f5f5f7;
  --mhw-co-ink: #18181b;
  --mhw-co-muted: #6b6b73;
  --mhw-co-faint: #9a9aa2;
  --mhw-co-line: #e6e6ea;
  --mhw-co-red: #e11414;
  --mhw-co-red-dark: #c50f0f;
  --mhw-co-green: #16893a;
  --mhw-co-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 30px rgba(0, 0, 0, .06);
  /* CP-CRITICAL-CSS/FIX-3 · las dos pilas nombran su cara de RESERVA CALIBRADA (las de
     CP-FUENTES, declaradas en header-racing.css, que va en todas las páginas) delante
     de las genéricas. `ui-monospace` y `Arial Narrow` tienen otras métricas: mientras
     baja el woff2 el rótulo se pinta con ellas y salta al relevar. El checkout NO lleva
     bloque crítico —no está entre las seis plantillas medidas—, pero la pila es la
     misma cosa aquí y en el carrito, y una sola forma por componente. */
  --mhw-co-mono: "JetBrains Mono", "JetBrains Reserva", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mhw-co-cond: "Barlow Semi Condensed", "Barlow SemiCond Reserva DejaVu",
                 "Barlow SemiCond Reserva Arial", "Arial Narrow", sans-serif;
}

/* ===== layout ===== */
.checkout-page {
  max-width: 1360px;
  margin: 22px auto 60px;
  padding: 0 20px;
  color: var(--mhw-co-ink);
  /* misma base tipográfica que el mockup aprobado */
  /* sin "Inter": la única cara Inter del sitio es la itálica 600 del header
     racing y el font-matching la usaría para TODO (texto inclinado) */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.checkout-page input,
.checkout-page select,
.checkout-page button,
.checkout-page textarea {
  font-family: inherit;
}

.checkout-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}
@media (min-width: 1024px) {
  .checkout-inner {
    grid-template-columns: 1.55fr 1fr;
    gap: 30px;
  }
}

/* ocultar el sufijo "(optional)" que WC añade a los labels */
.checkout-page .optional {
  display: none !important;
}

/* ===== tarjeta de datos (secciones 1 y 2) ===== */
.woocommerce-billing-fields,
.woocommerce-additional-fields {
  background: var(--mhw-co-surface);
  border: 1px solid var(--mhw-co-line);
  border-radius: 14px;
  box-shadow: var(--mhw-co-shadow);
  padding: 22px 24px 24px;
}
.woocommerce-additional-fields {
  margin-top: 18px;
}

/* título de sección con marcador racing */
.woocommerce-billing-fields > h3,
.mhw-fe > h3,
.woocommerce-additional-fields > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--mhw-co-cond);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mhw-sec-n {
  display: inline-block;
  background: var(--mhw-co-red);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 7px 11px 6px;
  transform: skewX(-9deg);
}

/* ===== grid de campos ===== */
.woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px 14px;
}

/* Anti-FOUC. Dos zonas del checkout se reconstruyen en cliente al cargar y se
   veían como un "render viejo" que se reacomoda:
   1) los DATOS (izq.): address-i18n + selectWoo reordenan/transforman campos.
   2) el RESUMEN (der.): WooCommerce lanza un update_checkout AJAX al cargar que
      recalcula totales y re-renderiza medios de pago y el botón (por eso el
      botón "cambiaba" de texto y el total saltaba).
   Cada zona arranca invisible y la revela checkout-ui.js cuando SU parte quedó
   lista (datos: tras el reflow; resumen: tras el primer updated_checkout).
   Fallback: si el JS no corriera, la animación las revela sola (nunca quedan
   invisibles). */
.checkout-page .woocommerce-billing-fields,
.checkout-page .woocommerce-additional-fields {
  opacity: 0;
  animation: mhw-co-reveal 0s linear 1.2s forwards;
}
html.mhw-co-ready .checkout-page .woocommerce-billing-fields,
html.mhw-co-ready .checkout-page .woocommerce-additional-fields {
  opacity: 1;
  animation: none;
  transition: opacity .18s ease;
}
.checkout-page .order-wrapper {
  opacity: 0;
  animation: mhw-co-reveal 0s linear 2s forwards;
}
html.mhw-co-review-ready .checkout-page .order-wrapper {
  opacity: 1;
  animation: none;
  transition: opacity .18s ease;
}
@keyframes mhw-co-reveal { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .checkout-page .woocommerce-billing-fields,
  .checkout-page .woocommerce-additional-fields,
  .checkout-page .order-wrapper { opacity: 1; animation: none; }
}
@media (min-width: 560px) {
  .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr 1fr;
  }
  .woocommerce-billing-fields__field-wrapper .form-row-wide {
    grid-column: 1 / -1;
  }

  /* Anclaje del layout por ID: el JS de locale de WC (address-i18n) reordena
     y re-clasifica los campos de dirección; el orden visual queda fijado aquí
     y no depende de las clases form-row-* que ese JS reescribe. */
  .woocommerce-billing-fields__field-wrapper .form-row { order: 90; }
  #billing_first_name_field            { order: 1; grid-column: 1; }
  #billing_last_name_field             { order: 2; grid-column: 2; }
  #billing_identification_type_field   { order: 3; grid-column: 1; }
  #billing_identification_number_field { order: 4; grid-column: 2; }
  #billing_email_field                 { order: 5; grid-column: 1; }
  #billing_phone_field                 { order: 6; grid-column: 2; }
  #billing_country_field               { order: 7; grid-column: 1; }
  #billing_state_field                 { order: 8; grid-column: 2; }
  #billing_city_field                  { order: 9; grid-column: 1; }
  #billing_postcode_field              { order: 10; grid-column: 2; }
  #billing_company_field               { order: 11; grid-column: 1 / -1; }
  #billing_address_1_field             { order: 12; grid-column: 1 / -1; }
}

/* país de venta única: WC lo pinta como texto — que parezca un campo lleno */
#billing_country_field strong {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  background: var(--mhw-co-fieldbg);
  border: 1px solid var(--mhw-co-line);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
}
/* Especificidad: el CSS core de WooCommerce estila los campos con selectores
   tipo `.woocommerce form .form-row input.input-text` (0,3,2) y layout
   `.woocommerce form .form-row-first { width: 47% }` — estas reglas deben
   ganarle, por eso el prefijo largo. */
.checkout-page .checkout-fields .form-row {
  margin: 0;
  padding: 0;
  float: none;
  width: auto;
}
.checkout-page .checkout-fields .form-row label {
  display: block;
  float: none;
  width: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mhw-co-muted);
  margin: 0 0 6px;
  letter-spacing: .01em;
  line-height: 1.5;
}
.checkout-page .checkout-fields .form-row label .required {
  color: var(--mhw-co-red);
  text-decoration: none;
}

/* inputs y selects */
.checkout-page .checkout-fields .form-row input.input-text,
.checkout-page .checkout-fields .form-row textarea,
.checkout-page .checkout-fields .form-row select,
.checkout-page .checkout-fields .form-row .select2-selection--single {
  width: 100%;
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-fieldbg);
  color: var(--mhw-co-ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
  height: 46px;
  box-sizing: border-box;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.checkout-page .checkout-fields .form-row textarea {
  height: auto;
  min-height: 76px;
}
.checkout-page .checkout-fields .form-row input.input-text::placeholder,
.checkout-page .checkout-fields .form-row textarea::placeholder {
  color: var(--mhw-co-faint);
}
.checkout-page .checkout-fields .form-row input.input-text:focus,
.checkout-page .checkout-fields .form-row textarea:focus,
.checkout-page .checkout-fields .form-row select:focus {
  outline: none;
  border-color: var(--mhw-co-red);
  background: var(--mhw-co-surface);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .12);
}

/* select2 / selectWoo a juego */
.checkout-page .checkout-fields .form-row .select2-selection--single {
  display: flex;
  align-items: center;
}
.checkout-page .checkout-fields .select2-selection__rendered {
  color: var(--mhw-co-ink) !important;
  line-height: 1.4 !important;
  padding-left: 0 !important;
}
.checkout-page .checkout-fields .select2-selection__arrow {
  height: 44px !important;
}
.checkout-page .checkout-fields .select2-container--focus .select2-selection--single,
.checkout-page .checkout-fields .select2-container--open .select2-selection--single {
  border-color: var(--mhw-co-red);
  background: var(--mhw-co-surface);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .12);
}

/* ===== sección facturación (módulo factura-electronica) ===== */
.mhw-fe {
  margin-top: 26px;
}
.mhw-fe-check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.mhw-fe-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--mhw-co-red);
  margin-top: 2px;
  flex: none;
  cursor: pointer;
}
.mhw-fe-check-hint {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--mhw-co-muted);
  margin-top: 1px;
}
.mhw-fe-target {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 0;
}
.mhw-fe-target label {
  border: 1px solid var(--mhw-co-line);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.mhw-fe-target label:has(input:checked) {
  border-color: var(--mhw-co-red);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .10);
}
.mhw-fe-target input {
  accent-color: var(--mhw-co-red);
  margin-right: 6px;
}
.mhw-fe-natural-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--mhw-co-muted);
  background: var(--mhw-co-fieldbg);
  border: 1px solid var(--mhw-co-line);
  border-radius: 9px;
  padding: 10px 12px;
}
.mhw-fe-empresa {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px 14px;
  margin-top: 14px;
}
@media (min-width: 560px) {
  .mhw-fe-empresa {
    grid-template-columns: 1fr 1fr;
  }
  .mhw-fe-empresa .form-row-wide {
    grid-column: 1 / -1;
  }
}
.mhw-fe-dv {
  color: var(--mhw-co-green);
  font-family: var(--mhw-co-mono);
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}

/* ===== resumen del pedido (sticky, cabecera oscura) ===== */
.order-wrapper {
  background: var(--mhw-co-surface);
  border: 1px solid var(--mhw-co-line);
  border-radius: 14px;
  box-shadow: var(--mhw-co-shadow);
  overflow: hidden;
  padding: 0;
  position: sticky;
  top: 18px;
}
#order_review_heading {
  margin: 0;
  background: var(--mhw-co-ink);
  color: #fff;
  padding: 15px 22px;
  border-bottom: 3px solid var(--mhw-co-red);
  font-family: var(--mhw-co-cond);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mhw-sum-count {
  /* sin "Inter": la única cara Inter del sitio es la itálica 600 del header
     racing y el font-matching la usaría para TODO (texto inclinado) */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #b6b6be;
}
#order_review {
  padding: 0 0 22px;
}

/* ===== resumen opción B: bloques propios (no tabla de WC) ===== */
.mhw-totals {
  padding: 6px 22px 0;
}
/* Tipografía del resumen IGUALADA al carrito (.mhw-sum__*): valores en
   JetBrains Mono tabular + Total protagónico 32.8px. Valores en px para que
   rendericen idéntico al carrito pese a la base de fuente distinta. */
.mhw-totals .mhw-trow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  color: var(--mhw-co-muted);
}
.mhw-totals .mhw-l {
  flex: none;
  font-size: 14.7px;
}
.mhw-totals .mhw-v,
.mhw-totals .mhw-v .woocommerce-Price-amount {
  font-family: var(--mhw-co-mono);
  font-weight: 500;
  font-size: 14.7px;
  color: var(--mhw-co-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  text-align: right;
}
.mhw-totals .mhw-discount .mhw-v,
.mhw-totals .mhw-discount .mhw-v .woocommerce-Price-amount {
  color: var(--mhw-co-green);
}
.mhw-totals .mhw-free {
  color: var(--mhw-co-green);
  font-family: var(--mhw-co-cond);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .02em;
}
.mhw-totals .mhw-total {
  border-top: 1px solid var(--mhw-co-line);
  margin-top: 12px;
  padding-top: 16px;
  align-items: flex-end;
}
.mhw-totals .mhw-total .mhw-l {
  font-family: var(--mhw-co-cond);
  font-weight: 700;
  font-size: 18.4px;
  color: var(--mhw-co-ink);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.mhw-totals .mhw-total .mhw-v,
.mhw-totals .mhw-total .mhw-v .woocommerce-Price-amount {
  font-family: var(--mhw-co-mono);
  font-weight: 700;
  font-size: 32.8px;
  line-height: 1;
  color: var(--mhw-co-ink);
  letter-spacing: -.045em;
}
.mhw-totals .mhw-total .mhw-v .woocommerce-Price-amount bdi {
  display: inline-flex;
  align-items: center;
}
.mhw-totals .mhw-total .mhw-v .woocommerce-Price-currencySymbol {
  font-size: .5em;
  font-weight: 500;
  color: var(--mhw-co-red);
  margin-right: 2px;
}

/* tabla de productos y totales — se saca del layout de tabla y cada fila
   pasa a flex (la estructura del mockup): así el total de 22px no dicta el
   ancho de la columna de precios y las filas insertadas ocupan todo el ancho.
   Nota: un tr con display:flex dentro de un tfoot real queda envuelto en una
   celda anónima (colapsaba a una columna), por eso tbody/tfoot van a block. */
.checkout-page .woocommerce-checkout-review-order-table,
.checkout-page .woocommerce-checkout-review-order-table tbody,
.checkout-page .woocommerce-checkout-review-order-table tfoot {
  display: block;
  width: 100%;
}
.checkout-page .woocommerce-checkout-review-order-table {
  border-collapse: collapse;
  color: var(--mhw-co-ink);
}
.checkout-page .woocommerce-checkout-review-order-table tr.cart_item {
  display: flex;
  align-items: flex-start;
}
.checkout-page .woocommerce-checkout-review-order-table th,
.checkout-page .woocommerce-checkout-review-order-table td {
  border: 0;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
  background: transparent;
}
/* el mockup no tiene fila de encabezados (Producto/Subtotal) */
.checkout-page .woocommerce-checkout-review-order-table thead {
  display: none;
}
.checkout-page .woocommerce-checkout-review-order-table .product-total,
.checkout-page .woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
}
.checkout-page .woocommerce-checkout-review-order-table .cart_item td {
  border-bottom: 1px solid var(--mhw-co-line);
  border-top: 0;
  padding: 15px 0;
}
.checkout-page .woocommerce-checkout-review-order-table .product-name {
  font-weight: 600;
  line-height: 1.35;
  color: var(--mhw-co-ink);
  padding-right: 12px;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  /* WC imprime un &nbsp; suelto tras el nombre: como ítem de grilla anónimo
     creaba una fila fantasma de una línea — las filas implícitas van a 0 */
  grid-template-rows: auto;
  grid-auto-rows: 0;
  gap: 0 14px;
  align-items: start;
}
/* los ::before/::after heredados (clearfix) serían ítems de grilla
   y crean una fila fantasma que estira la tarjeta */
.checkout-page .woocommerce-checkout-review-order-table .product-name::before,
.checkout-page .woocommerce-checkout-review-order-table .product-name::after {
  content: none;
}
.checkout-page .woocommerce-checkout-review-order-table .cart_item .product-total {
  flex: none;
  white-space: nowrap;
}
.mhw-item-thumb {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 9px;
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-fieldbg);
  display: block;
}
.mhw-item-thumb .mhw-item-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  /* si la imagen falta (caso local), el alt no desborda */
  font-size: 8px;
  color: var(--mhw-co-faint);
  overflow: hidden;
}
/* cantidad como badge rojo sobre la miniatura, como el mockup */
.mhw-qty-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mhw-co-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mhw-item-main {
  grid-column: 2;
  grid-row: 1;
}
.mhw-item-sku {
  display: block;
  font-family: var(--mhw-co-mono);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--mhw-co-faint);
  margin-top: 3px;
}
.checkout-page .woocommerce-Price-amount {
  font-family: var(--mhw-co-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
/* precios en tinta (el rojo del tema es solo para acentos del sitio) */
.checkout-page .woocommerce-checkout-review-order-table .woocommerce-Price-amount {
  color: var(--mhw-co-ink);
}
.checkout-page .woocommerce-checkout-review-order-table tfoot .woocommerce-Price-amount {
  font-weight: 600;
}
/* los totales van como filas flex (los .trow del mockup): así el total
   de 22px no comparte columna de tabla con los precios de los productos
   y la columna del nombre recupera su ancho */
.checkout-page .woocommerce-checkout-review-order-table tfoot tr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 0;
}
.checkout-page .woocommerce-checkout-review-order-table tfoot th,
.checkout-page .woocommerce-checkout-review-order-table tfoot td {
  padding: 7px 0;
  border: 0;
}
.checkout-page .woocommerce-checkout-review-order-table tfoot th {
  flex: none;
  font-weight: 400;
  color: var(--mhw-co-muted);
}
.checkout-page .woocommerce-checkout-review-order-table tfoot td {
  margin-left: auto;
}
/* filas de ancho completo insertadas en la tabla (cupón, en el tbody,
   y panel de envío, en el tfoot) */
.checkout-page .woocommerce-checkout-review-order-table tr.mhw-coupon-tr {
  display: flex;
}
.checkout-page .woocommerce-checkout-review-order-table tr.mhw-coupon-tr > td,
.checkout-page .woocommerce-checkout-review-order-table tr.mhw-ship-acc-body > td {
  flex: 1 1 100%;
  margin-left: 0;
}
.checkout-page .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td {
  flex: 1;
  min-width: 0;
}
/* la fila nativa de envío es redundante: el acordeón colapsable ya muestra el
   método elegido y su costo. Se oculta para no repetir "Envío Estándar $X". */
.checkout-page .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals {
  display: none;
}
.checkout-page .woocommerce-checkout-review-order-table tr.order-total {
  border-top: 1px solid var(--mhw-co-line);
  margin-top: 6px;
}
.checkout-page .woocommerce-checkout-review-order-table .order-total th,
.checkout-page .woocommerce-checkout-review-order-table .order-total td {
  padding-top: 14px;
}
.checkout-page .woocommerce-checkout-review-order-table .order-total th {
  font-weight: 800;
  font-size: 15px;
  color: var(--mhw-co-ink);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.checkout-page .woocommerce-checkout-review-order-table .order-total .woocommerce-Price-amount {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
}
/* refuerzo de especificidad: las reglas genéricas de th/td de WC core
   (.woocommerce table.shop_table th → 0,2,3) ganaban a las de arriba (0,2,2)
   y dejaban negritas y bordes con alfa en los totales */
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table tr,
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table th,
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table td {
  border: 0;
}
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table .cart_item td {
  border-bottom: 1px solid var(--mhw-co-line);
}
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table tfoot th {
  font-weight: 400;
  color: var(--mhw-co-muted);
}
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table tr.order-total {
  border-top: 1px solid var(--mhw-co-line);
}
.woocommerce-checkout .checkout-page .woocommerce-checkout-review-order-table .order-total th {
  font-weight: 800;
  color: var(--mhw-co-ink);
}

/* opciones de envío (Estándar / VIP) */
.checkout-page .woocommerce-checkout-review-order-table .woocommerce-shipping-totals th {
  vertical-align: top;
  padding-top: 16px;
}
#shipping_method {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
#shipping_method li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--mhw-co-line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 8px;
  transition: border-color .12s, box-shadow .12s;
}
#shipping_method li:has(input:checked) {
  border-color: var(--mhw-co-red);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .08);
}
#shipping_method input[type="radio"] {
  accent-color: var(--mhw-co-red);
  margin-top: 3px;
  flex: none;
}
#shipping_method label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
#shipping_method label .woocommerce-Price-amount {
  font-size: 12.5px;
}

/* filas contenedoras dentro de la tabla (cupón y panel de envío) */
.mhw-coupon-tr > td,
.mhw-ship-acc-body > td {
  padding: 10px 0 !important;
  text-align: left !important;
}

/* envío colapsable: ya viene elegido del carrito → summary con el método,
   se abre sólo para cambiar. Va directo en #order_review (opción B): es el
   primer bloque, la línea roja de la cabecera ya lo separa. */
.mhw-ship-acc {
  border-top: 0;
}
.mhw-ship-acc > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
}
.mhw-ship-acc > summary::-webkit-details-marker {
  display: none;
}
.mhw-ship-sel {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.mhw-ship-sel-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--mhw-co-ink);
}
.mhw-ship-ico {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--mhw-co-muted);
}
.mhw-ship-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mhw-co-muted);
}
.mhw-ship-change i {
  font-style: normal;
  transition: transform .15s;
}
.mhw-ship-acc[open] > summary .mhw-ship-change i {
  transform: rotate(180deg);
}
.mhw-ship-acc > summary:hover .mhw-ship-change {
  color: var(--mhw-co-red);
}
.mhw-ship-acc-body {
  padding: 0 22px 14px;
}

/* Productos: desplegable del resumen (colapsado, como el envío) */
.mhw-items-acc { border-bottom: 1px solid var(--mhw-co-line); }
.mhw-items-acc > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px;
}
.mhw-items-acc > summary::-webkit-details-marker { display: none; }
.mhw-items-lead { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: var(--mhw-co-ink); }
.mhw-items-lead svg { width: 18px; height: 18px; flex: none; color: var(--mhw-co-muted); }
.mhw-items-count { font-size: 14px; font-weight: 700; }
.mhw-items-count b { color: var(--mhw-co-red); }
.mhw-items-change { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--mhw-co-muted); }
.mhw-items-change i { font-style: normal; transition: transform .15s ease; }
.mhw-items-acc[open] > summary .mhw-items-change i { transform: rotate(180deg); }
.mhw-items-acc > summary:hover .mhw-items-change { color: var(--mhw-co-red); }
.mhw-items-acc-body { padding: 2px 22px 14px; display: flex; flex-direction: column; }
.mhw-ci { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--mhw-co-line); }
.mhw-ci:first-child { border-top: 0; }
.mhw-ci-thumb {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 8px;
  border: 1px solid var(--mhw-co-line); background: var(--mhw-co-fieldbg);
  overflow: hidden; display: grid; place-items: center;
}
.mhw-ci-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mhw-ci-main { flex: 1; min-width: 0; }
.mhw-ci-name { display: block; font-size: 13px; font-weight: 600; color: var(--mhw-co-ink); }
.mhw-ci-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.mhw-ci-sku { font-family: var(--mhw-co-mono); font-size: 11px; color: var(--mhw-co-faint); }
/* Cantidad al lado derecho del SKU (antes iba quemada sobre la foto) */
.mhw-ci-qty { font-family: var(--mhw-co-mono); font-size: 11px; font-weight: 700; color: var(--mhw-co-red); white-space: nowrap; }
.mhw-ci-price { flex: none; font-family: var(--mhw-co-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--mhw-co-ink); white-space: nowrap; }

/* panel de envío del plugin, calcado del mockup (tarjetas blancas,
   borde rojo al seleccionar, tag verde de gratis) */
.mhw-ship-acc-body .rafas-custom-shipping-options {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.mhw-ship-acc-body .rafas-custom-shipping-options h3,
.mhw-ship-acc-body .rafas-custom-shipping-options h4 {
  font-family: inherit;
  line-height: 1.5;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--mhw-co-muted);
  margin: 0 0 10px;
  background: transparent;
  border: 0;
  padding: 0;
}
.mhw-ship-acc-body .shipping-methods-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mhw-ship-acc-body .shipping-method-option {
  border: 1px solid var(--mhw-co-line) !important;
  border-radius: 12px !important;
  background: var(--mhw-co-surface) !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: border-color .12s, box-shadow .12s;
}
.mhw-ship-acc-body .shipping-method-option:has(input:checked) {
  border-color: var(--mhw-co-red) !important;
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .10) !important;
  background: var(--mhw-co-surface) !important;
}
.mhw-ship-acc-body .shipping-method-option label {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px !important;
  margin: 0 !important;
  cursor: pointer;
  font-weight: 400;
}
.mhw-ship-acc-body .rafas-shipping-method-radio {
  accent-color: var(--mhw-co-red);
  width: 18px;
  height: 18px;
  margin: 2px 0 0 !important;
  flex: none;
}
.mhw-ship-acc-body .shipping-method-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
}
.mhw-ship-acc-body .shipping-method-name {
  order: 1;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mhw-co-ink);
}
.mhw-ship-acc-body .shipping-method-cost {
  order: 3;
  margin-left: auto;
  font-family: var(--mhw-co-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--mhw-co-ink);
}
.mhw-ship-acc-body .shipping-method-free-badge {
  order: 2;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mhw-co-green);
  border: 1px solid rgba(22, 137, 58, .35);
  border-radius: 5px;
  padding: 2px 7px;
}
.mhw-ship-acc-body .shipping-free-original-cost {
  text-decoration: line-through;
  color: var(--mhw-co-faint);
  font-weight: 400;
}
.mhw-ship-acc-body .shipping-method-description {
  order: 4;
  flex: 0 0 100%;
  font-size: 12.5px;
  color: var(--mhw-co-muted);
  line-height: 1.5;
}
.mhw-ship-acc-body .shipping-free-threshold {
  order: 5;
  flex: 0 0 100%;
  font-size: 11.5px;
  color: var(--mhw-co-faint);
}
.mhw-ship-acc-body .shipping-method-mini-bar {
  order: 6;
  flex: 0 0 100%;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--mhw-co-line);
  overflow: hidden;
  margin-top: 5px;
}
.mhw-ship-acc-body .shipping-method-mini-progress {
  height: 100%;
  background: #f4c21b;
  border-radius: 999px;
}

/* cupón — acordeón colapsable en la cabecera del resumen (como Malossi) */
.mhw-coupon-acc {
  border-bottom: 1px solid var(--mhw-co-line);
}
.mhw-coupon-acc > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mhw-co-ink);
}
.mhw-coupon-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mhw-coupon-ico {
  width: 16px;
  height: 16px;
  color: var(--mhw-co-red);
  flex: none;
}
.mhw-coupon-acc > summary::-webkit-details-marker {
  display: none;
}
.mhw-coupon-acc > summary i {
  font-style: normal;
  color: var(--mhw-co-muted);
  transition: transform .15s;
}
.mhw-coupon-acc[open] > summary i {
  transform: rotate(180deg);
}
.mhw-coupon-acc > summary:hover {
  color: var(--mhw-co-red);
}
.mhw-coupon-row {
  display: flex;
  gap: 8px;
  padding: 0 22px 14px;
}
.mhw-coupon-row input {
  flex: 1;
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-fieldbg);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--mhw-co-ink);
  min-width: 0;
}
.mhw-coupon-row input:focus {
  outline: none;
  border-color: var(--mhw-co-red);
  background: var(--mhw-co-surface);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .12);
}
.mhw-coupon-row button {
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-surface);
  color: var(--mhw-co-ink);
  border-radius: 9px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.mhw-coupon-row button:hover {
  border-color: var(--mhw-co-ink);
}
.mhw-coupon-msg {
  font-size: 12.5px;
  color: var(--mhw-co-green);
  margin: 0 22px 8px;
}
.mhw-coupon-msg.is-error {
  color: var(--mhw-co-red);
}
.mhw-coupon-msg:empty {
  display: none;
}

/* productos: ya no se listan en el resumen — se ven/editan en el carrito */
.checkout-page .woocommerce-checkout-review-order-table tr.cart_item {
  display: none;
}

/* ===== pago ===== */
#payment.woocommerce-checkout-payment {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
/* selector al nivel de WC core: su ul.payment_methods trae padding 1em */
.woocommerce-checkout #payment ul.payment_methods {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-bottom: 0;
}
/* etiqueta de sección, como el .paylabel del mockup */
#payment .wc_payment_methods::before {
  content: "Medio de pago";
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mhw-co-muted);
  margin: 4px 0 10px;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
  border: 1px solid var(--mhw-co-line);
  border-radius: 12px;
  background: var(--mhw-co-surface);
  padding: 13px 14px;
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .12s, box-shadow .12s;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 2px 12px;
  align-items: start;
}
/* cuadrito de icono a la derecha del método, como el pm-ico del mockup */
.mhw-pm-ico {
  grid-column: 3;
  grid-row: 1;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--mhw-co-fieldbg);
  border: 1px solid var(--mhw-co-line);
  color: var(--mhw-co-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mhw-pm-ico svg {
  width: 15px;
  height: 15px;
}
#payment .wc_payment_method input.input-radio {
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  position: static;
}
#payment .wc_payment_method > label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0;
}
#payment .wc_payment_method .payment_box {
  grid-column: 2;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:has(input:checked) {
  border-color: var(--mhw-co-red);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .10);
}
#payment .wc_payment_method > label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  display: inline-block;
}
.mhw-pm-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 2px 7px;
  vertical-align: middle;
}
.mhw-pm-tag.instant {
  color: var(--mhw-co-green);
  border: 1px solid rgba(22, 137, 58, .35);
}
.mhw-pm-tag.manual {
  color: var(--mhw-co-muted);
  border: 1px solid var(--mhw-co-line);
}
.mhw-pm-desc {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mhw-co-muted);
  margin-top: 2px;
}
#payment .wc_payment_method input.input-radio {
  accent-color: var(--mhw-co-red);
  margin-right: 8px;
}
/* cajón del método seleccionado — mismo selector que WC core para ganarle
   (su fondo morado #dcd7e2, radios de 2px y ::before con flecha) */
.woocommerce-checkout #payment div.payment_box {
  background: var(--mhw-co-fieldbg);
  border: 1px solid var(--mhw-co-line);
  border-radius: 9px;
  padding: 10px 12px !important;
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--mhw-co-muted);
  width: auto;
}
.woocommerce-checkout #payment div.payment_box::before {
  display: none;
}
.woocommerce-checkout #payment div.payment_box p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
}
/* cajón de Wompi: logos Visa/Mastercard + sello "Pago protegido" */
.mhw-pm-secure-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.mhw-pm-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mhw-pm-logos svg {
  width: 46px;
  height: 30px;
  background: #fff;
  border: 1px solid var(--mhw-co-line);
  border-radius: 5px;
  flex: none;
}
.mhw-pm-secure {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--mhw-co-green);
}
.mhw-pm-secure svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.woocommerce-checkout #payment div.form-row.place-order {
  padding: 8px 0 0;
  margin: 0;
}
#place_order {
  width: 100%;
  float: none; /* WC core lo flota y colapsaba la nota de abajo (BFC) */
  border: 0;
  cursor: pointer;
  color: #fff;
  background: var(--mhw-co-red);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 800;
  line-height: normal;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .12s, transform .06s;
  box-shadow: 0 6px 18px rgba(225, 20, 20, .28);
}
#place_order svg {
  width: 18px;
  height: 18px;
  flex: none;
}
#place_order:hover {
  background: var(--mhw-co-red-dark);
}
#place_order:active {
  transform: translateY(1px);
}
/* nota bajo el botón + chips de medios, como el mockup */
.mhw-paynote {
  width: 100%;
  clear: both;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--mhw-co-muted);
  text-align: center;
}
.mhw-paynote svg {
  width: 14px;
  height: 14px;
  color: var(--mhw-co-green);
  flex: none;
}
.mhw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}
.mhw-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--mhw-co-muted);
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-surface);
  border-radius: 6px;
  padding: 4px 9px;
  letter-spacing: .02em;
}
.woocommerce-terms-and-conditions-wrapper {
  font-size: 12.5px;
  color: var(--mhw-co-muted);
}

/* cupón (banner nativo arriba del formulario) */
.woocommerce-form-coupon-toggle .woocommerce-info {
  background: var(--mhw-co-surface);
  border: 1px solid var(--mhw-co-line);
  border-radius: 12px;
  color: var(--mhw-co-muted);
}
.woocommerce-form-coupon-toggle .woocommerce-info a {
  color: var(--mhw-co-red);
  font-weight: 600;
}

/* ---- Aviso de login "¿Ya tienes cuenta?" (colapsable, arriba del checkout) ---- */
.mhw-login-acc {
  background: var(--mhw-co-surface);
  border: 1px solid var(--mhw-co-line);
  border-left: 3px solid var(--mhw-co-red);
  border-radius: 12px;
  box-shadow: var(--mhw-co-shadow);
  overflow: hidden;
  margin: 0 auto 18px;
  color: var(--mhw-co-ink);
}
/* Alineado con la columna izquierda "TUS DATOS": mismo ancho que el 1.55fr del
   grid .checkout-inner (1.55fr / 1fr, gap 30px, desde 1024px). En móvil (1 col)
   ocupa todo el ancho. 1.55/2.55 = 0.60784. */
@media (min-width: 1024px) {
  .mhw-login-acc { width: calc((100% - 30px) * 0.60784); }
}
.mhw-login-acc > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
}
.mhw-login-acc > summary::-webkit-details-marker { display: none; }
.mhw-login-ico {
  flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--mhw-co-fieldbg);
  display: grid; place-items: center; color: var(--mhw-co-muted);
}
.mhw-login-ico svg { width: 18px; height: 18px; }
.mhw-login-lead { flex: 1; min-width: 0; line-height: 1.35; }
.mhw-login-lead b { display: block; font-size: 14.5px; font-weight: 700; color: var(--mhw-co-ink); }
.mhw-login-lead > span { display: block; font-size: 12.5px; color: var(--mhw-co-muted); }
.mhw-login-cta {
  flex: none; font-family: var(--mhw-co-cond); text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; font-size: 13px; color: var(--mhw-co-red); display: inline-flex; align-items: center; gap: 6px;
}
.mhw-login-cta i { font-style: normal; transition: transform .16s ease; }
.mhw-login-acc[open] > summary .mhw-login-cta i { transform: rotate(180deg); }
.mhw-login-acc > summary:hover .mhw-login-cta { color: var(--mhw-co-red-dark); }

.mhw-login-body { padding: 2px 18px 18px; border-top: 1px solid var(--mhw-co-line); }
.mhw-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.mhw-login-form .mhw-fld { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.mhw-login-form .mhw-fld label {
  font-family: var(--mhw-co-cond); text-transform: uppercase; letter-spacing: .05em;
  font-size: 11px; font-weight: 700; color: var(--mhw-co-muted);
}
.mhw-login-form .mhw-fld input {
  font: inherit; font-size: 14px; padding: 11px 12px; border: 1px solid var(--mhw-co-line);
  border-radius: 9px; background: var(--mhw-co-fieldbg); color: var(--mhw-co-ink); width: 100%;
  transition: border-color .15s, background .15s;
}
.mhw-login-form .mhw-fld input:focus { outline: none; border-color: var(--mhw-co-red); background: var(--mhw-co-surface); }
.mhw-login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.mhw-login-remember { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mhw-co-muted); cursor: pointer; margin: 0; }
.mhw-login-remember input { accent-color: var(--mhw-co-red); width: 16px; height: 16px; }
.mhw-login-lost { font-size: 13px; color: var(--mhw-co-muted); text-decoration: none; }
.mhw-login-lost:hover { color: var(--mhw-co-red); text-decoration: underline; }
/* alta especificidad: el .button de WooCommerce (gris) pisaba el botón rojo */
.mhw-login-acc .mhw-login-form button.mhw-login-btn {
  margin-top: 16px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--mhw-co-red); color: #fff; font-family: var(--mhw-co-cond); text-transform: uppercase;
  letter-spacing: .03em; font-weight: 700; font-size: 15px; line-height: normal; padding: 13px; border: 0; border-radius: 10px;
  cursor: pointer; transition: background .15s;
}
.mhw-login-acc .mhw-login-form button.mhw-login-btn:hover { background: var(--mhw-co-red-dark); }
/* captcha del plugin rafas-login-register-capcha embebido en el login (centrado) */
.mhw-login-form .rlrc-captcha-container { margin-top: 14px; text-align: center; }
.mhw-login-form .rlrc-captcha-container label { font-size: 13px; color: var(--mhw-co-muted); display: block; margin-bottom: 6px; }
.mhw-login-form .rlrc-captcha-question { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.mhw-login-form .rlrc-captcha-container input {
  font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--mhw-co-line);
  border-radius: 9px; background: var(--mhw-co-fieldbg); color: var(--mhw-co-ink); width: 90px; text-align: center;
}
@media (max-width: 520px) { .mhw-login-grid { grid-template-columns: 1fr; } }

/* avisos de error del checkout */
.checkout-page .woocommerce-error {
  border-radius: 12px;
  border: 1px solid var(--mhw-co-red);
}
/* avisos informativos (p. ej. "un producto ya no está disponible" al recomprar) */
.checkout-page > .woocommerce-info,
.checkout-page .woocommerce-notices-wrapper > .woocommerce-info,
.checkout-page .woocommerce-notices-wrapper > .woocommerce-message {
  margin: 0 0 18px; padding: 13px 16px; border-radius: 12px; list-style: none;
  background: var(--mhw-co-fieldbg); border: 1px solid var(--mhw-co-line);
  color: var(--mhw-co-ink); font-size: 14px;
}
.checkout-page .woocommerce-notices-wrapper > .woocommerce-message { border-color: rgba(22, 137, 58, .4); }

/* elementos que el diseño aprobado no contempla:
   - "¿Enviar a otra dirección?": la tienda despacha a la dirección de facturación
   - "Create an account?": el pedido invitado es el flujo por defecto */
.checkout-page #ship-to-different-address,
.checkout-page .woocommerce-account-fields {
  display: none;
}
/* la tarjeta de Notas se pega al bloque de datos, como continuación */
.woocommerce-additional-fields {
  margin-top: 18px;
}
.woocommerce-additional-fields > h3:empty {
  display: none;
}

/* ===== responsive: el resumen deja de ser sticky apilado ===== */
@media (max-width: 1023px) {
  .order-wrapper {
    position: static;
  }
}

/* ===== pantalla "pedido recibido" — pago QR Bancolombia ===== */
.bqr-box {
  max-width: 640px;
  margin: 26px auto;
  background: var(--mhw-co-surface);
  border: 1px solid var(--mhw-co-line);
  border-radius: 14px;
  box-shadow: var(--mhw-co-shadow);
  overflow: hidden;
}
.bqr-head {
  background: var(--mhw-co-ink);
  color: #fff;
  padding: 15px 24px;
  border-bottom: 3px solid var(--mhw-co-red);
  font-family: var(--mhw-co-cond);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.bqr-body {
  padding: 22px 24px;
}
.bqr-lead {
  margin: 0 0 18px;
  color: var(--mhw-co-muted);
  font-size: 14.5px;
}
.bqr-flex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 560px) {
  .bqr-flex {
    grid-template-columns: auto 1fr;
  }
}
.bqr-qr {
  margin: 0;
  justify-self: center;
}
.bqr-qr {
  text-align: center;
}
.bqr-qr img {
  display: block;
  width: 190px;
  height: 190px;
  border: 1px solid var(--mhw-co-line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.bqr-key {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--mhw-co-muted);
  font-variant-numeric: tabular-nums;
}
.bqr-key strong {
  color: var(--mhw-co-ink);
  font-family: var(--mhw-co-mono);
  letter-spacing: .02em;
}
.bqr-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
}
.bqr-steps li::marker {
  color: var(--mhw-co-red);
  font-weight: 800;
}
.bqr-amount {
  font-family: var(--mhw-co-mono);
  font-size: 17px;
  font-weight: 800;
}
.bqr-report {
  margin-top: 20px;
  border-top: 1px solid var(--mhw-co-line);
  padding-top: 16px;
}
.bqr-report h4 {
  margin: 0 0 4px;
  font-family: var(--mhw-co-cond);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.bqr-report p {
  font-size: 13px;
  color: var(--mhw-co-muted);
  margin: 0 0 12px;
}
.bqr-feedback {
  color: var(--mhw-co-green) !important;
  font-weight: 600;
}
.bqr-report-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bqr-report-form input[type="text"] {
  flex: 1 1 240px;
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-fieldbg);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.bqr-report-form input[type="text"]:focus {
  outline: none;
  border-color: var(--mhw-co-red);
  background: var(--mhw-co-surface);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .12);
}
.bqr-report-form button {
  border: 0;
  background: var(--mhw-co-ink);
  color: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.bqr-report-form button:hover {
  background: #232327;
}
.bqr-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--mhw-co-muted);
}

/* ===== página "pedido recibido" — estructura general (fuera de la caja QR,
   que ya tiene su diseño .bqr-*): columna centrada estilo mockup pantalla 2 */
/* Ancho FIJO sin `:has()`: el rediseño (.mhw-or) se autocentra a 1060px vía su
   propia .wrap, así que el contenedor va a 1100px SIEMPRE y desde el primer byte.
   Antes se usaba `.woocommerce:has(.mhw-or)` como override del 680px base, pero
   el `:has` se resolvía DESPUÉS del primer layout → reflow visible ("los textos
   se estiran" al cargar). El fallback (muro de verificación) se acota en sus
   propios elementos, más abajo, para no ensancharse. */
body.woocommerce-order-received .woocommerce {
  max-width: 1320px;
  margin: 26px auto 60px;
  padding: 0 20px;
  /* sin "Inter": la única cara Inter del sitio es la itálica 600 del header
     racing y el font-matching la usaría para TODO (texto inclinado) */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mhw-co-ink);
}
/* el tema pone itálica en este contenido — aquí todo va en redonda */
body.woocommerce-order-received .woocommerce,
body.woocommerce-order-received .woocommerce p,
body.woocommerce-order-received .woocommerce li,
body.woocommerce-order-received .woocommerce th,
body.woocommerce-order-received .woocommerce td,
body.woocommerce-order-received .woocommerce address,
body.woocommerce-order-received .woocommerce h2 {
  font-style: normal;
}

/* aviso "¡Gracias! Recibimos tu pedido." como cabecera oscura de tarjeta.
   FALLBACK (muro de verificación): el contenedor va a 1100px, así que el
   párrafo+form se acotan a 680px centrados para no ensancharse. */
body.woocommerce-order-received .woocommerce-thankyou-order-received {
  max-width: 680px;
  margin: 0 auto;
  background: var(--mhw-co-ink);
  color: #fff;
  padding: 15px 24px;
  border-radius: 14px 14px 0 0;
  border-bottom: 3px solid var(--mhw-co-red);
  font-family: var(--mhw-co-cond);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* NOTA: el resumen, el detalle del pedido y las direcciones los pinta ahora el
   rediseño scopeado a .mhw-or (thankyou.php + order-details.php: .sum-grid,
   .prod-line, .totrows, address plano). Se eliminó el CSS legacy que estilizaba
   el markup viejo (ul.woocommerce-order-overview, table.order_details,
   .woocommerce-columns--addresses, la caja de <address> y los títulos de
   sección): pisaba por especificidad el diseño nuevo — rompía la cabecera de
   "Datos de facturación" y metía una caja gris en la dirección. */

/* formulario de verificación de correo (al reabrir la confirmación) */
body.woocommerce-order-received form.woocommerce-verify-email {
  max-width: 680px;
  margin: 0 auto 22px;
  padding: 22px 24px 24px;
  background: var(--mhw-co-surface);
  border: 1px solid var(--mhw-co-line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: var(--mhw-co-shadow);
}
body.woocommerce-order-received form.woocommerce-verify-email .form-row {
  margin: 0 0 14px;
  padding: 0;
}
body.woocommerce-order-received form.woocommerce-verify-email label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mhw-co-muted);
  margin: 0 0 6px;
}
body.woocommerce-order-received form.woocommerce-verify-email input.input-text {
  width: 100%;
  border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-fieldbg);
  color: var(--mhw-co-ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
  height: 46px;
  box-sizing: border-box;
}
body.woocommerce-order-received form.woocommerce-verify-email input.input-text:focus {
  outline: none;
  border-color: var(--mhw-co-red);
  background: var(--mhw-co-surface);
  box-shadow: 0 0 0 3px rgba(225, 20, 20, .12);
}
body.woocommerce-order-received form.woocommerce-verify-email button {
  border: 0;
  background: var(--mhw-co-red);
  color: #fff;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
body.woocommerce-order-received form.woocommerce-verify-email button:hover {
  background: var(--mhw-co-red-dark);
}

/* ---------- Widget de Wompi: SOLO el envoltorio ----------
   El contenido del iframe es de Wompi (cross-origin, PCI) y NO se puede tocar.
   Esto estiliza lo que el widget.js inyecta en NUESTRO DOM: el backdrop y el
   marco del modal, para que se vea como una tarjeta y no como un slab blanco.
   El form de Wompi hace su propio scroll dentro del iframe. */
.waybox-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(16, 16, 22, 0.6) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.waybox-iframe {
  border: 0 !important;
  display: block !important;
  width: 100% !important;
}
/* En pantallas anchas: tarjeta angosta centrada. IMPORTANTE: NO se capa la
   altura — el iframe de Wompi NO scrollea internamente (se dimensiona a la
   altura completa del contenido), así que capar recortaría el botón de pagar.
   Se deja su altura natural y la PÁGINA scrollea; el backdrop es fijo y cubre
   la ventana mientras se scrollea. En móvil, full-width nativo del widget. */
@media (min-width: 620px) {
  .waybox-modal {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(520px, 94vw) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4) !important;
  }
}

/* ---------- Modal PROPIO: QR Bancolombia (pago manual + confirmación) ----------
   Este sí es 100% nuestro (no un iframe de terceros) → diseño con la marca. */
.mhw-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 16, 22, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.mhw-qr-card {
  position: relative;
  width: min(420px, 100%);
  margin: auto;
  background: var(--mhw-co-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  padding: 28px 24px 22px;
  text-align: center;
}
.mhw-qr-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--mhw-co-muted, #6b6b74);
  cursor: pointer;
}
.mhw-qr-head {
  font-weight: 800;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mhw-co-ink, #18181b);
  margin: 0 0 10px;
}
.mhw-qr-lead {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--mhw-co-muted, #6b6b74);
  margin: 0 0 14px;
}
.mhw-qr-amount {
  font-family: var(--mhw-co-mono, monospace);
  font-weight: 800;
  font-size: 30px;
  color: var(--mhw-co-red, #e11414);
  margin: 0 0 16px;
}
.mhw-qr-img {
  width: 230px;
  height: 230px;
  max-width: 100%;
  display: block;
  margin: 0 auto 16px;
  border-radius: 12px;
  border: 1px solid var(--mhw-co-line, #e6e6ea);
}
.mhw-qr-note,
.mhw-qr-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--mhw-co-faint, #9a9aa2);
  margin: 0 0 14px;
}
.mhw-qr-confirm {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 15px;
  background: var(--mhw-co-red, #e11414);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.mhw-qr-confirm:hover {
  background: var(--mhw-co-red-dark, #b91010);
}
.mhw-qr-confirm:disabled {
  opacity: 0.7;
  cursor: default;
}
.mhw-qr-cancel {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px;
  margin-top: 4px;
  color: var(--mhw-co-muted, #6b6b74);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: underline;
}
.mhw-qr-cancel:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============================================================================
   ORDER-RECEIVED (pedido recibido) — rediseño MHW. Todo scopeado a .mhw-or.
   Desktop: 2 columnas (contenido + sidebar del medio de pago sticky) cuando
   hay panel (QR); si no, 1 columna. Móvil: siempre apilado.
   ============================================================================ */
.mhw-or .wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 900px) {
  .mhw-or .wrap.has-sidebar {
    display: grid;
    grid-template-columns: 1fr 384px;
    grid-template-areas: "hero hero" "summary qr" "content qr";
    gap: 18px;
    align-items: start;
  }
  .mhw-or .wrap.has-sidebar .a-hero { grid-area: hero; }
  .mhw-or .wrap.has-sidebar .a-summary { grid-area: summary; }
  .mhw-or .wrap.has-sidebar .a-content { grid-area: content; }
  .mhw-or .wrap.has-sidebar .a-qr { grid-area: qr; position: sticky; top: 24px; }
}
.mhw-or .a-content { display: flex; flex-direction: column; gap: 18px; }

.mhw-or .card {
  background: var(--mhw-co-surface); border: 1px solid var(--mhw-co-line);
  border-radius: 14px; box-shadow: var(--mhw-co-shadow); overflow: hidden;
}
.mhw-or .card-head {
  font-family: var(--mhw-co-cond); font-weight: 700; font-size: 20px;
  letter-spacing: .3px; text-transform: uppercase; color: #fff; background: #18181b;
  padding: 15px 22px; margin: 0; border-bottom: 3px solid var(--mhw-co-red);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.mhw-or .mhw-head-count {
  font-family: var(--mhw-co-mono); font-variant-numeric: tabular-nums;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  text-transform: none; color: rgba(255, 255, 255, .72); white-space: nowrap;
}
.mhw-or .card-body { padding: 22px; }
.mhw-or .lbl { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mhw-co-faint); }
.mhw-or .mono { font-family: var(--mhw-co-mono); font-variant-numeric: tabular-nums; }

/* hero */
.mhw-or .hero { text-align: center; padding: 30px 22px 26px; }
.mhw-or .hero .tick { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; background: rgba(22,137,58,.12); color: var(--mhw-co-green); }
.mhw-or .hero .tick svg { width: 28px; height: 28px; }
.mhw-or .hero h1 { font-family: var(--mhw-co-cond); font-weight: 700; text-transform: uppercase;
  font-size: 27px; letter-spacing: .3px; margin: 0 0 6px; text-wrap: balance; color: var(--mhw-co-ink); }
.mhw-or .hero p { margin: 0; color: var(--mhw-co-muted); font-size: 14px; }
.mhw-or .mhw-or-btn { display: inline-block; margin-top: 8px; background: var(--mhw-co-red); color: #fff;
  border-radius: 10px; padding: 12px 22px; font-weight: 700; text-decoration: none; }

/* resumen */
.mhw-or .sum-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mhw-or .sum-order { font-family: var(--mhw-co-cond); font-weight: 700; font-size: 22px; text-transform: uppercase; color: var(--mhw-co-ink); }
.mhw-or .sum-order b { color: var(--mhw-co-red); }
.mhw-or .pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.mhw-or .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mhw-or .pill.wait { color: #b26a00; background: #fff4e0; border: 1px solid rgba(178,106,0,.25); }
.mhw-or .pill.ok { color: var(--mhw-co-green); background: rgba(22,137,58,.10); border: 1px solid rgba(22,137,58,.28); }
.mhw-or .pill.proc { color: var(--mhw-co-muted); background: var(--mhw-co-fieldbg); border: 1px solid var(--mhw-co-line); }
.mhw-or .sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--mhw-co-line); }
.mhw-or .sum-grid .v { font-weight: 700; font-size: 15px; margin-top: 3px; color: var(--mhw-co-ink); }
.mhw-or .sum-grid .v.total { color: var(--mhw-co-red); font-family: var(--mhw-co-mono); font-size: 19px; }

/* detalle: producto con miniatura + SKU */
.mhw-or .mhw-or-items { display: flex; flex-direction: column; }
.mhw-or .prod-line { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--mhw-co-line); }
.mhw-or .prod-line:first-child { border-top: 0; padding-top: 0; }
.mhw-or .thumb { flex: none; width: 52px; height: 52px; border-radius: 8px; border: 1px solid var(--mhw-co-line);
  background: var(--mhw-co-fieldbg); overflow: hidden; display: grid; place-items: center; color: var(--mhw-co-faint); }
.mhw-or .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mhw-or .thumb svg { width: 24px; height: 24px; }
.mhw-or .prod-main { flex: 1; min-width: 0; }
.mhw-or .prod-main b { font-weight: 600; font-size: 14px; display: block; color: var(--mhw-co-ink); }
/* nombre y miniatura enlazan al producto */
.mhw-or .prod-main b a { color: inherit; text-decoration: none; transition: color .12s ease; }
.mhw-or .prod-main b a:hover { color: var(--mhw-co-red); }
.mhw-or a.thumb { text-decoration: none; }
.mhw-or a.thumb:hover { border-color: var(--mhw-co-red); }
.mhw-or .prod-main b a:focus-visible,
.mhw-or a.thumb:focus-visible { outline: 2px solid var(--mhw-co-red); outline-offset: 2px; }
.mhw-or .prod-main .sku { font-family: var(--mhw-co-mono); font-size: 11.5px; color: var(--mhw-co-faint);
  letter-spacing: .02em; margin-top: 2px; display: block; }
.mhw-or .prod-line .v { font-family: var(--mhw-co-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--mhw-co-ink); }
.mhw-or .totrows { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--mhw-co-line); display: flex; flex-direction: column; gap: 10px; }
.mhw-or .trow { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--mhw-co-ink); }
.mhw-or .trow .v { font-family: var(--mhw-co-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.mhw-or .trow.grand { border-top: 2px solid var(--mhw-co-ink); margin-top: 2px; padding-top: 12px; font-size: 16px; }
.mhw-or .trow.grand .v { color: var(--mhw-co-red); font-size: 18px; }

/* facturación — reset del box de <address> de WooCommerce core (padding/borde/
   radius); dirección plana como el mockup. La doble clase .woocommerce-order.mhw-or
   supera en especificidad a `.woocommerce-customer-details address` de WC. */
.woocommerce-order.mhw-or address {
  font-style: normal; color: var(--mhw-co-muted); font-size: 14px; line-height: 1.7;
  margin: 0; padding: 0; border: 0; background: none; border-radius: 0;
}
.mhw-or address b { color: var(--mhw-co-ink); }

/* Mi cuenta (logueado): el plugin rafas-login-register-capcha capa
   `.woocommerce-account .woocommerce` a 500px (bien para el login, mal para las
   páginas internas con nav). Solo estando LOGUEADO (hay nav) lo ensanchamos y
   pasamos la maqueta a flex: nav fijo angosto + contenido que llena. El login
   (no logueado, sin `.logged-in`) se queda en 500px centrado. */
body.woocommerce-account.logged-in .page-container .woocommerce {
  max-width: 1280px;
}
@media (min-width: 900px) {
  body.woocommerce-account.logged-in .woocommerce {
    display: flex;
    align-items: flex-start;
    gap: 32px;
  }
  body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation {
    float: none;
    width: 230px;
    flex: none;
    margin: 0;
  }
  body.woocommerce-account.logged-in .woocommerce-MyAccount-content {
    float: none;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }
}

/* ===== Mi cuenta: nav rediseñado (tarjeta + iconos + activo con franja roja) ===== */
.mhw-acct-nav ul {
  list-style: none; margin: 0; padding: 6px;
  background: var(--mhw-co-surface); border: 1px solid var(--mhw-co-line);
  border-radius: 14px; box-shadow: var(--mhw-co-shadow);
}
.mhw-acct-nav li { margin: 0; }
.mhw-acct-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 9px; text-decoration: none;
  font-family: var(--mhw-co-cond); font-weight: 600; font-size: 15px;
  letter-spacing: .02em; text-transform: uppercase; color: var(--mhw-co-muted);
  transition: background .12s ease, color .12s ease;
}
.mhw-acct-nav a svg { width: 19px; height: 19px; flex: none; color: var(--mhw-co-faint); transition: color .12s ease; }
.mhw-acct-nav a:hover { background: var(--mhw-co-fieldbg); color: var(--mhw-co-ink); }
.mhw-acct-nav a:hover svg { color: var(--mhw-co-ink); }
.mhw-acct-nav a:focus-visible { outline: 2px solid var(--mhw-co-red); outline-offset: 2px; }
.mhw-acct-nav .is-active a {
  background: var(--mhw-co-ink); color: #fff;
  box-shadow: inset 3px 0 0 var(--mhw-co-red);
}
.mhw-acct-nav .is-active a svg { color: var(--mhw-co-red); }
/* "Salir" separado abajo */
.mhw-acct-nav .woocommerce-MyAccount-navigation-link--customer-logout {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--mhw-co-line);
}
.mhw-acct-nav .woocommerce-MyAccount-navigation-link--customer-logout a:hover,
.mhw-acct-nav .woocommerce-MyAccount-navigation-link--customer-logout a:hover svg { color: var(--mhw-co-red); }

/* ===== Mi cuenta: lista de Compras (tarjetas de pedido) ===== */
.mhw-orders-list { display: flex; flex-direction: column; gap: 12px; }
.mhw-order-card {
  background: var(--mhw-co-surface); border: 1px solid var(--mhw-co-line);
  border-radius: 12px; box-shadow: var(--mhw-co-shadow); overflow: hidden;
  transition: border-color .12s ease;
}
.mhw-order-card:hover { border-color: var(--mhw-co-red); }
.mhw-order-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px;
  padding: 16px 20px; cursor: pointer; list-style: none;
}
.mhw-order-summary::-webkit-details-marker { display: none; }
.mhw-order-summary::marker { content: ""; }
.mhw-order-summary:focus-visible { outline: 2px solid var(--mhw-co-red); outline-offset: -2px; }
.mhw-order-chev { flex: none; display: inline-flex; color: var(--mhw-co-faint); transition: transform .18s ease; }
.mhw-order-chev svg { width: 18px; height: 18px; }
details.mhw-order-card[open] .mhw-order-chev { transform: rotate(180deg); }
.mhw-order-products {
  padding: 4px 20px 14px; border-top: 1px solid var(--mhw-co-line);
  display: flex; flex-direction: column;
}
@media (prefers-reduced-motion: reduce) { .mhw-order-chev { transition: none; } }
.mhw-order-id { flex: 1 1 210px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mhw-order-no {
  font-family: var(--mhw-co-cond); font-weight: 700; font-size: 18px;
  text-transform: uppercase; letter-spacing: .3px; color: var(--mhw-co-ink);
}
.mhw-order-no b { color: var(--mhw-co-red); }
.mhw-order-meta { font-size: 12.5px; color: var(--mhw-co-muted); }
.mhw-order-total {
  font-family: var(--mhw-co-mono); font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 16px; color: var(--mhw-co-ink); white-space: nowrap;
}
.mhw-order-actions { display: flex; gap: 8px; flex: none; }
.mhw-oa {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  padding: 9px 16px; border-radius: 9px; text-decoration: none; white-space: nowrap;
  font-family: var(--mhw-co-cond); font-weight: 600; font-size: 14px;
  text-transform: uppercase; letter-spacing: .02em;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.mhw-oa--view { background: var(--mhw-co-fieldbg); color: var(--mhw-co-ink); border: 1px solid var(--mhw-co-line); }
.mhw-oa--view:hover { background: var(--mhw-co-ink); color: #fff; border-color: var(--mhw-co-ink); }
.mhw-oa--pay { background: var(--mhw-co-red); color: #fff; border: 1px solid var(--mhw-co-red); }
.mhw-oa--pay:hover { background: var(--mhw-co-red-dark); border-color: var(--mhw-co-red-dark); }
.mhw-oa:focus-visible { outline: 2px solid var(--mhw-co-red); outline-offset: 2px; }
.mhw-orders-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.mhw-orders-empty {
  background: var(--mhw-co-surface); border: 1px solid var(--mhw-co-line);
  border-radius: 14px; box-shadow: var(--mhw-co-shadow); padding: 34px 24px; text-align: center;
}
.mhw-orders-empty p { margin: 0 0 16px; color: var(--mhw-co-muted); font-size: 15px; }

/* ===== Comprar de nuevo ===== */
.mhw-reorder-item {
  flex: none; width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center;
  border: 1px solid var(--mhw-co-line); border-radius: 9px; background: var(--mhw-co-surface);
  color: var(--mhw-co-ink); cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease, opacity .12s ease;
}
.mhw-reorder-item svg { width: 19px; height: 19px; }
.mhw-reorder-item:hover { background: var(--mhw-co-red); border-color: var(--mhw-co-red); color: #fff; }
.mhw-reorder-item:focus-visible { outline: 2px solid var(--mhw-co-red); outline-offset: 2px; }
.mhw-reorder-item.is-loading { opacity: .55; pointer-events: none; }
.mhw-reorder-item.is-done { background: var(--mhw-co-green); border-color: var(--mhw-co-green); color: #fff; }
.mhw-reorder-foot { padding: 12px 0 2px; }
.mhw-reorder-foot .mhw-reorder-order { width: 100%; }
.mhw-reorder-order { cursor: pointer; }
.mhw-reorder-order svg { width: 17px; height: 17px; margin-right: 7px; vertical-align: -3px; }

/* view-order: fila de acciones (Pagar + Comprar de nuevo) */
.mhw-or .mhw-or-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.mhw-or .mhw-or-btn--ghost {
  background: var(--mhw-co-surface); color: var(--mhw-co-ink); border: 1px solid var(--mhw-co-line);
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
}
.mhw-or .mhw-or-btn--ghost:hover { border-color: var(--mhw-co-red); color: var(--mhw-co-red); }
.mhw-or .mhw-or-btn--ghost svg { margin: 0; }

/* modal combinar / vaciar */
.mhw-ro-overlay {
  position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); padding: 20px; opacity: 0; transition: opacity .15s ease;
}
.mhw-ro-overlay.is-on { opacity: 1; }
.mhw-ro-modal {
  background: var(--mhw-co-surface); color: var(--mhw-co-ink); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); padding: 26px 24px 20px; max-width: 420px; width: 100%;
  transform: translateY(8px); transition: transform .15s ease;
}
.mhw-ro-overlay.is-on .mhw-ro-modal { transform: none; }
.mhw-ro-modal h3 { margin: 0 0 8px; font-family: var(--mhw-co-cond); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .3px; }
.mhw-ro-modal p { margin: 0 0 20px; color: var(--mhw-co-muted); font-size: 14.5px; }
.mhw-ro-btns { display: flex; gap: 10px; }
.mhw-ro-btns .mhw-oa { flex: 1; padding: 12px 14px; }
.mhw-ro-cancel { display: block; width: 100%; margin: 12px 0 0; padding: 8px; background: none; border: 0; color: var(--mhw-co-faint); font-size: 13.5px; cursor: pointer; }
.mhw-ro-cancel:hover { color: var(--mhw-co-ink); }

/* toast */
.mhw-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 100001;
  background: var(--mhw-co-ink); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; max-width: 90vw;
  transition: opacity .2s ease, transform .2s ease;
}
.mhw-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.mhw-toast.is-error { background: var(--mhw-co-red); }
@media (prefers-reduced-motion: reduce) {
  .mhw-ro-overlay, .mhw-ro-modal, .mhw-toast { transition: none; }
}
@media (max-width: 560px) {
  .mhw-order-id { flex-basis: 100%; }
  .mhw-order-actions { flex: 1 1 100%; }
  .mhw-order-actions .mhw-oa { flex: 1; }
}

/* view-order (mi-cuenta): botón "Pagar pedido" */
.mhw-or .mhw-or-pay { margin: 0; }
.mhw-or .mhw-or-pay .mhw-or-btn { margin: 0; font-size: 15px; padding: 14px 30px; }

/* view-order (mi-cuenta): "Actualizaciones del pedido" */
.mhw-or .mhw-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mhw-or .mhw-notes li { display: flex; flex-direction: column; gap: 3px; padding-bottom: 14px; border-bottom: 1px solid var(--mhw-co-line); }
.mhw-or .mhw-notes li:last-child { padding-bottom: 0; border-bottom: 0; }
.mhw-or .mhw-notes time { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mhw-co-faint); }
.mhw-or .mhw-notes .mhw-note-text { font-size: 14px; color: var(--mhw-co-muted); }
.mhw-or .mhw-notes .mhw-note-text p { margin: 0; }

/* sidebar del medio de pago (el QR .bqr-box vive aquí) */
.mhw-or .a-qr .bqr-box { width: 100%; max-width: none; margin: 0; }
/* En el sidebar angosto, el .bqr-flex de 2 columnas (QR | pasos) deja el QR
   diminuto. Se apila como el mockup: QR grande centrado arriba, pasos debajo. */
.mhw-or .a-qr .bqr-flex { grid-template-columns: 1fr; }
.mhw-or .a-qr .bqr-qr img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1 / 1;
}
