/* V2 stopka (sections-v2/v2-footer.mjs). Karta --v2-pack wcięta w okno jak karta hero (12 px, promień
   --v2-r-hero; 8 px na mobile). Siatka 12 kolumn (desktronic: lewa kolumna marki i newslettera, prawa siatka
   grup linków):
     kolumna 1–5 przez oba rzędy: marka, pod nią newsletter
     rząd 1: Zakupy 7–8 | Pomoc 9–10 | GS Meble 11–12
     rząd 2: Salony 7–10 | Obsługa klienta 11–12
   Nagłówki grup 14 px w --v2-text (zdanie, bez wersalików), linki 15/36 w --v2-ink, hover: podkreślenie.
   Pod linią płatności i social, rząd prawny i nota. Bez dużego znaku „gsmeble.pl” na dole (decyzja Piotra 19.10).
   Kontrast na #eef2f4: ink 14.6, --v2-text 5.4. */

.v2-footer {
  margin: var(--v2-section) 12px 12px;
}

.v2-footer__card {
  overflow: hidden;
  border-radius: var(--v2-r-hero);
  background: var(--v2-pack);
  color: var(--v2-ink);
  --gs-focus: var(--v2-ink);
}

.v2-footer .v2-container {
  /* Karta jest wcięta o 12 px, więc treść stoi na tej samej krawędzi co reszta strony. */
  max-width: calc(var(--gs-container-max) - 24px);
  padding-inline: calc(var(--gs-container-pad) - 12px);
}

.v2-footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--v2-gap);
  row-gap: 56px;
  padding-block: 80px 64px;
}

.v2-footer__side {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
}

.v2-footer__group--zakupy {
  grid-column: 7 / 9;
  grid-row: 1;
}

.v2-footer__group--pomoc {
  grid-column: 9 / 11;
  grid-row: 1;
}

.v2-footer__group--firma {
  grid-column: 11 / 13;
  grid-row: 1;
}

.v2-footer__group--salony {
  grid-column: 7 / 11;
  grid-row: 2;
}

.v2-footer__contact {
  grid-column: 11 / 13;
  grid-row: 2;
}

/* ---------- Marka ---------- */
.v2-footer .gs-logo {
  font-size: 28px;
}

.v2-footer__blurb {
  max-width: 26em;
  margin: 16px 0 0;
  color: var(--v2-text);
  font-size: var(--gs-body-size);
  line-height: var(--gs-body-leading);
}

/* ---------- Grupy linków ---------- */
.v2-footer__title {
  margin: 0 0 16px;
  color: var(--v2-text);
  font-family: var(--gs-font-text);
  font-size: var(--v2-small-size);
  font-weight: 400;
  line-height: var(--v2-small-leading);
  letter-spacing: 0;
}

.v2-footer__links,
.v2-footer__stores {
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2-footer__links a,
.v2-footer__legal a,
.v2-footer__cookies,
.v2-footer__map,
.v2-footer__consent a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color var(--v2-t-control), color var(--v2-t-control);
}

.v2-footer__links a {
  display: inline-block;
  padding-block: 6px;
  color: var(--v2-ink);
  font-size: 15px;
  line-height: 24px;
}

@media (hover: hover) {
  .v2-footer__links a:hover,
  .v2-footer__legal a:hover,
  .v2-footer__cookies:hover,
  .v2-footer__map:hover {
    text-decoration-color: currentColor;
  }
}

/* ---------- Salony: 2 × 2, miasto, ulica i „Mapa ↗” ---------- */
.v2-footer__stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px var(--v2-gap);
  padding-top: 6px;
}

.v2-footer__store {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 15px;
  line-height: 24px;
}

.v2-footer__city {
  color: var(--v2-ink);
  font-family: var(--gs-font-display);
}

.v2-footer__street {
  color: var(--v2-text);
}

.v2-footer__map {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--v2-ink);
  font-size: var(--v2-small-size);
  text-decoration-color: var(--v2-control);
}

.v2-footer__map .gs-icon {
  width: 14px;
  height: 14px;
}

