/* Global Family Meble style header — Family Meble */

.fm-strip-promo {
  background: var(--fm-red, #d62828);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.fm-strip-promo__inner {
  text-align: center;
  padding-block: 5px;
  /* Do NOT use padding shorthand — it would wipe .fm-container gutter */
}
.fm-strip-promo a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.fm-strip-promo a:hover,
.fm-strip-promo a:focus {
  color: #fff;
  background: rgba(0, 0, 0, .18);
  text-decoration: none;
  border-radius: 3px;
  padding: 2px 6px;
  margin: -2px -6px;
}
.fm-strip-promo strong { color: #fff; }

.fm-strip-util {
  background: var(--fm-gray-100);
  border-bottom: 1px solid var(--fm-gray-200);
  font-size: 12px;
}
.fm-strip-util__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding-block: 3px;
}
.fm-strip-util__left {
  justify-self: start;
  display: flex;
  align-items: center;
}
.fm-strip-util__center {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  text-align: center;
  color: var(--fm-gray-600);
  white-space: nowrap;
}
.fm-strip-util__right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}
.fm-strip-util__right a { font-weight: 600; color: var(--fm-gray-900); }
.fm-strip-util__right a:hover { color: var(--fm-red); }
.fm-strip-util__sep { color: var(--fm-gray-200); }

.fm-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fm-lang__link {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  color: #9ca3af;
  text-decoration: none;
}
.fm-lang__link.is-active,
.fm-lang__link:hover {
  color: var(--fm-gray-900);
}
.fm-lang__sep {
  color: #d1d5db;
  font-weight: 400;
}

/* Static top header — no sticky, no hamburger (Agata) */
.fm-hdr {
  background: #fff;
  position: relative;
  z-index: 500;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.fm-hdr__main {
  display: grid;
  /* Desktop Agata: logo | search | tools — burger ukryty (nie zajmuje komórki) */
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo search tools";
  align-items: center;
  gap: 16px 20px;
  padding-block: 10px;
  padding-inline: 0;
  position: relative;
  z-index: 40;
  overflow: visible;
}

/* Compact sticky bar — show only on scroll-up (JS .is-visible) */
.fm-hdr-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    visibility 0s linear 0.28s;
  will-change: transform, opacity;
}
.fm-hdr-sticky.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    visibility 0s linear 0s;
}
.fm-hdr-sticky__bar {
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1);
}
.fm-hdr-sticky__main {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  padding-block: 8px;
  padding-inline: 0;
}
.fm-hdr-sticky .fm-hdr__logo img {
  height: 24px !important;
  width: auto !important;
  max-width: 180px !important;
}
.fm-hdr-sticky .fm-hdr__search input {
  height: 38px;
}
.fm-hdr-sticky .fm-hdr__search button {
  /* (38px input − 32px btn) / 2 = 3px — pin to input, not form+drop */
  top: 3px;
  right: 3px;
  transform: none;
  width: 32px;
  height: 32px;
}
.fm-hdr-sticky__menu {
  background: #1a1a1a;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.fm-hdr-sticky__menu[hidden] {
  display: none !important;
}
.fm-hdr-sticky__nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  min-height: 40px;
  margin: 0;
  padding: 0;
}
.fm-hdr-sticky__nav::-webkit-scrollbar { display: none; }
.fm-hdr-sticky__nav .fm-hdr__nav-link {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.fm-hdr-sticky__nav .fm-hdr__nav-link:first-child { padding-left: 0; }
.fm-hdr-sticky__nav .fm-hdr__nav-link:last-child { padding-right: 0; }
.fm-hdr-sticky__nav .fm-hdr__nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-bottom-color: var(--fm-red);
}
.fm-hdr__burger {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fm-gray-900);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.fm-hdr__burger:hover {
  color: var(--fm-red);
  background: var(--fm-gray-100);
}
.fm-hdr__burger:focus-visible {
  outline: 2px solid var(--fm-red);
  outline-offset: 2px;
}
.fm-hdr__burger svg {
  display: block;
}
.fm-hdr__logo {
  display: block;
  line-height: 0;
  margin: 0;
  padding: 0;
  justify-self: start;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0;
}
.fm-hdr__logo::before,
.fm-hdr__logo::after {
  content: none !important;
  display: none !important;
}
.fm-hdr__main > .fm-hdr__logo { grid-area: logo; }
.fm-hdr__logo img {
  width: auto !important;
  height: 29px !important;
  max-width: 220px !important;
  object-fit: contain;
  object-position: left center;
  display: block;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* Sticky: tylko logo tekstowe — zero monogramu / szarego kwadratu */
.fm-hdr-sticky .fm-hdr__logo img[src*="monogram"],
.fm-hdr .fm-hdr__logo img[src*="monogram"] {
  display: none !important;
}
.fm-hdr__search {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  overflow: visible;
  z-index: 1;
}
.fm-hdr__main > .fm-hdr__search { grid-area: search; }
/* Elevate search+drop above quickbar(32)/nav(30) while open */
.fm-hdr.is-search-open .fm-hdr__search,
.fm-hdr__search:has([aria-expanded="true"]) {
  z-index: 60;
}
.fm-hdr__search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--fm-gray-200);
  border-radius: 999px;
  padding: 0 48px 0 18px;
  font: inherit;
  font-size: 14px;
  background: var(--fm-gray-100);
}
.fm-hdr__search input:focus {
  outline: none;
  border-color: var(--fm-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, .1);
}
.fm-hdr__search button {
  /* Pin to input height (42px), not form (which also wraps absolute drop). */
  position: absolute;
  right: 4px;
  top: 4px; /* (42 − 34) / 2 */
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fm-gray-600);
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  margin: 0;
  line-height: 0;
  transform: none;
}
.fm-hdr__search button svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  display: block;
  width: 18px;
  height: 18px;
  /* Optical center — SVG handle pulls weight SE */
  transform: translate(-0.5px, -0.5px);
}

