/* ══ DiveKit Mega Menu ═══════════════════════════════════════════════════════
   v2.0.0 — three-zone hover panel, rendered in <body> below the navbar.
   Typography inherits the site font so the panel reads as part of the header.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --dk-panel:  #10263C;   /* panel ground — dark navy, not black            */
  --dk-rail:   #0C1F32;   /* left rail, one step darker                     */
  --dk-line:   #234763;   /* dividers                                       */
  --dk-teal:   #1F9C90;   /* accent                                         */
  --dk-teal-hi:#2FC4B5;   /* active / CTA                                   */
  --dk-text:   #F2F7FB;   /* headings, active labels                        */
  --dk-body:   #C9DCEA;   /* links, body copy   (≈9:1 on --dk-panel)        */
  --dk-muted:  #93B6CC;   /* idle rail labels   (≈6:1 on --dk-rail)         */
  --dk-faint:  #4F7590;   /* small caps labels                              */
}

/* ── Nav item: hide Ustone's own dropdown, rotate its chevron when open ──── */
.dk-mega-item > .sub-menu,
.dk-mega-item > ul {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.dk-mega-item > a .menu-arrow,
.dk-mega-item > a .dk-mega-arrow {
  transition: transform .2s ease;
}
.dk-mega-item.dk-panel-open > a .menu-arrow,
.dk-mega-item.dk-panel-open > a .dk-mega-arrow {
  transform: rotate(180deg);
}
.dk-mega-arrow { display: inline-flex; align-items: center; margin-left: 4px; }

/* ── Backdrop (top set by JS to the navbar's bottom edge) ─────────────────── */
.dk-mega-backdrop {
  position: fixed;
  left: 0; right: 0; bottom: 0; top: 0;
  background: rgba(3, 12, 20, .5);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.dk-mega-backdrop.is-visible { opacity: 1; pointer-events: auto; }

/* ── Panel shell ───────────────────────────────────────────────────────────── */
.dk-mega-panel {
  position: fixed;
  left: 0; right: 0;
  z-index: 9010;
  display: none;
  background: var(--dk-panel);
  color: var(--dk-body);
  border-top: 2px solid var(--dk-teal);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  font-family: inherit;
}
.dk-mega-panel.is-open { display: block; }

/* ── Tab row: one tab per top-level category, "All products" on the right ─── */
.dk-mega-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 34px;
  background: var(--dk-rail);
  border-bottom: 1px solid var(--dk-line);
}
.dk-mega-tablist { display: flex; gap: 28px; }
.dk-mega-panel .dk-mega-tab {
  margin: 0 0 -1px;
  padding: 15px 2px 13px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dk-muted);
  transition: color .12s, border-color .12s;
}
.dk-mega-panel .dk-mega-tab:hover,
.dk-mega-panel .dk-mega-tab:focus-visible { color: var(--dk-text); outline: none; }
.dk-mega-panel .dk-mega-tab.is-active { color: var(--dk-text); border-bottom-color: var(--dk-teal-hi); }
.dk-mega-panel .dk-mega-tabs__search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 7px 12px;
  background: rgba(31, 156, 144, .10);
  border: 1px solid var(--dk-line);
  border-radius: 3px;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dk-text);
  transition: background .12s, border-color .12s;
}
.dk-mega-panel .dk-mega-tabs__search:hover,
.dk-mega-panel .dk-mega-tabs__search:focus-visible {
  background: rgba(31, 156, 144, .22);
  border-color: var(--dk-teal-hi);
  outline: none;
}
.dk-mega-panel .dk-mega-tabs__search svg { color: var(--dk-teal-hi); }

