/**
 * Konfigurator firany NEW - frontend styles - Etap 2.
 * Frontend only: no calculation, no customization, no price changes.
 */
body#product .kfn-configurator,
body#product .kfn-configurator * {
  box-sizing: border-box;
}

body#product .kfn-configurator {
  width: 100%;
  margin: 18px 0 20px;
  clear: both;
}

body#product .kfn-configurator.kfn-is-booting {
  min-height: 54px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body#product .kfn-configurator.kfn-is-ready {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.16s ease;
}

body#product .kfn-box {
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body#product .kfn-header {
  margin: 0 0 14px;
}

body#product .kfn-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

body#product .kfn-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  color: #111827;
}

body#product .kfn-step {
  margin-top: 14px;
}

body#product .kfn-step-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  color: #1f2937;
}

body#product .kfn-step-title-text {
  display: inline;
}

body#product .kfn-field-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border-radius: 999px;
  background: #eef2ff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  outline: none;
  vertical-align: middle;
}

body#product .kfn-field-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

body#product .kfn-field-tooltip-box {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 30;
  width: max-content;
  max-width: min(300px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

body#product .kfn-field-tooltip-box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-right: 1px solid #dbe4f0;
  border-bottom: 1px solid #dbe4f0;
  transform: translate(-50%, -5px) rotate(45deg);
}

body#product .kfn-field-tooltip:hover .kfn-field-tooltip-box,
body#product .kfn-field-tooltip:focus .kfn-field-tooltip-box,
body#product .kfn-field-tooltip:focus-within .kfn-field-tooltip-box {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

body#product .kfn-input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

body#product .kfn-width-input,
body#product .kfn-height-input {
  flex: 0 1 260px;
  width: 260px;
  max-width: 260px;
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 16px;
  line-height: 42px;
}

body#product .kfn-width-input:focus,
body#product .kfn-height-input:focus,
body#product .kfn-note-input:focus {
  border-color: var(--kfn-primary-color, #111827);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.10);
  outline: none;
}

body#product .kfn-variant-height {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

body#product .kfn-pleat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: start;
  overflow: visible;
}

body#product .kfn-pleats {
  display: grid;
  gap: 8px;
  overflow: visible;
}

body#product .kfn-pleat-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  cursor: pointer;
  overflow: visible;
}

body#product .kfn-pleat-option:hover,
body#product .kfn-pleat-option:focus-within,
body#product .kfn-pleat-option.is-active {
  border-color: var(--kfn-primary-color, #111827);
  background: #ffffff;
}

body#product .kfn-pleat-option input[type="radio"] {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin: 0;
  accent-color: var(--kfn-primary-color, #111827);
}

body#product .kfn-pleat-thumb-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  overflow: visible;
  outline: none;
}

body#product img.kfn-pleat-thumb {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  object-fit: cover;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  cursor: zoom-in;
}

body#product .kfn-pleat-text {
  flex: 1 1 auto;
  min-width: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

body#product .kfn-note-wrap {
  margin-top: 14px;
}

body#product .kfn-note-label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}

body#product .kfn-note-label span {
  font-weight: 600;
  color: #6b7280;
}

body#product .kfn-note-input {
  width: 100%;
  max-width: 520px;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

body#product .kfn-note-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
  opacity: 1;
}

body#product .kfn-result-placeholder {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f1f5f9;
}

body#product .kfn-result-placeholder__title {
  margin: 0 0 5px;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

body#product .kfn-result-placeholder__text {
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

body#product .kfn-desktop-pleat-preview {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  pointer-events: none;
  background: transparent;
}

body#product .kfn-desktop-pleat-preview__panel {
  position: fixed;
  width: 360px;
  max-width: min(360px, 38vw);
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.24);
  overflow: visible;
}

body#product .kfn-desktop-pleat-preview__panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  image-rendering: auto;
}

body#product .kfn-desktop-pleat-preview__panel::before,
body#product .kfn-desktop-pleat-preview__panel::after {
  content: "";
  position: absolute;
  top: var(--kfn-preview-arrow-y, 50%);
  width: 0;
  height: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

