/* NutraHogar checkout/cart refinements. */
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-cart .wp-block-woocommerce-cart {
  --nh-checkout-blue: #11518a;
  --nh-checkout-blue-dark: #0b3d6a;
  --nh-checkout-green: #2eb441;
  --nh-checkout-green-soft: #eaf7ec;
  --nh-checkout-blue-soft: #eef5fa;
  --nh-checkout-border: #dbe7e0;
}

/* Typography inspired by the clean retail checkout reference. */
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-checkout .wc-block-checkout *,
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wp-block-woocommerce-cart * {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif !important;
}

body.woocommerce-checkout h1,
body.woocommerce-checkout h2,
body.woocommerce-checkout h3,
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__heading,
body.woocommerce-cart h1,
body.woocommerce-cart h2,
body.woocommerce-cart h3 {
  letter-spacing: -0.02em;
}

/* Give entered values more breathing room below WooCommerce floating labels. */
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox-control input,
body.woocommerce-checkout .wc-block-components-address-form select {
  min-height: 64px !important;
  line-height: 1.35 !important;
}

body.woocommerce-checkout .wc-block-components-text-input.is-active input,
body.woocommerce-checkout .wc-block-components-combobox.is-active .wc-block-components-combobox-control input {
  min-height: 64px !important;
  padding-top: 30px !important;
  padding-bottom: 9px !important;
}

body.woocommerce-checkout .wc-block-components-text-input.is-active label,
body.woocommerce-checkout .wc-block-components-combobox.is-active label {
  top: 0 !important;
  transform: translateY(9px) scale(.74) !important;
  transform-origin: top left !important;
}

/* Region is fixed internally to Metropolitana de Santiago. */
body.woocommerce-checkout .wc-block-components-address-form__state,
body.woocommerce-checkout .nh-fixed-region-field {
  display: none !important;
}

/* Branded order summary instead of an all-white panel. */
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block,
body.woocommerce-checkout .wc-block-components-checkout-order-summary {
  overflow: hidden;
  border: 1px solid #cfe2d6 !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #f2faf5 0%, #f3f8fc 100%) !important;
  box-shadow: 0 14px 34px rgba(17,81,138,.08);
}

body.woocommerce-checkout .wc-block-components-checkout-order-summary__title,
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block > .wc-block-components-order-summary__button-text {
  color: var(--nh-checkout-blue) !important;
  font-weight: 800 !important;
}

body.woocommerce-checkout .wc-block-components-order-summary-item {
  margin: 10px 12px !important;
  padding: 14px !important;
  border: 1px solid rgba(17,81,138,.10) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.88) !important;
}

body.woocommerce-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-components-order-summary-item__description a {
  color: var(--nh-checkout-blue-dark) !important;
}

body.woocommerce-checkout .wc-block-components-totals-wrapper {
  border-top-color: rgba(17,81,138,.12) !important;
}

body.woocommerce-checkout .wc-block-components-totals-footer-item {
  margin: 10px 12px 12px !important;
  padding: 15px 14px !important;
  border-radius: 12px !important;
  background: var(--nh-checkout-green-soft) !important;
  color: var(--nh-checkout-blue-dark) !important;
}

body.woocommerce-checkout .wc-block-components-totals-shipping .wc-block-components-totals-item__value,
body.woocommerce-checkout .wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__label {
  color: #198a2c !important;
  font-weight: 800 !important;
}

/* Discreet remove action: icon-only so it stays available without competing with purchase actions. */
body.woocommerce-checkout .nh-checkout-remove {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-top: 9px;
  padding: 0;
  border: 1px solid #dfe6e3;
  border-radius: 50%;
  background: transparent;
  color: #7b878d !important;
  opacity: .78;
  text-decoration: none !important;
  transition: border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}

body.woocommerce-checkout .nh-checkout-remove svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.woocommerce-checkout .nh-checkout-remove:hover,
body.woocommerce-checkout .nh-checkout-remove:focus-visible {
  border-color: #dfc9c9;
  background: #fff7f7;
  color: #b15d5d !important;
  opacity: 1;
}

/* Cart visual consistency. */
body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
  border-radius: 999px !important;
  background: #2eb441 !important;
  color: #fff !important;
  font-weight: 800 !important;
}

@media (max-width: 781px) {
  body.woocommerce-checkout .wc-block-components-order-summary-item {
    margin-left: 8px !important;
    margin-right: 8px !important;
  }
}
