/* =====================================================================
   Custom Header — page-specific styles only — theme tokens come from
   design-system.css (mobile boundary: 900px — see --eralux-mobile-breakpoint).

   NAV COLLAPSE — not a media query
   -------------------------------
   The burger layout and the "hide the Favorites label" step used to be
   fixed breakpoints (980px / 1180px). A header's menu does not run out
   of room at a width you can guess in advance: it runs out when the
   labels, the language and the number of menu items say so. Both steps
   are therefore driven by two classes that header.js puts on <html>
   after measuring the real content:

     html.ews-nav-compact    — Favorites shrinks to its icon
     html.ews-nav-collapsed  — full burger menu

   Every rule below that belongs to a step is prefixed with
   :where(html.ews-nav-*), which adds ZERO specificity — so the cascade
   behaves exactly as it did while these were media queries, and the
   later mobile blocks still override them by source order.
   The nav-collapse width can also be pinned to a fixed pixel value in
   Settings -> Eralux Header.
   --eralux-header-bg / --eralux-header-text / --eralux-header-accent are set on :root by header.php;
   their fallbacks below alias the master tokens.
   ===================================================================== */

.eralux-header {
  /* Dropdown palette — the theme's cool grey-blue family. */
  --eralux-header-border: var(--ews-cool-line);
  --eralux-header-ink: var(--ews-cool-ink);
  --eralux-header-muted: var(--ews-cool-muted);
  --eralux-header-panel: var(--ews-cool-panel);
  --eralux-header-media-placeholder: var(--ews-cool-media);
  --eralux-header-heading-tint: var(--ews-cool-tint);
  --eralux-header-empty-ink: var(--ews-muted-ink);
  position: relative;
  z-index: 99990;
  /* Full-viewport-width breakout: the header always spans edge to edge,
	   even when a theme places it inside a width-constrained wrapper. */
  width: calc(100vw - var(--ews-scrollbar, 0px));
  max-width: calc(100vw - var(--ews-scrollbar, 0px));
  margin-left: calc(50% - 50vw + var(--ews-scrollbar, 0px) / 2);
  margin-right: calc(50% - 50vw + var(--ews-scrollbar, 0px) / 2);
  background: var(--eralux-header-bg, var(--ews-ink));
  color: var(--eralux-header-text, var(--ews-contrast-ink));
}

.eralux-header-sticky .eralux-header {
  position: sticky;
  top: 0;
}

.admin-bar.eralux-header-sticky .eralux-header {
  top: 32px;
}

/* Self-contained typography reset — :is() (specificity 0,2,0) rather than
   :where() (0,0,0) so page-level `*` resets and browser defaults can never
   change the header's rhythm from one page to the next. */
.eralux-header :is(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, form) {
  margin: 0;
  padding: 0;
}

.eralux-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 84px;
  margin: 0 auto;
  /* The ONLY place the header's horizontal inset is set. It is the page
     gutter, so the logo lines up with the page content beneath it at every
     width. State rules below change the vertical padding and the heights;
     none of them may restate the inset. Three different values for it —
     the gutter here, clamp(16px, 4vw, 24px) when the nav collapsed, and a
     flat 16px below 900px — are why the logo drifted out of line with the
     page as soon as the menu collapsed. */
  padding: 9px var(--ews-gutter);
}

.eralux-header-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  line-height: 0;
}

/* Shared logo size convention (header + footer): 48px tall on desktop,
   36px tall below the 900px mobile boundary. The wordmark PNG is dark, so
   no filter is applied — it renders in its own (black) color. */
.eralux-header-inner .eralux-header-logo {
  display: block;
  width: auto;
  height: 48px;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

.eralux-header-navigation {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 26px);
}

.eralux-header-menu {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.5vw, 48px);
}

.eralux-header-products-menu {
  position: static;
}

.eralux-header-products-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.eralux-header-products-trigger svg {
  width: 10px;
  height: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 180ms ease;
}

.eralux-header-products-menu.is-open .eralux-header-products-trigger {
  color: var(--eralux-header-accent, var(--ews-accent));
}

.eralux-header-products-trigger:focus-visible,
.eralux-header-menu > a:focus-visible,
.eralux-header-logo-link:focus-visible,
.eralux-header-menu-toggle:focus-visible {
  outline: 2px solid var(--eralux-header-accent, var(--ews-accent));
  outline-offset: 5px;
}

