/* SAYWA v1.25.0 — ajustes finales de Home móvil y Checkout */

/* HOME móvil: más aire entre bloques sin bajar hasta los productos. */
@media (max-width: 820px) {
  .saywa-home .saywa-home-hero-v4-inner {
    padding-top: 2.25rem !important;
    padding-bottom: 2rem !important;
  }
  .saywa-home .saywa-home-hero-v4-copy {
    width: min(90%, 560px) !important;
  }
  .saywa-home .saywa-home-hero-v4-badge {
    margin-bottom: 1.15rem !important;
  }
  .saywa-home .saywa-home-hero-v4 h1 {
    line-height: 1.035 !important;
  }
  .saywa-home .saywa-home-hero-v4 p {
    margin-top: 1.3rem !important;
    line-height: 1.64 !important;
  }
  .saywa-home .saywa-home-hero-v4-actions {
    margin-top: 1.55rem !important;
  }
}
@media (max-width: 520px) {
  .saywa-home .saywa-home-hero-v4-inner {
    padding-top: 1.9rem !important;
    padding-bottom: 1.8rem !important;
  }
  .saywa-home .saywa-home-hero-v4-copy {
    width: 91% !important;
  }
  .saywa-home .saywa-home-hero-v4-badge {
    margin-bottom: 1rem !important;
  }
  .saywa-home .saywa-home-hero-v4 h1 {
    font-size: clamp(2rem, 9.6vw, 2.72rem) !important;
    line-height: 1.035 !important;
  }
  .saywa-home .saywa-home-hero-v4 p {
    margin-top: 1.2rem !important;
    font-size: 16px !important;
    line-height: 1.62 !important;
  }
  .saywa-home .saywa-home-hero-v4-actions {
    margin-top: 1.45rem !important;
  }
}

/* CHECKOUT: selectores dobles para funcionar incluso si el tema ignora la clase SAYWA. */
body.woocommerce-checkout,
body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout .woocommerce-checkout,
.saywa-checkout-page,
.saywa-checkout-page .woocommerce {
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif !important;
}

/* Botón de confirmación SIEMPRE azul corporativo. */
body.woocommerce-checkout #place_order,
body.woocommerce-checkout button#place_order,
body.woocommerce-checkout .woocommerce #payment #place_order,
body.woocommerce-checkout .woocommerce-checkout #payment #place_order,
.saywa-checkout-page #place_order {
  background: #1D599D !important;
  background-color: #1D599D !important;
  border-color: #1D599D !important;
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(29,89,157,.22) !important;
}
body.woocommerce-checkout #place_order:hover,
body.woocommerce-checkout #place_order:focus,
.saywa-checkout-page #place_order:hover,
.saywa-checkout-page #place_order:focus {
  background: #174A84 !important;
  background-color: #174A84 !important;
  border-color: #174A84 !important;
  color: #fff !important;
}

