/* STX classic checkout shell — scoped to body.stx-classic-checkout only */
body.stx-classic-checkout {
  --stx-co-bg: #f5f6f8;
  --stx-co-card: var(--stx-panel-bg, #ffffff);
  --stx-co-ink: var(--stx-ink, #1a1d21);
  --stx-co-muted: #5b6570;
  --stx-co-line: var(--stx-panel-border, #d8dde3);
  --stx-co-blue: var(--stx-btn-primary-bg, #1e5a8a);
  --stx-co-blue-dark: var(--stx-btn-primary-hover, #16466c);
  --stx-co-navy: var(--stx-navy-text, #0d2137);
  --stx-co-orange: var(--stx-orange, #d97706);
  --stx-co-orange-dark: var(--stx-orange-dark, #b45309);
  --stx-co-charcoal: #1a1d21;
  --stx-co-danger: #b42318;
  --stx-co-max: min(var(--stx-content-max, 1440px), calc(100% - 48px));
  --stx-co-gutter: var(--stx-gutter-desktop, 24px);
}

/* Break out of the default narrow .stx-section / .stx-container phone-like column */
body.stx-classic-checkout .stx-woocommerce.stx-woocommerce--checkout-full {
  padding-top: 0;
  padding-bottom: 2rem;
  max-width: none;
  width: 100%;
}

body.stx-classic-checkout .stx-checkout-page-wrap {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.stx-classic-checkout .stx-woocommerce > .stx-container {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

body.stx-classic-checkout .stx-compliance-banner--spaced {
  margin: 24px var(--stx-co-gutter) 0;
  max-width: var(--stx-co-max);
}

body.stx-classic-checkout .stx-checkout-form {
  background: var(--stx-co-bg);
  color: var(--stx-co-ink);
  margin: 0;
  width: 100%;
  padding-bottom: 48px;
}

body.stx-classic-checkout .stx-checkout-header {
  background: var(--stx-co-navy);
  color: #fff;
  margin-bottom: 28px;
  width: 100%;
  border-bottom: 3px solid var(--stx-co-orange);
}

body.stx-classic-checkout .stx-checkout-header__inner {
  max-width: var(--stx-content-max, 1440px);
  width: 100%;
  margin: 0 auto;
  padding: 18px var(--stx-co-gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Checkout chrome is steps-only — no STX BULLSEYE wordmark above Shipping. */
body.stx-classic-checkout .stx-checkout-header__brand {
  display: none !important;
}

body.stx-classic-checkout .stx-checkout-steps {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.stx-classic-checkout .stx-checkout-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
}

body.stx-classic-checkout .stx-checkout-steps__item.is-complete {
  color: rgba(255, 255, 255, 0.85);
}

body.stx-classic-checkout .stx-checkout-steps__item.is-active {
  color: #fff;
}

body.stx-classic-checkout .stx-checkout-steps__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0;
}

body.stx-classic-checkout .stx-checkout-steps__item.is-complete .stx-checkout-steps__num {
  background: transparent;
  border-color: var(--stx-co-orange);
  color: var(--stx-co-orange);
}

body.stx-classic-checkout .stx-checkout-steps__item.is-active .stx-checkout-steps__num {
  background: var(--stx-co-orange);
  border-color: var(--stx-co-orange);
  color: #fff;
}

body.stx-classic-checkout .stx-checkout-steps__rule {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
}

body.stx-classic-checkout .stx-checkout-steps__item.is-complete + .stx-checkout-steps__rule {
  background: var(--stx-co-orange);
}

/* Desktop: ~65% left / ~35% right, consistent gap; panels top-aligned */
body.stx-classic-checkout .stx-checkout-layout {
  max-width: var(--stx-content-max, 1440px);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--stx-co-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
  box-sizing: border-box;
}

body.stx-classic-checkout .stx-checkout-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

body.stx-classic-checkout .stx-checkout-step__title,
body.stx-classic-checkout .stx-checkout-section-title,
body.stx-classic-checkout .stx-checkout-summary__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.06em;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--stx-co-navy);
  margin: 0 0 14px;
}

body.stx-classic-checkout .stx-checkout-step__title {
  font-size: clamp(32px, 3vw, 40px);
}

body.stx-classic-checkout .stx-checkout-section-title {
  font-size: 22px;
  border-bottom: 1px solid var(--stx-co-line);
  padding-bottom: 8px;
}

body.stx-classic-checkout .stx-checkout-section {
  background: var(--stx-co-card);
  border: 1px solid var(--stx-co-line);
  border-radius: 2px;
  padding: 22px 24px;
  margin-bottom: 18px;
}

body.stx-classic-checkout .stx-checkout-signin a,
body.stx-classic-checkout .stx-link-btn,
body.stx-classic-checkout a {
  color: var(--stx-co-blue);
}

body.stx-classic-checkout .stx-fulfillment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.stx-classic-checkout .stx-fulfillment-card {
  display: block;
  border: 1px solid var(--stx-co-line);
  border-radius: 2px;
  padding: 14px 14px 14px 42px;
  position: relative;
  cursor: pointer;
  background: #fafbfc;
}

body.stx-classic-checkout .stx-fulfillment-card input {
  position: absolute;
  left: 14px;
  top: 16px;
  accent-color: var(--stx-co-blue);
}

body.stx-classic-checkout .stx-fulfillment-card:has(input:checked) {
  border-color: var(--stx-co-blue);
  box-shadow: inset 0 0 0 1px var(--stx-co-blue);
  background: #fff;
}

body.stx-classic-checkout .stx-fulfillment-card__title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

body.stx-classic-checkout .stx-fulfillment-card__address,
body.stx-classic-checkout .stx-fulfillment-card__hint {
  display: block;
  font-size: 13px;
  color: var(--stx-co-muted);
  line-height: 1.4;
}

body.stx-classic-checkout .stx-dealer-warning {
  color: var(--stx-co-danger);
  font-weight: 700;
  margin: 0 0 12px;
}

body.stx-classic-checkout .stx-dealer-selected {
  margin-top: 14px;
  padding: 14px;
  background: #f4f7fa;
  border: 1px solid var(--stx-co-line);
}

body.stx-classic-checkout .stx-dealer-selected__name {
  font-weight: 800;
  margin: 0 0 6px;
}

body.stx-classic-checkout .stx-dealer-selected__line {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--stx-co-muted);
}

body.stx-classic-checkout .stx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

body.stx-classic-checkout .stx-btn--primary {
  background: var(--stx-co-orange);
  border-color: var(--stx-co-orange);
  color: #fff;
}

body.stx-classic-checkout .stx-btn--primary:hover,
body.stx-classic-checkout .stx-btn--primary:focus-visible {
  background: var(--stx-co-orange-dark);
  border-color: var(--stx-co-orange-dark);
  color: #fff;
}

body.stx-classic-checkout .stx-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

body.stx-classic-checkout .stx-btn--ghost {
  background: #fff;
  border-color: var(--stx-co-charcoal);
  color: var(--stx-co-charcoal);
}

body.stx-classic-checkout .stx-btn--wide {
  width: 100%;
  max-width: none;
}

body.stx-classic-checkout .stx-checkout-payment-section {
  max-width: 760px;
}

/* Disclaimer removed from template — hide if cached HTML / plugins re-inject. */
body.stx-classic-checkout .stx-checkout-payment-note {
  display: none !important;
}

body.stx-classic-checkout .stx-checkout-summary__row--shipping {
  display: block;
  padding: 10px 0;
}

body.stx-classic-checkout .stx-checkout-summary__row--shipping > span:first-child:empty,
body.stx-classic-checkout .stx-checkout-summary__row--shipping .stx-summary-ship-label-hidden {
  display: none;
}

body.stx-classic-checkout .stx-checkout-summary__row--shipping [data-stx-summary-shipping],
body.stx-classic-checkout .stx-checkout-summary__row--shipping .stx-checkout-summary__ship-chosen {
  display: block;
  text-align: left;
  font-weight: 700;
  color: var(--stx-co-ink);
}

body.stx-classic-checkout .stx-checkout-step__footer {
  margin-top: 8px;
}

body.stx-classic-checkout .stx-checkout-summary {
  position: sticky;
  top: calc(var(--stx-header-offset, 7.5rem) + 8px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: start;
  overflow-wrap: anywhere;
  max-height: calc(100vh - var(--stx-header-offset, 7.5rem) - 16px);
  overflow-y: auto;
}

body.stx-classic-checkout .stx-checkout-summary__card {
  background: #f0f2f5;
  border: 1px solid var(--stx-co-line);
  border-left: 3px solid var(--stx-co-orange);
  border-radius: 2px;
  padding: 18px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

body.stx-classic-checkout .stx-checkout-summary__line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--stx-co-line);
  align-items: start;
}

body.stx-classic-checkout .stx-checkout-summary__media {
  width: 64px;
  flex-shrink: 0;
}

body.stx-classic-checkout .stx-checkout-summary__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
  background: #fff;
}

body.stx-classic-checkout .stx-checkout-summary__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

body.stx-classic-checkout .stx-checkout-summary__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

body.stx-classic-checkout .stx-checkout-summary__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

body.stx-classic-checkout .stx-checkout-summary__qty {
  font-size: 12px;
  line-height: 1.4;
  color: var(--stx-co-muted);
  margin: 0;
}

/* Reset WooCommerce cart .remove (often a square × control) */
body.stx-classic-checkout .stx-checkout-summary__remove,
body.stx-classic-checkout a.remove.stx-checkout-summary__remove {
  display: inline;
  position: static;
  float: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--stx-co-blue);
  text-decoration: underline;
  text-indent: 0;
  text-align: left;
  overflow: visible;
}

body.stx-classic-checkout .stx-checkout-summary__remove:hover,
body.stx-classic-checkout .stx-checkout-summary__remove:focus-visible {
  color: var(--stx-co-blue-dark);
}

body.stx-classic-checkout .stx-checkout-summary__price {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  margin: 0;
  padding-top: 0;
  justify-self: end;
}

body.stx-classic-checkout .stx-checkout-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--stx-co-line);
}

body.stx-classic-checkout .stx-checkout-summary__row--total {
  font-weight: 800;
  font-size: 16px;
  border-bottom: 0;
  padding-top: 12px;
}

body.stx-classic-checkout .stx-checkout-summary__ffl {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--stx-co-line);
  font-size: 13px;
}

body.stx-classic-checkout .stx-link-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

/* Contact + shipping stack full-width in the main column (kill Woo col floats). */
body.stx-classic-checkout .col2-set,
body.stx-classic-checkout .col2-set.stx-checkout-customer,
body.stx-classic-checkout #customer_details {
  display: flex !important;
  flex-direction: column !important;
  float: none !important;
  gap: 0;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

body.stx-classic-checkout .col2-set::before,
body.stx-classic-checkout .col2-set::after,
body.stx-classic-checkout #customer_details::before,
body.stx-classic-checkout #customer_details::after {
  display: none !important;
  content: none !important;
}

body.stx-classic-checkout .col2-set .col-1,
body.stx-classic-checkout .col2-set .col-2,
body.stx-classic-checkout #customer_details .col-1,
body.stx-classic-checkout #customer_details .col-2,
body.stx-classic-checkout .stx-checkout-shipping-wrap,
body.stx-classic-checkout .stx-checkout-billing-wrap,
body.stx-classic-checkout .stx-checkout-contact,
body.stx-classic-checkout .stx-checkout-shipping-details {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  clear: both !important;
  box-sizing: border-box;
}

body.stx-classic-checkout .stx-checkout-shipping-wrap .woocommerce-shipping-fields,
body.stx-classic-checkout .stx-checkout-shipping-wrap .shipping_address {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

body.stx-classic-checkout .stx-checkout-shipping-wrap .woocommerce-shipping-fields__field-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

/* g-FFL / Woo notices inside shipping — wrap fully, never clip mid-sentence */
body.stx-classic-checkout #first_last_notice,
body.stx-classic-checkout #mixed_cart_notice,
body.stx-classic-checkout .stx-checkout-shipping-details .notice,
body.stx-classic-checkout .stx-checkout-shipping-details .woocommerce-info,
body.stx-classic-checkout .stx-checkout-shipping-details .woocommerce-message,
body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper > .notice,
body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper > p.notice {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  float: none !important;
  clear: both !important;
}

/* Name/address field grid — CSS grid instead of Woo floats */
body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper,
body.stx-classic-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 16px;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper,
  body.stx-classic-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper .form-row-wide,
  body.stx-classic-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide,
  body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper > .notice,
  body.stx-classic-checkout .woocommerce-billing-fields__field-wrapper > .notice,
  body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper > p.notice,
  body.stx-classic-checkout #first_last_notice,
  body.stx-classic-checkout #mixed_cart_notice {
    grid-column: 1 / -1;
  }
}

/* Hide redundant "Edit shipping" while already on the Shipping step */
body.stx-classic-checkout.stx-checkout-step-1 .stx-checkout-summary__edit,
body.stx-classic-checkout:not(.stx-checkout-step-2) .stx-checkout-summary__edit {
  display: none;
}

body.stx-classic-checkout.stx-checkout-step-2 .stx-checkout-summary__edit {
  display: block;
}

body.stx-classic-checkout .stx-checkout-summary__pending {
  color: var(--stx-co-muted);
  font-style: italic;
  font-size: 13px;
  white-space: normal;
  text-align: right;
}

/* Theme summary owns line items/totals — hide Woo duplicate table chrome only.
   Keep #payment, #ffl_container, and g-FFL / document blocks visible. */
body.stx-classic-checkout #order_review > .woocommerce-checkout-review-order-table,
body.stx-classic-checkout #order_review > .shop_table,
body.stx-classic-checkout #order_review table.shop_table {
  display: none !important;
}