/* Search mega — Agata proportions (~1200×~520)
   Stacking: drop (via elevated .fm-hdr__search) > nav/quickbar; scrim z 400 < .fm-hdr 500. */
.fm-search-drop {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 60;
  width: min(1200px, calc(100vw - 40px));
  max-height: min(520px, calc(100vh - 180px));
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(300px, 1.2fr);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  overflow: hidden;
  text-align: left;
  line-height: 1.35;
}
/* Author display:grid beats UA [hidden] — must force hide when closed */
.fm-search-drop[hidden] {
  display: none !important;
}
.fm-search-drop__hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: #888;
  padding: 0 4px;
}
body.is-search-open {
  overflow: hidden;
}

.fm-search-drop__side {
  background: #f3f4f6;
  padding: 16px 14px 18px;
  max-height: inherit;
  overflow-y: auto;
}
.fm-search-drop__block + .fm-search-drop__block { margin-top: 18px; }
.fm-search-drop__block h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fm-gray-900);
}
.fm-search-drop__block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fm-search-drop__block li + li { margin-top: 1px; }
.fm-search-drop__block a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
}
.fm-search-drop__block a:hover {
  color: var(--fm-gray-900);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fm-search-drop__block a span {
  margin-left: auto;
  color: #888;
  font-size: 12px;
}
.fm-search-ico {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1.75px solid #999;
  border-radius: 50%;
  position: relative;
  box-sizing: border-box;
}
.fm-search-ico::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 1.75px;
  background: #999;
  border-radius: 1px;
  right: -4px;
  bottom: -1px;
  transform: rotate(45deg);
  transform-origin: left center;
}
.fm-search-drop__top,
.fm-search-drop__reco {
  padding: 16px 18px 18px;
  max-height: inherit;
  overflow-y: auto;
}
.fm-search-drop__top { border-right: 1px solid var(--fm-gray-200); }
.fm-search-drop__heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}
.fm-search-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.fm-search-top__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fm-search-top__media {
  aspect-ratio: 1;
  max-height: 260px;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.fm-search-top__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fm-search-top__name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.fm-search-top__rating {
  margin: 0;
  font-size: 12px;
  color: #666;
}
.fm-search-top__rating span { color: #e6a800; }
.fm-search-top__price {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.fm-search-top__price.is-sale { color: var(--fm-red); }
.fm-search-top__price small {
  font-size: 12px;
  font-weight: 600;
  vertical-align: super;
}
.fm-search-top__old {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}
.fm-search-top__old small {
  font-size: 10px;
  vertical-align: super;
}
.fm-label {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.fm-label--red { background: var(--fm-red); }
.fm-label--gray { background: #6b7280; }
.fm-label--black { background: #111111; }
.fm-label--payu {
  background: #a6c307;
  color: #fff;
}
.fm-label--ship {
  background: var(--fm-red);
  letter-spacing: 0.01em;
}
.fm-search-reco {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fm-search-reco__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}
.fm-search-reco__item:hover { background: #f7f7f7; }
.fm-search-reco__thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background: #f7f7f7;
  overflow: hidden;
}
.fm-search-reco__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fm-search-reco__meta { min-width: 0; }
.fm-search-reco__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 2px;
}
.fm-search-reco__name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.fm-search-reco__rating {
  margin: 2px 0 0;
  font-size: 11px;
  color: #666;
}
.fm-search-reco__rating span { color: #e6a800; }
.fm-search-reco__price {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}
.fm-search-reco__price.is-sale { color: var(--fm-red); }
.fm-search-reco__old {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}

/* Scrim BELOW header (hdr z-index 500) — only dims page content */
.fm-search-scrim,
.fm-nav-scrim {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  background: rgba(17,17,17,.45);
  pointer-events: auto;
}
.fm-search-scrim {
  top: var(--fm-scrim-top, 160px);
}
.fm-nav-scrim {
  top: var(--fm-nav-scrim-top, 220px);
}
.fm-search-scrim[hidden],
.fm-nav-scrim[hidden] { display: none !important; }

.fm-hdr__tools {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
  margin: 0;
  padding: 0;
}
.fm-hdr__main > .fm-hdr__tools { grid-area: tools; }
.fm-hdr__tool {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  font-size: 11px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
.fm-hdr__tools .fm-hdr__tool:last-child {
  margin-right: 0;
}
.fm-hdr__tool svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.fm-hdr__tool:hover { color: var(--fm-red); }
.fm-hdr__tool--placeholder {
  opacity: .85;
  cursor: default;
}
.fm-hdr__badge {
  position: absolute;
  top: -4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--fm-red);
  color: #fff;
  font-size: 9px; font-weight: 700;
  display: grid; place-items: center;
}
.fm-hdr__badge[hidden] { display: none !important; }
.fm-hdr__tool-wrap { position: relative; z-index: 1; }
.fm-hdr__tool-wrap.is-open { z-index: 55; }
.fm-hdr__tool-wrap.is-open > .fm-hdr__tool { color: var(--fm-red); }
/* Bridge gap so mouse can move from icon → dropdown without closing */
.fm-hdr__tool-wrap::after {
  content: '';
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 14px;
  display: none;
}
.fm-hdr__tool-wrap.is-open::after { display: block; }

/* Quickbar — L: promo · R: katalog/kolekcje/inspiracje (jak referencyjny sklep meblowy) */
.fm-hdr__quickbar {
  background: #f3f4f6;
  border-top: 1px solid var(--fm-gray-200);
  border-bottom: 1px solid var(--fm-gray-200);
  position: relative;
  z-index: 32;
}
.fm-hdr__quickbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  /* Only block — do not touch padding-inline (shared .fm-container gutter) */
  padding-block: 0;
}
.fm-hdr__quick-left,
.fm-hdr__quick-right {
  display: flex;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
}
.fm-hdr__quick-left { justify-content: flex-start; }
.fm-hdr__quick-right { justify-content: flex-end; }
.fm-hdr__quick-left > a,
.fm-hdr__quick-right > a,
.fm-hdr__quick-link {
  color: var(--fm-gray-900);
  text-decoration: none;
  white-space: nowrap;
}
.fm-hdr__quick-left > a:hover,
.fm-hdr__quick-right > a:hover,
.fm-hdr__quick-link:hover,
.fm-hdr__quick-link.is-open {
  color: var(--fm-red);
}
.fm-hdr__quick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fm-red) !important;
}
.fm-hdr__quick-item img { display: block; }
.fm-hdr__quick-kolekcje {
  position: static;
  display: inline-flex;
  align-items: center;
}
.fm-hdr__quick-link {
  font-size: inherit;
  font-weight: inherit;
}

/* Czarny pasek kategorii */
.fm-hdr__nav {
  background: #1a1a1a;
  color: #fff;
  position: relative;
  z-index: 30;
}
.fm-hdr__nav-inner {
  display: flex;
  align-items: stretch;
  min-height: 40px;
  padding-block: 0;
}
.fm-hdr__menu {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  margin: 0;
  padding: 0;
}
.fm-hdr__menu::-webkit-scrollbar { display: none; }
.fm-hdr__nav-item {
  position: static;
  display: flex;
  align-items: stretch;
}
.fm-hdr__nav-link,
.fm-hdr__menu > a.fm-hdr__nav-link {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
/* Agata-like: first/last nav items flush to container edges (yellow line) */
.fm-hdr__nav-item:first-child .fm-hdr__nav-link {
  padding-left: 0;
}
.fm-hdr__nav-item:last-child .fm-hdr__nav-link {
  padding-right: 0;
}
.fm-hdr__nav-link:hover,
.fm-hdr__nav-link.is-open,
.fm-hdr__nav-link.is-active {
  background: rgba(255,255,255,.06);
  border-bottom-color: var(--fm-red);
}

/* Mega menu pod czarnym paskiem / quickbar — pełna szerokość */
.fm-nav-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  background: #fff;
  color: var(--fm-gray-900);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  max-height: min(820px, calc(100vh - 100px));
  overflow-x: hidden;
  overflow-y: auto;
  border-top: 1px solid var(--fm-gray-200);
  padding-bottom: 20px;
  box-sizing: border-box;
}
.fm-nav-mega[hidden] { display: none !important; }
.fm-nav-mega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(280px, 360px);
  gap: 20px 28px;
  padding: 22px 0 36px;
  align-items: start;
}
.fm-nav-mega__grid--no-promo {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fm-nav-mega h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.fm-nav-mega h3 + ul + h3 { margin-top: 14px; }
.fm-nav-mega ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fm-nav-mega li + li { margin-top: 4px; }
.fm-nav-mega a {
  color: #333;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.35;
}
.fm-nav-mega a:hover { color: var(--fm-red); text-decoration: underline; text-underline-offset: 3px; }
.fm-nav-mega__all { color: var(--fm-red) !important; font-weight: 600; }
.fm-nav-mega__promo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none !important;
  color: inherit !important;
  width: 100%;
}
.fm-nav-mega__promo img {
  width: 100%;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  background: #f5f5f5;
  display: block;
}
/* Mobile: fewer above-fold chrome on archive/home */
@media (max-width: 900px) {
  .fm-strip-promo { display: none; }
  .fm-hero__nav { display: none; }
}
.fm-nav-mega__promo span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fm-gray-900);
}
.fm-nav-mega__promo em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--fm-red);
}
.fm-nav-mega__grid--kolekcje {
  /* legacy alias — browse grid below */
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  grid-template-rows: auto;
  gap: 16px 28px;
  padding: 20px 0 36px;
  align-items: start;
}
.fm-nav-mega__grid--browse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 16px 32px;
  padding: 20px 0 36px;
  align-items: start;
  width: 100%;
  max-width: var(--fm-page-max, 1440px);
  margin-inline: auto;
}
.fm-nav-mega__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 22px;
  min-width: 0;
  overflow: hidden;
  align-items: start;
}
.fm-nav-mega__cols .fm-nav-mega__col {
  min-height: 0;
}
.fm-nav-mega--browse {
  left: 0;
  right: 0;
  width: 100%;
  max-height: min(820px, calc(100vh - 100px));
  min-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 20px;
  box-sizing: border-box;
}
.fm-nav-mega--browse .fm-nav-mega__col {
  min-width: 0;
  overflow: hidden;
}
.fm-nav-mega--browse .fm-nav-mega__promo-col {
  align-self: start;
  width: 100%;
  max-width: 320px;
  min-width: 0;
  overflow: visible;
}
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
.fm-nav-mega__thumb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none !important;
  color: #333 !important;
}
.fm-nav-mega__thumb-link:hover,
.fm-nav-mega__thumb-link:focus {
  color: var(--fm-red) !important;
}
.fm-nav-mega__thumb-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
}
.fm-nav-mega__thumb {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #eee;
  padding: 2px;
  box-sizing: border-box;
}
/* Kolekcje mega: text-only labels (promo panel still uses large aranż). */
.fm-nav-mega__text-link {
  display: block;
  min-width: 0;
  text-decoration: none !important;
  color: #333 !important;
  padding: 2px 0;
}
.fm-nav-mega__text-link:hover,
.fm-nav-mega__text-link:focus {
  color: var(--fm-red) !important;
}
.fm-nav-mega__text-link span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}
.fm-nav-mega--kolekcje .fm-nav-mega__thumb {
  display: none !important;
}
.fm-nav-mega--browse li {
  margin: 0 !important;
  padding: 0;
  line-height: 1.35;
}
.fm-nav-mega--browse li + li {
  margin-top: 6px !important;
}
.fm-nav-mega--browse .fm-nav-mega__promo img {
  width: 100%;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center center;
  border-radius: 6px;
  background: #f7f7f7;
  display: block;
}
.fm-nav-mega--browse .fm-nav-mega__promo-col.is-fabric .fm-nav-mega__promo img {
  object-fit: contain;
  background: #f7f7f7;
  border: 1px solid #ececec;
}
.fm-nav-mega--browse .fm-nav-mega__promo-col.is-fabric .fm-nav-mega__promo {
  background: #fafafa;
  border-radius: 8px;
  padding: 6px;
}
/* Soft left blur when viewport is tight (≤1500px / zoom ~125%). */
@media (max-width: 1500px) {
  .fm-nav-mega--browse::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(96px, 10vw);
    pointer-events: none;
    z-index: 4;
    background: linear-gradient(90deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.35) 55%, transparent 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    mask-image: linear-gradient(90deg, #000 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 20%, transparent 100%);
  }
}
/* Keep lists in their lanes — no bleed over promo */
.fm-nav-mega--kolekcje {
  max-height: min(820px, calc(100vh - 100px));
  overflow-x: hidden;
  overflow-y: auto;
}
.fm-nav-mega--kolekcje .fm-container.fm-nav-mega__grid--kolekcje {
  max-width: min(1520px, calc(100vw - 40px));
}
.fm-nav-mega--kolekcje .fm-nav-mega__col {
  min-width: 0;
  overflow: hidden;
}
.fm-nav-mega--kolekcje .fm-nav-mega__promo-col {
  grid-column: auto;
  grid-row: auto;
  align-self: start;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}
