/* Factoría Checkout Visual 1.6.21
 * Ajustes acotados a las incidencias de la última revisión.
 * No se cambian el marcado ni las reglas del asterisco de términos.
 */

/* 1) En checkout y pedido recibido, alinear de verdad las propiedades del producto:
   etiqueta en una columna fija y valor en la columna contigua, con ambas al mismo eje. */
body.woocommerce-checkout #order_review td.product-name dl.variation,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta {
  display:grid!important;
  grid-template-columns:minmax(108px, 132px) minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  align-items:baseline!important;
  justify-items:stretch!important;
  column-gap:10px!important;
  row-gap:5px!important;
  width:100%!important;
  max-width:100%!important;
  margin:8px 0 0!important;
  padding:0!important;
  line-height:1.45!important;
  text-align:left!important;
}
body.woocommerce-checkout #order_review td.product-name dl.variation dt,
body.woocommerce-checkout #order_review td.product-name dl.variation dd,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta dt,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta dd,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation dt,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation dd,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta dt,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta dd {
  display:block!important;
  float:none!important;
  clear:none!important;
  position:static!important;
  inset:auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  align-self:baseline!important;
  justify-self:stretch!important;
  transform:none!important;
  vertical-align:baseline!important;
  line-height:1.45!important;
  overflow-wrap:anywhere!important;
  box-sizing:border-box!important;
}
body.woocommerce-checkout #order_review td.product-name dl.variation dt,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta dt,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation dt,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta dt {
  font-weight:700!important;
  color:#333!important;
  text-align:left!important;
}
body.woocommerce-checkout #order_review td.product-name dl.variation dd,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta dd,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation dd,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta dd {
  color:#626262!important;
  text-align:left!important;
}
body.woocommerce-checkout #order_review td.product-name dl.variation dt p,
body.woocommerce-checkout #order_review td.product-name dl.variation dd p,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta dt p,
body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta dd p,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation dt p,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation dd p,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta dt p,
body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta dd p {
  display:inline!important;
  position:static!important;
  float:none!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  line-height:inherit!important;
  vertical-align:baseline!important;
}
@media(max-width:480px){
  body.woocommerce-checkout #order_review td.product-name dl.variation,
  body.woocommerce-checkout #order_review td.product-name dl.wc-item-meta,
  body.woocommerce-order-received .woocommerce-order-details td.product-name dl.variation,
  body.woocommerce-order-received .woocommerce-order-details td.product-name dl.wc-item-meta {
    grid-template-columns:minmax(92px, 112px) minmax(0,1fr)!important;
    column-gap:7px!important;
    row-gap:6px!important;
    font-size:12px!important;
  }
}

/* El script de la versión anterior agrupa los atributos del pedido recibido en spans.
   Se alinean esos grupos igual que los dl nativos: etiqueta fija y valor contiguo. */
body.woocommerce-order-received .woocommerce-order-details td.product-name p.fdt-product-meta-row,
body.woocommerce-order-received .woocommerce-order-details td.product-name .fdt-product-meta-row {
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:7px 0 0!important;
  padding:0!important;
  text-align:left!important;
  font-size:12px!important;
  line-height:1.45!important;
}
body.woocommerce-order-received .woocommerce-order-details td.product-name .fdt-product-meta-item {
  display:grid!important;
  grid-template-columns:minmax(112px,132px) minmax(0,1fr)!important;
  align-items:baseline!important;
  column-gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:3px 0!important;
  box-sizing:border-box!important;
  line-height:1.45!important;
  overflow-wrap:anywhere!important;
}
body.woocommerce-order-received .woocommerce-order-details td.product-name .fdt-product-meta-item > strong,
body.woocommerce-order-received .woocommerce-order-details td.product-name .fdt-product-meta-item > b {
  grid-column:1!important;
  display:block!important;
  align-self:baseline!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  white-space:normal!important;
  line-height:inherit!important;
}
body.woocommerce-order-received .woocommerce-order-details td.product-name .fdt-product-meta-item br {display:none!important}
@media(max-width:480px){
  body.woocommerce-order-received .woocommerce-order-details td.product-name .fdt-product-meta-item {
    grid-template-columns:minmax(92px,112px) minmax(0,1fr)!important;
    column-gap:7px!important;
  }
}

