/*
 * Checkout steps layout. Markup: woocommerce/checkout/form-checkout.php.
 *
 * Loaded after style.css. Selectors are prefixed with body.woocommerce-checkout .chf-co
 * so they outrank the older checkout rules without editing them; !important appears only
 * where an older rule already uses it.
 */

body.woocommerce-checkout .chf-co {
  --co-ink: #0F2747;
  --co-blue: #1B4F8C;
  --co-orange: #E87722;
  --co-line: #E2E8F0;
  --co-muted: #5A6B82;
  /* Full width: the page gutter comes from the .woocommerce wrapper around this. */
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 0 56px;
  box-sizing: border-box;
  color: var(--co-ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

body.woocommerce-checkout .chf-co .chf-breadcrumb {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── Step header ───────────────────────────────────────────────────────── */

body ol.chf-co-steps {
  --co-ink: #0F2747;
  --co-blue: #1B4F8C;
  --co-line: #E2E8F0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  gap: 24px;
  margin: 12px 0 28px;
  padding: 0;
  list-style: none;
}

body ol.chf-co-steps .chf-co-step {
  margin: 0;
  padding: 14px 0 0;
  border-top: 3px solid var(--co-line);
  list-style: none;
}

body ol.chf-co-steps .chf-co-step.is-active,
body ol.chf-co-steps .chf-co-step.is-done { border-top-color: var(--co-ink); }

body ol.chf-co-steps .chf-co-step-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #8A98AB;
  font: inherit;
  text-align: left;
  cursor: default;
}

body ol.chf-co-steps .chf-co-step.is-done button.chf-co-step-btn,
body ol.chf-co-steps a.chf-co-step-btn { cursor: pointer; text-decoration: none; }

body ol.chf-co-steps .chf-co-step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #EEF2F6;
  color: #5A6B82;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body ol.chf-co-steps .chf-co-step-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1.3;
}

body ol.chf-co-steps .chf-co-step.is-active .chf-co-step-btn,
body ol.chf-co-steps .chf-co-step.is-done .chf-co-step-btn { color: var(--co-ink); }

body ol.chf-co-steps .chf-co-step.is-active .chf-co-step-num { background: var(--co-ink); color: #fff; }

body ol.chf-co-steps .chf-co-step.is-done .chf-co-step-num {
  background: #E6F4EC;
  color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F855A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px;
}

body ol.chf-co-steps .chf-co-step.is-done button.chf-co-step-btn:hover .chf-co-step-label,
body ol.chf-co-steps a.chf-co-step-btn:hover .chf-co-step-label { text-decoration: underline; }

/* ── Page grid ─────────────────────────────────────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-grid {
  position: relative; /* containing block for WooCommerce's "processing" overlay */
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 520px);
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

/* Left column, top to bottom: errors, tabs, promo code, the active step. */
body.woocommerce-checkout .chf-co .woocommerce-NoticeGroup,
body.woocommerce-checkout .chf-co .chf-dm-notice { grid-column: 1; grid-row: 1; margin: 0 0 16px; }
body.woocommerce-checkout .chf-co .chf-co-auth   { grid-column: 1; grid-row: 2; min-width: 0; }
body.woocommerce-checkout .chf-co .chf-co-coupon { grid-column: 1; grid-row: 3; min-width: 0; }
body.woocommerce-checkout .chf-co .chf-co-main   { grid-column: 1; grid-row: 4; min-width: 0; }

body.woocommerce-checkout .chf-co .chf-co-side {
  grid-column: 2;
  grid-row: 1 / span 4;
  position: sticky;
  top: 96px;
  min-width: 0;
}

/* What each step shows. */
body.woocommerce-checkout .chf-co[data-step="2"] .chf-co-auth,
body.woocommerce-checkout .chf-co[data-step="1"] .chf-co-coupon,
body.woocommerce-checkout .chf-co[data-mode="login"][data-step="1"] .chf-co-main,
body.woocommerce-checkout .chf-co .chf-co-pane[hidden] { display: none !important; }

body.woocommerce-checkout .chf-co .chf-co-tabinfo { display: none; }
body.woocommerce-checkout .chf-co[data-mode="login"] .chf-co-tabinfo[data-for="login"],
body.woocommerce-checkout .chf-co[data-mode="register"] .chf-co-tabinfo[data-for="register"],
body.woocommerce-checkout .chf-co[data-mode="guest"] .chf-co-tabinfo[data-for="guest"] { display: block; }

/* The tabs replace WooCommerce's "Create an account?" tick box; it stays in the form. */
body.woocommerce-checkout .chf-co .woocommerce-account-fields > .create-account { display: none !important; }
body.woocommerce-checkout .chf-co .woocommerce-account-fields:not(:has(input:not([type="hidden"]):not(#createaccount), select, textarea)) { display: none; }

/* ── Kicker, tabs, tab text ────────────────────────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #EEF4FB;
  color: var(--co-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.woocommerce-checkout .chf-co .chf-co-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #EEF2F6;
}

body.woocommerce-checkout .chf-co .chf-co-tab {
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: var(--co-ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

body.woocommerce-checkout .chf-co .chf-co-tab:hover { background: #F7F9FC; }

body.woocommerce-checkout .chf-co .chf-co-tab[aria-selected="true"] {
  background: var(--co-ink);
  color: #fff;
}

body.woocommerce-checkout .chf-co .chf-co-tab:focus-visible,
body.woocommerce-checkout .chf-co .chf-co-btn:focus-visible,
body.woocommerce-checkout .chf-co .chf-co-link:focus-visible,
body ol.chf-co-steps .chf-co-step-btn:focus-visible {
  outline: 2px solid var(--co-blue);
  outline-offset: 2px;
}

body.woocommerce-checkout .chf-co .chf-co-lead {
  margin: 20px 0 0;
  max-width: 62ch;
  color: #3D4E66;
  font-size: 15px;
  line-height: 1.55;
}

body.woocommerce-checkout .chf-co .chf-co-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--co-line);
  border-bottom: 1px solid var(--co-line);
  list-style: none;
}

body.woocommerce-checkout .chf-co .chf-co-benefits li {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 18px 16px 18px 0;
  color: var(--co-muted);
  font-size: 13px;
  line-height: 1.45;
  list-style: none;
}

body.woocommerce-checkout .chf-co .chf-co-benefits li + li {
  padding-left: 16px;
  border-left: 1px solid var(--co-line);
}

body.woocommerce-checkout .chf-co .chf-co-benefits strong {
  display: block;
  margin-bottom: 2px;
  color: var(--co-ink);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.woocommerce-checkout .chf-co .chf-co-benefit-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #EEF4FB;
  color: var(--co-blue);
}

body.woocommerce-checkout .chf-co .chf-co-auth { margin-bottom: 24px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-card,
body.woocommerce-checkout .chf-co .chf-co-login,
body.woocommerce-checkout .chf-co .chf-co-coupon form.checkout_coupon {
  margin: 0 0 16px;
  padding: 24px;
  border: 1px solid #E8EDF3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 39, 71, .06);
  box-sizing: border-box;
}

body.woocommerce-checkout .chf-co .chf-co-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

body.woocommerce-checkout .chf-co .chf-co-card-head h3 { margin: 0 !important; }

body.woocommerce-checkout .chf-co .chf-co-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.woocommerce-checkout .chf-co .chf-co-billing,
body.woocommerce-checkout .chf-co .chf-co-shipping {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

body.woocommerce-checkout .chf-co .chf-co-shipping > *,
body.woocommerce-checkout .chf-co .chf-co-billing > * { margin: 0 !important; }

/* An older rule pins these cards to align-self:start, which shrink-wraps them inside
   the flex column (the order notes box collapsed to the width of its label). */
body.woocommerce-checkout .chf-co .chf-co-billing > *,
body.woocommerce-checkout .chf-co .chf-co-shipping > * {
  align-self: stretch !important;
  width: 100% !important;
  box-sizing: border-box;
}

body.woocommerce-checkout .chf-co .woocommerce-additional-fields .form-row,
body.woocommerce-checkout .chf-co .woocommerce-additional-fields textarea {
  width: 100% !important;
  box-sizing: border-box;
}

/* ── Buttons and links ─────────────────────────────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 0;
  padding: 0 32px;
  border: 0;
  border-radius: 12px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease;
}

body.woocommerce-checkout .chf-co .chf-co-btn--primary {
  background: var(--co-orange);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 119, 34, .28);
}

body.woocommerce-checkout .chf-co .chf-co-btn--primary:hover { background: #D56A18; }

body.woocommerce-checkout .chf-co .chf-co-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

body.woocommerce-checkout .chf-co .chf-co-back,
body.woocommerce-checkout .chf-co .chf-co-link,
body.woocommerce-checkout .chf-co .chf-co-login a {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--co-blue);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

body.woocommerce-checkout .chf-co .chf-co-back:hover,
body.woocommerce-checkout .chf-co .chf-co-link:hover,
body.woocommerce-checkout .chf-co .chf-co-login a:hover { text-decoration: underline; }

/* ── Sign-in form ──────────────────────────────────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-login { margin-top: 20px; max-width: 520px; }

body.woocommerce-checkout .chf-co .chf-co-field { margin: 0 0 14px; }

body.woocommerce-checkout .chf-co .chf-co-field label,
body.woocommerce-checkout .chf-co .chf-co-coupon label {
  display: block;
  margin: 0 0 6px;
  color: var(--co-ink);
  font-size: 13px;
  font-weight: 700;
}

body.woocommerce-checkout .chf-co .chf-co-field input,
body.woocommerce-checkout .chf-co .chf-co-coupon input.input-text {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #D9E1EA;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  box-sizing: border-box;
  color: var(--co-ink);
  font-family: inherit;
  font-size: 15px;
}

body.woocommerce-checkout .chf-co .chf-co-field input:focus,
body.woocommerce-checkout .chf-co .chf-co-coupon input.input-text:focus {
  outline: none;
  border-color: var(--co-blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 140, .15);
}

body.woocommerce-checkout .chf-co .chf-co-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  font-size: 14px;
}

body.woocommerce-checkout .chf-co .chf-co-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3D4E66;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

body.woocommerce-checkout .chf-co .chf-co-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--co-blue); }

body.woocommerce-checkout .chf-co .chf-co-login .chf-co-btn { width: 100%; }

/* ── Promo code ────────────────────────────────────────────────────────── */

/* WooCommerce hides this form on load and after a code is applied; here it is a
   permanent part of step 2. */
body.woocommerce-checkout .chf-co .chf-co-coupon form.checkout_coupon { display: block !important; }

body.woocommerce-checkout .chf-co .chf-co-coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

body.woocommerce-checkout .chf-co .chf-co-coupon button.button {
  height: 48px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--co-blue);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

body.woocommerce-checkout .chf-co .chf-co-coupon .woocommerce-error,
body.woocommerce-checkout .chf-co .chf-co-coupon .woocommerce-message { margin: 0 0 12px; }

/* ── Step 2: recap and payment ─────────────────────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-recap-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

body.woocommerce-checkout .chf-co .chf-co-recap-body dt {
  margin: 0;
  color: var(--co-muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.9;
}

body.woocommerce-checkout .chf-co .chf-co-recap-body dd { margin: 0; color: var(--co-ink); overflow-wrap: anywhere; }

body.woocommerce-checkout .chf-co .chf-co-pay #payment,
body.woocommerce-checkout .chf-co .chf-co-pay .woocommerce-checkout-payment {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Banners duplicated from the order summary; removed by checkout-steps.js, hidden here
   so they never flash before it runs. */
body.woocommerce-checkout .chf-co .chf-co-pay > *:not(.chf-co-card-head):not(#payment) { display: none !important; }

body.woocommerce-checkout .chf-co .chf-co-pay #place_order {
  width: 100%;
  float: none;
  background: var(--co-orange) !important;
  box-shadow: 0 6px 16px rgba(232, 119, 34, .28);
}

body.woocommerce-checkout .chf-co .chf-co-pay #place_order:hover { background: #D56A18 !important; }

body.woocommerce-checkout .chf-co .chf-co-pay input[type="radio"] { accent-color: var(--co-blue); }

/* These two selects are enforced on "Continue to payment", so "(optional)" is wrong. */
body.woocommerce-checkout .chf-co .chf-dm-row .optional { display: none; }

body.woocommerce-checkout .chf-co .chf-co-coupon .chf-co-kicker { display: block; width: fit-content; }

/* ── Field errors from "Continue to payment" ───────────────────────────── */

body.woocommerce-checkout .chf-co .chf-co-fielderror {
  display: block;
  margin-top: 6px;
  color: #C53030;
  font-size: 13px;
  font-weight: 600;
}

body.woocommerce-checkout .chf-co .chf-co-invalid input.input-text,
body.woocommerce-checkout .chf-co .chf-co-invalid select,
body.woocommerce-checkout .chf-co .chf-co-invalid .select2-selection { border-color: #E53E3E !important; }

/* ── Wide screens: use the width instead of stretching one column ──────── */

@media (min-width: 1500px) {
  /* Billing and shipping/notes side by side, so fields stay a readable length. */
  body.woocommerce-checkout .chf-co .chf-co-details {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }

  /* Step 2: details recap beside the payment card. */
  body.woocommerce-checkout .chf-co .chf-co-pane[data-pane="2"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
    gap: 24px;
  }
}

/* ── Tablet and phone ──────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  body.woocommerce-checkout .chf-co .chf-co-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  body.woocommerce-checkout .chf-co .chf-co-side {
    grid-column: 1;
    grid-row: 5;
    position: static;
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  /* A 32px gutter each side costs a phone a sixth of its width. */
  body.woocommerce-checkout .woocommerce:has(> .chf-co) { padding-left: 16px !important; padding-right: 16px !important; }

  body.woocommerce-checkout .chf-co { padding-bottom: 32px; }

  body ol.chf-co-steps { gap: 8px; margin-bottom: 20px; }
  body ol.chf-co-steps .chf-co-step { padding-top: 10px; }
  body ol.chf-co-steps .chf-co-step-btn { gap: 8px; }
  body ol.chf-co-steps .chf-co-step-label { font-size: 10.5px; letter-spacing: .05em; }

  /* Three long labels do not fit side by side: name the current step only. */
  body ol.chf-co-steps .chf-co-step:not(.is-active) .chf-co-step-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body ol.chf-co-steps { display: flex; }
  body ol.chf-co-steps .chf-co-step { flex: 0 0 40px; min-width: 0; }
  body ol.chf-co-steps .chf-co-step.is-active { flex: 1 1 auto; }

  body.woocommerce-checkout .chf-co .chf-co-tab { min-height: 48px; padding: 6px 4px; font-size: 11px; letter-spacing: .04em; }

  body.woocommerce-checkout .chf-co .chf-co-benefits { grid-template-columns: 1fr; }
  body.woocommerce-checkout .chf-co .chf-co-benefits li { padding: 14px 0; }
  body.woocommerce-checkout .chf-co .chf-co-benefits li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--co-line); }

  body.woocommerce-checkout .chf-co .chf-co-card,
  body.woocommerce-checkout .chf-co .chf-co-login,
  body.woocommerce-checkout .chf-co .chf-co-coupon form.checkout_coupon { padding: 18px; }

  body.woocommerce-checkout .chf-co .chf-co-actions { flex-direction: column-reverse; align-items: stretch; }
  body.woocommerce-checkout .chf-co .chf-co-actions .chf-co-btn { width: 100%; }
  body.woocommerce-checkout .chf-co .chf-co-back { text-align: center; }

  body.woocommerce-checkout .chf-co .chf-co-recap-body { grid-template-columns: 1fr; gap: 2px; }
  body.woocommerce-checkout .chf-co .chf-co-recap-body dd { margin-bottom: 10px; }

  /* 16px stops iOS zooming the page when a field takes focus. */
  body.woocommerce-checkout .chf-co .chf-co-field input,
  body.woocommerce-checkout .chf-co .chf-co-coupon input.input-text { font-size: 16px !important; }
}

/* ══ Cart page: same full width, gutters and step header as the checkout ══ */

/* #content gives these the specificity to beat the 1120px cap that the
   chf-auto-discounts plugin prints in wp_head after every stylesheet. */
body.woocommerce-cart #content .woocommerce {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px;
  box-sizing: border-box;
}

body.woocommerce-cart #content .chf-flow-head { padding: 8px 0 0; }

body.woocommerce-cart #content .chf-flow-head .chf-breadcrumb {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

body.woocommerce-cart #content .chf-cart-page,
body.woocommerce-cart #content .chf-cart-editorial .chf-cart-container {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

body.woocommerce-cart #content .chf-cart-page { padding-left: 0; padding-right: 0; }

/* The cart sits on a tinted panel, so its contents need room from the panel's edges. */
body.woocommerce-cart #content .chf-cart-editorial .chf-cart-container {
  padding-left: clamp(16px, 2vw, 32px);
  padding-right: clamp(16px, 2vw, 32px);
}