/* Part D — STX navy/orange cards around native Woo shipping radios (not custom radios). */
body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method li,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods li {
  position: relative;
  margin: 0;
  padding: 0;
  border: 2px solid var(--stx-co-navy);
  border-radius: 4px;
  background: var(--stx-co-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method li:has(input:checked),
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods li:has(input:checked) {
  border-color: var(--stx-co-orange);
  background: #fffaf3;
  box-shadow: inset 3px 0 0 var(--stx-co-orange);
}

body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method label,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--stx-co-ink);
  padding: 14px 16px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method label .amount,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods label .amount,
body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method label .woocommerce-Price-amount,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods label .woocommerce-Price-amount {
  margin-left: auto;
  font-weight: 800;
  white-space: nowrap;
  color: var(--stx-co-navy);
}

body.stx-classic-checkout .stx-checkout-shipping-slot input[type="radio"] {
  /* Visually present for a11y — never display:none on native radios. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pseudo radio — must match #shipping_method ID specificity of base + checked rules. */
body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method label::before,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods label::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--stx-co-navy);
  background-color: #fff;
  box-shadow: none;
  box-sizing: border-box;
}

body.stx-classic-checkout .stx-checkout-shipping-slot #shipping_method li:has(input:checked) label::before,
body.stx-classic-checkout .stx-checkout-shipping-slot .woocommerce-shipping-methods li:has(input:checked) label::before {
  border-color: var(--stx-co-orange);
  /* Filled center dot (box-shadow — avoids radial-gradient double-stop gaps). */
  background-color: #fff;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--stx-co-orange);
}