/* ---------- Obsługa klienta ---------- */
.v2-footer__phone {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--v2-ink);
  font-family: var(--gs-font-display);
  font-size: var(--v2-h3-size);
  line-height: var(--v2-h3-leading);
  text-decoration: none;
  white-space: nowrap;
}

.v2-footer__links--contact a {
  padding-block: 2px;
  overflow-wrap: anywhere;
}

.v2-footer__hours {
  margin: 8px 0 0;
  color: var(--v2-text);
  font-size: var(--v2-small-size);
  line-height: var(--v2-small-leading);
}

/* ---------- Newsletter: pole-pigułka 56 px z przyciskiem w środku (desktronic) ---------- */
.v2-footer__nl {
  max-width: 460px;
  margin-top: 48px;
}

.v2-footer__nl-title {
  margin: 0;
  font-family: var(--gs-font-display);
  font-size: var(--v2-title-size);
  line-height: var(--v2-title-leading);
}

.v2-footer__nl-lead {
  margin: 4px 0 0;
  color: var(--v2-text);
  font-size: var(--v2-small-size);
  line-height: var(--v2-small-leading);
}

.v2-footer__field {
  display: flex;
  align-items: center;
  height: 56px;
  margin-top: 20px;
  padding: 6px;
  border: 1px solid var(--v2-control);
  border-radius: var(--v2-r-control);
  background: var(--gs-bg);
  transition: border-color var(--v2-t-control);
}

.v2-footer__field:hover,
.v2-footer__field:focus-within {
  border-color: var(--v2-ink);
}

/* Fokus pola: obrys pogrubiony do 2 px (pole ma własny kształt, więc bez outline na input). */
.v2-footer__field:focus-within {
  box-shadow: 0 0 0 1px var(--v2-ink);
}

.v2-footer__field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px 0 18px;
  border: 0;
  background: transparent;
  color: var(--v2-ink);
  font: inherit;
  font-size: 16px;
}

.v2-footer__field input::placeholder {
  color: var(--v2-text);
}

.v2-footer__field input:focus {
  outline: none;
}

.v2-footer__send {
  flex: none;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--v2-r-control);
  background: var(--v2-ink);
  color: var(--v2-on-band);
  font-family: var(--gs-font-display);
  font-size: 15px;
  cursor: pointer;
  transition: background-color var(--v2-t-control);
}

.v2-footer__send:hover {
  background: var(--v2-band);
}

.v2-footer__send:focus-visible {
  outline-offset: 3px;
}

.v2-footer__status:empty {
  display: none;
}

.v2-footer__status {
  margin: 12px 0 0;
  font-size: var(--v2-small-size);
  line-height: var(--v2-small-leading);
}

.v2-footer__consent {
  margin: 12px 0 0;
  color: var(--v2-text);
  font-size: var(--v2-caption-size);
  line-height: var(--v2-caption-leading);
}

.v2-footer__consent a {
  text-decoration-color: currentColor;
}

/* ---------- Dół: płatności i social, rząd prawny i nota ---------- */
.v2-footer__base {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px var(--v2-gap);
  padding-block: 28px 32px;
  border-top: 1px solid var(--v2-line);
  font-size: var(--v2-small-size);
  line-height: var(--v2-small-leading);
}

.v2-footer__pay,
.v2-footer__social,
.v2-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Płatności: same znaki w kolorach marek, bez kafelków i obrysów (decyzja Piotra 19.10), każdy wyrównany
   optycznie własną wysokością. BLIK to znak z własnym czarnym polem; przelew tradycyjny bez znaku stoi tekstem. */
.v2-footer__pay {
  gap: 12px 24px;
}

.v2-footer__pay-item {
  display: flex;
  align-items: center;
  height: 24px;
}

.v2-footer__pay-item img {
  display: block;
  width: auto;
  height: var(--v2-pay-h, 16px);
}