/* Items | order summary, on the same column widths as the checkout. */
@media (min-width: 1001px) {
  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-container {
    grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 520px);
    column-gap: clamp(24px, 3vw, 48px);
  }
}

@media (max-width: 640px) {
  body.woocommerce-cart #content .woocommerce { padding: 0 16px; }
}

/*
 * Wide screens: the cart rows are a 12-column grid with the thumbnail on three columns,
 * which at full width leaves a ~150px hole between the picture and the product name.
 * Fixed tracks keep the picture and name together; the header row uses the same tracks
 * minus the thumbnail, so the column headings still line up.
 */
@media (min-width: 1400px) {
  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-line {
    grid-template-columns: 120px minmax(0, 1fr) 150px 150px 150px;
  }

  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-labels {
    grid-template-columns: minmax(0, 1fr) 150px 150px 150px;
  }

  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-line > *,
  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-labels > * {
    grid-column: auto;
  }
}

/* Order-received page: breathing room between the navigation and the step header. */
body.woocommerce-checkout .chf-flow-head--done { padding-top: 20px; }

/*
 * Below 900px the cart is one column. The discount banner is pinned to row 2 by the
 * chf-auto-discounts plugin and the items form to row 2 by style.css, so on phones and
 * tablets the banner was drawn on top of the first product. Give each block its own row.
 */