body.stx-classic-checkout .stx-checkout-summary__ship-chosen {
  text-align: right;
  font-weight: 600;
  color: var(--stx-co-ink);
  white-space: normal;
}

/* Summary must never show interactive shipping controls. */
body.stx-classic-checkout .stx-checkout-summary input[name^="shipping_method"],
body.stx-classic-checkout .stx-checkout-summary #shipping_method,
body.stx-classic-checkout .stx-checkout-summary .woocommerce-shipping-methods {
  display: none !important;
}

/* Form fields — prevent overflow, touch-friendly */
body.stx-classic-checkout .woocommerce-input-wrapper,
body.stx-classic-checkout .form-row {
  max-width: 100%;
}

body.stx-classic-checkout .form-row input.input-text,
body.stx-classic-checkout .form-row textarea,
body.stx-classic-checkout .form-row select,
body.stx-classic-checkout .select2-container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

body.stx-classic-checkout .form-row input.input-text,
body.stx-classic-checkout .form-row select,
body.stx-classic-checkout .select2-container .select2-selection--single {
  min-height: 44px;
}

body.stx-classic-checkout .form-row,
body.stx-classic-checkout .form-row-first,
body.stx-classic-checkout .form-row-last,
body.stx-classic-checkout .form-row-wide {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  clear: none;
  box-sizing: border-box;
}

