/* ═══════════════════════════════════════════════════════════════════════════
   Tienda web — estilos de la compra online (solo tiendas en modo venta; emeweb no baja este archivo).
   Usa las variables de tienda.css y de /tema.css. Apta 390 px.
   ═══════════════════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

/* ─── Cabecera: carrito ─── */
.tw-carrito-cabecera { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 8px; color: var(--tw-oscuro); flex-shrink: 0; text-decoration: none; }
.tw-carrito-cabecera:hover { color: var(--tw-principal-texto); }
.tw-carrito-cabecera .tw-icono { width: 26px; height: 26px; }
.tw-carrito-n { position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--tw-principal-texto); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }

/* ─── Ficha ─── */
.tw-precio-transferencia { margin: 6px 0 0; font-size: 16px; color: var(--tw-oscuro); }
.tw-precio-transferencia strong { font-size: 22px; color: var(--tw-principal-texto); font-weight: 700; }
.tw-dto { display: inline-block; background: var(--tw-principal-texto); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 10px; vertical-align: middle; }
.tw-form-compra { margin: 4px 0 6px; }
.tw-compra-fila { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tw-campo-cantidad { width: 110px; margin-bottom: 0; flex: none; }
.tw-boton-agregar { flex: 1 1 220px; margin: 0; min-height: 48px; }
.tw-boton-agregar .tw-icono { width: 22px; height: 22px; }
.tw-boton[disabled], .tw-boton.tw-deshabilitado { opacity: .55; cursor: not-allowed; }
.tw-agregado { margin: 12px 0 0; padding: 12px 14px; border-radius: 8px; background: #eef7f0; color: var(--tw-ok); font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tw-agregado .tw-boton { margin: 0; }
.tw-ficha-wa { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--tw-gris); margin: 14px 0 0; }
.tw-ficha-wa .tw-icono { width: 20px; height: 20px; color: #25d366; }

/* ─── Resumen (checkout, carrito y pedido) ─── */
.tw-resumen { background: var(--tw-fondo-suave); border-radius: var(--tw-radio); padding: 20px; }
.tw-resumen-lineas { list-style: none; margin: 0 0 12px; padding: 0; }
.tw-resumen-lineas li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--tw-borde); }
.tw-resumen-prod { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; }
.tw-resumen-prod small { font-weight: 400; color: var(--tw-gris); font-size: 13px; }
.tw-resumen-monto { white-space: nowrap; font-size: 14px; }
.tw-resumen-totales { margin: 0; }
.tw-resumen-totales > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.tw-resumen-totales dt { color: var(--tw-gris); }
.tw-resumen-totales dd { margin: 0; text-align: right; white-space: nowrap; }
.tw-resumen-dto dd, .tw-resumen-dto dt { color: var(--tw-ok); }
.tw-resumen-total { border-top: 2px solid var(--tw-oscuro); margin-top: 6px; padding-top: 10px !important; font-size: 20px; font-weight: 700; }
.tw-resumen-total dt { color: var(--tw-oscuro); }