@media (max-width: 899px) {
  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-head { grid-column: 1; grid-row: 1; }
  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-container > #chf-ad-msg-slot { grid-column: 1; grid-row: 2; }
  body.woocommerce-cart #content .chf-cart-editorial .woocommerce-cart-form { grid-column: 1; grid-row: 3; min-width: 0; }
  body.woocommerce-cart #content .chf-cart-editorial .chf-cart-collaterals { grid-column: 1; grid-row: 4; }
}

/*
 * "Continue to payment": centred, wide, and kept in view.
 *
 * The step 1 form is long, so the button used to sit below the fold in the bottom-right
 * corner. The action bar now sticks to the bottom of the window while the form is on
 * screen and settles into place at the end of it. "Back to cart" sits underneath.
 */
body.woocommerce-checkout .chf-co .chf-co-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 16px 0 14px;
  background: linear-gradient(to bottom, rgba(243, 244, 246, 0), #F3F4F6 22%);
}

body.woocommerce-checkout .chf-co .chf-co-actions .chf-co-next {
  width: min(100%, 460px);
  min-height: 58px;
  font-size: 17px;
}

/* Phones: the site's fixed bottom navigation would cover a bar stuck to the window edge. */
@media (max-width: 768px) {
  body.woocommerce-checkout .chf-co .chf-co-actions { bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.woocommerce-checkout .chf-co .chf-co-actions .chf-co-next { width: 100%; }
}

/*
 * Order summary column, top to bottom: discount banner, "Your order" card, rewards.
 * The banner and rewards are printed together after the card (review-order.php);
 * display:contents lets each be ordered on its own.
 */
body.woocommerce-checkout .chf-co #order_review {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.woocommerce-checkout .chf-co #order_review .chf-order-extras { display: contents; }

body.woocommerce-checkout .chf-co #order_review #chf-ad-msg-slot { order: -1; margin: 0; }
body.woocommerce-checkout .chf-co #order_review #chf-ad-msg-slot:empty { display: none; }
body.woocommerce-checkout .chf-co #order_review #chf-ad-msg-slot .chf-ad-msg { margin: 0; }
body.woocommerce-checkout .chf-co #order_review .chf-checkout-order-section { order: 0; margin: 0; }
body.woocommerce-checkout .chf-co #order_review .chf-rw { order: 1; margin: 0; }

/* ══ Consistency pass (QA, 2026-11-12): one look from cart to confirmation ══ */

/* Same page background on cart, checkout and confirmation (the cart's tint). */
body.woocommerce-checkout { background: #F3F4F6; }

/* Primary button: every "move forward" action is the orange button. The cart's
   "Proceed to Checkout" was blue, underlined, 14px. */
body.woocommerce-cart #content .chf-cart-summary-card .chf-proceed-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: #E87722;
  box-shadow: 0 6px 16px rgba(232, 119, 34, .28);
  color: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

body.woocommerce-cart #content .chf-cart-summary-card .chf-proceed-btn:hover { background: #D56A18; }

/* "Place order" was 22.6px/900 next to a 17px/800 "Continue to payment". */
body.woocommerce-checkout .chf-co .chf-co-pay #place_order {
  min-height: 58px;
  border-radius: 12px;
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: 0;
}

/* Summary card: same radius, border and title as the checkout's "Your order". */
body.woocommerce-cart #content .chf-cart-summary-card {
  border: 1px solid #E8EDF3;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 39, 71, .06);
}