body.stx-classic-checkout .stx-checkout-form,
body.stx-classic-checkout .stx-checkout-layout {
  overflow-x: clip;
  max-width: 100%;
}

/* Do NOT clip #payment / #order_review — overflow-x:clip breaks iframe hosted fields
   (Authorize.Net Accept.js, Stripe Elements, etc.). */
body.stx-classic-checkout #order_review,
body.stx-classic-checkout #payment,
body.stx-classic-checkout .woocommerce-checkout-payment {
  overflow: visible;
  max-width: 100%;
}

/* Keep shipping notices visible — do not clip the main column */
body.stx-classic-checkout .stx-checkout-main,
body.stx-classic-checkout .stx-checkout-shipping-details,
body.stx-classic-checkout .stx-checkout-section {
  overflow: visible;
  max-width: 100%;
}

body.stx-classic-checkout #payment .place-order .button,
body.stx-classic-checkout #place_order {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--stx-co-orange);
  border: 2px solid var(--stx-co-orange);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

body.stx-classic-checkout #payment .place-order .button:hover,
body.stx-classic-checkout #place_order:hover {
  background: var(--stx-co-orange-dark);
  border-color: var(--stx-co-orange-dark);
  color: #fff;
}

/* Hide shipping methods until dealer/pickup ready (opacity — not display:none) */
body.stx-classic-checkout:not(.stx-checkout-shipping-ready) .woocommerce-shipping-totals,
body.stx-classic-checkout:not(.stx-checkout-shipping-ready) #shipping_method {
  opacity: 0.35;
  pointer-events: none;
}