/* 2) Cada método de pago: radio y nombre/iconos en la misma fila.
   El panel detallado de la pasarela queda en una fila completa debajo. */
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
  display:grid!important;
  grid-template-columns:16px minmax(0,1fr)!important;
  grid-template-areas:"radio label" "details details"!important;
  align-items:center!important;
  justify-items:stretch!important;
  column-gap:8px!important;
  row-gap:8px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:11px 0!important;
  float:none!important;
  clear:both!important;
  box-sizing:border-box!important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
  grid-area:radio!important;
  display:inline-block!important;
  position:static!important;
  float:none!important;
  clear:none!important;
  align-self:center!important;
  justify-self:start!important;
  width:14px!important;
  min-width:14px!important;
  max-width:14px!important;
  height:14px!important;
  min-height:14px!important;
  max-height:14px!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  vertical-align:middle!important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
  grid-area:label!important;
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:20px!important;
  margin:0!important;
  padding:0!important;
  float:none!important;
  clear:none!important;
  position:static!important;
  text-align:left!important;
  line-height:1.35!important;
  vertical-align:middle!important;
  box-sizing:border-box!important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img,
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label .payment-method-icon {
  display:inline-block!important;
  flex:0 0 auto!important;
  position:static!important;
  float:none!important;
  width:auto!important;
  max-width:38px!important;
  height:auto!important;
  max-height:22px!important;
  margin:0!important;
  object-fit:contain!important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box,
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > div.payment_box {
  grid-area:details!important;
  position:relative!important;
  float:none!important;
  clear:both!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:7px 0 2px!important;
  box-sizing:border-box!important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box p:last-child {margin-bottom:0!important}

/* 3) Casilla de aceptación: pequeña y alineada con el comienzo del texto.
   No se cambia ni se oculta el asterisco gestionado en la capa 1.6.19. */
body.woocommerce-checkout #payment .place-order #terms_field > label,
body.woocommerce-checkout #payment .place-order #terms-field > label,
body.woocommerce-checkout #payment .place-order label.fdt-terms-inline-final,
body.woocommerce-checkout #payment .place-order label[for="terms"] {
  display:inline-flex!important;
  flex-flow:row nowrap!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  gap:8px!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  float:none!important;
  clear:none!important;
  text-align:left!important;
  vertical-align:top!important;
  line-height:1.45!important;
  white-space:normal!important;
  box-sizing:border-box!important;
}
body.woocommerce-checkout #payment .place-order input#terms,
body.woocommerce-checkout #payment .place-order #terms_field input[type="checkbox"] {
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  display:inline-block!important;
  flex:0 0 13px!important;
  width:13px!important;
  min-width:13px!important;
  max-width:13px!important;
  height:13px!important;
  min-height:13px!important;
  max-height:13px!important;
  margin:3px 0 0!important;
  padding:0!important;
  position:static!important;
  float:none!important;
  clear:none!important;
  transform:none!important;
  box-shadow:none!important;
}
body.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-checkbox-text {
  display:inline!important;
  flex:0 1 auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  line-height:1.45!important;
  text-align:left!important;
  overflow-wrap:anywhere!important;
}

/* 4) Más aire entre el aviso de cuotas Klarna y el CTA de pago en el carrito. */
body.woocommerce-cart .cart-collaterals .cart_totals .wc-proceed-to-checkout {
  margin-top:17px!important;
  padding-top:0!important;
}
body.woocommerce-cart .cart-collaterals .cart_totals .wc-proceed-to-checkout a.checkout-button {
  margin-top:0!important;
}
body.woocommerce-cart .cart-collaterals .cart_totals p:has(a[href*="klarna"]),
body.woocommerce-cart .cart-collaterals .cart_totals [id*="klarna-placement"],
body.woocommerce-cart .cart-collaterals .cart_totals [class*="klarna-placement"],
body.woocommerce-cart .cart-collaterals .cart_totals [class*="klarna-widget"] {
  margin-bottom:12px!important;
}
@media(max-width:767px){
  body.woocommerce-cart .cart-collaterals .cart_totals .wc-proceed-to-checkout {margin-top:20px!important}
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {column-gap:7px!important;padding:12px 0!important}
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {font-size:14px!important}
  body.woocommerce-checkout #payment .place-order label.fdt-terms-inline-final,
  body.woocommerce-checkout #payment .place-order label[for="terms"] {max-width:100%!important}
}