.dk-mega-panel a.dk-mega-tabs__all {
  margin-left: 22px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dk-teal-hi) !important;
  text-decoration: none !important;
}
.dk-mega-panel a.dk-mega-tabs__all:hover { color: #ffffff !important; }

/* ── One section per tab; only the active one is laid out ─────────────────── */
.dk-mega-inner {
  display: none;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 360px;
  max-height: calc(100vh - 190px);
}
.dk-mega-inner.is-active { display: flex; }

/* ── Left rail ─────────────────────────────────────────────────────────────── */
.dk-mega-rail {
  width: 236px;
  flex: 0 0 236px;
  background: var(--dk-rail);
  border-right: 1px solid var(--dk-line);
  padding: 14px 0;
  overflow-y: auto;
}
.dk-mega-panel .dk-rail-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 18px 11px 22px;
  margin: 0;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--dk-muted);
  transition: color .12s, background .12s, border-color .12s;
}
.dk-mega-panel .dk-rail-item svg { flex: none; opacity: .35; }
.dk-mega-panel .dk-rail-item:hover,
.dk-mega-panel .dk-rail-item:focus-visible {
  color: var(--dk-text);
  background: rgba(31, 156, 144, .10);
  outline: none;
}
.dk-mega-panel .dk-rail-item.is-active {
  color: var(--dk-text);
  background: rgba(31, 156, 144, .16);
  border-left-color: var(--dk-teal-hi);
}
.dk-mega-panel .dk-rail-item.is-active svg { opacity: 1; color: var(--dk-teal-hi); }

/* ── Centre: sub-category columns ──────────────────────────────────────────── */
.dk-mega-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px 34px;
  overflow-y: auto;
}
.dk-sub-panel { display: none; flex-wrap: wrap; gap: 0 40px; align-content: flex-start; }
.dk-sub-panel.is-active { display: flex; }
.dk-sub-col {
  display: flex;
  flex-direction: column;
  flex: 0 1 200px;
  min-width: 160px;
  margin-bottom: 18px;
}
.dk-sub-col--all { flex-basis: 100%; margin-top: 4px; }

/* Links are scoped and !important because Ustone's `.navigation a` rules
   (class + element) out-specify a bare class and paint every anchor black. */
.dk-mega-panel a.dk-sub-link {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--dk-body) !important;
  text-decoration: none !important;
  transition: color .12s, padding-left .12s;
}
.dk-mega-panel a.dk-sub-link:hover,
.dk-mega-panel a.dk-sub-link:focus-visible { color: #ffffff !important; padding-left: 4px; }
.dk-mega-panel a.dk-sub-link--all {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dk-teal-hi) !important;
}

/* ── Right: feature card + quick links ─────────────────────────────────────── */
.dk-mega-feature {
  width: 250px;
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  border-left: 1px solid var(--dk-line);
  overflow-y: auto;
}
.dk-feature-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dk-teal-hi);
  margin-bottom: 10px;
}
.dk-feature-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dk-text);
  margin-bottom: 8px;
  text-wrap: balance;
}
.dk-mega-panel p.dk-feature-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--dk-body);
  margin: 0 0 14px;
}
.dk-mega-panel a.dk-feature-cta {
  display: inline-block;
  align-self: flex-start;
  padding: 9px 14px;
  margin-bottom: 22px;
  border-radius: 3px;
  background: var(--dk-teal);
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: background .12s;
}
.dk-mega-panel a.dk-feature-cta:hover { background: var(--dk-teal-hi); }