body#product .kfn-desktop-pleat-preview__panel--left::before {
  right: -13px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 13px solid #d1d5db;
}

body#product .kfn-desktop-pleat-preview__panel--left::after {
  right: -12px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid #ffffff;
}

body#product .kfn-desktop-pleat-preview__panel--right::before {
  left: -13px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-right: 13px solid #d1d5db;
}

body#product .kfn-desktop-pleat-preview__panel--right::after {
  left: -12px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid #ffffff;
}

@media (max-width: 768px) {
  body#product .kfn-configurator {
    margin: 14px 0 18px;
  }

  body#product .kfn-box {
    padding: 14px;
    border-radius: 12px;
  }

  body#product .kfn-title {
    font-size: 19px;
  }

  body#product .kfn-input-row {
    display: block;
  }

  body#product .kfn-width-input,
  body#product .kfn-height-input {
    width: 100%;
    max-width: 100%;
  }

  body#product .kfn-pleat-layout {
    display: block;
  }

  body#product .kfn-pleat-text {
    font-size: 13px;
  }

  body#product .kfn-note-input {
    max-width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  body#product .kfn-configurator.kfn-is-ready,
  body#product .kfn-field-tooltip-box {
    transition: none;
  }
}

/* Etap 2 korekta UX: zatwierdzanie wymiarów jak w module wzorcowym */
body#product .kfn-confirm-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--kfn-primary-color, #111827);
  border-radius: 10px;
  background: var(--kfn-primary-color, #111827);
  color: var(--kfn-primary-text-color, #ffffff);
  font-size: 14px;
  font-weight: 800;
  line-height: 40px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

body#product .kfn-confirm-button:hover,
body#product .kfn-confirm-button:focus {
  background: var(--kfn-primary-hover-color, #020617);
  border-color: var(--kfn-primary-hover-color, #020617);
  color: var(--kfn-primary-text-color, #ffffff);
  outline: none;
}

body#product .kfn-confirm-button.is-confirmed {
  background: var(--kfn-confirmed-color, #ffffff);
  border-color: var(--kfn-confirmed-border-color, #cfd8e3);
  color: var(--kfn-confirmed-text-color, #111827);
}

body#product .kfn-confirm-button.is-confirmed::before {
  content: "✓";
  display: inline-block;
  margin-right: 6px;
  color: var(--kfn-confirmed-check-color, #16a34a);
  font-weight: 900;
}

body#product .kfn-width-input.is-confirmed,
body#product .kfn-height-input.is-confirmed {
  background: #f3f4f6;
  color: #374151;
}

body#product .kfn-width-input.has-error,
body#product .kfn-height-input.has-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

body#product .kfn-step-pleat.is-disabled .kfn-pleat-option {
  opacity: 0.45;
  cursor: not-allowed;
}

body#product .kfn-step-pleat.is-disabled .kfn-pleat-thumb-wrap,
body#product .kfn-step-pleat.is-disabled img.kfn-pleat-thumb {
  cursor: not-allowed;
}

body#product .kfn-step-pleat.is-disabled .kfn-pleat-option:hover,
body#product .kfn-step-pleat.is-disabled .kfn-pleat-option:focus-within {
  border-color: #e5e7eb;
  background: #f9fafb;
}

@media (max-width: 768px) {
  body#product .kfn-confirm-button {
    display: block;
    width: 100%;
    margin-top: 8px;
  }
}


body#product .kfn-pleat-layout {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 14px;
}

@media (min-width: 992px) {
  body#product .kfn-configurator {
    max-width: 620px;
  }
}

@media (max-width: 520px) {
  body#product .kfn-pleat-layout {
    display: block;
  }
}


body#product .kfn-pleat-layout {
  display: block;
}

body#product .kfn-desktop-pleat-preview {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  pointer-events: none;
  background: transparent;
  display: none;
}

body#product .kfn-desktop-pleat-preview.is-visible {
  display: block;
}

body#product .kfn-desktop-pleat-preview__panel {
  position: fixed;
  width: 360px;
  max-width: min(360px, 38vw);
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.24);
  overflow: visible;
}

