/* Family Meble — shared design tokens (fonts via fm-redesign-font enqueue) */

:root {
  --fm-red: #d62828;
  --fm-red-dark: #b91c1c;
  --fm-red-soft: #fef2f2;
  --fm-black: #111111;
  --fm-gray-900: #1f2937;
  --fm-gray-600: #6b7280;
  --fm-gray-400: #9ca3af;
  --fm-gray-200: #e5e7eb;
  --fm-gray-100: #f3f4f6;
  --fm-white: #ffffff;
  --fm-radius: 12px;
  --fm-radius-lg: 20px;
  --fm-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --fm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --fm-font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --fm-text-xs: 11px;
  --fm-text-sm: 12px;
  --fm-text-md: 13px;
  --fm-text-base: 14px;
  --fm-text-lg: 15px;
  --fm-text-xl: 18px;
  --fm-text-2xl: 22px;
  --fm-text-3xl: 24px;
  /* Align with site header `.fm-container` / tokens.css */
  --fm-page-max: 1520px;
  --fm-max: var(--fm-page-max);
  --fm-gutter: 24px;
  --fm-story: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--fm-font);
  color: var(--fm-gray-900);
  background: var(--fm-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Siatka wariantów tkanin ── */
.fm-fabric-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 100%;
}

.fm-fabric-swatches--collapsible .fm-fabric-swatch--extra {
  display: none;
}

.fm-fabric-swatches--collapsible.is-expanded .fm-fabric-swatch--extra {
  display: block;
}

.fm-fabric-swatches__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-gray-900);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fm-fabric-swatches__toggle:hover { color: var(--fm-red); }

.fm-fabric-swatches__toggle span {
  font-size: 12px;
  font-weight: 700;
  color: var(--fm-red);
  text-decoration: none;
}

.fm-fabric-swatches-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fm-fabric-swatches-nav__btn {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--fm-gray-200);
  border-radius: 8px;
  background: #fff;
  color: var(--fm-gray-600);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: border-color .15s, color .15s, background .15s;
}
.fm-fabric-swatches-nav__btn:hover:not(:disabled) {
  border-color: var(--fm-gray-400);
  color: var(--fm-gray-900);
  background: var(--fm-gray-100);
}
.fm-fabric-swatches-nav__btn:disabled {
  opacity: .35;
  cursor: default;
}
.fm-fabric-swatches-nav__track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  width: calc(88px * 5 + 8px * 4);
  max-width: 100%;
}
.fm-fabric-swatches-nav__track .fm-fabric-swatches {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  max-width: none;
}
.fm-fabric-swatches-nav__track .fm-fabric-swatches::-webkit-scrollbar {
  display: none;
}
.fm-fabric-swatches-nav__track .fm-fabric-swatch {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border: 2px solid var(--fm-gray-200);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}
.fm-fabric-swatches-nav__track .fm-fabric-swatch.is-active {
  border-color: var(--fm-red);
  box-shadow: 0 0 0 2px rgba(214, 40, 40, .22);
}
.fm-fabric-swatches-nav__track .fm-fabric-swatch__frame img {
  transform: scale(1.14);
  transform-origin: center bottom;
}

.fm-fabric-swatch {
  aspect-ratio: 1;
  border: 2px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  position: relative;
}

.fm-fabric-swatch.is-active {
  border-color: var(--fm-red);
  box-shadow: 0 0 0 2px rgba(214, 40, 40, .25);
}

.fm-fabric-swatch__frame {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 14%;
  bottom: 6%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.fm-fabric-swatch__frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  transform: scale(1.08);
  transform-origin: center bottom;
}

.fm-fabric-swatch__frame.is-flipped {
  transform: none;
}

.fm-fabric-swatch__frame.is-flipped img {
  transform: scale(1.08) scaleX(-1);
  transform-origin: center bottom;
}

.fm-fabric-swatch--compact {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  opacity: .55;
}

.fm-fabric-swatch--compact.is-active {
  opacity: 1;
  border-color: var(--fm-red);
  box-shadow: none;
}

.fm-fabric-swatches__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fm-gray-900);
}

.fm-fabric-swatches__hint {
  font-size: var(--fm-text-md);
  color: var(--fm-gray-600);
  margin-top: 6px;
}

/* ── Opis Allegro 1:1 ── */
.fm-product-story .fm-bl-description--allegro {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fm-gray-900);
}

.fm-product-story .fm-bl-description--allegro h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--fm-black);
}