.dk-quick-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dk-faint);
  padding-top: 16px;
  margin-bottom: 4px;
  border-top: 1px solid var(--dk-line);
}
.dk-mega-panel a.dk-quick-link {
  display: block;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--dk-body) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(35, 71, 99, .6);
  transition: color .12s;
}
.dk-mega-panel a.dk-quick-link:last-child { border-bottom: 0; }
.dk-mega-panel a.dk-quick-link:hover { color: #ffffff !important; }

/* ── Below the desktop nav breakpoint the header nav is hidden by Ustone; the
   drawer menu takes over, so the panels must never render there. ─────────── */
@media (max-width: 1023px) {
  .dk-mega-panel, .dk-mega-backdrop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .dk-mega-backdrop, .dk-mega-item > a .menu-arrow, .dk-mega-panel a { transition: none; }
}

/* ══ Brands panel ══════════════════════════════════════════════════════════
   Featured: 4×4 grid of brand tiles (logo when term meta has one, else a
   typographic wordmark) with live product counts. A–Z: every brand in
   letter groups. Right: editorial cover using the site's own hero image. */
.dk-brands-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dk-brands-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dk-muted);
}
.dk-mega-panel a.dk-brands-head__all {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dk-teal-hi) !important;
  text-decoration: none !important;
}
.dk-mega-panel a.dk-brands-head__all:hover { color: #ffffff !important; }

.dk-brands-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.dk-mega-panel a.dk-brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 88px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--dk-line);
  border-radius: 4px;
  color: var(--dk-text) !important;
  text-decoration: none !important;
  transition: border-color .15s, background .15s, transform .15s;
}
.dk-mega-panel a.dk-brand-tile:hover,
.dk-mega-panel a.dk-brand-tile:focus-visible {
  border-color: var(--dk-teal-hi);
  background: rgba(31, 156, 144, .12);
  transform: translateY(-1px);
  outline: none;
}
.dk-brand-mark {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
  text-wrap: balance;
}
.dk-brand-mark--long { font-size: 12px; letter-spacing: .1em; }
.dk-brand-logo {
  max-width: 120px;
  max-height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);   /* one-colour treatment on the navy ground */
  opacity: .92;
}
.dk-brand-count {
  font-size: 11px;
  color: var(--dk-muted);
  font-variant-numeric: tabular-nums;
}

.dk-brands-az { column-count: 5; column-gap: 30px; }
.dk-brands-az__group { break-inside: avoid; margin-bottom: 16px; }
.dk-brands-az__letter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--dk-teal-hi);
  padding-bottom: 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--dk-line);
}
.dk-mega-panel a.dk-brands-az__link {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--dk-body) !important;
  text-decoration: none !important;
}
.dk-mega-panel a.dk-brands-az__link:hover { color: #ffffff !important; }
.dk-brands-az__count {
  font-size: 11px;
  color: var(--dk-faint);
  font-variant-numeric: tabular-nums;
}

.dk-mega-feature--brands { width: 300px; flex-basis: 300px; padding-top: 22px; }
.dk-brands-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
  background: #0c1f32 center / cover no-repeat;
}
.dk-brands-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 38, 60, 0) 30%, rgba(16, 38, 60, .94) 100%);
}
.dk-brands-cover__stat {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dk-body);
}
.dk-brands-cover__stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* ══ "Shop by category" trigger as a filled menu button ═══════════════════
   Ustone's nav anchors are full-row-height flex items, so the pill is the
   inner .dk-mega-pill span (hamburger + label + chevron) that the anchor
   centres like any other label. Scoped under .header and !important on the
   colours because Ustone's nav rules out-specify a bare class. */
.header .dk-mega-item.dk-mega-cat--all > a {
  padding-left: 0 !important;
  padding-right: 8px !important;
  background: none !important;
}
.header .dk-mega-item.dk-mega-cat--all > a .dk-mega-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 14px 0 13px;
  border-radius: 4px;
  background: var(--dk-teal);
  color: #ffffff;
  transition: background .15s;
}
.header .dk-mega-item.dk-mega-cat--all > a:hover .dk-mega-pill,
.header .dk-mega-item.dk-mega-cat--all.dk-panel-open > a .dk-mega-pill {
  background: #178478;
}
.header .dk-mega-item.dk-mega-cat--all > a .dk-mega-menu-icon { display: inline-flex; line-height: 0; }
.header .dk-mega-item.dk-mega-cat--all > a .menu-arrow,
.header .dk-mega-item.dk-mega-cat--all > a .dk-mega-arrow { color: rgba(255, 255, 255, .8); }