.fm-nav-mega--kolekcje h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.fm-nav-mega--kolekcje h3 + ul + h3 { margin-top: 16px; }
.fm-nav-mega--kolekcje a {
  font-size: 13px;
  line-height: 1.35;
}
.fm-nav-mega--kolekcje li {
  margin: 0 !important;
  padding: 0;
  line-height: 1.35;
}
.fm-nav-mega--kolekcje li + li {
  margin-top: 5px !important;
}
/* Hierarchical brand groups in Kolekcje mega (text-only children). */
.fm-nav-mega--kolekcje .fm-nav-mega__item--parent {
  margin-top: 8px !important;
}
.fm-nav-mega--kolekcje .fm-nav-mega__item--parent > .fm-nav-mega__text-link span {
  font-weight: 700;
}
.fm-nav-mega--kolekcje .fm-nav-mega__children {
  list-style: none;
  margin: 4px 0 2px;
  padding: 0 0 0 12px;
  border-left: 1px solid #e8e8e8;
}
.fm-nav-mega--kolekcje .fm-nav-mega__item--child {
  margin-top: 3px !important;
}
.fm-nav-mega--kolekcje .fm-nav-mega__text-link--child {
  font-size: 12px;
  line-height: 1.35;
  color: #555 !important;
}
.fm-nav-mega--kolekcje .fm-nav-mega__text-link--child:hover,
.fm-nav-mega--kolekcje .fm-nav-mega__text-link--child:focus {
  color: var(--fm-red) !important;
}
.fm-nav-mega__promo-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.fm-nav-mega--kolekcje .fm-nav-mega__promo img {
  width: 100%;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center center;
  border-radius: 6px;
  background: #f3f3f3;
  padding: 10px;
  box-sizing: border-box;
  display: block;
}
/* Fabric line promo: contain full fabric card (no crop of specs) */
.fm-nav-mega--kolekcje .fm-nav-mega__promo-col.is-fabric .fm-nav-mega__promo img {
  object-fit: contain;
  background: #f7f7f7;
  border: 1px solid #ececec;
  padding: 6px;
}
.fm-nav-mega--kolekcje .fm-nav-mega__promo-col.is-fabric .fm-nav-mega__promo {
  background: #fafafa;
  border-radius: 8px;
  padding: 6px;
}
.fm-nav-mega__promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--fm-red, #d62828);
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  text-align: center;
  transition: background .15s ease, opacity .15s ease;
}
.fm-nav-mega__promo-btn:hover,
.fm-nav-mega__promo-btn:focus {
  background: #b91f1f;
  color: #fff !important;
  text-decoration: none !important;
}
.fm-nav-mega__col-spacer {
  visibility: hidden;
  user-select: none;
  margin: 0 0 4px !important;
  font-size: 11px !important;
  line-height: 1.2;
}
.fm-nav-mega--kolekcje a[data-mega-image]:hover,
.fm-nav-mega--kolekcje a[data-mega-image]:focus,
.fm-nav-mega--browse a[data-mega-image]:hover,
.fm-nav-mega--browse a[data-mega-image]:focus {
  color: var(--fm-red);
}
.fm-hdr__quick-nowosci {
  position: static;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1100px) {
  .fm-search-drop {
    width: min(960px, calc(100vw - 24px));
    grid-template-columns: 200px minmax(0, 1fr) minmax(260px, 1fr);
  }
  .fm-nav-mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(180px, 240px);
  }
}
/* Main-header burger + mobile drawer — desktop hidden.
   !important: WoodMart base `:is(..., button, ...)` sets display:inline-flex
   and loads AFTER header.css; without !important burger stays in grid and
   wraps tools to row 2 (logo center / search right / tools left). */
