/* ─────────────────────────────────────────────────────────────
   Techwish — rich mega menu panel (matches Wellness mockup).
   Layout (desktop):
     ┌─────────────────────────────────────────────────────────┐
     │ HERO (left)  │ CATEGORIES grid 3×2  │ BESTSELLERS (right) │
     ├─────────────────────────────────────────────────────────┤
     │ GUIDES (left ~60%)              │ USP icons (right ~40%) │
     └─────────────────────────────────────────────────────────┘
   ───────────────────────────────────────────────────────────── */

/* ── Salient parent overrides — without these the panel scrolls and
      list items inherit nav styling. Different Salient versions wrap
      mega content in different DOM layers, so we cast a wide net:
      anything in #header-outer that contains a .tw-mm has its
      max-height + overflow killed. */

/* Specific known wrappers (all Salient versions seen in the wild). */
#header-outer .sf-menu .sf-mega,
#header-outer .sf-menu .sf-mega-section-wrap,
#header-outer .sf-menu .sf-mega-section,
#header-outer .sf-menu .menu-item-mega-block,
#header-outer .sf-menu ul.sub-menu,
#header-outer .sf-menu li.megamenu > ul,
#header-outer .sf-menu li.megamenu .sf-mega,
#header-outer #top nav ul.sub-menu {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* Catch-all: max-height kill on Salient wrappers ONLY (not deep into
   our .tw-mm subtree). We use :not(.tw-mm):not(.tw-mm *) effectively
   by listing the known wrapper selectors explicitly so that overflow:
   hidden inside .tw-mm (hero image, guide thumbs) is preserved. */
#header-outer .sf-menu li.megamenu,
#header-outer .sf-menu li.megamenu > ul,
#header-outer .sf-menu li.megamenu > div,
#header-outer .sf-menu li.megamenu > div > div,
#header-outer li.megamenu .nectar-global-section,
#header-outer li.megamenu .nectar-global-section > .inner {
  max-height: none !important;
  overflow: visible !important;
}

/* Bullet-proof reset for anything inside our panel — Salient's nav CSS
   styles <a>, <li>, <ul> inside the header aggressively (floated nav
   items, animated underlines, font sizes). We pin our own baseline so
   the panel renders predictably regardless of Salient version. */
.tw-mm,
.tw-mm * {
  box-sizing: border-box;
}
.tw-mm ul,
.tw-mm ol {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border: 0 !important;
  background: none !important;
}
/* Default ul/ol to block, but allow `.tw-mm__guides-list` (grid) and any
   future flex/grid lists declared explicitly in their own rules. */
.tw-mm ul:not([class*="-list"]):not([class*="-links"]),
.tw-mm ol {
  display: block;
}
/* Salient adds a 1px bottom border on some mega-menu list wrappers
   (.sf-mega-section ul, .menu-item) — strip every variant inside our
   panel. The intentional separator stays on .tw-mm__cat-head only. */