body.stx-classic-checkout #payment .payment_methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

body.stx-classic-checkout #payment .payment_methods > li {
  flex: 1 1 auto;
  margin: 0;
  border: 2px solid var(--stx-co-navy);
  border-radius: 4px;
  background: var(--stx-co-card);
  padding: 14px 16px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.stx-classic-checkout #payment .payment_methods > li:has(input:checked),
body.stx-classic-checkout #payment .payment_methods > .wc_payment_method:has(input:checked) {
  border-color: var(--stx-co-orange);
  background: #fffaf3;
  box-shadow: inset 3px 0 0 var(--stx-co-orange);
}

body.stx-classic-checkout #payment .payment_methods > li > label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--stx-co-navy);
  letter-spacing: 0.01em;
  margin: 0;
  cursor: pointer;
}

/*
 * Hide Visa/MC/Amex/Discover brand logos beside the gateway title.
 * Do NOT touch inputs, labels text, or Auth.net fields inside .payment_box.
 */
body.stx-classic-checkout #payment .payment_methods > li > label img,
body.stx-classic-checkout #payment .payment_methods > li > img,
body.stx-classic-checkout #payment .payment_methods > li img,
body.stx-classic-checkout #payment .payment_methods .payment-method-icons,
body.stx-classic-checkout #payment .payment_methods .wc-credit-card-form__card-icons,
body.stx-classic-checkout #payment .payment_methods .sv-wc-payment-gateway-card-icons,
body.stx-classic-checkout #payment .payment_methods .sv-wc-payment-gateway-icon,
body.stx-classic-checkout #payment .payment_methods .card-type,
body.stx-classic-checkout #payment .payment_methods [class*="card-icon"],
body.stx-classic-checkout #payment .payment_methods [class*="card_icon"],
body.stx-classic-checkout #payment .payment_methods [class*="card-brand"],
body.stx-classic-checkout #payment .payment_methods [class*="card_brand"] {
  display: none !important;
}

/* If a gateway ever places an image inside .payment_box, keep it (fields stay usable). */
body.stx-classic-checkout #payment .payment_methods > li .payment_box img {
  display: inline-block !important;
  max-height: 24px;
  width: auto;
}

/*
 * Woo hides the sole gateway radio with jQuery .hide() (display:none) — that is fine
 * for submit if the input stays present, enabled, and checked in form.checkout.
 * Theme must NOT remove/disable/rename those inputs, and must not use display:none
 * rules that also set disabled or strip name=payment_method.
 */

body.stx-classic-checkout #payment .payment_box {
  background: #f7f9fb;
  border: 1px solid var(--stx-co-line);
  border-radius: 4px;
  padding: 16px 18px;
  margin: 12px 0 0;
  overflow: visible;
}

body.stx-classic-checkout #payment .payment_box p {
  margin: 0 0 12px;
  color: var(--stx-co-muted);
  font-size: 13px;
  line-height: 1.45;
}

body.stx-classic-checkout #payment .payment_box fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

body.stx-classic-checkout #payment .payment_box .form-row {
  margin-bottom: 12px;
}

body.stx-classic-checkout #payment .payment_box label {
  font-size: 13px;
  font-weight: 600;
  color: var(--stx-co-ink);
}

