/* Site footer — extracted from layout.css (shop_design §34) */

.site-footer {
  background: var(--c-brand);
  color: var(--c-soft);
  padding: var(--space-7) 0 calc(var(--space-6) + var(--safe-bottom));
  -webkit-tap-highlight-color: transparent;
}

.site-footer a {
  color: var(--c-soft);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.site-footer a:hover {
  color: var(--c-neutral-warm);
}

.site-footer__list a,
.site-footer__social a {
  position: relative;
  display: inline-block;
  padding-bottom: 0.15rem;
}

.site-footer__list a::after,
.site-footer__social a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #9889aa, var(--c-accent-yellow));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-underline) var(--ease);
}

.site-footer__list a:hover::after,
.site-footer__social a:hover::after {
  transform: scaleX(1);
}

.site-footer__grid {
  display: grid;
  /* Контакти трохи ширші — email вміщується в один рядок на вузьких екранах */
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: var(--space-5);
  align-items: start;
}

/* бренд і соцмережі — на всю ширину; навігація + контакти поруч */
.site-footer__grid > :first-child,
.site-footer__grid > :nth-child(4) {
  grid-column: 1 / -1;
}

.site-footer__grid > :nth-child(2),
.site-footer__grid > :nth-child(3) {
  min-width: 0;
}

/* Адреса може переноситись; email/тел. — ні (інакше «…com.u / a») */
.site-footer__grid > :nth-child(3) .site-footer__list > li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer__grid > :nth-child(3) .site-footer__list a[href^="mailto:"],
.site-footer__grid > :nth-child(3) .site-footer__list a[href^="tel:"] {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.site-footer__logo {
  display: block;
  width: auto;
  max-width: min(200px, 70vw);
  height: 36px;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .site-footer__logo {
    height: 44px;
    max-width: 220px;
  }

  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .site-footer__grid > :first-child,
  .site-footer__grid > :nth-child(4) {
    grid-column: auto;
  }
}

.site-footer__muted {
  color: rgb(246 242 247 / 0.72);
  max-width: 28rem;
}

.site-footer__title {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
  color: var(--c-neutral-warm);
}

.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

/* Нижче 768: колонка по центру, юр. посилання першим рядком (пункти можуть переноситись).
   768–1023: юр. рядок на всю ширину, під ним копірайт ліворуч і кредит праворуч.
   Від 1024: один ряд — копірайт | юр. по центру | кредит, без переносу. */
.site-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgb(246 242 247 / 0.18);
  font-size: var(--fs-sm);
  color: rgb(246 242 247 / 0.7);
  text-align: center;
  min-width: 0;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  order: -1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.site-footer__legal a,
.site-footer__cookie-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.site-footer__legal a {
  font-size: var(--fs-sm);
  color: rgb(246 242 247 / 0.78);
}

.site-footer__legal a:hover {
  color: var(--c-accent-yellow);
}

.site-footer__copy,
.site-footer__credit {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.site-footer__credit {
  font-size: var(--fs-base);
  line-height: 1.4;
  color: rgb(246 242 247 / 0.78);
}

@media (min-width: 768px) {
  .site-footer__bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-4);
    row-gap: var(--space-3);
  }

  .site-footer__legal {
    flex: 1 0 100%;
    gap: var(--space-2) var(--space-4);
  }

  .site-footer__copy,
  .site-footer__credit {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .site-footer__copy {
    text-align: left;
  }

  .site-footer__credit {
    text-align: right;
  }
}

@media (min-width: 1024px) {
  .site-footer__bottom {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-4);
  }

  .site-footer__copy,
  .site-footer__legal,
  .site-footer__credit {
    order: 0;
  }

  .site-footer__copy,
  .site-footer__credit {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }

  .site-footer__legal {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    min-width: 0;
    gap: var(--space-3);
  }

  /* 0.8125rem не вміщує 5 пунктів у контент ~992px; 0.6875rem лишає запас ~26px */
  .site-footer__legal a,
  .site-footer__legal .site-footer__cookie-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.6875rem;
  }

  .site-footer__credit {
    font-size: var(--fs-sm);
  }
}

@media (min-width: 1280px) {
  .site-footer__legal {
    gap: var(--space-4);
  }

  .site-footer__legal a,
  .site-footer__legal .site-footer__cookie-btn {
    font-size: 0.875rem;
  }
}

/* PrometeyLabs brand: orange #E65100 / purple #7B2CBF */
.site-footer__credit-link,
.site-footer__credit-name {
  color: #e65100;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-footer a.site-footer__credit-link {
  color: #e65100;
}

.site-footer a.site-footer__credit-link:hover {
  color: #7b2cbf;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.site-footer__social a {
  color: var(--c-neutral-warm);
}

.site-footer__social a:hover {
  color: var(--c-accent-yellow);
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__list a::after,
  .site-footer__social a::after {
    transition: none;
  }
}