.fm-product-story .fm-bl-description--allegro .fm-desc-row__text h2:first-child {
  margin-top: 0;
}

.fm-product-story .fm-bl-description--allegro p {
  margin: 0 0 10px;
}

.fm-product-story .fm-bl-description--allegro ul {
  margin: 0 0 12px;
  padding-left: 1.15rem;
}

.fm-product-story .fm-bl-description--allegro li {
  margin-bottom: 6px;
}

.fm-bl-description:not(.fm-bl-description--allegro) .fm-desc-intro {
  margin-bottom: 20px;
}

.fm-bl-description .fm-desc-intro h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}

.fm-bl-description--allegro .fm-desc-listing-title {
  margin: 0 0 36px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--fm-gray-900);
}

.fm-product-story .fm-bl-description--allegro .fm-desc-listing-title {
  margin: 0 0 36px;
}

.fm-product-story .fm-bl-description--allegro .fm-desc-intro {
  margin: 0;
  padding: 0;
}

.fm-product-story .fm-bl-description--allegro .fm-desc-intro h3 {
  margin: 0;
  padding: 0;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--fm-black);
}

.fm-bl-description--allegro .fm-desc-allegro-banner {
  margin: 0 0 56px;
}

.fm-bl-description--allegro .fm-desc-allegro-banner,
.fm-bl-description--allegro .fm-desc-allegro-banner img {
  border: none;
  box-shadow: none;
}

.fm-bl-description--allegro .fm-desc-allegro-banner img {
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.fm-bl-description--allegro .fm-desc-views-collage {
  margin: 56px 0 56px;
}

.fm-bl-description--allegro .fm-desc-views-collage img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: none;
  background: transparent;
}

.fm-bl-description--allegro .fm-desc-benefits-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 56px;
  align-items: center;
  margin: 0 0 64px;
}

.fm-desc-benefits-row__media {
  margin: 0;
}

.fm-desc-benefits-row__media .fm-desc-image {
  margin: 0;
}

.fm-desc-benefits-collage img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.fm-bl-description.fm-bl-description--allegro .fm-desc-benefits.fm-desc-benefits--column {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0;
  padding: 0;
  grid-template-columns: unset;
}

.fm-bl-description--allegro .fm-desc-benefits--column p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  display: block;
  width: 100%;
  max-width: 100%;
}

.fm-bl-description--allegro .fm-desc-benefits--column p:has(.fm-desc-check) {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fm-bl-description--allegro .fm-desc-benefits--column p b {
  font-weight: 700;
}

.fm-bl-description--allegro .fm-desc-benefits--column p:has(.fm-desc-check) > span:last-child {
  flex: 1;
  min-width: 0;
}

.fm-bl-description--allegro .fm-desc-benefits {
  margin-bottom: 0;
}

.fm-bl-description--allegro .fm-desc-row {
  gap: 40px 48px;
  align-items: start;
  margin: 64px 0;
}

.fm-bl-description--allegro .fm-desc-row__text p {
  display: block;
  margin: 0 0 10px;
}

.fm-bl-description--allegro .fm-desc-row__text p:has(.fm-desc-check) {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.fm-bl-description--allegro .fm-desc-row__text p:has(.fm-desc-check) + p:has(.fm-desc-check) {
  margin-top: 0;
}

.fm-bl-description--allegro .fm-desc-row__text h2 + p {
  margin-top: 0;
}

.fm-bl-description--allegro .fm-desc-row__media .fm-desc-image img {
  border-radius: 16px;
}

.fm-bl-description--allegro .fm-desc-note {
  margin-top: 48px;
}

.fm-bl-description .fm-desc-hero-image {
  margin: 0 0 24px;
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
}

.fm-bl-description .fm-desc-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.fm-bl-description .fm-desc-benefits:not(.fm-desc-benefits--column) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  margin-bottom: 28px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.fm-bl-description .fm-desc-benefits:not(.fm-desc-benefits--column) p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  display: block;
  width: 100%;
  max-width: 100%;
}

.fm-bl-description .fm-desc-benefits:not(.fm-desc-benefits--column) p:has(.fm-desc-check) {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fm-desc-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 3px;
  background: #3aaa35;
  position: relative;
}

.fm-desc-check::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fm-bl-description .fm-desc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 28px 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.fm-bl-description .fm-desc-row--reverse .fm-desc-row__text { order: 2; }
.fm-bl-description .fm-desc-row--reverse .fm-desc-row__media { order: 1; }

.fm-bl-description .fm-desc-row__text h2,
.fm-bl-description .fm-desc-row__text h3 {
  margin-top: 0;
}

.fm-bl-description .fm-desc-list,
.fm-bl-description .fm-desc-spec {
  margin: 12px 0 0;
  padding-left: 1.1rem;
}

.fm-bl-description .fm-desc-note {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--fm-radius);
  background: var(--fm-gray-100);
  border: 1px solid var(--fm-gray-200);
  font-size: 14px;
}