.fm-hdr__burger--main { display: none !important; }
/* Sticky burger only on mobile — on desktop black nav is always under sticky bar.
   Without this WoodMart button{display:inline-flex} leaves a white “kwadracik”
   on the left of Fotele / Meble in the sticky black bar. */
.fm-hdr-sticky .fm-hdr__burger { display: none !important; }
@media (min-width: 901px) {
  .fm-hdr-sticky.is-visible .fm-hdr-sticky__menu {
    display: block !important;
  }
  .fm-hdr-sticky.is-visible .fm-hdr-sticky__menu[hidden] {
    display: block !important;
  }
}
.fm-hdr__mobile-menu {
  background: #1a1a1a;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.fm-hdr__mobile-menu[hidden] { display: none !important; }
.fm-hdr__mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0 16px;
  margin: 0;
}
.fm-hdr__mobile-nav a {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fm-hdr__mobile-nav a:hover,
.fm-hdr__mobile-nav a:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  margin-inline: calc(var(--fm-gutter, 16px) * -1);
  padding-inline: var(--fm-gutter, 16px);
}

@media (max-width: 900px) {
  /* Agata-like: mniej chrome nad foldem */
  .fm-strip-util { display: none; }
  .fm-hdr__burger--main {
    display: grid !important;
    grid-area: burger;
  }

  .fm-hdr__main {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "burger logo tools"
      "search search search";
    gap: 8px 10px;
    padding-block: 8px;
  }
  .fm-hdr__logo { grid-area: logo; }
  .fm-hdr__tools { grid-area: tools; justify-self: end; gap: 4px; }
  .fm-hdr__search { grid-area: search; max-width: none; }
  .fm-hdr__search input { height: 40px; }
  .fm-hdr__tool {
    width: 40px;
    height: 40px;
    padding: 0;
  }
  .fm-hdr__tool span:not(.fm-hdr__badge) { display: none; }

  /* Quickbar: jeden rząd + scroll (NIE kolumna — puchła do 76px+) */
  .fm-hdr__quickbar-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 36px;
    padding-block: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .fm-hdr__quickbar-inner::-webkit-scrollbar { display: none; }
  .fm-hdr__quick-left,
  .fm-hdr__quick-right {
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 0;
  }
  .fm-hdr__quick-left > a,
  .fm-hdr__quick-right > a,
  .fm-hdr__quick-link,
  .fm-hdr__quick-item {
    padding: 8px 12px;
    font-size: 12px;
  }
  .fm-hdr__quick-left > a:first-child { padding-left: 0; }

  /* Czarny pasek → hamburger (jak Agata Menu) */
  .fm-hdr__nav { display: none; }
  .fm-hdr.is-mobile-nav-open .fm-hdr__mobile-menu { display: block; }

  .fm-hdr-sticky__main {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "burger logo tools"
      "search search search";
    gap: 8px 10px;
    padding-block: 6px;
  }
  .fm-hdr-sticky .fm-hdr__burger {
    display: grid !important;
    grid-area: burger;
  }
  .fm-hdr-sticky__main .fm-hdr__logo { grid-area: logo; }
  .fm-hdr-sticky__main .fm-hdr__tools { grid-area: tools; justify-self: end; }
  .fm-hdr-sticky__main .fm-hdr__search { grid-area: search; max-width: none; }

  .fm-search-drop {
    position: fixed;
    left: 12px;
    right: 12px;
    top: var(--fm-scrim-top, 120px);
    transform: none;
    width: auto;
    max-height: min(70vh, 560px);
    grid-template-columns: 1fr;
    overflow-y: auto;
    z-index: 550;
  }
  .fm-search-drop__side,
  .fm-search-drop__top,
  .fm-search-drop__reco { max-height: none; }
  .fm-search-drop__top { border-right: 0; border-bottom: 1px solid var(--fm-gray-200); }

  .fm-nav-mega__grid {
    grid-template-columns: 1fr 1fr;
    padding: 20px 0;
  }
  .fm-nav-mega__grid--kolekcje,
  .fm-nav-mega__grid--browse {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    grid-template-rows: auto;
    max-width: none;
  }
  .fm-nav-mega__cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fm-nav-mega--kolekcje .fm-nav-mega__promo-col,
  .fm-nav-mega--browse .fm-nav-mega__promo-col {
    grid-column: 1 / -1;
    grid-row: auto;
    position: static;
    max-width: 280px;
  }
  .fm-nav-mega__promo {
    grid-column: 1 / -1;
    max-width: 280px;
  }
}
@media (max-width: 560px) {
  .fm-hdr__logo img {
    height: 22px !important;
    max-width: 150px !important;
  }
  .fm-nav-mega__grid { grid-template-columns: 1fr; }
  .fm-hdr__tools { gap: 0; }
}