.eralux-header-products-menu.is-open .eralux-header-products-trigger svg {
  transform: rotate(180deg);
}

.eralux-header-products-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: none;
  padding: 0 var(--ews-gutter) 26px;
  background: var(--eralux-header-bg, var(--ews-paper));
  cursor: pointer;
}

.eralux-header-products-menu.is-open .eralux-header-products-dropdown {
  display: block;
}

.eralux-header-dropdown-inner {
  display: grid;
  height: min(490px, calc(100vh - 116px));
  min-height: 320px;
  grid-template-columns: minmax(310px, 33%) minmax(0, 1fr);
  overflow: hidden;
  border-top: 3px solid var(--eralux-header-accent, var(--ews-accent));
  border-radius: 0 0 3px 3px;
  background: var(--eralux-header-panel);
  box-shadow: 0 22px 50px rgba(var(--ews-ink-rgb), 0.34);
  color: var(--eralux-header-ink);
  cursor: default;
}

/*
 * The four scrollable panels in this header — this one, the mobile navigation,
 * the search results and the Favorites tray — all carry data-lenis-prevent in
 * the markup as well as overscroll-behavior here.
 *
 * overscroll-behavior alone is not enough on a product page. Those pages run
 * Lenis for smooth scrolling, and Lenis listens for wheel events on the
 * document and scrolls the PAGE itself; it does no overflow detection, so it
 * has no idea the pointer is over a panel with its own scrollbar. The wheel
 * event never reaches the panel, and the page moves underneath an open
 * dropdown instead. data-lenis-prevent is the attribute Lenis checks to hand
 * the event back to the browser, and only then does overscroll-behavior get to
 * do its job of stopping the scroll chaining to the page at the ends.
 */
.eralux-header-segments-panel {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-right: 1px solid var(--eralux-header-border);
  background: var(--eralux-header-bg, var(--ews-paper));
  scrollbar-color: var(--eralux-header-accent, var(--ews-accent))
    var(--eralux-header-bg, var(--ews-paper));
  scrollbar-width: thin;
}

.eralux-header-segments-panel::-webkit-scrollbar {
  width: 8px;
}

.eralux-header-segments-panel::-webkit-scrollbar-track {
  background: var(--eralux-header-bg, var(--ews-paper));
}

.eralux-header-segments-panel::-webkit-scrollbar-thumb {
  border: 2px solid var(--eralux-header-bg, var(--ews-paper));
  border-radius: 10px;
  background: var(--eralux-header-accent, var(--ews-accent));
}

.eralux-header-menu .eralux-header-segment-level a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--eralux-header-ink) !important;
  text-decoration: none !important;
}

.eralux-header-segment-level {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eralux-header-segment-level > li {
  margin: 0;
}

.eralux-header-segment-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--eralux-header-border);
  background: var(--eralux-header-bg, var(--ews-paper));
}

.eralux-header-segment-level a {
  flex: 1 1 auto;
  min-height: 50px;
  padding: 10px 20px;
  border: 0;
}

/* "All Products" link at the top of the products dropdown. */
.eralux-header-all-products {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--eralux-header-border);
  background: var(--eralux-header-bg, var(--ews-paper));
}

.eralux-header-menu .eralux-header-all-products:hover,
.eralux-header-menu .eralux-header-all-products:focus-visible {
  background: var(--ews-accent-soft);
  color: var(--eralux-header-accent, var(--ews-accent)) !important;
  outline: none;
}

.eralux-header-menu .eralux-header-segment-level a:hover,
.eralux-header-menu .eralux-header-segment-level a:focus-visible {
  background: var(--ews-accent-soft);
  color: var(--eralux-header-accent, var(--ews-accent)) !important;
  outline: none;
}

.eralux-header-segment-toggle {
  position: relative;
  width: 50px;
  flex: 0 0 50px;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--eralux-header-border);
  background: transparent;
  color: var(--eralux-header-muted);
  cursor: pointer;
}

.eralux-header-segment-toggle:hover,
.eralux-header-segment-toggle:focus-visible {
  background: var(--ews-accent-soft);
  color: var(--eralux-header-accent, var(--ews-accent));
  outline: none;
}

.eralux-header-segment-toggle span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translate(-50%, -65%) rotate(45deg);
  transition: transform 160ms ease;
}

.eralux-header-has-children.is-expanded
  > .eralux-header-segment-row
  .eralux-header-segment-toggle
  span::before {
  transform: translate(-50%, -35%) rotate(225deg);
}

