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

.eralux-footer {
  --eralux-footer-gutter: var(--ews-gutter);
  /* vertical rhythm inside every footer column */
  --eralux-footer-block-gap: 26px;
  --eralux-footer-heading-gap: 12px;
  box-sizing: border-box;
  /* Full-viewport-width breakout: the footer 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: 0 calc(50% - 50vw + var(--ews-scrollbar, 0px) / 2) 0
    calc(50% - 50vw + var(--ews-scrollbar, 0px) / 2);
  background: var(--eralux-footer-bg, var(--ews-paper));
  color: var(--eralux-footer-text, var(--ews-ink));
  border-top: 1px solid var(--ews-line);
}

.eralux-footer * {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   SELF-CONTAINED TYPOGRAPHY RESET
   The footer is rendered inside many different pages, several of which
   ship their own universal reset (e.g. `.eralux-where-to-buy-page *`,
   specificity 0,1,0) that used to strip the footer's heading/paragraph
   margins on some pages while other pages kept the BROWSER defaults —
   which is exactly why column headings sat at different heights from one
   page to the next. This rule has specificity 0,2,0, so it beats both
   the browser defaults and any page-level `*` reset: the footer's
   vertical rhythm is now decided here and nowhere else.
   ------------------------------------------------------------------ */
.eralux-footer :is(h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, address) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eralux-footer .eralux-footer-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 72px var(--eralux-footer-gutter) 54px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(190px, 260px) 1fr;
  gap: clamp(30px, 4vw, 72px);
  align-items: start;
}

/* 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/transform is applied — it renders in its own (black) color and
   sits flush with the footer's left gutter padding. */
.eralux-footer-brand {
  width: auto;
  height: auto;
  line-height: 0;
}

.eralux-footer .eralux-footer-brand img {
  position: static;
  display: block;
  width: auto;
  height: 48px;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: left center;
  opacity: 1;
  filter: none;
  transform: none;
}

.eralux-footer a {
  color: inherit;
  text-decoration: none;
}

.eralux-footer a:hover,
.eralux-footer a:focus {
  color: var(--ews-accent-dark);
  text-decoration: underline;
}

.eralux-footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 34px clamp(28px, 4vw, 70px);
}

/* ---------------------------------------------------------------------
   COLUMN RHYTHM — one set of rules for every column
   Each column is a stack of .eralux-footer-block; each block is a
   .eralux-footer-heading plus one body element. Because both the contact
   column and the link columns use this structure, their first headings
   share a baseline automatically.
   ------------------------------------------------------------------ */
.eralux-footer-contact,
.eralux-footer-link-group {
  display: grid;
  align-content: start;
  gap: var(--eralux-footer-block-gap);
}

.eralux-footer-block {
  display: grid;
  align-content: start;
  gap: var(--eralux-footer-heading-gap);
  min-width: 0;
}

.eralux-footer-heading {
  font-size: 15px;
  font-weight: var(--ews-weight-semibold);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.eralux-footer-text {
  font-size: 13px;
  line-height: 1.6;
}

.eralux-footer-links {
  display: grid;
  gap: 5px;
}

.eralux-footer-link-group p {
  font-size: 13px;
  line-height: 1.25;
}

.eralux-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.eralux-footer-socials a {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ews-ink);
  color: var(--ews-paper);
  font-size: 10px;
  font-weight: var(--ews-weight-bold);
  text-decoration: none;
}

.eralux-footer-socials svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.eralux-footer-socials a:hover,
.eralux-footer-socials a:focus {
  background: var(--ews-accent-dark);
  color: var(--ews-contrast-ink);
  text-decoration: none;
}

.eralux-footer .eralux-footer-copyright {
  padding: 12px var(--eralux-footer-gutter) 28px;
  text-align: center;
  color: var(--ews-ink);
  font-size: 11px;
}

.eralux-footer a,
.eralux-footer-link-group p {
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  .eralux-footer .eralux-footer-inner {
    padding-top: 56px;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 42px;
  }

  .eralux-footer-groups {
    grid-column: 1/-1;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  /* --eralux-footer-gutter tracks --ews-gutter, which the theme already
	   collapses to 16px at this boundary — no local override needed. */

  .eralux-footer .eralux-footer-inner {
    padding: 38px var(--eralux-footer-gutter) 30px;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .eralux-footer-brand {
    width: 100%;
    height: auto;
  }

  .eralux-footer .eralux-footer-brand img {
    position: static;
    width: auto;
    height: 36px;
    max-width: 100%;
    max-height: none;
    margin: 0;
    object-fit: contain;
    object-position: left center;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .eralux-footer-contact {
    min-width: 0;
  }

  .eralux-footer-groups {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 20px;
  }

  .eralux-footer-link-group {
    min-width: 0;
  }

  .eralux-footer-link-group p {
    line-height: 1.35;
  }

  .eralux-footer .eralux-footer-link-group a {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 2px 0;
  }

  .eralux-footer-socials {
    gap: 10px;
  }

  .eralux-footer-socials a {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }

  .eralux-footer-socials svg {
    width: 17px;
    height: 17px;
  }

  .eralux-footer .eralux-footer-copyright {
    padding: 8px var(--eralux-footer-gutter) 22px;
    font-size: 10px;
    line-height: 1.5;
  }
}

@media (max-width: 479px) {
  .eralux-footer .eralux-footer-inner {
    gap: 27px;
  }

  .eralux-footer-groups {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .eralux-footer .eralux-footer-link-group a {
    width: 100%;
    min-height: 26px;
  }
}