.fm-bl-description .fm-desc-image {
  margin: 0;
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  border: none;
  background: transparent;
}

.fm-bl-description .fm-desc-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--fm-radius-lg);
}

@media (max-width: 800px) {
  .fm-bl-description .fm-desc-benefits {
    grid-template-columns: 1fr;
  }

  .fm-bl-description--allegro .fm-desc-benefits-row {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
    align-items: start;
  }

  .fm-bl-description .fm-desc-row,
  .fm-bl-description .fm-desc-row--reverse {
    grid-template-columns: 1fr;
  }

  .fm-bl-description .fm-desc-row--reverse .fm-desc-row__text,
  .fm-bl-description .fm-desc-row--reverse .fm-desc-row__media {
    order: unset;
  }
}

.fm-bl-description h2,
.fm-bl-description h3 {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.3;
}

.fm-bl-description--allegro h2,
.fm-bl-description--allegro h3,
.fm-bl-description--allegro .fm-desc-intro h3 {
  margin-top: 0;
  margin-bottom: 0;
}

.fm-bl-description ul {
  padding-left: 1.25rem;
}

.fm-bl-description p {
  margin: 0.5em 0;
}

.fm-bl-description--allegro > p {
  margin: 0;
}

.fm-bl-description--allegro > .fm-desc-listing-title {
  margin: 0 0 36px;
}

@media (max-width: 900px) {
  .fm-bl-description .fm-desc-row,
  .fm-bl-description .fm-desc-row--reverse {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .fm-bl-description .fm-desc-row--reverse .fm-desc-row__text,
  .fm-bl-description .fm-desc-row--reverse .fm-desc-row__media {
    order: unset;
  }
  .fm-bl-description .fm-desc-benefits {
    grid-template-columns: 1fr;
  }
}

/* ── Baner aranżacji ── */
.fm-lifestyle-banner {
  margin: 0 0 32px;
  min-height: 420px;
  aspect-ratio: 21 / 9;
  border-radius: var(--fm-radius-lg);
  background-size: cover;
  background-position: center 35%;
  position: relative;
  overflow: hidden;
}

.fm-lifestyle-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45));
}

.fm-lifestyle-banner__label {
  position: absolute;
  left: 20px;
  bottom: 16px;
  z-index: 1;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Przycisk wideo (poza galerią miniaturek) ── */
.fm-video-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .15s, transform .15s;
}

.fm-video-trigger:hover {
  background: rgba(0, 0, 0, .88);
  transform: translateY(-1px);
}

.fm-video-trigger__icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fm-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}

.fm-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fm-video-modal.is-open {
  display: flex;
}

.fm-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}

.fm-video-modal__dialog {
  position: relative;
  width: min(920px, 100%);
  background: #111;
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  box-shadow: var(--fm-shadow-lg);
}

.fm-video-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.fm-video-modal__body video,
.fm-video-modal__body .fm-gallery-video__placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
}

/* ── Parametry (jak Allegro) ── */
.fm-params-accordion {
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  margin-bottom: 12px;
  background: var(--fm-white);
}

.fm-params-accordion summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fm-params-accordion summary::after {
  content: '›';
  font-size: 18px;
  color: var(--fm-gray-400);
  transition: transform .2s;
}

.fm-params-accordion[open] summary::after {
  transform: rotate(90deg);
}

.fm-params-accordion summary::-webkit-details-marker { display: none; }

.fm-params-accordion__body {
  padding: 0 20px 16px;
  border-top: 1px solid var(--fm-gray-200);
}

.fm-params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fm-params-table th {
  text-align: left;
  font-weight: 500;
  color: var(--fm-gray-600);
  padding: 10px 12px 10px 0;
  width: 42%;
  vertical-align: top;
  border-bottom: 1px solid var(--fm-gray-100);
}

.fm-params-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--fm-gray-100);
}