body.stx-classic-checkout #payment .payment_box input.input-text,
body.stx-classic-checkout #payment .payment_box select {
  min-height: 44px;
  border: 1px solid var(--stx-co-line);
  border-radius: 4px;
  background: #fff;
}

body.stx-classic-checkout #payment .payment_box input.input-text:focus,
body.stx-classic-checkout #payment .payment_box select:focus {
  border-color: var(--stx-co-orange);
  outline: 2px solid rgba(217, 119, 6, 0.22);
  outline-offset: 1px;
}

/* Terms / privacy checkbox — keep native Woo control usable */
body.stx-classic-checkout #payment .woocommerce-terms-and-conditions-wrapper,
body.stx-classic-checkout #payment .woocommerce-privacy-policy-text,
body.stx-classic-checkout #payment .form-row.validate-required {
  overflow: visible;
}

body.stx-classic-checkout #payment .woocommerce-form__label-for-checkbox,
body.stx-classic-checkout #payment label.woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
  color: var(--stx-co-ink);
}

body.stx-classic-checkout #payment .woocommerce-form__input-checkbox,
body.stx-classic-checkout #payment input[name="terms"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--stx-co-orange);
}

/* Never hide the Woo payment block with theme rules (table hide is separate above). */
body.stx-classic-checkout #payment.woocommerce-checkout-payment {
  display: block;
  visibility: visible;
}

body.stx-classic-checkout .stx-checkout-coupon {
  margin: 16px 0;
}

body.stx-classic-checkout .stx-checkout-transfer-ack {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--stx-co-line);
  background: #fff;
}

body.stx-classic-checkout #stx-ffl-checkout {
  display: none !important;
}

/* Dealer modal — wide on desktop */
.stx-dealer-modal[hidden] {
  display: none !important;
}

body.stx-dealer-modal-open {
  overflow: hidden;
}

.stx-dealer-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
}

.stx-dealer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.7);
}

.stx-dealer-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  color: #1a1d21;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.stx-dealer-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: #1a1d21;
  color: #fff;
}

.stx-dealer-modal__header h2 {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.stx-dealer-modal__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.stx-dealer-modal__search {
  display: grid;
  grid-template-columns: 1fr 140px 1fr auto auto;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #d8dde3;
}

.stx-dealer-modal__search input,
.stx-dealer-modal__search select {
  min-height: 42px;
  border: 1px solid #d8dde3;
  padding: 0 10px;
}

.stx-dealer-modal__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  flex: 1;
}

.stx-dealer-modal__list {
  overflow: auto;
  max-height: 60vh;
  padding: 12px;
  border-right: 1px solid #d8dde3;
}

.stx-dealer-modal__map {
  min-height: 320px;
  background: #eef2f6;
}

.stx-ffl-dealer-card {
  list-style: none;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #d8dde3;
  background: #fff;
}

.stx-ffl-dealer-card .is-selected,
.stx-ffl-list-div.is-selected {
  outline: 2px solid #1e5a8a;
}

.stx-ffl-select-dealer {
  margin-top: 10px;
  width: 100%;
}

.stx-dealer-modal__mobile-toggle {
  display: none;
  gap: 8px;
  padding: 8px 16px;
}

.stx-dealer-modal__status {
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  color: #5b6570;
}

/* Tablet: keep two columns down to 768px */
@media (max-width: 1100px) and (min-width: 768px) {
  body.stx-classic-checkout .stx-checkout-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
    gap: 32px;
  }

  body.stx-classic-checkout .stx-fulfillment-options {
    grid-template-columns: 1fr;
  }
}

/* Phone / small tablet only — Contact → Shipping → Summary below 768px */
@media (max-width: 375px) {
  body.stx-classic-checkout {
    --stx-co-gutter: 12px;
  }

  body.stx-classic-checkout .stx-checkout-layout,
  body.stx-classic-checkout .stx-checkout-header__inner {
    width: calc(100% - 24px);
  }

  body.stx-classic-checkout .stx-checkout-step__title {
    font-size: clamp(1.4rem, 7vw, 1.75rem);
    overflow-wrap: anywhere;
  }

  body.stx-classic-checkout #payment .place-order .button,
  body.stx-classic-checkout #place_order,
  body.stx-classic-checkout .stx-btn--wide {
    min-height: 48px;
  }
}