body#product .kfn-desktop-pleat-preview__panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

body#product .kfn-desktop-pleat-preview__panel::before,
body#product .kfn-desktop-pleat-preview__panel::after {
  content: "";
  position: absolute;
  top: var(--kfn-preview-arrow-y, 50%);
  width: 0;
  height: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

body#product .kfn-desktop-pleat-preview__panel--left::before {
  right: -13px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 13px solid #d1d5db;
}

body#product .kfn-desktop-pleat-preview__panel--left::after {
  right: -12px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid #ffffff;
}

body#product .kfn-desktop-pleat-preview__panel--right::before {
  left: -13px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-right: 13px solid #d1d5db;
}

body#product .kfn-desktop-pleat-preview__panel--right::after {
  left: -12px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid #ffffff;
}

@media (max-width: 768px) {
  body#product .kfn-desktop-pleat-preview {
    display: none !important;
  }
}


body#product .kfn-configurator {
  margin: 10px 0 16px;
}

body#product .kfn-box {
  padding: 14px;
  border-radius: 8px;
  border-color: #d6e2ef;
  box-shadow: none;
}

body#product .kfn-header {
  margin: 0 0 10px;
}

body#product .kfn-label {
  font-size: 10px;
  margin-bottom: 2px;
  color: #5b6b7f;
}

body#product .kfn-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

body#product .kfn-step {
  margin-top: 10px;
}

body#product .kfn-step-title {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

body#product .kfn-height-range-note {
  margin: -2px 0 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

body#product .kfn-field-tooltip,
body#product .kfn-field-tooltip-icon {
  width: 16px;
  height: 16px;
  font-size: 11px;
}

body#product .kfn-input-row {
  gap: 8px;
  align-items: center;
}

body#product .kfn-width-input,
body#product .kfn-height-input {
  flex: 0 1 220px;
  width: 220px;
  max-width: 220px;
  min-height: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 36px;
}

body#product .kfn-confirm-button {
  min-height: 36px;
  height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 34px;
}

body#product .kfn-variant-height {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
}

body#product .kfn-pleats {
  gap: 7px;
}

body#product .kfn-pleat-option {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 7px;
  gap: 9px;
  background: #fbfcfd;
}

body#product .kfn-pleat-thumb-wrap,
body#product img.kfn-pleat-thumb {
  flex-basis: 38px;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
}

body#product .kfn-pleat-text {
  font-size: 13px;
  font-weight: 700;
}

body#product .kfn-note-wrap {
  margin-top: 10px;
}

body#product .kfn-note-label {
  margin-bottom: 5px;
  font-size: 13px;
  text-align: left;
}

body#product .kfn-note-input {
  min-height: 76px;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13px;
}

body#product .kfn-result-placeholder {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 7px;
}

body#product .kfn-result-placeholder__title {
  margin-bottom: 3px;
  font-size: 14px;
}

body#product .kfn-result-placeholder__text {
  font-size: 12px;
}

/* Standardowy koszyk PrestaShop pozostaje aktywny do momentu wybrania marszczenia. */
body#product .product-add-to-cart .add-to-cart,
body#product button.add-to-cart {
  pointer-events: auto;
}

@media (min-width: 992px) {
  body#product .kfn-configurator {
    max-width: 560px;
  }
}

@media (max-width: 768px) {
  body#product .kfn-box {
    padding: 12px;
  }

  body#product .kfn-title {
    font-size: 17px;
  }

  body#product .kfn-width-input,
  body#product .kfn-height-input {
    width: 100%;
    max-width: 100%;
  }

  body#product .kfn-confirm-button {
    width: auto;
    max-width: 100%;
    margin-top: 7px;
  }
}