.fm-params-note {
  font-size: 12px;
  color: var(--fm-gray-400);
  margin: 12px 0 0;
}

/* ── Galeria: wideo ── */
.va-gallery__thumb.is-featured {
  outline: 2px solid var(--fm-red);
  outline-offset: 2px;
}

.va-gallery__thumb.is-video {
  position: relative;
}

.fm-thumb-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 18px;
  z-index: 1;
  pointer-events: none;
}

.fm-gallery-video {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--fm-radius);
  overflow: hidden;
  background: var(--fm-gray-100);
}

.fm-gallery-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fm-gallery-video__placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.fm-gallery-video__play {
  font-size: 48px;
  line-height: 1;
}

/* ── Prototype chrome (not part of final design) ── */
.proto-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  font-size: 13px;
  font-weight: 500;
}

.proto-bar button {
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: background .15s;
}

.proto-bar button:hover { background: rgba(255,255,255,.12); }

.proto-bar .proto-label {
  padding: 0 12px;
  min-width: 200px;
  text-align: center;
  white-space: nowrap;
}

.proto-bar .proto-hint {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}

/* ── Shared product components ── */

.fm-badge {
  display: inline-block;
  background: var(--fm-black);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.fm-badge--sale { background: var(--fm-red); }

.fm-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.fm-price--promo {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.fm-price__current {
  font-size: 32px;
  font-weight: 700;
  color: var(--fm-red);
  line-height: 1;
}

.fm-price__old {
  font-size: 18px;
  color: var(--fm-gray-400);
  text-decoration: line-through;
}

.fm-price__omnibus {
  width: 100%;
  font-size: 12px;
  color: var(--fm-gray-600);
}

.fm-price__installment {
  width: 100%;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-gray-800);
}

.fm-price--promo {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fm-gray-200);
}

.fm-price__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.fm-price--promo .fm-badge--sale {
  margin-left: 6px;
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 8px;
}

.fm-price--promo .fm-price__current {
  font-size: 34px;
}

.fm-price--promo .fm-price__omnibus {
  color: var(--fm-red);
  font-size: 11px;
}

/* Meta produktu — EAN, logistyka, data dostawy */
.fm-product-meta {
  margin: 0 0 14px;
  padding: 0;
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  overflow: hidden;
  background: #fff;
}

.fm-product-meta__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--fm-gray-200);
  font-size: 13px;
}

.fm-product-meta__row:last-child {
  border-bottom: none;
}

.fm-product-meta__row dt {
  margin: 0;
  color: var(--fm-gray-600);
  font-weight: 500;
}

.fm-product-meta__row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  color: var(--fm-gray-900);
}

.fm-product-meta__row--highlight {
  background: var(--fm-gray-100);
}

.fm-product-meta__row--highlight dd {
  color: var(--fm-red);
  font-weight: 700;
}

/* Tabela parametrów — grid */
.fm-params-grid {
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  background: #fff;
}

.fm-params-grid__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
  padding: 13px 20px;
  border-bottom: 1px solid var(--fm-gray-200);
  font-size: 14px;
  line-height: 1.45;
}

.fm-params-grid__item:last-child {
  border-bottom: none;
}

.fm-params-grid__item:nth-child(even) {
  background: var(--fm-gray-100);
}

.fm-params-grid__label {
  color: var(--fm-gray-600);
  font-weight: 500;
}

.fm-params-grid__value {
  color: var(--fm-gray-900);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.fm-params-grid-wrap {
  position: relative;
}

.fm-params-grid--collapsible.is-collapsed {
  max-height: 288px;
  overflow: hidden;
}

.fm-params-grid-wrap:has(.fm-params-grid--collapsible.is-collapsed)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  height: 80px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 78%);
  pointer-events: none;
  border-radius: 0 0 var(--fm-radius-lg) var(--fm-radius-lg);
}

.fm-params-grid__expand {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: var(--fm-text-md);
  font-weight: 600;
  color: var(--fm-gray-900);
  text-align: center;
  background: var(--fm-gray-100);
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.fm-params-grid__expand:hover {
  color: var(--fm-red);
  border-color: var(--fm-red);
  background: #fff;
}

.fm-params-grid-wrap:not(:has(.fm-params-grid--collapsible.is-collapsed))::after {
  display: none;
}

/* Galeria — lightbox */
.va-gallery__main img.is-flipped,
.va-gallery__thumb img.is-flipped {
  transform: scaleX(-1);
}

.fm-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fm-gallery-lightbox.is-open {
  display: flex;
}

.fm-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .82);
}