.eralux-header-has-children > .eralux-header-segment-level {
  display: none;
}

.eralux-header-has-children.is-expanded > .eralux-header-segment-level {
  display: block;
}

.eralux-header-segment-level-1 a {
  min-height: 42px;
  padding-left: 38px;
  background: var(--eralux-header-bg, var(--ews-paper));
  font-size: 12px;
  font-weight: var(--ews-weight-medium);
}

.eralux-header-segment-level-2 a {
  padding-left: 56px;
  font-size: 11px;
}

.eralux-header-segment-arrow {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-right: 3px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  color: var(--eralux-header-muted);
  transform: rotate(45deg);
}

.eralux-header-empty-segments {
  margin: 0;
  padding: 20px;
  color: var(--eralux-header-empty-ink);
}

.eralux-header-product-images {
  /* Fluid, justified collage: each tile's aspect ratio is set from its
	   image (by header.js), and flex-grow proportional to that ratio lets
	   the tiles stretch to fill every row — images scale fluidly with NO
	   cropping and NO stretching, clamped between a min and max size. */

  /* How far each picture dissolves into the panel at its own edges is set
	   in the header's own settings and published on :root as
	   --eralux-collage-fade; the 12px below each var() is the fallback for
	   a page that somehow renders without it. The tiles sit flush against
	   each other (no gap), so this soft border is what separates one
	   picture from the next: a hard rectangle edge against a hard rectangle
	   edge reads as a seam, a fade reads as one collage. */
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  background: var(--ews-paper);
}

/* The reserve tiles ship with the hidden attribute and header.js reveals
   only as many as fit. This rule is required, not defensive: the author
   `display: block` below beats the browser's [hidden] { display: none },
   so without it the whole reserve would be visible until the script ran. */
.eralux-header-product-image[hidden] {
  display: none;
}

.eralux-header-product-image {
  position: relative;
  display: block;
  /* header.js overrides flex-grow / flex-basis / aspect-ratio per image;
	   these are the fallbacks and the min/max size clamps. */
  flex: 140 1 240px;
  aspect-ratio: 1.4;
  min-width: 84px;
  max-width: min(100%, 480px);
  min-height: 64px;
  max-height: 260px;
  overflow: hidden;
  background: transparent;
  text-decoration: none !important;
}

.eralux-header-product-images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;

  /* Two gradients intersected: one fades the left and right edges, the
	   other the top and bottom, so all four melt into the panel. Where
	   mask-composite is not supported the layers merely add up, which
	   leaves the pictures as they were — flush, but unfaded. */
  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent 0,
      #000 var(--eralux-collage-fade, 12px),
      #000 calc(100% - var(--eralux-collage-fade, 12px)),
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0,
      #000 var(--eralux-collage-fade, 12px),
      #000 calc(100% - var(--eralux-collage-fade, 12px)),
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(
      to right,
      transparent 0,
      #000 var(--eralux-collage-fade, 12px),
      #000 calc(100% - var(--eralux-collage-fade, 12px)),
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0,
      #000 var(--eralux-collage-fade, 12px),
      #000 calc(100% - var(--eralux-collage-fade, 12px)),
      transparent 100%
    );
  mask-composite: intersect;
}

/* No zoom or filter on hover. */
.eralux-header-product-image:hover img {
  filter: none;
  transform: none;
}

.eralux-header-menu .eralux-header-product-image::after {
  display: none;
}

.eralux-header-menu a {
  position: relative;
  color: var(--eralux-header-text, var(--ews-contrast-ink)) !important;
  font-size: 14px;
  font-weight: var(--ews-weight-semibold);
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
}

.eralux-header-menu a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--eralux-header-accent, var(--ews-accent));
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.eralux-header-menu a:hover::after,
.eralux-header-menu a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.eralux-header-search-wrap {
  position: relative;
  flex: 0 1 auto;
}

.eralux-header-search {
  display: flex;
  align-items: center;
  width: clamp(180px, 18vw, 280px);
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(var(--ews-ink-rgb), 0.38);
  border-radius: 1px;
  background: rgba(var(--ews-contrast-ink-rgb), 0.3);
}

.eralux-header-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(430px, calc(100vw - 32px));
  max-height: min(520px, 70vh);
  overflow-y: auto;
  border: 1px solid var(--eralux-header-border);
  background: var(--eralux-header-bg, var(--ews-paper));
  box-shadow: 0 18px 42px rgba(var(--ews-ink-rgb), 0.2);
}