body#product .kfn-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid var(--kfn-primary-color, #111827);
  border-radius: 10px;
  background: var(--kfn-primary-color, #111827);
  color: var(--kfn-primary-text-color, #ffffff);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

body#product .kfn-accordion-toggle:hover,
body#product .kfn-accordion-toggle:focus {
  background: var(--kfn-primary-hover-color, #0b1220);
  border-color: var(--kfn-primary-hover-color, #0b1220);
  color: var(--kfn-primary-text-color, #ffffff);
  outline: none;
}

body#product .kfn-accordion-icon {
  flex: 0 0 auto;
  margin-left: 12px;
  font-size: 14px;
  line-height: 1;
}

body#product .kfn-accordion-body[hidden] {
  display: none !important;
}

body#product .kfn-accordion-body {
  display: block;
  margin-top: 8px;
}

body#product .kfn-box {
  margin-top: 0;
}

body#product .kfn-header,
body#product .kfn-title,
body#product .kfn-label {
  display: none !important;
}

@media (max-width: 768px) {
  body#product .kfn-accordion-toggle {
    min-height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }
}


body#product .kfn-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--kfn-primary-color, #111827);
  border-radius: 10px;
  background: var(--kfn-primary-color, #111827);
  color: var(--kfn-primary-text-color, #ffffff);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

body#product .kfn-accordion-toggle:hover {
  background: var(--kfn-primary-hover-color, #000000);
  border-color: var(--kfn-primary-hover-color, #000000);
  color: var(--kfn-primary-text-color, #ffffff);
}

body#product .kfn-accordion-toggle:active {
  transform: translateY(1px);
}

body#product .kfn-accordion-toggle:focus,
body#product .kfn-accordion-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.14);
}

body#product .kfn-accordion-icon {
  flex: 0 0 auto;
  margin-left: 12px;
  font-size: 14px;
  line-height: 1;
}

body#product .kfn-accordion-body,
body#product .kfn-accordion-body[hidden] {
  display: block !important;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, margin-top 0.18s ease;
}

body#product .kfn-configurator.kfn-is-open .kfn-accordion-body {
  margin-top: 10px;
}

body#product .kfn-accordion-body.is-overflow-visible {
  overflow: visible;
}

@media (max-width: 768px) {
  body#product .kfn-accordion-toggle {
    min-height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }
}


body#product .product-add-to-cart.kfn-native-cart-hidden,
body#product button.add-to-cart.kfn-native-cart-hidden,
body#product [data-button-action="add-to-cart"].kfn-native-cart-hidden {
  display: none !important;
}


html.kfn-product-refreshing body#product .kfn-accordion-body,
body#product .kfn-accordion-body.kfn-no-transition {
  transition: none !important;
}

html.kfn-product-refreshing body#product .kfn-configurator.kfn-is-ready {
  transition: none !important;
}


body#product .kfn-field-error {
  display: none;
  margin: 6px 0 0;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

body#product .kfn-field-error.is-visible {
  display: block;
}

body#product .kfn-height-input.has-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

/* Etap 3 — wynik kalkulacji */
body#product .kfn-result-placeholder.has-result {
  border-color: #d1d5db;
  background: #ffffff;
}

body#product .kfn-result-placeholder.has-error {
  border-color: #fecaca;
  background: #fff7f7;
}

body#product .kfn-result-error {
  color: #b91c1c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

body#product .kfn-result-summary {
  color: #111827;
}

body#product .kfn-result-main {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.35;
}

body#product .kfn-result-main strong {
  font-size: 20px;
  font-weight: 900;
}

body#product .kfn-result-list {
  margin: 0;
}

body#product .kfn-result-row {
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) minmax(120px, 1.1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #eef2f7;
}

body#product .kfn-result-row:first-child {
  border-top: 0;
}

body#product .kfn-result-row dt {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

body#product .kfn-result-row dd {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body#product .kfn-result-row dt {
  min-width: 0;
}

body#product .kfn-result-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  body#product .kfn-result-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Mobile pleat preview - Etap 3 v1.2.4 */
body#product .kfn-mobile-pleat-preview {
  display: none;
}