body.woocommerce-cart #content .chf-cart-summary-card > h3 {
  color: #0F2747;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
}

/* Promo code field and Apply button: same as on the checkout. */
body.woocommerce-cart #content .chf-coupon-section-summary .chf-coupon-input-field {
  height: 48px;
  padding: 0 14px;
  border: 1px solid #D9E1EA;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: #0F2747;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
}

body.woocommerce-cart #content .chf-coupon-section-summary .chf-coupon-apply-btn {
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: #1B4F8C;
  color: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
}

/* ── Confirmation page: was Storefront defaults (32px light grey headings, italic
      addresses, grey square buttons) ── */

body.woocommerce-order-received #content .woocommerce-order { padding-bottom: 56px; color: #0F2747; }

body.woocommerce-order-received #content .woocommerce-order .woocommerce-notice--success { border-radius: 12px; font-size: 15px; font-weight: 700; }

body.woocommerce-order-received #content .woocommerce-order h2 {
  margin: 0 0 14px;
  color: #0F2747;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
}

body.woocommerce-order-received #content .woocommerce-order ul.woocommerce-order-overview,
body.woocommerce-order-received #content .woocommerce-order section.woocommerce-order-details,
body.woocommerce-order-received #content .woocommerce-order section.woocommerce-customer-details {
  margin: 0 0 16px;
  padding: 24px;
  border: 1px solid #E8EDF3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 39, 71, .06);
  box-sizing: border-box;
}