.eralux-header-search-results[hidden] {
  display: none;
}

.eralux-header-search-result {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid var(--eralux-header-border);
  color: var(--eralux-header-ink) !important;
  text-decoration: none !important;
  flex-direction: column;
  gap: 3px;
}

/* is-active is the arrow-key highlight. It shares the hover appearance
   deliberately: there is one selection in the list, whether it was reached
   with the mouse or with the keyboard, and Enter goes to whatever is lit. */
.eralux-header-search-result:hover,
.eralux-header-search-result:focus-visible,
.eralux-header-search-result.is-active {
  background: var(--ews-accent-soft);
  outline: none;
}

.eralux-header-search-result-title {
  font-size: 13px;
  font-weight: 650;
}

.eralux-header-search-result-meta {
  color: var(--eralux-header-muted);
  font-size: 10px;
  font-weight: var(--ews-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eralux-header-search-status {
  padding: 18px 16px;
  color: var(--eralux-header-muted);
  font-size: 13px;
}

/* Loading row shown while a search request is in flight. */
.eralux-header-search-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: var(--eralux-header-muted);
  font-size: 13px;
}

.eralux-header-search-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid var(--eralux-header-border);
  border-top-color: var(--eralux-header-accent, var(--ews-accent));
  border-radius: 50%;
  animation: eralux-header-search-spin 0.7s linear infinite;
}

@keyframes eralux-header-search-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Favorites panel (opens from the header Favorites button) ---- */
.eralux-header-favorites-panel {
  position: absolute;
  z-index: 30;
  top: 100%;
  right: var(--eralux-page-padding-horizontal);
  width: min(430px, calc(100vw - 32px));
  max-height: min(540px, 72vh);
  overflow-y: auto;
  border: 1px solid var(--eralux-header-border);
  background: var(--eralux-header-bg, var(--ews-paper));
  box-shadow: 0 18px 42px rgba(var(--ews-ink-rgb), 0.2);
  /* Reaching the end of the list should not start scrolling the page
     underneath it, the same as the project and news panels. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, currentColor 45%, transparent) transparent;
}

/* The thumb is built from currentColor rather than a fixed ink, because the
   header's background and text colour are both chosen in admin: a hard-coded
   dark thumb disappears the moment someone picks a dark header. The plain
   currentColor line is the fallback for browsers without color-mix. */
.eralux-header-favorites-panel::-webkit-scrollbar {
  width: 9px;
}

.eralux-header-favorites-panel::-webkit-scrollbar-track {
  background: transparent;
}

.eralux-header-favorites-panel::-webkit-scrollbar-thumb {
  background: currentColor;
  background: color-mix(in srgb, currentColor 45%, transparent);
  border: 2px solid var(--eralux-header-bg, var(--ews-paper));
  border-radius: var(--ews-radius-pill);
}

.eralux-header-favorites-panel::-webkit-scrollbar-thumb:hover {
  background: currentColor;
  background: color-mix(in srgb, currentColor 70%, transparent);
}

.eralux-header-favorites-panel[hidden] {
  display: none;
}

.eralux-header-favorites-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--eralux-header-border);
  /* Inherit the header's chosen text colour rather than pinning to the cool
     dark ink: with the header background now selectable in admin, a fixed
     dark colour here puts the product names dark-on-dark the moment someone
     chooses a dark header. */
  color: inherit;
}

.eralux-header-favorites-image {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  /* No tinted backdrop behind the product hero image. */
  background: transparent;
  overflow: hidden;
}

.eralux-header-favorites-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eralux-header-favorites-name {
  overflow-wrap: anywhere;
}

.eralux-header-favorites-sku {
  color: var(--eralux-header-muted);
}

.eralux-header-favorites-actions {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}

.eralux-header-favorites-view,
.eralux-header-favorites-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--eralux-header-border);
  background: transparent;
  color: var(--eralux-header-ink) !important;
  text-decoration: none !important;
  cursor: pointer;
}

.eralux-header-favorites-view {
  background: var(--ews-ink);
  border-color: var(--ews-ink);
  color: var(--ews-contrast-ink) !important;
}

.eralux-header-favorites-view:hover {
  background: var(--eralux-header-accent, var(--ews-accent));
  border-color: var(--eralux-header-accent, var(--ews-accent));
}

