/* ==========================================================
   KSC configurator UI — single set, 3 horizontal steps
   Warm flat theme with green accents
   Rewritten: 2026-07-20
   ========================================================== */

/* ---------- Design tokens ---------- */
.ksc {
  --ksc-bg: #FAF7F2;
  --ksc-panel: #F3EDE3;
  --ksc-card: #ffffff;
  --ksc-ink: #221d18;
  --ksc-text: #221d18;
  --ksc-muted: #6E6256;
  --ksc-sand: #E8D5B7;
  --ksc-line: rgba(110, 98, 86, .22);
  --ksc-green: #3f6f56;
  --ksc-green-dark: #2f5140;
  --ksc-green-bright: #15864d;
  --ksc-green-soft: rgba(63, 111, 86, .1);
  --ksc-danger: #b42318;

  --ksc-radius-xs: 10px;
  --ksc-radius-sm: 14px;
  --ksc-radius-md: 18px;
  --ksc-radius-lg: 24px;

  background: var(--ksc-bg);
  color: var(--ksc-text);
  font-family: inherit;
  isolation: isolate;
  width: 100%;
}

.ksc,
.ksc *,
.ksc *::before,
.ksc *::after {
  box-sizing: border-box !important;
  letter-spacing: normal !important;
}

.ksc button,
.ksc a,
.ksc input,
.ksc textarea,
.ksc select {
  font-family: inherit;
}

.ksc :where(button, input, textarea, select) {
  -webkit-appearance: none;
  appearance: none;
}

.ksc button {
  -webkit-tap-highlight-color: transparent;
}

.ksc a {
  color: inherit;
  text-decoration: none;
}

.ksc img,
.ksc video,
.ksc iframe {
  max-width: 100%;
}

.ksc del,
.ksc del * {
  text-decoration: line-through;
}

/* ---------- Page layout ---------- */
.ksc-body-picker,
.ksc-flow {
  margin: 0 auto;
  max-width: 1360px;
  padding: clamp(16px, 3vw, 34px);
}

.ksc--embedded {
  background: transparent !important;
  clear: both;
  margin: 34px 0;
}

.ksc--embedded .ksc-flow {
  padding-left: 0;
  padding-right: 0;
}

/* ---------- Typography ---------- */
.ksc h1,
.ksc h2,
.ksc h3 {
  color: var(--ksc-ink);
  line-height: 1.06;
  margin: 0;
}

.ksc h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
}

.ksc h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 900;
}