.fm-gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fm-gallery-lightbox__stage {
  margin: 0;
  width: 100%;
  max-height: calc(92vh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fm-gallery-lightbox__stage img {
  max-width: 100%;
  max-height: calc(92vh - 80px);
  object-fit: contain;
  border-radius: var(--fm-radius);
  background: #fff;
}

.fm-gallery-lightbox__stage img.is-flipped {
  transform: scaleX(-1);
}

.fm-gallery-lightbox__stage figcaption {
  color: #fff;
  font-size: 13px;
  text-align: center;
}

.fm-gallery-lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.fm-gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--fm-gray-900);
  font-size: 28px;
  line-height: 1;
  box-shadow: var(--fm-shadow-sm);
}

.fm-gallery-lightbox__prev { left: -56px; }
.fm-gallery-lightbox__next { right: -56px; }

.fm-gallery-lightbox__counter {
  margin-top: 12px;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  font-weight: 600;
}

/* Modal wymiarów i pakowania */
.fm-dimensions-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fm-dimensions-modal[hidden] {
  display: none;
}

.fm-dimensions-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.fm-dimensions-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: var(--fm-radius-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--fm-shadow);
}

.fm-dimensions-modal__title {
  margin: 0 0 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fm-dimensions-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fm-gray-100);
  color: var(--fm-gray-900);
  font-size: 22px;
  line-height: 1;
}

.fm-dimensions-scroll {
  overflow-x: auto;
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
}

.fm-dimensions-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.fm-dimensions-table th,
.fm-dimensions-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--fm-gray-200);
  text-align: center;
  white-space: nowrap;
}

.fm-dimensions-table th {
  background: var(--fm-gray-100);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.fm-dimensions-table th:first-child,
.fm-dimensions-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--fm-gray-600);
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.fm-dimensions-table thead th:first-child {
  background: var(--fm-gray-100);
}

.fm-dimensions-table tr:last-child td,
.fm-dimensions-table tr:last-child th {
  border-bottom: none;
}

.fm-dimensions-table .is-highlight {
  background: var(--fm-red-soft);
  color: var(--fm-red-dark);
  font-weight: 700;
}

.fm-addon-card__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--fm-gray-200);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .fm-gallery-lightbox__prev { left: 8px; }
  .fm-gallery-lightbox__next { right: 8px; }
  .fm-gallery-lightbox__close { top: 8px; right: 8px; }
  .fm-params-grid__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .fm-params-grid__value { text-align: left; }
}

.fm-btn-atc {
  width: 100%;
  background: var(--fm-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 16px 24px;
  border-radius: var(--fm-radius);
  transition: background .15s, transform .1s;
}

.fm-btn-atc:hover { background: var(--fm-red-dark); }
.fm-btn-atc:active { transform: scale(.98); }

.fm-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--fm-gray-200);
  border-radius: var(--fm-radius);
  overflow: hidden;
}

.fm-qty button {
  width: 44px;
  height: 44px;
  font-size: 18px;
  color: var(--fm-gray-600);
}

.fm-qty button:hover { background: var(--fm-gray-100); }

.fm-qty input {
  width: 48px;
  text-align: center;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
}

.fm-logistics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.fm-logistics__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fm-gray-900);
}

.fm-logistics__icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.fm-addon {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fm-gray-100);
}

.fm-addon:last-child { border-bottom: none; }

.fm-addon input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--fm-red);
  flex-shrink: 0;
}

.fm-addon--main input { opacity: .5; }

.fm-addon__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.fm-addon__body { flex: 1; min-width: 0; }

.fm-addon__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.fm-addon__price {
  font-size: 14px;
  font-weight: 600;
  color: var(--fm-red);
  white-space: nowrap;
}

.fm-addon__price del {
  color: var(--fm-gray-400);
  font-weight: 400;
  margin-right: 4px;
}

.fm-savings {
  font-size: 14px;
  color: var(--fm-gray-600);
  padding: 8px 0;
}

.fm-savings strong { color: var(--fm-red); }

.fm-social-proof {
  background: var(--fm-red-soft);
  color: var(--fm-red);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--fm-radius);
  text-align: center;
}

/* ── New description format (cross-platform) ── */

.fm-product-story {
  font-size: 16px;
  line-height: 1.75;
  color: var(--fm-gray-900);
}