.eralux-header-favorites-remove:hover {
  border-color: var(--ews-error);
  color: var(--ews-error) !important;
}

.eralux-header-favorites-empty {
  padding: 20px 16px;
  color: var(--eralux-header-muted);
}

.eralux-header-favorites {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  /* rendered as a <button>: strip the UA button chrome */
  margin: 0;
  border: 0;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  padding: 0 16px;
  border-radius: var(--ews-radius-pill);
  background: var(--ews-ink);
  color: var(--ews-contrast-ink) !important;
  text-decoration: none !important;
}

.eralux-header-favorites:hover,
.eralux-header-favorites:focus-visible {
  background: var(--eralux-header-accent, var(--ews-accent));
  outline: none;
}

.eralux-header-favorites svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: currentColor;
}

:where(html.ews-nav-compact) .eralux-header-favorites {
  width: 42px;
  padding: 0;
}

:where(html.ews-nav-compact) .eralux-header-favorites-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.eralux-header-search:focus-within {
  border-color: var(--eralux-header-accent, var(--ews-accent));
  box-shadow: inset 0 0 0 1px var(--eralux-header-accent, var(--ews-accent));
}

.eralux-header-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  margin: 0 !important;
  padding: 0 8px 0 14px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--eralux-header-text, var(--ews-contrast-ink)) !important;
  font: inherit;
  font-size: 14px;
}

.eralux-header-search input::placeholder {
  color: rgba(var(--ews-ink-rgb), 0.62);
  opacity: 1;
}

.eralux-header-search input::-webkit-search-cancel-button {
  filter: none;
}

.eralux-header-search button {
  display: inline-grid;
  width: 43px;
  height: 100%;
  flex: 0 0 43px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--eralux-header-text, var(--ews-contrast-ink));
  cursor: pointer;
}

.eralux-header-search button:hover,
.eralux-header-search button:focus-visible {
  background: var(--eralux-header-accent, var(--ews-accent));
  color: var(--ews-contrast-ink);
  outline: none;
}

.eralux-header-search svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.eralux-header-menu-toggle {
  display: none;
}

/* Collapsed (burger) state — see the NAV COLLAPSE note at the top of the
   file. Below the 900px mobile boundary the mobile block refines these. */
:where(html.ews-nav-collapsed) .eralux-header {
  box-shadow: 0 1px 0 rgba(var(--ews-ink-rgb), 0.1);
}

:where(html.ews-nav-collapsed) .eralux-header-inner {
  min-height: 70px;
  padding-top: 7px;
  padding-bottom: 7px;
}

:where(html.ews-nav-collapsed) .eralux-header-inner .eralux-header-logo {
  height: 48px;
  max-width: 200px;
}

:where(html.ews-nav-collapsed) .eralux-header-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0 10px 14px;
  border: 0;
  background: transparent;
  color: var(--eralux-header-text, var(--ews-contrast-ink));
  font: inherit;
  font-size: 14px;
  font-weight: var(--ews-weight-semibold);
  cursor: pointer;
}

:where(html.ews-nav-collapsed) .eralux-header-menu-icon {
  display: flex;
  width: 25px;
  flex-direction: column;
  gap: 5px;
}

:where(html.ews-nav-collapsed) .eralux-header-menu-icon i {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

:where(html.ews-nav-collapsed)
  .eralux-header-menu-toggle[aria-expanded="true"]
  .eralux-header-menu-icon
  i:first-child {
  transform: translateY(7px) rotate(45deg);
}

:where(html.ews-nav-collapsed)
  .eralux-header-menu-toggle[aria-expanded="true"]
  .eralux-header-menu-icon
  i:nth-child(2) {
  opacity: 0;
}

:where(html.ews-nav-collapsed)
  .eralux-header-menu-toggle[aria-expanded="true"]
  .eralux-header-menu-icon
  i:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

:where(html.ews-nav-collapsed) .eralux-header-navigation {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: none;
  align-items: stretch;
  max-height: calc(100vh - 70px);
  max-height: calc(100dvh - 70px);
  padding: 8px var(--ews-gutter) 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid rgba(var(--ews-ink-rgb), 0.15);
  background: var(--eralux-header-bg, var(--ews-ink));
  box-shadow: 0 18px 36px rgba(var(--ews-ink-rgb), 0.18);
  scrollbar-color: var(--eralux-header-accent, var(--ews-accent)) transparent;
  scrollbar-width: thin;
}

:where(html.ews-nav-collapsed) .eralux-header-navigation::-webkit-scrollbar {
  width: 5px;
}

:where(html.ews-nav-collapsed)
  .eralux-header-navigation::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: var(--eralux-header-accent, var(--ews-accent));
}

