/* ==========================================================================
   MAGNETIE — Global Site Footer
   Shared by every page. Markup is rendered once by js/footer.js (single
   source) directly after <main id="mainContent">, so page scripts that
   re-render their own sections (filters, sort, pagination, collection
   tabs) never touch it. Moved here from css/home.css.
   ========================================================================== */

/* Frontend redesign: logotype-led brand column, small-caps group labels,
   tight 13px link lists, no boxed controls (underline newsletter field,
   bare social glyphs). No margin-top: every page's last section already
   ends with bottom padding. */
.site-footer {
  flex-shrink: 0;
  padding-block: var(--space-8) var(--space-5);
  background: var(--color-surface);
  border-top: var(--border-hairline);
}

.site-footer__grid {
  display: grid;
  /* Brand + About + Customer Service + Policies + We welcome your
     feedback (Account group folded into Customer Service by request). */
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: var(--space-7) var(--space-6);
  padding-bottom: var(--space-8);
}

.site-footer__logo {
  display: inline-block;
}

.site-footer__logo img {
  display: block;
  height: 44px;
  width: auto;
  mix-blend-mode: multiply; /* drop the PNG's white canvas */
}

.site-footer__tagline {
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  color: var(--color-ink-soft);
}

.newsletter {
  display: flex;
  align-items: center;
  max-width: 340px;
  margin-top: var(--space-6);
  border-bottom: 1px solid var(--color-ink);
}

.newsletter input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: var(--fs-small);
}

.newsletter input::placeholder {
  color: var(--color-ink-muted);
}

.newsletter input:focus-visible {
  outline: none;
}

.newsletter:focus-within {
  box-shadow: 0 1px 0 var(--color-ink);
}

/* Flush with the field's right end (no right padding). */
.newsletter button {
  flex: 0 0 auto;
  padding: 0 0 0 var(--space-4);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-ink);
}

.newsletter button:hover {
  color: var(--color-ink-soft);
}

.site-footer__social {
  margin-top: var(--space-6);
}

.site-footer__social-label,
.site-footer__group h3 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-ink);
}

.site-footer__social-label {
  margin-bottom: var(--space-3);
}

.site-footer__social-icons {
  display: flex;
  gap: var(--space-4);
}

.site-footer__social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-ink-soft);
}

.site-footer__social-icons svg {
  width: 18px;
  height: 18px;
}

.site-footer__social-icons a:hover {
  color: var(--color-ink);
}

.site-footer__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__group h3 {
  margin-bottom: var(--space-2);
}

.site-footer__group a,
.site-footer__group p {
  font-size: var(--fs-small);
  line-height: var(--lh-snug);
  color: var(--color-ink-soft);
  overflow-wrap: anywhere;
}

.site-footer__group a:hover {
  color: var(--color-ink);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: var(--border-hairline);
  font-size: 0.75rem;
  color: var(--color-ink-muted);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.site-footer__legal a:hover {
  color: var(--color-ink);
}

@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding-top: var(--space-7);
  }

  .site-footer__grid {
    /* Phones: one column — brand, then each link group stacked. */
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    padding-bottom: var(--space-7);
  }

  .site-footer__logo img {
    height: 38px;
  }

  /* One-column footer: the field runs the full width, so "Subscribe"
     sits at the right edge. */
  .newsletter {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