body.woocommerce-order-received #content .woocommerce-order ul.woocommerce-order-overview::before,
body.woocommerce-order-received #content .woocommerce-order ul.woocommerce-order-overview::after { display: none; }

body.woocommerce-order-received #content .woocommerce-order ul.woocommerce-order-overview li { background: transparent; }

body.woocommerce-order-received #content .woocommerce-order table.shop_table,
body.woocommerce-order-received #content .woocommerce-order table.shop_table th,
body.woocommerce-order-received #content .woocommerce-order table.shop_table td { background: transparent; }

body.woocommerce-order-received #content .woocommerce-order address {
  padding: 0;
  border: 0;
  color: #3D4E66;
  font-style: normal;
  line-height: 1.6;
}

body.woocommerce-order-received #content .woocommerce-order .button,
body.woocommerce-order-received #content .woocommerce-order a.button,
body.woocommerce-order-received #content .woocommerce-order button {
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid #CBD5E0;
  border-radius: 10px;
  background: #fff;
  color: #0F2747;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 41px;
  text-decoration: none;
}

body.woocommerce-order-received #content .woocommerce-order .button:hover,
body.woocommerce-order-received #content .woocommerce-order a.button:hover,
body.woocommerce-order-received #content .woocommerce-order button:hover { border-color: #1B4F8C; color: #1B4F8C; }
