/* ==========================================================
   RANDOMLY VISIONARY
   FOOTER
   ========================================================== */

/* ---------------------------------------------
   Light Mode Footer Overrides
   --------------------------------------------- */

[data-theme="light"] .site-footer,
[data-theme="light"] .footer-bottom,
[data-theme="light"] .footer-main {
  color: var(--alabaster-grey);
}

[data-theme="light"] .footer-main a,
[data-theme="light"] .footer-bottom a {
  color: var(--alabaster-grey);
}

/* ---------------------------------------------
   Main Structure
   --------------------------------------------- */

.site-footer {
  background-color: var(--onyx);
  color: var(--color-text);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* ---------------------------------------------
   Footer Columns
   --------------------------------------------- */

.footer-col h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul li a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-text);
}

/* ---------------------------------------------
   Brand Column
   --------------------------------------------- */

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}

.footer-blurb {
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

/* ---------------------------------------------
   Social Icons
   --------------------------------------------- */

.footer-social.desktop-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-mobile-social {
  display: none;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* ---------------------------------------------
   Newsletter Form
   --------------------------------------------- */

.footer-newsletter {
  display: flex;
  gap: var(--space-xs);
}

.footer-newsletter input[type="email"] {
  flex: 1;
  background-color: var(--color-surface);
}

/* ---------------------------------------------
   Bottom Bar
   --------------------------------------------- */

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-legal {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-legal a {
  color: var(--color-text-muted);
}

.footer-legal a:hover {
  color: var(--color-text);
}

/* ---------------------------------------------
   Responsive
   --------------------------------------------- */

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-social.desktop-social {
    display: none;
  }

  .footer-mobile-social {
    display: flex;
  }
}
/* Final five-column footer layout */
.footer-main {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
}

.footer-col p,
.footer-widget {
  color: var(--color-text-muted);
}

.footer-menu__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0 0 var(--space-sm);
  padding: 0;
}

.footer-col .button {
  display: inline-block;
  margin-top: var(--space-xs);
}

@media (max-width: 1100px) {
  .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .footer-main { grid-template-columns: 1fr; }
}

/* 1.1 compact footer content */
.footer-newsletter { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .45rem; }
.footer-newsletter input { min-width: 0; padding: .6rem .7rem; }
.footer-newsletter .button { margin: 0; }
.footer-product-list { display: grid; gap: .7rem; }
.footer-product { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: .65rem; align-items: start; color: inherit; text-decoration: none; }
.footer-product__thumb img { width: 54px; height: 54px; object-fit: cover; display: block; }
.footer-product__text { min-width: 0; display: grid; gap: .15rem; }
.footer-product__text strong { font-size: .84rem; line-height: 1.2; }
.footer-product__price,
.footer-product__blurb { color: var(--color-text-muted); font-size: .75rem; line-height: 1.25; }
@media (max-width: 620px) { .footer-newsletter { grid-template-columns: 1fr; } }


/* 1.4.4 footer balance: newsletter gets breathing room; compact Account moves last. */
@media (min-width: 1101px) {
  .footer-main {
    grid-template-columns: 1.5fr 1fr 1fr 1fr .5fr;
  }
}
.footer-col--newsletter .footer-newsletter {
  grid-template-columns: 1fr;
  align-items: start;
}
.footer-col--newsletter .footer-newsletter input[type="email"] {
  width: 100%;
}
.footer-col--newsletter .footer-newsletter .button {
  justify-self: start;
}


/* 1.4.7 Light-mode footer contrast: preserve dark footer, brighten headings/titles only. */
[data-theme="light"] .site-footer .footer-col h4,
[data-theme="light"] .site-footer .footer-product__text strong {
  color: var(--bright-snow);
}