:where(html.ews-nav-collapsed)
  .eralux-header.eralux-header-menu-open
  .eralux-header-navigation {
  display: block;
}

:where(html.ews-nav-collapsed) .eralux-header-menu {
  align-items: stretch;
  flex-direction: column;
  gap: 0;
}

:where(html.ews-nav-collapsed) .eralux-header-products-menu {
  position: relative;
  border-bottom: 1px solid rgba(var(--ews-ink-rgb), 0.12);
}

:where(html.ews-nav-collapsed) .eralux-header-products-trigger {
  width: 100%;
  justify-content: space-between;
  min-height: 50px;
  padding: 13px 2px;
  font-size: 15px;
}

:where(html.ews-nav-collapsed) .eralux-header-products-dropdown {
  position: static;
  padding: 0 0 14px;
  background: transparent;
}

:where(html.ews-nav-collapsed) .eralux-header-dropdown-inner {
  display: block;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  border-top-width: 2px;
  border-radius: 0;
  box-shadow: none;
}

:where(html.ews-nav-collapsed) .eralux-header-segments-panel {
  overflow: visible;
  border-right: 0;
}

:where(html.ews-nav-collapsed) .eralux-header-product-images {
  display: none;
}

:where(html.ews-nav-collapsed) .eralux-header-menu a {
  min-height: 48px;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(var(--ews-ink-rgb), 0.12);
}

:where(html.ews-nav-collapsed) .eralux-header-segment-level a {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 13px;
}

:where(html.ews-nav-collapsed) .eralux-header-segment-toggle {
  width: 48px;
  flex-basis: 48px;
}

:where(html.ews-nav-collapsed) .eralux-header-segment-level-1 a {
  padding-left: 30px;
}

:where(html.ews-nav-collapsed) .eralux-header-segment-level-2 a {
  padding-left: 46px;
}

:where(html.ews-nav-collapsed) .eralux-header-menu a::after {
  display: none;
}

:where(html.ews-nav-collapsed) .eralux-header-search {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  background: rgba(var(--ews-contrast-ink-rgb), 0.55);
}

:where(html.ews-nav-collapsed) .eralux-header-search-wrap {
  width: 100%;
}

:where(html.ews-nav-collapsed) .eralux-header-search-results {
  position: static;
  width: 100%;
  max-height: 360px;
  margin-top: 6px;
  box-shadow: none;
}

:where(html.ews-nav-collapsed) .eralux-header-favorites {
  width: 100%;
  margin-top: 12px;
  border-radius: var(--ews-radius);
}

/* Inside the collapsed navigation the favorites panel flows inline,
   full width, instead of hanging off the header edge. */
:where(html.ews-nav-collapsed) .eralux-header-favorites-panel {
  position: static;
  width: 100%;
  max-height: 420px;
  margin-top: 8px;
  box-shadow: none;
}

/* WordPress admin-bar breakpoint — do not merge with the 900px boundary */
@media (max-width: 782px) {
  .admin-bar.eralux-header-sticky .eralux-header {
    top: 46px;
  }
}

/* =====================================================================
   Mobile — theme boundary 900px (see --eralux-mobile-breakpoint)
   ===================================================================== */

@media (max-width: 900px) {
  .eralux-header-inner {
    min-height: 64px;
  }

  .eralux-header-inner .eralux-header-logo {
    height: 36px;
    max-width: 170px;
  }

  .eralux-header-menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .eralux-header-navigation {
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    padding: 6px var(--ews-gutter) 18px;
  }

  .eralux-header-products-dropdown {
    padding-bottom: 10px;
  }
}

/* WordPress admin-bar breakpoint (bar unfixes below 600px) — keep as is */
@media (max-width: 600px) {
  .admin-bar.eralux-header-sticky .eralux-header {
    top: 0;
  }
}
/* =====================================================================
   Company tab — hover dropdown with a simple editable list of links
   ===================================================================== */

.eralux-header-company-menu {
  position: relative;
}

.eralux-header-company-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.eralux-header-company-trigger svg {
  width: 10px;
  height: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform 0.25s ease;
}