.fm-product-story h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 2em 0 .75em;
  line-height: 1.3;
  color: var(--fm-black);
}

.fm-product-story h3:first-child { margin-top: 0; }

.fm-product-story p { margin: 0 0 1em; }

.fm-product-story .fm-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fm-gray-900);
  margin-bottom: 1.5em;
}

.fm-product-story .fm-steps {
  margin: 0 0 1.5em;
  padding-left: 1.25em;
}

.fm-product-story .fm-steps li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.fm-btn-atc--b2b {
  background: var(--fm-black);
}

.fm-btn-atc--b2b:hover {
  background: #333;
}

.fm-product-story .fm-banner {
  position: relative;
  border-radius: var(--fm-radius-lg);
  overflow: hidden;
  margin: 1.5em 0 2em;
}

.fm-product-story .fm-banner img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.fm-product-story .fm-banner__logo {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  box-shadow: var(--fm-shadow);
  color: var(--fm-black);
}

.fm-product-story .fm-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 2em;
}

.fm-product-story .fm-benefits li {
  padding: 6px 0;
  font-size: 15px;
}

.fm-product-story .fm-benefits strong {
  color: var(--fm-black);
}

/* Opis Allegro — odstępy na sztywno (nadpisuje globalne .fm-product-story h3/p) */
.fm-product-story .fm-bl-description--allegro > .fm-desc-listing-title {
  margin: 0 0 36px;
}

.fm-product-story .fm-bl-description--allegro > .fm-desc-allegro-banner {
  margin: 0 0 56px;
}

.fm-product-story .fm-bl-description--allegro > .fm-desc-intro {
  margin: 0;
  padding: 0;
}

.fm-product-story .fm-bl-description--allegro .fm-desc-intro h3,
.fm-product-story .fm-bl-description--allegro > .fm-desc-intro h3 {
  margin: 0;
  padding: 0;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
}

.fm-product-story .fm-bl-description--allegro > .fm-desc-views-collage {
  margin: 56px 0 56px;
}

.fm-product-story .fm-bl-description--allegro > .fm-desc-benefits-row {
  margin: 0 0 64px;
}

.fm-product-story .fm-bl-description--allegro .fm-desc-benefits.fm-desc-benefits--column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.fm-product-story .fm-bl-description--allegro > .fm-desc-row {
  margin: 64px 0;
}

.fm-product-story .fm-bl-description--allegro > .fm-desc-note {
  margin-top: 64px;
}

/* Variant hidden */
.proto-panel { display: none; }
.proto-panel.is-active { display: block; }

/* Opis Allegro — mobile (jak na Allegro: jedna kolumna, pełna szerokość) */
@media (max-width: 800px) {
  .fm-product-story .fm-bl-description--allegro > .fm-desc-listing-title {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.4;
  }

  .fm-product-story .fm-bl-description--allegro > .fm-desc-allegro-banner {
    margin: 0 0 32px;
  }

  .fm-product-story .fm-bl-description--allegro .fm-desc-intro h3,
  .fm-product-story .fm-bl-description--allegro > .fm-desc-intro h3 {
    font-size: 18px;
    line-height: 1.35;
  }

  .fm-product-story .fm-bl-description--allegro > .fm-desc-views-collage {
    margin: 32px 0;
  }

  .fm-product-story .fm-bl-description--allegro > .fm-desc-benefits-row {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0 0 40px;
    align-items: start;
  }

  .fm-bl-description--allegro .fm-desc-benefits-row__media {
    width: 100%;
  }

  .fm-product-story .fm-bl-description--allegro .fm-desc-benefits.fm-desc-benefits--column {
    gap: 18px;
    width: 100%;
  }

  .fm-bl-description--allegro .fm-desc-benefits--column p {
    font-size: 14px;
    line-height: 1.65;
  }

  .fm-bl-description--allegro .fm-desc-benefits--column p:has(.fm-desc-check) {
    gap: 10px;
  }

  .fm-product-story .fm-bl-description--allegro > .fm-desc-row {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 40px 0;
  }

  .fm-bl-description--allegro .fm-desc-row--reverse .fm-desc-row__text,
  .fm-bl-description--allegro .fm-desc-row--reverse .fm-desc-row__media {
    order: unset;
  }

  .fm-bl-description--allegro .fm-desc-row__media .fm-desc-image img {
    border-radius: 12px;
  }

  .fm-product-story .fm-bl-description--allegro > .fm-desc-note {
    margin-top: 40px;
  }
}