.tw-mm ul.sub-menu,
.tw-mm .sf-mega-section,
.tw-mm .sf-mega-section ul,
.tw-mm li.menu-item,
.tw-mm .menu-item-mega-block {
  border: 0 !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.tw-mm li {
  display: block !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  line-height: normal;
  list-style: none !important;
}
.tw-mm a {
  display: inline-block;
  float: none !important;
  text-decoration: none !important;
  background: none !important;
  border: 0 !important;
  padding: 0;
  margin: 0;
  color: inherit;
  line-height: 1.4;
  white-space: normal;
  font-size: inherit;
  text-transform: none;
  letter-spacing: 0;
}
.tw-mm a::before,
.tw-mm a::after {
  /* Kill Salient's animated underline pseudos that bleed into our links. */
  display: none !important;
  content: none !important;
  background: none !important;
}

.tw-mm {
  --tw-mm-pad: 12px;
  --tw-mm-card-bg: #FFFFFF;
  --tw-mm-line: var(--tw-line-soft, #ECEFED);
  --tw-mm-radius: 12px;

  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--tw-mm-pad);
  font-family: var(--tw-display, "Space Grotesk", system-ui, sans-serif);
  color: var(--tw-ink, #0B0F0D);
  background: #ffffff;
  max-width: var(--tw-container-max, 1320px);
  margin: 0 auto;
}

/* ── TOP ROW: hero | cats | bestsellers ─────────────────────────── */
.tw-mm__top {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: stretch;
}

/* ===== HERO — compact version, hugs panel height ===== */
.tw-mm__hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--tw-mm-radius);
  background: #2b3a30;
  color: #fff;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tw-mm__hero-media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.tw-mm__hero-media--placeholder {
  background:
    /* mint vlines pattern (signature Techwish motif) */
    repeating-linear-gradient(100deg,
      transparent 0 18px,
      rgba(45, 206, 146, 0.12) 18px 20px),
    /* soft mint glow top-left */
    radial-gradient(120% 80% at 20% 20%, rgba(45,206,146,.28), transparent 50%),
    /* dark base */
    linear-gradient(180deg, #1a2520 0%, #0b0f0d 100%);
}
.tw-mm__hero-media::after {
  content: "";
  position: absolute; inset: 0;
  /* Strong, smooth scrim — text sits in the bottom 60%, so we keep the
     top ~20% mostly clean and ramp aggressively in the middle. */
  background:
    linear-gradient(180deg,
      rgba(11,15,13, 0)    0%,
      rgba(11,15,13, 0)    20%,
      rgba(11,15,13, 0.45) 50%,
      rgba(11,15,13, 0.82) 75%,
      rgba(11,15,13, 0.95) 100%);
}
.tw-mm__hero-body {
  position: relative;
  padding: 18px 18px 18px;
}
.tw-mm__eyebrow {
  display: inline-block;
  font-family: var(--tw-mono, "IBM Plex Mono", monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tw-mint, #2DCE92);
  margin-bottom: 8px;
}
.tw-mm__hero-title {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 10px;
  color: #fff;
}
.tw-mm__hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--tw-mint, #2DCE92);
}
.tw-mm__hero-lede {
  font-size: 12.5px;
  line-height: 1.45;
  color: #cfd9d4;
  margin: 0 0 14px;
  max-width: 36ch;
}
.tw-mm__hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

/* Buttons — scoped, don't inherit Salient .btn */
.tw-mm__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
  transition: background var(--tw-dur-fast, .15s) ease, color var(--tw-dur-fast, .15s) ease;
}
.tw-mm__btn.is-mint  { background: var(--tw-mint, #2DCE92); color: #062319; }
.tw-mm__btn.is-mint:hover { background: var(--tw-mint-600, #1FB37C); color: #062319; }
.tw-mm__btn.is-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.tw-mm__btn.is-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

.tw-mm__social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.tw-mm__avatars {
  display: inline-flex;
}
.tw-mm__avatars span {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #cdd6cf, #6b7470);
  border: 2px solid #1a2520;
  margin-left: -8px;
}
.tw-mm__avatars span:first-child { margin-left: 0; }
.tw-mm__social-proof-text {
  font-size: 12px;
  line-height: 1.3;
  color: #b9c4be;
}

/* ===== CATEGORIES GRID — clean sections, no boxy borders ===== */
.tw-mm__cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 36px;          /* więcej oddechu między kartami */
  padding: 8px 16px;
}
.tw-mm__cat {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
}

/* — HEAD: ikona + tytuł + blurb pod, separator pod całością — */
.tw-mm__cat-head {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  row-gap: 2px;
  align-items: start;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--tw-line-soft, #ECEFED);
}
.tw-mm__cat-icon {
  grid-row: 1 / span 2;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--tw-mint-050, #F1FAF5);
  color: var(--tw-mint-600, #1FB37C);
}
.tw-mm__cat-icon svg { width: 18px; height: 18px; }
.tw-mm__cat-headtext {
  /* span both head columns under icon when blurb wraps long */
  display: contents;
}
.tw-mm__cat-title {
  display: block;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--tw-ink, #0B0F0D);
  text-decoration: none;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0;
  /* keep title on its own line next to icon */
  grid-column: 2;
  align-self: end;
}
.tw-mm__cat-title:hover { color: var(--tw-mint-600, #1FB37C); }
.tw-mm__cat-blurb {
  display: block;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
  font-size: 12px;
  line-height: 1.4;
  color: var(--tw-mute, #6B7470);
  margin: 0;
  grid-column: 2;
}

/* — LINKS: clean baseline grid, even rhythm — */
.tw-mm__cat-links {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px;
}
.tw-mm__cat-links li { margin: 0; padding: 0; }
.tw-mm__cat-links a {
  display: block;
  padding: 5px 0;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--tw-ink-2, #2A2F2C);
  text-decoration: none;
  letter-spacing: -0.003em;
  transition: color var(--tw-dur-fast, .15s) ease, transform var(--tw-dur-fast, .15s) ease;
}
.tw-mm__cat-links a:hover {
  color: var(--tw-mint-600, #1FB37C);
  transform: translateX(2px);
}
/* "Zobacz wszystkie" — distinct from regular sub-links: dashed top
   separator with breathing room + monospace eyebrow style + mint pill arrow.
   The pill arrow is wrapped to vertically center against the lowercase
   ascender height of the mono label (which sits below pure middle). */
.tw-mm__cat-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;        /* more space above */
  padding-top: 14px;       /* more space below the dashed line */
  border-top: 1px dashed var(--tw-line, #DDE3E0);
  font-family: var(--tw-mono, "IBM Plex Mono", monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tw-mint-600, #1FB37C);
  text-decoration: none;
  align-self: flex-start;
  line-height: 1;          /* let the flex centerline equal the cap height */
}
.tw-mm__cat-all:hover { color: var(--tw-mint, #2DCE92); }
.tw-mm__cat-all svg {
  display: block;
  width: 18px; height: 18px;
  padding: 4px;
  background: var(--tw-mint-050, #F1FAF5);
  border-radius: 999px;
  box-sizing: border-box;   /* contain padding inside the 18×18 box */
  transition: transform var(--tw-dur-fast, .15s) ease, background var(--tw-dur-fast, .15s) ease;
}
.tw-mm__cat-all:hover svg {
  background: var(--tw-mint, #2DCE92);
  color: #062319;
  transform: translateX(2px);
}

/* ===== BESTSELLERS ===== */
.tw-mm__best {
  background: var(--tw-paper-2, #F4F7F5);
  border: 0;
  border-radius: var(--tw-mm-radius);
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;            /* equal visual weight with hero */
}
.tw-mm__best-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 24px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tw-mute, #6B7470);
  margin: 0;
}
.tw-mm__best-empty::before {
  content: "○";
  display: block;
  font-size: 28px;
  color: var(--tw-mute-2, #98A09B);
  margin-bottom: 8px;
  opacity: .4;
}
.tw-mm__best-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.tw-mm__best-icon {
  color: var(--tw-mint-600, #1FB37C);
  display: inline-flex;
}
.tw-mm__best-title {
  font-family: var(--tw-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tw-ink-2, #2A2F2C);
  font-weight: 500;
}
.tw-mm__best-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tw-mm__best-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px;
  border-radius: 10px;
  transition: background var(--tw-dur-fast, .15s) ease;
}
.tw-mm__best-item:hover { background: var(--tw-paper-2, #F4F7F5); }
.tw-mm__best-thumb {
  position: relative;
  display: block;
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tw-paper-2, #F4F7F5);
}
.tw-mm__best-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tw-mm__best-badge {
  position: absolute;
  top: 4px; left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--tw-mint, #2DCE92);
  color: #062319;
  font-family: var(--tw-mono, monospace);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.tw-mm__best-info { min-width: 0; }
.tw-mm__best-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--tw-ink, #0B0F0D);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tw-mm__best-name:hover { color: var(--tw-mint-600, #1FB37C); }
.tw-mm__best-rating {
  font-size: 11px;
  margin-top: 2px;
}
.tw-mm-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tw-mute, #6B7470);
}
.tw-mm-rating__icon { color: #F5B400; display: inline-flex; }
.tw-mm-rating__value { font-weight: 600; color: var(--tw-ink-2, #2A2F2C); }
.tw-mm-rating__count { color: var(--tw-mute-2, #98A09B); }

.tw-mm__best-price {
  margin-top: 4px;
  font-family: var(--tw-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--tw-ink, #0B0F0D);
}
.tw-mm__best-price del { color: var(--tw-mute-2, #98A09B); font-weight: 400; font-size: 11px; margin-right: 4px; }
.tw-mm__best-price ins { text-decoration: none; color: var(--tw-mint-600, #1FB37C); }

.tw-mm__best-cart {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--tw-paper-2, #F4F7F5);
  color: var(--tw-ink, #0B0F0D);
  transition: background var(--tw-dur-fast, .15s) ease, color var(--tw-dur-fast, .15s) ease;
}
.tw-mm__best-cart:hover {
  background: var(--tw-mint, #2DCE92);
  color: #062319;
}

.tw-mm__best-viewall {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 10px 12px;
  background: var(--tw-mint-050, #F1FAF5);
  border-radius: 12px;
  text-decoration: none;
  color: var(--tw-ink, #0B0F0D);
  transition: background var(--tw-dur-fast, .15s) ease;
}
.tw-mm__best-viewall:hover { background: var(--tw-mint-100, #DFF6EC); }
.tw-mm__best-viewall-icon {
  color: var(--tw-mint-600, #1FB37C);
  display: inline-flex;
}
.tw-mm__best-viewall-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tw-mm__best-viewall-label {
  font-size: 13px;
  font-weight: 600;
}
.tw-mm__best-viewall-sub {
  font-size: 11px;
  color: var(--tw-mute, #6B7470);
}
.tw-mm__best-viewall-arrow {
  margin-left: auto;
  color: var(--tw-mint-600, #1FB37C);
  display: inline-flex;
}

/* ── BOTTOM STRIP — compact, no boxed card ───────────────────── */
.tw-mm__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--tw-line-soft, #ECEFED);
  border-radius: 0;
  padding: 14px 12px 4px;
}

/* GUIDES (left) */
.tw-mm__guides-title {
  display: block;
  font-family: var(--tw-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tw-mute, #6B7470);
  margin-bottom: 10px;
}
.tw-mm__guides-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px 16px;
}
.tw-mm__guides-list > li {
  display: flex !important;
  /* let our row-flex .tw-mm__guide a render thumb+body horizontally */
}
.tw-mm__guide a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.tw-mm__guide a {
  align-items: center;
}
.tw-mm__guide-thumb {
  position: relative;
  flex-shrink: 0;
  width: 72px; height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #0e1311 0%, #1b221e 100%);
  background-size: cover; background-position: center;
}
.tw-mm__guide-play {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(11,15,13,.4);
}
.tw-mm__guide-play svg { width: 14px; height: 14px; }
.tw-mm__guide-dur {
  position: absolute;
  left: 4px; bottom: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(11,15,13,.78);
  color: #fff;
  font-family: var(--tw-mono, monospace);
  font-size: 10px;
  line-height: 1.2;
}
.tw-mm__guide-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
}
.tw-mm__guide-title {
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--tw-ink, #0B0F0D);
  letter-spacing: -0.005em;
  /* clamp to 2 lines so layout doesn't break on long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tw-mm__guide-cta {
  font-family: var(--tw-mono, "IBM Plex Mono", monospace);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tw-mint-600, #1FB37C);
}

/* USP (right) — single-line "title sub" pattern (matches mockup).
   Each block: small mint circle icon + tytuł + jasniejszy sub w tej samej
   linii. Cztery USP rozkładają się w wiersz z równym oddechem. */
.tw-mm__usp {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  border-left: 1px dashed var(--tw-line, #DDE3E0);
  padding-left: 20px;
  align-items: center;
}
.tw-mm__usp-item {
  flex: 1 1 0;
  min-width: 120px;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 10px;
  font-family: var(--tw-display, "Space Grotesk", sans-serif);
}
.tw-mm__usp-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--tw-mint-050, #F1FAF5);
  color: var(--tw-mint-600, #1FB37C);
}
.tw-mm__usp-icon svg { width: 16px; height: 16px; }
.tw-mm__usp-text {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 4px;
  row-gap: 0;
  line-height: 1.35;
  min-width: 0;
}
.tw-mm__usp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tw-ink, #0B0F0D);
  letter-spacing: -0.005em;
}
.tw-mm__usp-sub {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--tw-mute, #6B7470);
  letter-spacing: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
/* Salient sometimes renders the mega dropdown narrower than the
   viewport (contained-width setting + container padding). We push the
   breakpoints down so the panel keeps its 3-column shape on real
   menus, only stacking when there's truly no room. */
@media (max-width: 1200px) {
  .tw-mm__top { grid-template-columns: 260px minmax(0, 1fr) 280px; }
  .tw-mm__cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  /* Drop bestsellers below; keep hero+cats side-by-side as long as we can. */
  .tw-mm__top {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .tw-mm__best { grid-column: 1 / -1; }
  .tw-mm__cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .tw-mm__top { grid-template-columns: 1fr; }
  .tw-mm__hero { min-height: 280px; }
  .tw-mm__bottom { grid-template-columns: 1fr; }
  .tw-mm__usp {
    border-left: 0;
    padding-left: 0;
    border-top: 1px dashed var(--tw-line, #DDE3E0);
    padding-top: 12px;
  }
}
@media (max-width: 560px) {
  .tw-mm__cats { grid-template-columns: 1fr; }
  .tw-mm__usp-item { flex: 1 1 calc(50% - 6px); }
}