/* Pago: radio en primera columna, nombre e iconos en segunda. */
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method {
  display: grid !important;
  grid-template-columns: 24px minmax(0,1fr) !important;
  column-gap: 10px !important;
  row-gap: 5px !important;
  align-items: start !important;
  padding: .65rem 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"],
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
  position: static !important;
  float: none !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label,
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method input[name="payment_method"] + label,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > label,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method input[name="payment_method"] + label {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: .35rem .5rem !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  color: #555f68 !important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label br,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > label br {
  display: none !important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > label img {
  display: inline-block !important;
  width: auto !important;
  max-width: 170px !important;
  max-height: 30px !important;
  margin: 0 !important;
  vertical-align: middle !important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > img,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > img {
  grid-column: 2 !important;
  width: auto !important;
  max-width: 170px !important;
  max-height: 30px !important;
  margin: 0 !important;
}
body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box,
.saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > .payment_box {
  grid-column: 2 !important;
  width: 100% !important;
  margin: .35rem 0 0 !important;
}

@media (max-width: 620px) {
  /* Contenedor del pedido más compacto. */
  body.woocommerce-checkout #order_review_heading,
  .saywa-checkout-page #order_review_heading {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: .55rem .65rem .25rem !important;
  }
  body.woocommerce-checkout #order_review,
  .saywa-checkout-page #order_review {
    padding: .2rem .35rem .55rem !important;
    margin: 0 !important;
    border-radius: 0 0 12px 12px !important;
  }
  body.woocommerce-checkout #order_review table.shop_table,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table,
  .saywa-checkout-page #order_review table.shop_table {
    width: 100% !important;
    table-layout: fixed !important;
    margin: 0 0 .45rem !important;
    border-collapse: collapse !important;
  }
  body.woocommerce-checkout #order_review table.shop_table thead,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table thead,
  .saywa-checkout-page #order_review table.shop_table thead {
    display: none !important;
  }
  body.woocommerce-checkout #order_review table.shop_table th,
  body.woocommerce-checkout #order_review table.shop_table td,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table th,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table td,
  .saywa-checkout-page #order_review table.shop_table th,
  .saywa-checkout-page #order_review table.shop_table td {
    padding: .42rem .35rem !important;
    font-size: 14px !important;
    line-height: 1.32 !important;
    vertical-align: middle !important;
    min-height: 0 !important;
  }
  body.woocommerce-checkout #order_review table.shop_table th:first-child,
  body.woocommerce-checkout #order_review table.shop_table td:first-child,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table th:first-child,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table td:first-child,
  .saywa-checkout-page #order_review table.shop_table th:first-child,
  .saywa-checkout-page #order_review table.shop_table td:first-child {
    width: 76% !important;
  }
  body.woocommerce-checkout #order_review table.shop_table th:last-child,
  body.woocommerce-checkout #order_review table.shop_table td:last-child,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table th:last-child,
  body.woocommerce-checkout table.woocommerce-checkout-review-order-table td:last-child,
  .saywa-checkout-page #order_review table.shop_table th:last-child,
  .saywa-checkout-page #order_review table.shop_table td:last-child {
    width: 24% !important;
    text-align: right !important;
    white-space: nowrap !important;
  }
  body.woocommerce-checkout #order_review .product-name,
  .saywa-checkout-page #order_review .product-name {
    font-size: 14px !important;
    line-height: 1.32 !important;
    font-weight: 700 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }
  body.woocommerce-checkout #order_review .product-total,
  body.woocommerce-checkout #order_review .amount,
  body.woocommerce-checkout #order_review tfoot th,
  .saywa-checkout-page #order_review .product-total,
  .saywa-checkout-page #order_review .amount,
  .saywa-checkout-page #order_review tfoot th {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }
  body.woocommerce-checkout #order_review .order-total th,
  body.woocommerce-checkout #order_review .order-total td,
  body.woocommerce-checkout #order_review .order-total .amount,
  .saywa-checkout-page #order_review .order-total th,
  .saywa-checkout-page #order_review .order-total td,
  .saywa-checkout-page #order_review .order-total .amount {
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
  }

  body.woocommerce-checkout #payment ul.payment_methods,
  .saywa-checkout-page #payment ul.payment_methods {
    padding: .45rem .55rem !important;
  }
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method,
  .saywa-checkout-page #payment ul.payment_methods li.wc_payment_method {
    grid-template-columns: 22px minmax(0,1fr) !important;
    column-gap: 9px !important;
    padding: .55rem 0 !important;
  }
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"],
  .saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
    width: 19px !important;
    height: 19px !important;
  }
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label,
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method input[name="payment_method"] + label,
  .saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > label,
  .saywa-checkout-page #payment ul.payment_methods li.wc_payment_method input[name="payment_method"] + label {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img,
  .saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > label img {
    max-width: 145px !important;
    max-height: 27px !important;
  }
  body.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box,
  .saywa-checkout-page #payment ul.payment_methods li.wc_payment_method > .payment_box {
    padding: .5rem .6rem !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  body.woocommerce-checkout #payment .place-order,
  .saywa-checkout-page #payment .place-order {
    padding: .65rem .55rem !important;
  }
  body.woocommerce-checkout #place_order,
  .saywa-checkout-page #place_order {
    min-height: 50px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
  }
}