.ksc-eyebrow {
  align-items: center;
  background: var(--ksc-sand);
  border: 0;
  border-radius: 999px;
  color: var(--ksc-muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin: 0 0 12px;
  padding: 9px 13px;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.ksc-button,
.ksc-body-card__action {
  align-items: center;
  background: var(--ksc-green);
  border: 1px solid var(--ksc-green);
  border-radius: 999px;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  line-height: 1.15;
  min-height: 48px;
  padding: 13px 22px;
  text-align: center;
  text-transform: none !important;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ksc-button:hover,
.ksc-button:focus-visible,
.ksc-body-card:hover .ksc-body-card__action {
  background: var(--ksc-green-dark) !important;
  border-color: var(--ksc-green-dark) !important;
  color: #fff !important;
  outline: none;
  transform: translateY(-1px);
}

.ksc-button--secondary {
  background: var(--ksc-bg) !important;
  border-color: rgba(110, 98, 86, .34) !important;
  color: var(--ksc-muted) !important;
}

.ksc-button--secondary:hover,
.ksc-button--secondary:focus-visible {
  background: #fff !important;
  border-color: rgba(110, 98, 86, .5) !important;
  color: var(--ksc-ink) !important;
  transform: none;
}

.ksc-button--large {
  font-size: 15px;
  min-height: 54px;
  padding: 14px 30px;
}

.ksc-button--small {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 18px;
}

.ksc-button:disabled {
  cursor: not-allowed;
  opacity: .52;
  transform: none;
}

.ksc-link-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ksc-green);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  min-height: 28px;
  padding: 0;
}

.ksc-link-button::after {
  content: "›";
  font-size: 17px;
  line-height: 1;
  margin-left: 5px;
}

.ksc-link-button:hover,
.ksc-link-button:focus-visible {
  color: var(--ksc-green-dark);
  outline: none;
  text-decoration: underline;
}

.ksc-link-button--muted {
  color: var(--ksc-muted);
}

.ksc-link-button--muted::after {
  content: "×";
}

.ksc-link-button:disabled {
  color: var(--ksc-muted);
  cursor: not-allowed;
  opacity: .55;
}

/* Catalog "Konfigurieren" button */
.ksc-configure-product {
  box-shadow: none !important;
  color: #fff !important;
  font-family: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.ksc-configure-product:hover,
.ksc-configure-product:focus {
  background: var(--ksc-green-dark, #2f5140) !important;
  border-color: var(--ksc-green-dark, #2f5140) !important;
  color: #fff !important;
}

/* ---------- Flow header ---------- */
.ksc-flow__header {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 22px;
}

.ksc-flow__intro {
  min-width: 0;
}

.ksc-flow__lead {
  color: var(--ksc-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  margin: 10px 0 0;
  max-width: 560px;
}

/* Set-price info block (top right) */
.ksc-benefits {
  align-content: center;
  background: var(--ksc-panel);
  border-radius: var(--ksc-radius-md);
  display: grid;
  gap: 4px;
  min-width: 220px;
  max-width: 260px;
  padding: 16px 20px;
}

.ksc-benefits.is-active {
  background: var(--ksc-green);
}

.ksc-benefits__title {
  color: var(--ksc-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ksc-benefits__value {
  color: var(--ksc-ink);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 900;
  line-height: 1.05;
}

.ksc-benefits__hint {
  color: var(--ksc-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.ksc-benefits.is-active .ksc-benefits__title,
.ksc-benefits.is-active .ksc-benefits__hint {
  color: var(--ksc-sand);
}

.ksc-benefits.is-active .ksc-benefits__value,
.ksc-benefits.is-active .ksc-benefits__value .woocommerce-Price-amount {
  color: #fff !important;
}

/* ---------- Steps (horizontal) ---------- */
.ksc-steps {
  counter-reset: ksc-step;
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.ksc-step {
  background: var(--ksc-panel);
  border-radius: var(--ksc-radius-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(14px, 1.8vw, 20px);
  position: relative;
}

.ksc-step.is-next {
  outline: 2px solid var(--ksc-green);
  outline-offset: -2px;
}

.ksc-step__header {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.ksc-step__num {
  align-items: center;
  background: var(--ksc-sand);
  border-radius: 999px;
  color: var(--ksc-muted);
  display: flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.ksc-step.is-done .ksc-step__num {
  background: var(--ksc-green-bright);
  color: #fff;
}

.ksc-step__heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ksc-step__heading strong {
  color: var(--ksc-ink);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 900;
  line-height: 1.15;
}

.ksc-step__heading small {
  color: var(--ksc-muted);
  font-size: 11px;
  font-weight: 750;
}

.ksc-step__bonus {
  background: var(--ksc-green);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}

.ksc-step__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
}

.ksc-step__product {
  background: var(--ksc-card);
  border-radius: var(--ksc-radius-sm);
  display: grid;
  gap: 12px;
  grid-template-columns: 74px minmax(0, 1fr);
  padding: 10px;
}

.ksc-step__image,
.ksc-step__thumb {
  background: var(--ksc-bg);
  border-radius: var(--ksc-radius-xs);
  display: block;
  overflow: hidden;
}

.ksc-step__image {
  aspect-ratio: 1;
  align-self: start;
}

.ksc-step__image img,
.ksc-step__thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ksc-step__info {
  align-content: center;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ksc-step__info strong {
  color: var(--ksc-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ksc-step__info small {
  color: var(--ksc-muted);
  display: -webkit-box;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ksc-step__price {
  align-items: baseline;
  color: var(--ksc-green) !important;
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  gap: 6px;
}

.ksc-step__price del {
  color: var(--ksc-muted);
  font-size: 12px;
  font-weight: 750;
}

.ksc-step__empty {
  color: var(--ksc-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}

.ksc-step__empty strong {
  color: var(--ksc-green);
}

.ksc-step__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
}

/* ---------- Step 2: heater type cards ---------- */
/* The choice between an electric and a wood-fired heater is the step itself,
   so the two options are cards in the flow rather than rows in a popup. */
.ksc-heater-types {
  display: grid;
  gap: 10px;
}

.ksc-heater-type {
  align-items: center;
  background: var(--ksc-card);
  border: 2px solid transparent;
  border-radius: var(--ksc-radius-sm);
  color: inherit;
  cursor: pointer;
  display: grid;
  /* A theme's own button styling would otherwise reach these — the card is a
     <button> so the whole thing is one click target. */
  font: inherit;
  gap: 12px;
  grid-template-columns: 26px 62px minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
  text-align: left;
  text-transform: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 100%;
}

/* No photo yet — the card is just the type until a heater is picked. */
.ksc-heater-type--plain {
  grid-template-columns: 26px minmax(0, 1fr);
}

.ksc-heater-type:hover {
  border-color: var(--ksc-line);
  transform: translateY(-1px);
}

.ksc-heater-type.is-selected {
  border-color: var(--ksc-green-bright);
  box-shadow: 0 0 0 4px var(--ksc-green-soft);
}

.ksc-heater-type:focus-visible {
  outline: 2px solid var(--ksc-green);
  outline-offset: 2px;
}

.ksc-heater-type__check {
  align-items: center;
  background: transparent;
  border: 1px solid var(--ksc-line);
  border-radius: 999px;
  color: var(--ksc-ink);
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.ksc-heater-type.is-selected .ksc-heater-type__check {
  background: var(--ksc-green-bright);
  border-color: var(--ksc-green-bright);
  color: #fff;
}

.ksc-heater-type__image {
  aspect-ratio: 1;
  background: var(--ksc-bg);
  border-radius: var(--ksc-radius-xs);
  display: block;
  overflow: hidden;
}

.ksc-heater-type__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ksc-heater-type__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ksc-heater-type__label {
  color: var(--ksc-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em !important;
  text-transform: uppercase;
}

.ksc-heater-type.is-selected .ksc-heater-type__label {
  color: var(--ksc-green-bright);
}

.ksc-heater-type__body strong {
  color: var(--ksc-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ksc-heater-type__hint {
  color: var(--ksc-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.ksc-step__list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Up to 4 accessories stack in one column, from 5 on they flow 2 per row. */
.ksc-step__list--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ksc-step__list-item {
  align-items: center;
  background: var(--ksc-card);
  border-radius: var(--ksc-radius-sm);
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 8px 10px;
}

.ksc-step__thumb {
  aspect-ratio: 1;
  height: 44px;
  width: 44px;
}

.ksc-step__list-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ksc-step__list-body strong {
  color: var(--ksc-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ksc-step__list-body .ksc-step__price {
  font-size: 13px;
}

.ksc-step__qty {
  color: var(--ksc-green);
  font-weight: 900;
}

.ksc-included {
  color: var(--ksc-green) !important;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

/* ---------- Summary ---------- */
.ksc-summary {
  background: var(--ksc-panel);
  border-radius: var(--ksc-radius-md);
  box-shadow: 0 12px 32px rgba(34, 29, 24, .08);
  display: grid;
  gap: 14px;
  padding: clamp(14px, 1.8vw, 20px);
}

.ksc-summary__rows {
  display: grid;
  gap: 6px;
}

.ksc-summary__row {
  align-items: baseline;
  color: var(--ksc-muted);
  display: flex;
  font-size: 13px;
  font-weight: 750;
  gap: 12px;
  justify-content: space-between;
}

.ksc-summary__row strong {
  color: var(--ksc-ink);
  font-weight: 900;
  white-space: nowrap;
}

.ksc-summary__row--savings,
.ksc-summary__row--savings strong {
  color: var(--ksc-green-bright) !important;
}

.ksc-summary__total {
  align-items: center;
  border-top: 1px solid var(--ksc-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: space-between;
  padding-top: 14px;
}

.ksc-summary__total > div {
  display: grid;
  gap: 2px;
}

.ksc-summary__total span {
  color: var(--ksc-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

/* The "z VAT" suffix rides along with the total, quieter than the number. */
.ksc .woocommerce-price-suffix {
  color: var(--ksc-muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ksc-sticky-summary .woocommerce-price-suffix {
  font-size: 11px;
}

.ksc-summary__total strong {
  color: var(--ksc-green) !important;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

/* ---------- Sticky summary ---------- */
.ksc-sticky-summary {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(243, 237, 227, .94);
  border: 0;
  border-radius: 22px;
  bottom: 14px;
  box-shadow: 0 -10px 32px rgba(68, 68, 68, .12) !important;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  left: 50%;
  max-width: 760px;
  padding: 12px 16px;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  /* One below the modal (2147483000) so an open modal still covers it. */
  z-index: 999999999;
}

.ksc-sticky-summary__price {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ksc-sticky-summary__price > span {
  color: var(--ksc-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.ksc-sticky-summary__price strong {
  color: var(--ksc-green) !important;
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

/* The theme's own sticky add-to-cart bar shows the base product price only,
   which would contradict the configurator's live total right above it. */
.wd-sticky-btn {
  display: none !important;
}

/* On configurator (body) products the configurator handles the purchase,
   so the native WooCommerce quantity + add-to-cart form is removed. This covers
   block-based themes (Woodmart) where remove_action() alone is not enough. */
.ksc-base-product.single-product form.cart,
.ksc-base-product.single-product .wd-sticky-content,
.ksc-base-product.single-product .single_add_to_cart_button {
  display: none !important;
}

/* Hide the native product price on the configurator product page — the
   configurator shows the live total instead.

   Two independent hooks so it works on any theme, block or classic, and with no
   flash before JS runs:
   1) body:has(.ksc[data-ksc-configurator]) matches at CSS-parse time on any page
      that contains the configurator (body products) — no body class or JS
      needed. The catalog/loop has no configurator, so its price stays.
   2) the .ksc-base-product body-class fallback (the class is also added by JS).

   Woodmart's block template wraps the price in .wd-single-price; .price /
   .woocommerce-Price-amount cover the classic and inner markup. The configurator
   renders after the summary and uses .ksc-* classes (not .price), so its totals
   are never touched; related/upsell loops are re-shown below. */
body:has(.ksc[data-ksc-configurator]) .wd-single-price,
body:has(.ksc[data-ksc-configurator]) .summary .price,
body:has(.ksc[data-ksc-configurator]) .entry-summary .price,
.ksc-base-product.single-product .wd-single-price,
.ksc-base-product.single-product .price,
.ksc-base-product.single-product .wd-sticky-price,
.ksc-base-product.single-product .summary .woocommerce-Price-amount {
  display: none !important;
}

body:has(.ksc[data-ksc-configurator]) .related .price,
body:has(.ksc[data-ksc-configurator]) .up-sells .price,
body:has(.ksc[data-ksc-configurator]) .cross-sells .price,
body:has(.ksc[data-ksc-configurator]) .products .price,
.ksc-base-product.single-product .ksc .price,
.ksc-base-product.single-product .related .price,
.ksc-base-product.single-product .up-sells .price,
.ksc-base-product.single-product .cross-sells .price,
.ksc-base-product.single-product .products .price {
  display: revert !important;
}

/* ---------- Roof shingle picker (above the short description) ---------- */
.ksc-shingle {
  margin: 0 0 18px;
}

.ksc-shingle__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ksc-shingle__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ksc-shingle__option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ksc-shingle__option:has(input:checked) {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor inset;
}

.ksc-shingle__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ksc-shingle__swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex: none;
}

.ksc-shingle__swatch--red {
  background: #9c2b23;
}

.ksc-shingle__swatch--graphite {
  background: #3c4145;
}

/* Surcharge lines in the cart carry a flat graphite rectangle instead of the
   korpus photo; keep it inside whatever box the theme gives the thumbnail. */
.ksc-surcharge-thumb {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.ksc-shingle__name {
  font-weight: 600;
}

.ksc-shingle__price {
  font-style: normal;
  font-weight: 600;
  opacity: 0.75;
}

/* ---------- Sauna picker (shortcode without product) ---------- */
.ksc-body-picker__header {
  margin-bottom: 22px;
}

.ksc-body-grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ksc-body-card {
  background: var(--ksc-panel);
  border: 0;
  border-radius: var(--ksc-radius-md);
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: transform .22s ease;
}

.ksc-body-card:hover {
  transform: translateY(-3px);
}

.ksc-body-card a {
  display: grid;
  gap: 12px;
  height: 100%;
  padding: 14px;
}

.ksc-body-card__image {
  aspect-ratio: 1.35;
  background: var(--ksc-bg);
  border-radius: var(--ksc-radius-sm);
  overflow: hidden;
}

.ksc-body-card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
  width: 100%;
}

.ksc-body-card:hover .ksc-body-card__image img {
  transform: scale(1.045);
}

.ksc-body-card__body {
  display: grid;
  gap: 6px;
}

.ksc-body-card__body strong {
  color: var(--ksc-ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.ksc-body-card__body small {
  color: var(--ksc-muted);
  display: -webkit-box;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ksc-body-card__body em {
  color: var(--ksc-green);
  font-size: 19px;
  font-style: normal;
  font-weight: 900;
}

/* ---------- Product tab bridge (Saunaofen tab) ---------- */
.ksc-heater-tab {
  color: var(--ksc-text, #221d18);
}

.ksc-heater-tab__card,
.ksc-heater-tab__empty {
  align-items: center;
  background: var(--ksc-panel, #F3EDE3);
  border: 0;
  border-radius: var(--ksc-radius-md, 18px);
  display: grid;
  gap: 18px;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  padding: 18px;
}

.ksc-heater-tab__empty {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ksc-heater-tab__image {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 14px;
  display: block;
  overflow: hidden;
}

.ksc-heater-tab__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ksc-heater-tab__body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ksc-heater-tab__eyebrow {
  color: var(--ksc-green, #3f6f56);
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.ksc-heater-tab__card strong,
.ksc-heater-tab__empty strong {
  color: var(--ksc-ink, #221d18);
  display: block;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.14;
}

.ksc-heater-tab__card small,
.ksc-heater-tab__empty p {
  color: var(--ksc-muted, #6E6256);
  display: block;
  margin: 0;
}

.ksc-heater-tab__card em {
  color: var(--ksc-green, #3f6f56);
  font-style: normal;
  font-weight: 900;
}

.ksc-heater-tab__action {
  justify-self: end;
  min-width: 168px;
}

/* ---------- Modal ---------- */
/* Body-level modal host: escapes the theme's stacking contexts so the modal
   always renders above the whole page. Must NOT create its own stacking context
   (isolation:auto, static) and carries no visible box of its own. */
.ksc.ksc-modal-host {
  background: transparent !important;
  isolation: auto;
  margin: 0;
  padding: 0;
  position: static;
  width: auto;
}

.ksc-modal-host:empty {
  display: none;
}

.ksc-modal {
  align-items: center;
  background: rgba(24, 16, 12, .58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2147483000;
}

.ksc-modal__dialog,
.ksc-modal__dialog--wide {
  background: #fff !important;
  border: 0;
  border-radius: var(--ksc-radius-lg);
  color: var(--ksc-text) !important;
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 860px);
  overflow: hidden;
  padding: 0;
  position: relative;
  width: min(100%, 980px);
}

.ksc-modal__body {
  overflow: auto;
  padding: 24px;
}

.ksc-modal__close {
  align-items: center;
  background: var(--ksc-muted);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 34px;
  font-weight: 300;
  height: 52px;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  padding: 0 0 4px;
  position: absolute;
  right: 14px;
  top: 14px;
  transition: background .18s ease, transform .18s ease;
  width: 52px;
  z-index: 5;
}

.ksc-modal__close:hover,
.ksc-modal__close:focus,
.ksc-modal__close:focus-visible {
  background: var(--ksc-green-dark);
  outline: none;
  transform: scale(1.04);
}

.ksc-modal__header {
  border-bottom: 1px solid var(--ksc-line);
  margin-bottom: 18px;
  padding: 0 72px 16px 0;
}

.ksc-modal__header h2 {
  font-size: 30px;
  font-weight: 900;
}

.ksc-modal__footer {
  align-items: center;
  background: var(--ksc-bg);
  border-top: 1px solid var(--ksc-line);
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 14px 24px;
  position: relative;
  z-index: 4;
}

/* ---------- Product grid and product cards ---------- */
.ksc-product-grid {
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ksc-product-grid > .ksc-empty {
  grid-column: 1 / -1;
}

.ksc-product-card {
  background: var(--ksc-panel);
  border: 0;
  border-radius: var(--ksc-radius-md);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: transform .22s ease;
}

.ksc-product-card:hover {
  transform: translateY(-2px);
}

.ksc-product-card.is-selected {
  outline: 2px solid var(--ksc-green);
  outline-offset: -2px;
}

.ksc-product-card.is-disabled {
  opacity: .55;
}

.ksc-product-card button,
.ksc-product-card > .ksc-product-card__select {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  position: relative;
  text-align: center;
  width: 100%;
}

.ksc-product-card button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.ksc-product-card.is-locked .ksc-product-card__select {
  cursor: default;
}

.ksc-product-card button:focus-visible,
.ksc-product-card > .ksc-product-card__select:focus-visible {
  border-radius: var(--ksc-radius-md);
  outline: 2px solid var(--ksc-green);
  outline-offset: -5px;
}

.ksc-product-card__check {
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--ksc-line);
  border-radius: 999px;
  color: var(--ksc-ink);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 28px;
  z-index: 2;
}

.ksc-product-card.is-selected .ksc-product-card__check {
  background: var(--ksc-green-bright);
  border-color: var(--ksc-green-bright);
  color: #fff;
}

.ksc-product-card__image {
  aspect-ratio: 1;
  background: #fff;
  border-radius: var(--ksc-radius-sm);
  overflow: hidden;
}

.ksc-product-card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
  width: 100%;
}

.ksc-product-card:hover .ksc-product-card__image img {
  transform: scale(1.045);
}

.ksc-product-card__body {
  display: grid;
  gap: 5px;
  min-height: 54px;
}

.ksc-product-card__body strong {
  color: var(--ksc-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ksc-product-card__body small {
  color: var(--ksc-muted);
  display: -webkit-box;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ksc-product-card__body em,
.ksc-product-card__body .ksc-step__price {
  align-items: baseline;
  color: var(--ksc-green) !important;
  display: inline-flex;
  flex-wrap: wrap;
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
  gap: 5px;
  justify-content: center;
  margin-top: 2px;
  -webkit-text-fill-color: var(--ksc-green);
}

.ksc-product-card__body .ksc-step__price del,
.ksc-product-card__body .ksc-step__price del * {
  color: var(--ksc-muted) !important;
  font-size: 12px;
  font-weight: 750;
  -webkit-text-fill-color: var(--ksc-muted);
}

.ksc-option-price.is-included {
  color: var(--ksc-green-bright) !important;
  -webkit-text-fill-color: var(--ksc-green-bright);
}

.ksc-product-card__actions {
  align-items: center;
  background: rgba(255, 255, 255, .55);
  border-top: 1px solid var(--ksc-line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 9px 10px 10px;
}

.ksc-product-card__actions > button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ksc-green);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 24px;
}

.ksc-product-card__actions > button:hover,
.ksc-product-card__actions > button:focus-visible {
  color: var(--ksc-green-dark);
  outline: none;
}

/* ---------- Quantity controls ---------- */
.ksc-quantity {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ksc-line);
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 3px;
}

.ksc-quantity button {
  align-items: center;
  background: var(--ksc-bg);
  border: 0;
  border-radius: 999px;
  color: var(--ksc-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 17px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  min-height: 28px;
  padding: 0;
  transition: background .18s ease, color .18s ease;
  width: 28px;
}

.ksc-quantity button:last-child {
  color: var(--ksc-green);
}

.ksc-quantity button:hover {
  background: var(--ksc-green);
  color: #fff;
}

.ksc-quantity strong {
  color: var(--ksc-ink);
  font-size: 13px;
  min-width: 24px;
  text-align: center;
}

/* ---------- Filters ---------- */
.ksc-heater-filters,
.ksc-extras-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ksc-heater-filters button,
.ksc-extras-filters button {
  background: #fff;
  border: 1px solid var(--ksc-line);
  border-radius: 999px;
  color: var(--ksc-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 14px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.ksc-heater-filters button:hover,
.ksc-heater-filters button:focus-visible,
.ksc-heater-filters button.is-active,
.ksc-extras-filters button:hover,
.ksc-extras-filters button:focus-visible,
.ksc-extras-filters button.is-active {
  background: var(--ksc-green);
  border-color: transparent;
  color: #fff;
  outline: none;
}

/* ---------- Detail modal content ---------- */
.ksc-detail {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
}

.ksc-detail__gallery {
  min-width: 0;
}

.ksc-detail__image {
  aspect-ratio: 1;
  background: var(--ksc-bg);
  border-radius: var(--ksc-radius-md);
  overflow: hidden;
  position: relative;
}

.ksc-detail__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ksc-detail__arrow {
  align-items: center;
  background: rgba(68, 68, 68, .72);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 28px;
  height: 42px;
  justify-content: center;
  padding: 0 0 3px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
}

.ksc-detail__arrow--prev { left: 12px; }
.ksc-detail__arrow--next { right: 12px; }

.ksc-detail__counter {
  background: rgba(68, 68, 68, .72);
  border-radius: 8px;
  bottom: 10px;
  color: #fff;
  font-size: 11px;
  padding: 5px 8px;
  position: absolute;
  right: 10px;
}

.ksc-detail__thumbs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.ksc-detail__thumbs button {
  aspect-ratio: 1;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--ksc-radius-xs);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.ksc-detail__thumbs button.is-active {
  border-color: var(--ksc-green);
}

.ksc-detail__thumbs img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ksc-detail__body,
.ksc-detail__description {
  color: var(--ksc-text);
  font-size: 14px;
  line-height: 1.55;
}

.ksc-detail__body > p {
  font-size: 16px;
  font-weight: 750;
  margin-top: 0;
}

/* ---------- Empty/loading/error ---------- */
.ksc-empty,
.ksc-empty-state,
.ksc-error,
.ksc__loading {
  background: #fff !important;
  border: 1px solid var(--ksc-line) !important;
  border-radius: var(--ksc-radius-md);
  color: var(--ksc-muted) !important;
  font-weight: 850;
  margin: 24px auto;
  max-width: 760px;
  padding: 18px;
  text-align: center;
}

/* ---------- WooCommerce price fragments ---------- */
.ksc .woocommerce-Price-amount,
.ksc .woocommerce-Price-currencySymbol {
  color: inherit !important;
  font: inherit !important;
  white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ksc-steps {
    grid-template-columns: 1fr;
  }

  .ksc-step.is-next {
    outline-offset: -2px;
  }
}

@media (max-width: 900px) {
  .ksc-product-grid,
  .ksc-body-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ksc-flow__header {
    grid-template-columns: 1fr;
  }

  .ksc-heater-tab__card,
  .ksc-heater-tab__empty {
    grid-template-columns: 1fr;
  }

  .ksc-heater-tab__image {
    max-width: 132px;
  }

  .ksc-heater-tab__action {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .ksc--embedded {
    padding-bottom: 110px;
  }

  .ksc-sticky-summary {
    bottom: 8px;
    gap: 9px 12px;
    padding: 10px;
    width: calc(100% - 16px);
  }

  .ksc-sticky-summary__price strong {
    font-size: 18px;
  }

  .ksc-summary__total {
    align-items: stretch;
    flex-direction: column;
  }

  .ksc-summary__total .ksc-button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ksc-body-picker,
  .ksc-flow {
    padding: 14px;
  }

  .ksc--embedded .ksc-flow {
    padding-left: 0;
    padding-right: 0;
  }

  .ksc-body-grid {
    grid-template-columns: 1fr;
  }

  .ksc-step__list--grid {
    grid-template-columns: 1fr;
  }

  .ksc-modal {
    align-items: stretch;
    padding: 10px;
  }

  .ksc-modal__dialog,
  .ksc-modal__dialog--wide {
    border-radius: 20px;
    max-height: calc(100vh - 20px);
    width: 100%;
  }

  .ksc-modal__body {
    padding: 18px;
  }

  .ksc-modal__header h2 {
    font-size: 25px;
  }

  .ksc-modal__footer {
    flex-direction: column;
    padding: 12px 18px;
  }

  .ksc-modal__footer .ksc-button {
    width: 100%;
  }

  .ksc-modal .ksc-product-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ksc-modal .ksc-product-card button,
  .ksc-modal .ksc-product-card > .ksc-product-card__select {
    gap: 8px;
    padding: 8px;
  }

  .ksc-modal .ksc-product-card__check {
    height: 24px;
    right: 8px;
    top: 8px;
    width: 24px;
  }

  .ksc-modal .ksc-product-card__body {
    min-height: 0;
  }

  .ksc-modal .ksc-product-card__body strong {
    font-size: 12px;
  }

  .ksc-modal .ksc-product-card__body small {
    font-size: 11px;
    line-height: 1.25;
  }

  .ksc-modal .ksc-product-card__body em {
    font-size: 14px;
  }

  .ksc-modal .ksc-product-card__actions {
    gap: 6px;
    padding: 6px 8px 8px;
  }

  .ksc-modal .ksc-product-card__actions > button {
    font-size: 11px;
  }

  .ksc-detail {
    grid-template-columns: 1fr;
  }
}


/* ---------- GARDJ recommendation (heater picker) ---------- */
.ksc-product-card.is-recommended {
  outline: 1px solid var(--ksc-green-bright);
  outline-offset: -1px;
}
.ksc-product-card.is-recommended.is-selected {
  outline: 2px solid var(--ksc-green-bright);
  outline-offset: -2px;
}
.ksc-reco-badge {
  align-items: center;
  background: var(--ksc-green-bright);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-self: start;
  line-height: 1.1;
  max-width: calc(100% - 34px);
  min-height: 26px;
  overflow: hidden;
  padding: 4px 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-text-fill-color: #fff;
}
.ksc-reco-note {
  color: var(--ksc-green-bright);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}
.ksc-modal .ksc-reco-badge {
  font-size: 11px;
  min-height: 24px;
  padding: 3px 9px;
}
.ksc-modal .ksc-reco-note {
  font-size: 11px;
}