.eralux-header-company-menu.is-open .eralux-header-company-trigger {
  color: var(--eralux-header-accent, var(--ews-accent));
}

.eralux-header-company-menu.is-open .eralux-header-company-trigger svg {
  transform: rotate(180deg);
}

.eralux-header-company-trigger:focus-visible {
  outline: 2px solid var(--eralux-header-accent, var(--ews-accent));
  outline-offset: 5px;
}

.eralux-header-company-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  padding: 6px 0;
  border: 1px solid var(--eralux-header-border, var(--ews-line-strong));
  background: var(--eralux-header-bg, var(--ews-paper));
  box-shadow: var(--ews-shadow);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
  z-index: 60;
}

.eralux-header-company-menu.is-open .eralux-header-company-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.eralux-header-company-dropdown a {
  display: block;
  padding: 11px 20px;

  white-space: nowrap;
}

.eralux-header-menu .eralux-header-company-dropdown a:hover,
.eralux-header-menu .eralux-header-company-dropdown a:focus-visible {
  background: var(--ews-accent-soft);
  color: var(--eralux-header-accent, var(--ews-accent)) !important;
  outline: none;
}

:where(html.ews-nav-collapsed) .eralux-header-company-menu {
  border-bottom: 1px solid rgba(var(--ews-ink-rgb), 0.12);
}

:where(html.ews-nav-collapsed) .eralux-header-company-trigger {
  width: 100%;
  justify-content: space-between;
  min-height: 50px;
  padding: 13px 2px;
  font-size: 15px;
}

:where(html.ews-nav-collapsed) .eralux-header-company-dropdown {
  display: none;
  position: static;
  transform: none;
  min-width: 0;
  padding: 0 0 12px;
  border: 0;
  box-shadow: none;
  background: transparent;
  opacity: 1;
  visibility: visible;
}

:where(html.ews-nav-collapsed)
  .eralux-header-company-menu.is-open
  .eralux-header-company-dropdown {
  display: block;
  transform: none;
}

/* =====================================================================
   Mobile scrolled state — header.js toggles .is-scrolled on the header
   whenever the page is scrolled away from the very top. Below the 900px
   boundary the bar then goes semi-transparent (with a blur so the text
   stays readable over whatever scrolls beneath it). At the top of the
   page, and on desktop, the bar stays fully opaque.
   ===================================================================== */

@media (max-width: 900px) {
  .eralux-header {
    transition: background 220ms ease;
  }

  .eralux-header.is-scrolled {
    background: color-mix(
      in srgb,
      var(--eralux-header-bg, var(--ews-ink)) 74%,
      transparent
    );
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    backdrop-filter: blur(10px) saturate(1.1);
  }

  /* Keep the open mobile menu readable: while the nav panel is open the
	   bar returns to its opaque background. */
  .eralux-header.is-scrolled.eralux-header-menu-open {
    background: var(--eralux-header-bg, var(--ews-ink));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* =====================================================================
   EN/FR language switcher — rendered only when the Eralux Translator
   module is enabled with a DeepL key. Desktop: small pill at the right
   end of the nav. Mobile: a row inside the collapsed menu panel.
   ===================================================================== */

.eralux-header-navigation .eralux-header-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--eralux-header-text, var(--ews-contrast-ink));
  line-height: 1;
  text-decoration: none;
}

.eralux-header-navigation .eralux-header-lang:hover,
.eralux-header-navigation .eralux-header-lang:focus-visible {
  border-color: var(--eralux-header-accent, var(--ews-accent));
  color: var(--eralux-header-accent, var(--ews-accent));
  outline: none;
}

:where(html.ews-nav-collapsed) .eralux-header-navigation .eralux-header-lang {
  align-self: flex-start;
  margin-top: 12px;
}

/* =====================================================================
   PLAIN-TEXT LABELS
   The dropdown rows, the Favorites control and its panel, and the
   language switcher carry their text in a <p>, so it renders with the
   design system's paragraph styling — no extra weight, letter-spacing
   or uppercasing. The header's own reset already removes p margins.
   ===================================================================== */

.eralux-header-all-products p,
.eralux-header-segment-level a p,
.eralux-header-company-dropdown a p,
.eralux-header-favorites p,
.eralux-header-favorites-panel p,
.eralux-header-lang p {
  font-size: 14px;
  font-weight: var(--ews-weight-regular);
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}