@media (max-width: 768px) {
  body#product .kfn-mobile-pleat-preview {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    z-index: 9999;
    display: none;
    margin: 0;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(17, 24, 39, 0.22);
  }

  body#product .kfn-mobile-pleat-preview.is-visible {
    display: block;
  }

  body#product .kfn-mobile-pleat-preview__image {
    display: block;
    width: 100%;
    max-width: 360px;
    max-height: min(320px, 42vh);
    margin: 0 auto;
    object-fit: contain;
    border-radius: 10px;
    background: #ffffff;
  }

  body#product .kfn-mobile-pleat-preview__close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
  }
}


/* Natywne pole personalizacji jest wyłącznie techniczne. */
body#product .product-customization,
body#product .product-customization-line,
body#product .product-customization-item,
body#product .customization-message,
body#product .js-product-customization,
body#product section.product-customization {
  display: none !important;
}

body#product .kfn-cart-bridge {
  margin-top: 14px;
}

body#product .kfn-module-cart-button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 13px 18px;
  background: var(--kfn-primary-color, #101827);
  color: var(--kfn-primary-text-color, #fff);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}

body#product .kfn-module-cart-button:hover {
  opacity: .92;
}

body#product .kfn-module-cart-button:disabled {
  opacity: .65;
  cursor: wait;
}

body#product .kfn-cart-message {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-line;
}

body#product .kfn-cart-message.is-error {
  color: #b42318;
}

body#product .kfn-cart-message.is-success {
  color: #027a48;
}

/* Fallback frontend */
.kfn-configurator-fallback { margin: 14px 0; }
.kfn-fallback-button {
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  background: #f7f7f7;
  color: #333;
  padding: 13px 16px;
  font-weight: 600;
  cursor: not-allowed;
}

/* Mobile label and tooltip UX */
@media (max-width: 576px) {
  .kfn-field-label,
  .kfn-configurator label {
    text-align: left;
    line-height: 1.25;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .kfn-field-label .kfn-tooltip-trigger,
  .kfn-configurator label .kfn-tooltip-trigger {
    flex: 0 0 auto;
  }

  body#product .kfn-field-tooltip {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    margin-left: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  body#product .kfn-field-tooltip-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
    border-radius: 999px;
  }

  /* Mobile tooltips are controlled only by JS class .is-mobile-active.
     This prevents sticky :focus/:focus-within behavior on touch devices. */
  body#product .kfn-field-tooltip:hover .kfn-field-tooltip-box,
  body#product .kfn-field-tooltip:focus .kfn-field-tooltip-box,
  body#product .kfn-field-tooltip:focus-within .kfn-field-tooltip-box {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body#product .kfn-field-tooltip-box {
    position: fixed !important;
    left: var(--kfn-tooltip-mobile-left, 50vw) !important;
    right: auto !important;
    top: var(--kfn-tooltip-mobile-top, 96px) !important;
    bottom: auto !important;
    width: max-content !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0 !important;
    z-index: 99999 !important;
    transform: translate(-50%, 0) !important;
    pointer-events: none !important;
  }

  body#product .kfn-field-tooltip.is-mobile-active .kfn-field-tooltip-box {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) !important;
    pointer-events: auto !important;
  }

  body#product .kfn-field-tooltip.is-mobile-active .kfn-field-tooltip-box::after {
    display: block !important;
    left: var(--kfn-tooltip-arrow-left, 50%) !important;
  }

  body#product .kfn-field-tooltip.kfn-tooltip-above .kfn-field-tooltip-box::after {
    top: 100% !important;
    bottom: auto !important;
    transform: translate(-50%, -5px) rotate(45deg) !important;
    border-right: 1px solid #dbe4f0;
    border-bottom: 1px solid #dbe4f0;
    border-left: 0;
    border-top: 0;
  }

  body#product .kfn-field-tooltip.kfn-tooltip-below .kfn-field-tooltip-box::after {
    top: 0 !important;
    bottom: auto !important;
    transform: translate(-50%, -5px) rotate(225deg) !important;
    border-right: 1px solid #dbe4f0;
    border-bottom: 1px solid #dbe4f0;
    border-left: 0;
    border-top: 0;
  }
}


body#product .kfn-pleat-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
}

body#product .kfn-pleat-thumb-wrap--empty {
  cursor: default;
}