/* ─── Carrito ─── */
.tw-carrito-lineas { list-style: none; margin: 0 0 20px; padding: 0; }
.tw-carrito-linea { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--tw-borde); }
.tw-carrito-linea.tw-sin-stock { background: #fdf1f0; }
.tw-carrito-foto { display: block; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--tw-borde); }
.tw-carrito-foto img { width: 100%; height: 100%; object-fit: contain; }
.tw-carrito-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tw-carrito-nombre { font-weight: 600; color: var(--tw-oscuro); text-decoration: none; }
.tw-carrito-var, .tw-carrito-precio, .tw-carrito-stock { font-size: 13px; color: var(--tw-gris); }
.tw-carrito-cant { display: flex; align-items: center; border: 1px solid #d6d6d6; border-radius: 6px; overflow: hidden; background: #fff; }
.tw-carrito-cant input { width: 52px; border: 0; text-align: center; font-size: 16px; min-height: 40px; -moz-appearance: textfield; }
.tw-carrito-cant input::-webkit-outer-spin-button, .tw-carrito-cant input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tw-cant-boton { width: 38px; min-height: 40px; border: 0; background: var(--tw-fondo-suave); font-size: 18px; cursor: pointer; }
.tw-carrito-sub { font-weight: 700; white-space: nowrap; min-width: 110px; text-align: right; }
.tw-carrito-quitar { background: none; border: 0; color: var(--tw-gris); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 6px; }
.tw-carrito-resumen { max-width: 420px; margin-left: auto; background: var(--tw-fondo-suave); border-radius: var(--tw-radio); padding: 20px; }
.tw-carrito-seguir { font-size: 14px; }
.tw-cargando { color: var(--tw-gris); padding: 20px 0; }

/* ─── Checkout ─── */
.tw-checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.tw-checkout-resumen { position: sticky; top: 100px; }
.tw-form-checkout { margin-top: 0; }
.tw-grupo { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.tw-grupo legend { font-family: var(--tw-fuente-titulos); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: .06em; color: var(--tw-oscuro); margin-bottom: 12px; padding: 0; }
.tw-opciones { display: grid; gap: 10px; margin-bottom: 12px; }
.tw-opcion { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 2px solid var(--tw-borde); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.tw-opcion input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--tw-principal-texto); }
.tw-opcion-txt { display: flex; flex-direction: column; gap: 2px; }
.tw-opcion-txt span { font-size: 13px; color: var(--tw-gris); }
.tw-opcion-elegida { border-color: var(--tw-principal); }
.tw-opcion-off { opacity: .6; cursor: not-allowed; }
.tw-opcion-txt .tw-opcion-no { color: var(--tw-error); font-weight: 600; }
.tw-opcion-txt [hidden] { display: none; }
/* Total junto al botón Confirmar (en el celular el resumen queda debajo del formulario). */
.tw-total-confirmar { font-size: 18px; margin: 14px 0 8px; text-align: center; }
.tw-total-confirmar span { display: block; font-size: 13px; color: var(--tw-gris); }
.tw-aviso-esperar { background: #fff8e6; border-radius: 8px; padding: 12px 14px; }
.tw-entrega-datos, .tw-cuenta { background: #fff; border: 1px solid var(--tw-borde); border-radius: 8px; padding: 14px 14px 2px; margin-bottom: 12px; }
.tw-entrega-titulo { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; color: var(--tw-oscuro); }
.tw-datos-cuenta { margin: 0 0 12px; }
.tw-datos-cuenta > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.tw-datos-cuenta dt { color: var(--tw-gris); font-size: 14px; }
.tw-datos-cuenta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tw-copiar { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; background: none; border: 1px solid var(--tw-borde); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: var(--tw-gris); vertical-align: middle; }
.tw-copiar .tw-icono { width: 14px; height: 14px; }
.tw-check { display: flex; gap: 10px; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; font-size: 15px !important; }
.tw-check input { width: 20px !important; height: 20px; min-height: 0 !important; margin-top: 2px; flex: none; accent-color: var(--tw-principal-texto); }
.tw-problemas { text-align: left; display: inline-block; }

/* ─── Pedido ─── */
.tw-pedido { text-align: left; }
.tw-pedido > .tw-gracias-icono, .tw-pedido > h1, .tw-pedido > .tw-codigo, .tw-pedido > .tw-pedido-estado { text-align: center; }
.tw-pedido > .tw-codigo { display: table; margin: 0 auto 10px; }
.tw-pedido-estado { font-size: 17px; }
.tw-pedido-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 20px 0; }
.tw-pedido-bloque { border: 1px solid var(--tw-borde); border-radius: var(--tw-radio); padding: 18px 20px; margin-bottom: 16px; }
.tw-pedido-bloque h2 { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; }
.tw-pedido-pago { border-color: var(--tw-principal); }
.tw-aviso-comprobante { background: #fff8e6; border-radius: 8px; padding: 12px 14px; }
.tw-link-pedido { overflow-wrap: anywhere; font-size: 14px; }
.tw-pedido .tw-boton .tw-icono { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .tw-checkout, .tw-pedido-grid { grid-template-columns: minmax(0, 1fr); }
  .tw-checkout-resumen { position: static; }
}
@media (max-width: 640px) {
  .tw-carrito-linea { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: 'foto info info' 'foto cant sub' 'foto quitar quitar'; gap: 6px 10px; }
  .tw-carrito-foto { grid-area: foto; width: 72px; height: 72px; }
  .tw-carrito-info { grid-area: info; }
  .tw-carrito-cant { grid-area: cant; justify-self: start; }
  .tw-carrito-sub { grid-area: sub; min-width: 0; }
  .tw-carrito-quitar { grid-area: quitar; justify-self: start; padding-left: 0; }
  .tw-carrito-resumen { max-width: none; }
  .tw-datos-cuenta > div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px 0; }
  .tw-campo-cantidad { width: 96px; }
  .tw-carrito-cabecera .tw-icono { width: 24px; height: 24px; }
}