@media (max-width: 767px) {
  body.stx-classic-checkout {
    --stx-co-gutter: 16px;
    overflow-x: clip;
  }

  body.stx-classic-checkout .stx-checkout-layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    width: calc(100% - 32px);
    gap: 20px;
  }

  body.stx-classic-checkout .stx-checkout-main {
    order: 1;
    width: 100%;
  }

  body.stx-classic-checkout .stx-checkout-header__inner {
    width: calc(100% - 32px);
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
  }

  body.stx-classic-checkout .stx-checkout-header__brand {
    display: none !important;
  }

  body.stx-classic-checkout .stx-checkout-summary {
    position: static;
    order: 2;
    width: 100%;
  }

  body.stx-classic-checkout .stx-checkout-summary__card {
    padding: 14px;
  }

  body.stx-classic-checkout .stx-checkout-summary__line {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
  }

  body.stx-classic-checkout .stx-checkout-summary__media,
  body.stx-classic-checkout .stx-checkout-summary__thumb {
    width: 56px;
    height: 56px;
  }

  body.stx-classic-checkout .stx-checkout-section {
    padding: 16px;
    margin-bottom: 14px;
  }

  body.stx-classic-checkout .stx-checkout-step__title {
    font-size: 28px;
  }

  body.stx-classic-checkout .woocommerce-shipping-fields__field-wrapper,
  body.stx-classic-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  body.stx-classic-checkout .form-row-first,
  body.stx-classic-checkout .form-row-last,
  body.stx-classic-checkout .form-row-wide {
    width: 100% !important;
    float: none !important;
  }

  body.stx-classic-checkout #first_last_notice,
  body.stx-classic-checkout #mixed_cart_notice,
  body.stx-classic-checkout .stx-checkout-shipping-details .notice {
    font-size: 13px;
    padding: 10px 12px !important;
  }

  body.stx-classic-checkout .stx-btn--wide,
  body.stx-classic-checkout #payment .place-order .button,
  body.stx-classic-checkout #place_order {
    max-width: none;
    width: 100%;
  }

  body.stx-classic-checkout .stx-checkout-steps__label {
    display: none;
  }

  body.stx-classic-checkout .stx-checkout-back {
    width: 100%;
    margin-bottom: 12px;
  }

  body.stx-classic-checkout #payment ul.payment_methods li {
    padding: 10px 0;
  }

  body.stx-classic-checkout #payment .payment_box {
    padding: 12px;
    overflow-x: auto;
  }

  /* g-FFL dealer panel — stack search/map columns on small screens */
  body.stx-classic-checkout #ffl_container,
  body.stx-classic-checkout .stx-checkout-ffl-panel {
    max-width: 100%;
    overflow-x: clip;
  }

  body.stx-classic-checkout #ffl_container .ffl_checkout_columns,
  body.stx-classic-checkout #ffl_container .ffl_checkout_column {
    display: block;
    width: 100% !important;
    margin: 0 0 8px;
  }

  body.stx-classic-checkout #ffl-list,
  body.stx-classic-checkout #ffl-map,
  body.stx-classic-checkout .ffl-map-resize {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }

  body.stx-classic-checkout #ffl_container input,
  body.stx-classic-checkout #ffl_container select,
  body.stx-classic-checkout #ffl_container button {
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .stx-dealer-modal__search {
    grid-template-columns: 1fr;
  }

  .stx-dealer-modal__body {
    grid-template-columns: 1fr;
  }

  .stx-dealer-modal__mobile-toggle {
    display: flex;
  }

  .stx-dealer-modal__map {
    display: none;
  }

  .stx-dealer-modal.is-map-view .stx-dealer-modal__list {
    display: none;
  }

  .stx-dealer-modal.is-map-view .stx-dealer-modal__map {
    display: block;
  }
}

body.stx-classic-checkout .stx-checkout-account {
  margin-top: 12px;
  border-top: 1px solid var(--stx-co-line);
  padding-top: 10px;
}

body.stx-classic-checkout .stx-checkout-account summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--stx-co-muted);
}

body.stx-classic-checkout .stx-billing-same {
  margin: 16px 0 8px;
}

body.stx-classic-checkout .stx-hide-woo-ship-toggle,
body.stx-classic-checkout #ship-to-different-address-checkbox,
body.stx-classic-checkout .woocommerce-shipping-fields > h3#ship-to-different-address {
  display: none !important;
}

