/* Site footer — compact, equal side insets */

.site-footer {
  background: var(--color-secondary);
  color: #fff;
  padding: 22px 0 calc(14px + var(--safe-bottom));
  margin-top: 24px;
}

.footer-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

.footer-main {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 32px;
}

.footer-col {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 17rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.footer-col--brand {
  flex: 0 0 auto;
  max-width: none;
  padding-top: 2px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.footer-logo img {
  display: block;
  width: auto;
  max-width: min(280px, 100%);
  height: auto;
  max-height: 56px;
}

.footer-cabinet {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-cabinet:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.footer-col__title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col__list a {
  display: inline-block;
  font-size: 13px;
  line-height: 1.3;
  color: #cbd5e1;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-col__list a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copy {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
}

.footer-credit {
  flex: 0 0 auto;
  margin: 0 56px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.footer-credit__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-credit__link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit__name {
  color: inherit;
}

/* Tablet: 2×2, equal side padding */
@media (max-width: 992px) {
  .footer-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 18px 24px;
  }

  .footer-col {
    max-width: none;
  }

  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer-bottom {
    margin-top: 18px;
    padding-top: 12px;
  }

  .footer-credit {
    margin-right: 56px;
  }
}

/* Mobile: brand + catalog full; buyers | info side-by-side */
@media (max-width: 640px) {
  .site-footer {
    padding: 20px 0 calc(12px + var(--safe-bottom));
  }

  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 12px;
    justify-items: stretch;
  }

  .footer-col {
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: none;
  }

  .footer-col--brand,
  .footer-col--catalog {
    grid-column: 1 / -1;
  }

  .footer-col--catalog .footer-col__title {
    text-align: center;
    width: 100%;
  }

  .footer-col--catalog .footer-col__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2px 10px;
    align-items: start;
    justify-items: center;
  }

  .footer-col--buyers,
  .footer-col--info {
    align-items: center;
    text-align: center;
    min-width: 0;
  }

  .footer-col--buyers .footer-col__list,
  .footer-col--info .footer-col__list {
    align-items: center;
    gap: 2px;
  }

  .footer-col__list a {
    padding: 4px 0;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .footer-col__list a:hover {
    transform: none;
  }

  .footer-logo img {
    max-width: min(200px, 70vw);
    max-height: 48px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    gap: 6px;
  }

  .footer-credit {
    margin-right: 0;
    white-space: normal;
  }
}

/* iOS Safari: avoid hover sticky */
@supports (-webkit-touch-callout: none) {
  .footer-col__list a:hover {
    transform: none;
  }
}
