/**
 * Cart + Checkout two-column flow — modern order summary UI.
 */

/* --------------------------------------------------------------------------
   Shared shell
   -------------------------------------------------------------------------- */
body.woocommerce-cart .terea-wc-container,
body.woocommerce-checkout .terea-wc-container,
.wh-flow {
  max-width: 1120px;
}

.wh-flow-header,
.terea-checkout-hero.wh-flow-header,
.terea-cart-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 22px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  box-shadow: none;
}

.wh-flow-header__eyebrow,
.wh-flow-header .terea-checkout-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wh-flow-header__title,
.wh-flow-header .terea-checkout-hero-title {
  margin: 0;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111;
  line-height: 1.2;
}

.wh-flow-header__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f6f6f6;
  border: 1px solid #e8e8e6;
  color: #374151;
  font-size: 13px;
  font-weight: 650;
}

.wh-flow-grid,
.terea-checkout-grid.wh-flow-grid,
.terea-cart-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr) !important;
  gap: 24px !important;
  align-items: start !important;
  margin-top: 0 !important;
}

.wh-flow-main,
.wh-flow-summary,
.terea-checkout-form.wh-flow-main,
.terea-checkout-sidebar.wh-flow-summary {
  min-width: 0;
  width: 100%;
}

.wh-flow-summary,
.terea-checkout-sidebar.wh-flow-summary {
  position: sticky;
  top: calc(var(--tx-header-offset, 88px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0 !important;
}

/* Kill Woo float layout that breaks the two columns */
body.woocommerce-cart .woocommerce form .form-row-first,
body.woocommerce-cart .woocommerce form .form-row-last,
body.woocommerce-checkout .woocommerce form .form-row-first,
body.woocommerce-checkout .woocommerce form .form-row-last,
body.woocommerce-checkout .terea-checkout-form .form-row {
  float: none !important;
  clear: none !important;
}

body.woocommerce-checkout .terea-checkout-form .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .terea-checkout-form .woocommerce-shipping-fields__field-wrapper,
body.woocommerce-checkout .terea-checkout-form .woocommerce-additional-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.woocommerce-checkout .terea-checkout-form .form-row.form-row-wide,
body.woocommerce-checkout .terea-checkout-form .form-row#billing_email_field,
body.woocommerce-checkout .terea-checkout-form .form-row#billing_phone_field,
body.woocommerce-checkout .terea-checkout-form .form-row#billing_address_1_field,
body.woocommerce-checkout .terea-checkout-form .form-row#billing_address_2_field,
body.woocommerce-checkout .terea-checkout-form .form-row#shipping_address_1_field,
body.woocommerce-checkout .terea-checkout-form .form-row#shipping_address_2_field,
body.woocommerce-checkout .terea-checkout-form .form-row#order_comments_field,
body.woocommerce-checkout .terea-checkout-form .form-row.notes {
  grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Left: cart lines
   -------------------------------------------------------------------------- */
.wh-cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wh-cart-line {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
}

.wh-cart-line__media,
.wh-order-summary__thumb,
.wh-review-item__thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: visible;
  background: #f7f7f5;
  border: 1px solid #ececec;
  flex-shrink: 0;
}

.wh-order-summary__thumb,
.wh-review-item__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
}

.wh-cart-line__media a,
.wh-order-summary__thumb,
.wh-review-item__thumb {
  display: block;
}

.wh-cart-line__media img,
.wh-order-summary__thumb img,
.wh-review-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.wh-qty-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.wh-cart-line__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.wh-cart-line__name {
  display: block;
  margin: 0 0 4px;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.35;
}

.wh-cart-line__name:hover { color: var(--tx-accent, #c8102e); }

.wh-cart-line__unit {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.wh-cart-line__pricing {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.wh-cart-line__subtotal,
.wh-order-summary__price,
.wh-review-item__price {
  font-size: 15px;
  font-weight: 800;
  color: #111;
  white-space: nowrap;
}

.wh-save-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.wh-cart-line__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.wh-qty-stepper,
.wh-cart-line .terea-qty-input {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.wh-qty-stepper button,
.wh-cart-line .terea-qty-input button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f7f7f5;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.wh-qty-stepper .qty,
.wh-cart-line .terea-qty-input .qty {
  width: 44px;
  height: 36px;
  border: 0 !important;
  text-align: center;
  font-weight: 700;
  background: transparent;
}

.wh-cart-line__remove {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.wh-cart-line__remove:hover { color: #b91c1c; }

.wh-cart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
}

.wh-cart-continue {
  color: #374151;
  font-weight: 650;
  text-decoration: none;
}

.wh-cart-continue:hover { color: #111; text-decoration: underline; }

.wh-cart-update {
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #111 !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* --------------------------------------------------------------------------
   Right: order summary card (matches reference)
   -------------------------------------------------------------------------- */
.wh-order-summary,
.terea-checkout-summary-card.wh-order-summary {
  background: #fff !important;
  border: 1px solid #ececec !important;
  border-radius: 16px !important;
  padding: 0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden;
}

.wh-order-summary .terea-cart-totals,
.wh-order-summary .cart_totals {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  position: static !important;
}

.wh-order-summary__head,
.terea-checkout-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #eeeeee;
  margin: 0 !important;
}

.wh-order-summary__title,
.terea-checkout-summary-title {
  margin: 0 !important;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wh-order-summary__title svg,
.terea-checkout-summary-title svg { display: none; }

.terea-checkout-summary-count {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  background: #f6f6f6;
  border-radius: 999px;
  padding: 4px 10px;
}

.wh-order-summary__items {
  list-style: none;
  margin: 0;
  padding: 16px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wh-order-summary__item,
.wh-review-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.wh-order-summary__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.wh-order-summary__name,
.wh-review-item__name {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #111;
  line-height: 1.35;
}

.wh-order-summary__price-col,
.wh-review-item__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* Coupon accordion */
.wh-coupon-panel {
  margin: 8px 20px 0;
  border: 1.5px dashed #d4d4d4;
  border-radius: 12px;
  background: #fafafa;
  overflow: hidden;
}

.wh-coupon-panel > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  user-select: none;
}

.wh-coupon-panel > summary::-webkit-details-marker { display: none; }

.wh-coupon-panel > summary svg {
  transition: transform 0.2s ease;
  color: #6b7280;
}

.wh-coupon-panel[open] > summary svg {
  transform: rotate(180deg);
}

.wh-coupon-panel__body {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}

.wh-coupon-panel__body .input-text {
  flex: 1;
  min-height: 42px;
  border: 1px solid #e5e5e5 !important;
  border-radius: 10px !important;
  padding: 0 12px !important;
  background: #fff !important;
}

.wh-coupon-panel__body .button,
.wh-coupon-panel__body .wh-apply-coupon {
  min-height: 42px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #111 !important;
  color: #fff !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

/* Totals table */
.wh-order-summary__totals,
.wh-order-summary .cart_totals,
.wh-order-summary .woocommerce-checkout-review-order {
  padding: 8px 20px 20px;
}

.wh-order-summary .cart_totals > h2,
.wh-order-summary .cart_totals h2,
#order_review_heading {
  display: none !important;
}

.wh-totals-table,
.wh-review-table,
.wh-order-summary .shop_table {
  width: 100%;
  border: 0 !important;
  border-collapse: collapse;
  margin: 0 !important;
  background: transparent !important;
}

.wh-totals-table th,
.wh-totals-table td,
.wh-review-table tfoot th,
.wh-review-table tfoot td,
.wh-order-summary .shop_table tfoot th,
.wh-order-summary .shop_table tfoot td {
  padding: 12px 0 !important;
  border: 0 !important;
  border-top: 1px solid #eeeeee !important;
  background: transparent !important;
  vertical-align: middle;
}

.wh-totals-table tr:first-child th,
.wh-totals-table tr:first-child td,
.wh-review-table tfoot tr:first-child th,
.wh-review-table tfoot tr:first-child td {
  border-top: 1px solid #eeeeee !important;
}

.wh-totals-table th,
.wh-review-table tfoot th,
.wh-order-summary .shop_table tfoot th {
  text-align: left !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.wh-totals-table td,
.wh-review-table tfoot td,
.wh-order-summary .shop_table tfoot td {
  text-align: right !important;
  color: #111 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.wh-totals-table .order-total th,
.wh-totals-table .order-total td,
.wh-review-table .order-total th,
.wh-review-table .order-total td,
.wh-order-summary .order-total th,
.wh-order-summary .order-total td {
  padding-top: 16px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #111 !important;
  border-top: 1px solid #eeeeee !important;
}

.wh-totals-table .order-total td .amount,
.wh-review-table .order-total td .amount,
.wh-order-summary .order-total td .amount {
  color: #111 !important;
  font-size: 22px !important;
}

.wh-review-table thead { display: none; }

.wh-review-table tbody td {
  padding: 10px 0 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #f0f0f0 !important;
  background: transparent !important;
  vertical-align: top;
}

.wh-review-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.wh-review-table .product-total {
  width: 1%;
  white-space: nowrap;
}

.wh-order-summary .wc-proceed-to-checkout {
  margin-top: 8px;
}

.wh-order-summary .checkout-button,
.wh-order-summary a.checkout-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--tx-accent, #c8102e) !important;
  color: #fff !important;
  font-family: var(--tx-font-body, Manrope, sans-serif);
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none !important;
  box-shadow: none !important;
}

.wh-order-summary .checkout-button:hover {
  background: #a50d25 !important;
  color: #fff !important;
}

/* Checkout left panels */
.terea-checkout-panel {
  background: #fff !important;
  border: 1px solid #ececec !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  margin-top: 0 !important;
}

.terea-checkout-panel-head {
  margin-bottom: 16px;
}

.terea-checkout-panel-step {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-accent, #c8102e);
}

.terea-checkout-panel-title {
  margin: 0 0 4px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terea-checkout-panel-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

/* Classic checkout — compact standard form fields */
body.woocommerce-checkout .terea-checkout-form .form-row label,
body.woocommerce-cart .wh-flow-form .form-row label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: 6px !important;
}

body.woocommerce-checkout .terea-checkout-form .form-row input.input-text,
body.woocommerce-checkout .terea-checkout-form .form-row select,
body.woocommerce-checkout .terea-checkout-form .form-row textarea,
body.woocommerce-cart .wh-flow-form .input-text,
body.woocommerce-cart .wh-flow-form select,
body.woocommerce-cart .wh-flow-form textarea {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  background: #fff !important;
  box-shadow: none !important;
}

body.woocommerce-checkout .terea-checkout-form .form-row input.input-text:focus,
body.woocommerce-checkout .terea-checkout-form .form-row select:focus,
body.woocommerce-checkout .terea-checkout-form .form-row textarea:focus {
  border-color: #111 !important;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08) !important;
  outline: none !important;
}

body.woocommerce-checkout .terea-checkout-form .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .terea-checkout-form .woocommerce-shipping-fields__field-wrapper {
  gap: 12px !important;
}

.terea-checkout-form.wh-flow-main {
  display: flex;
  flex-direction: column;
  gap: 16px !important;
}

.terea-checkout-help {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 14px;
}

.terea-checkout-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8e8e6;
  color: var(--tx-accent, #c8102e);
}

.terea-checkout-help strong {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 750;
  color: #111;
}

.terea-checkout-help p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}

.terea-checkout-help-link {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
}

.terea-checkout-help-link:hover {
  color: var(--tx-accent, #c8102e);
}

/* Payment block inside summary */
.wh-order-summary #payment {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #eeeeee;
  background: transparent !important;
}

.wh-order-summary #payment .payment_methods {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wh-order-summary #payment .payment_methods li {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e8e8e6;
  border-radius: 12px;
  background: #fafafa;
}

.wh-order-summary #payment #place_order {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--tx-accent, #c8102e);
  color: #fff;
  font-family: var(--tx-font-body, Manrope, sans-serif);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   Right rail — payment + place order (classic)
   -------------------------------------------------------------------------- */
.terea-checkout-payment-card,
.i3d-checkout-complete {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.terea-checkout-payment-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f0f0ee;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.terea-checkout-payment-title {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  line-height: 1.25;
}

.terea-checkout-payment-title svg {
  flex-shrink: 0;
  color: var(--tx-accent, #c8102e);
}

.terea-checkout-payment-sub {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.terea-checkout-payment-card #payment,
.terea-checkout-payment-card .woocommerce-checkout-payment {
  margin: 0 !important;
  padding: 16px 20px 20px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.terea-checkout-payment-card #payment ul.payment_methods,
.terea-checkout-payment-card .payment_methods {
  list-style: none;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terea-checkout-payment-card #payment .payment_methods li,
.terea-checkout-payment-card .wc_payment_method {
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e8e8e6 !important;
  border-radius: 12px !important;
  background: #fafafa !important;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.terea-checkout-payment-card #payment .payment_methods li:has(input:checked),
.terea-checkout-payment-card .wc_payment_method:has(input:checked) {
  border-color: #111 !important;
  background: #fff !important;
  box-shadow: 0 0 0 1px #111;
}

.terea-checkout-payment-card #payment .payment_methods li label,
.terea-checkout-payment-card .wc_payment_method > label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 14px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #111 !important;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.terea-checkout-payment-card #payment .payment_box,
.terea-checkout-payment-card .payment_box {
  margin: 0 !important;
  padding: 0 14px 14px !important;
  background: transparent !important;
  border: 0 !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  line-height: 1.45;
}

.terea-checkout-payment-card #payment .payment_box::before {
  display: none !important;
}

.terea-checkout-payment-card .place-order {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}

.terea-checkout-payment-card #place_order,
.terea-checkout-payment-card button#place_order {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-height: 46px !important;
  margin: 12px 0 0 !important;
  padding: 12px 18px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--tx-accent, #c8102e) !important;
  color: #fff !important;
  font-family: var(--tx-font-body, Manrope, sans-serif) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  text-transform: none;
  box-shadow: none !important;
  transition: background 0.15s ease, transform 0.15s ease;
}

.terea-checkout-payment-card #place_order:hover {
  background: #a50d25 !important;
  transform: translateY(-1px);
}

.terea-checkout-payment-card .woocommerce-privacy-policy-text,
.terea-checkout-payment-card .woocommerce-terms-and-conditions-wrapper {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.5;
}

.terea-checkout-payment-card .woocommerce-privacy-policy-text a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terea-checkout-payment-card .woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
}

/* Hide duplicate payment heading from WC default when our card title exists */
.terea-checkout-payment-card #payment > .woocommerce-notice,
.terea-checkout-payment-card #order_review_heading {
  display: none !important;
}

/* Hide default coupon notice link duplication */
body.woocommerce-checkout .woocommerce-form-coupon-toggle {
  display: none !important;
}

body.woocommerce-checkout form.checkout_coupon {
  display: none !important;
}

/* Blocks cart/checkout — do not fight wc-blocks.css layout rules here */

@media (max-width: 960px) {
  .wh-flow-grid,
  .terea-checkout-grid.wh-flow-grid,
  .terea-cart-grid {
    grid-template-columns: 1fr !important;
  }

  body.woocommerce-cart .wh-flow-summary {
    position: static;
    order: -1;
  }

  body.woocommerce-checkout .terea-checkout-sidebar.wh-flow-summary {
    position: static;
    order: 0;
  }

  .wh-cart-line {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .wh-cart-line__media {
    width: 72px;
    height: 72px;
  }

  body.woocommerce-checkout .terea-checkout-form .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout .terea-checkout-form .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: 1fr;
  }

  body.woocommerce-cart .wh-flow,
  body.woocommerce-checkout .wh-flow,
  body.woocommerce-cart .terea-wc-container,
  body.woocommerce-checkout .terea-wc-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .wh-flow-header,
  .terea-checkout-hero.wh-flow-header,
  .terea-cart-page-header {
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .wh-flow-header__title,
  .wh-flow-header .terea-checkout-hero-title {
    font-size: 1.25rem;
    overflow-wrap: normal;
    word-break: normal;
  }

  body.woocommerce-checkout .terea-checkout-form .form-row,
  body.woocommerce-checkout .terea-checkout-form .form-row input.input-text,
  body.woocommerce-checkout .terea-checkout-form .form-row select,
  body.woocommerce-checkout .terea-checkout-form .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }

  .terea-checkout-panel {
    padding: 16px !important;
  }
}

@media (max-width: 640px) {
  .wh-cart-line__top {
    flex-direction: column;
  }

  .wh-cart-line__pricing,
  .wh-order-summary__meta {
    align-items: flex-start;
    text-align: left;
  }

  .wh-order-summary__price-col,
  .wh-review-item__price {
    align-items: flex-start;
  }

  .wh-coupon-panel__body {
    flex-direction: column;
  }
}