body.stx-classic-checkout.stx-checkout-mode-accessory #stx-checkout-fulfillment,
body.stx-classic-checkout.stx-checkout-mode-accessory #stx-checkout-dealer,
body.stx-classic-checkout.stx-checkout-mode-accessory .stx-checkout-transfer-ack,
body.stx-classic-checkout.stx-checkout-mode-accessory [data-stx-summary-ffl],
body.stx-classic-checkout.stx-checkout-mode-accessory #ffl_container,
body.stx-classic-checkout.stx-checkout-mode-accessory [data-stx-ffl-slot] {
  display: none !important;
}

body.stx-classic-checkout .stx-checkout-empty {
  max-width: 480px;
  margin: 48px auto;
  text-align: center;
  padding: 24px;
}

body.stx-classic-checkout .stx-checkout-footer,
.stx-footer--checkout .stx-checkout-footer {
  padding: 28px 24px 40px;
  text-align: center;
}

.stx-footer--checkout {
  background: #f5f6f8;
  border-top: 1px solid #d8dde3;
  margin-top: 0;
}

.stx-checkout-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  margin-bottom: 12px;
}

.stx-checkout-footer__links a {
  color: #1e5a8a;
  text-decoration: none;
  font-size: 14px;
}

.stx-checkout-footer__notice {
  max-width: 640px;
  margin: 0 auto 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #5b6570;
}

.stx-checkout-footer__copy {
  font-size: 12px;
  color: #8a939c;
  margin: 0;
}

/* Hide marketing chrome leftovers on checkout if any slip through */
body.stx-classic-checkout .stx-footer-cta,
body.stx-classic-checkout .stx-footer-service-band,
body.stx-classic-checkout .stx-footer-newsletter-panel {
  display: none !important;
}

/* g-FFL Checkout dealer panel — light STX panel chrome; never change field names/IDs */
body.stx-classic-checkout .stx-checkout-ffl-panel:not([hidden]),
body.stx-classic-checkout #ffl_container {
  color: var(--stx-co-ink);
}

body.stx-classic-checkout .ffl-dealer-heading {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
  color: var(--stx-co-ink);
  border-bottom: 1px solid var(--stx-co-line);
  padding-bottom: 8px;
}

body.stx-classic-checkout .ffl-widget input[type="text"],
body.stx-classic-checkout .ffl-widget input[type="search"],
body.stx-classic-checkout .ffl-widget select,
body.stx-classic-checkout #ffl_container input[type="text"],
body.stx-classic-checkout #ffl_container input[type="search"],
body.stx-classic-checkout #ffl_container select {
  background: #fff;
  border: 1px solid var(--stx-co-line);
  color: var(--stx-co-ink);
  border-radius: 2px;
  padding: 0.55rem 0.75rem;
  min-height: 44px;
  box-sizing: border-box;
}

body.stx-classic-checkout .ffl-widget button,
body.stx-classic-checkout #ffl_container button:not(.remove):not(.selectedFFLDivButton) {
  background: var(--stx-co-blue);
  border: 2px solid var(--stx-co-blue);
  color: #fff;
  font-weight: 700;
  border-radius: 2px;
  padding: 0.55rem 1rem;
  min-height: 44px;
  cursor: pointer;
}

body.stx-classic-checkout .ffl-widget button:hover,
body.stx-classic-checkout #ffl_container button:not(.remove):hover {
  background: var(--stx-co-blue-dark);
  border-color: var(--stx-co-blue-dark);
}

body.stx-classic-checkout .stx-checkout-shipping-wrap .woocommerce-shipping-fields,
body.stx-classic-checkout #customer_details {
  width: 100%;
}

/* Ensure Woo shipping field groups never inherit half-column floats from plugins */
body.stx-classic-checkout .woocommerce-shipping-fields,
body.stx-classic-checkout .woocommerce-billing-fields,
body.stx-classic-checkout .woocommerce-additional-fields {
  width: 100% !important;
  float: none !important;
  max-width: 100% !important;
}

/* Document upload (g-FFL) — keep visible, fit STX step-2 card rhythm */
body.stx-classic-checkout .ffl-document-upload,
body.stx-classic-checkout [class*="ffl_document"],
body.stx-classic-checkout [id*="ffl_document"] {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  body.stx-classic-checkout .ffl-dealer-heading {
    font-size: 20px;
  }
}