.v2-footer__pay-item.is-visa { --v2-pay-h: 13px; }
.v2-footer__pay-item.is-mastercard { --v2-pay-h: 22px; }
.v2-footer__pay-item.is-apple-pay,
.v2-footer__pay-item.is-google-pay { --v2-pay-h: 18px; }
.v2-footer__pay-item.is-przelewy24 { --v2-pay-h: 20px; }
.v2-footer__pay-item.is-comfino { --v2-pay-h: 19px; }
.v2-footer__pay-item.is-blik { --v2-pay-h: 24px; }

.v2-footer__pay-item.is-text {
  color: var(--v2-text);
  font-size: var(--v2-caption-size);
  line-height: 1;
  white-space: nowrap;
}

.v2-footer__social {
  justify-self: end;
  gap: 16px;
}

.v2-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--v2-ink);
  text-decoration: none;
  transition: color var(--v2-t-control);
}

.v2-footer__social a:hover {
  color: var(--gs-link);
}

.v2-footer__legal ul {
  gap: 4px 24px;
}

.v2-footer__legal a,
.v2-footer__cookies {
  color: var(--v2-text);
}

.v2-footer__cookies {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.v2-footer__note {
  margin: 0;
  color: var(--v2-text);
  font-size: var(--v2-caption-size);
  line-height: var(--v2-caption-leading);
  text-align: right;
}

/* ---------- Tablet: marka | newsletter, potem cztery kolumny, salony w rzędzie ---------- */
@media (max-width: 1279px) {
  .v2-footer__grid {
    row-gap: 48px;
    padding-block: 64px 56px;
  }

  .v2-footer__side {
    grid-column: 1 / 13;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--v2-gap);
  }

  .v2-footer__nl {
    justify-self: end;
    width: 100%;
    margin-top: 0;
  }

  .v2-footer__group--zakupy {
    grid-column: 1 / 4;
    grid-row: 2;
  }

  .v2-footer__group--pomoc {
    grid-column: 4 / 7;
    grid-row: 2;
  }

  .v2-footer__group--firma {
    grid-column: 7 / 10;
    grid-row: 2;
  }

  .v2-footer__contact {
    grid-column: 10 / 13;
    grid-row: 2;
  }

  .v2-footer__group--salony {
    grid-column: 1 / 13;
    grid-row: 3;
  }

  .v2-footer__stores {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Mobile: jedna kolumna, grupy i salony jako akordeony ---------- */
@media (max-width: 767px) {
  .v2-footer {
    margin: var(--v2-section) 8px 8px;
  }

  .v2-footer .v2-container {
    padding-inline: var(--gs-container-pad);
    max-width: none;
  }

  .v2-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
    padding-block: 48px 40px;
  }

  .v2-footer__grid > * {
    grid-column: 1;
    grid-row: auto;
  }

  /* Newsletter schodzi na koniec, pod kontakt (desktronic: najpierw linki). */
  .v2-footer__side {
    display: contents;
  }

  .v2-footer__nl {
    order: 1;
  }

  .v2-footer__brand {
    margin-bottom: 32px;
  }

  .v2-footer .gs-logo {
    font-size: 24px;
  }

  .v2-footer__group {
    border-bottom: 1px solid var(--v2-line);
  }

  .v2-footer__group .v2-footer__title {
    margin: 0;
  }

  .v2-footer .gs-footer__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--v2-ink);
    font-family: var(--gs-font-display);
    font-size: 17px;
    text-align: left;
    cursor: pointer;
  }

  .v2-footer .gs-footer__chevron {
    width: 20px;
    height: 20px;
    transition: transform var(--v2-t-control);
  }

  .v2-footer .gs-footer__toggle[aria-expanded='true'] .gs-footer__chevron {
    transform: rotate(180deg);
  }

  .v2-footer__panel {
    padding-bottom: 16px;
  }

  .v2-footer__stores {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-top: 0;
  }

  .v2-footer__contact {
    margin-top: 32px;
  }

  .v2-footer__nl {
    justify-self: stretch;
    margin-top: 32px;
    max-width: none;
  }

  .v2-footer__base {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .v2-footer__note {
    text-align: left;
  }

  .v2-footer__social {
    justify-self: start;
  }

}
