/* ------------------------------------------------------------------ *
 * Brand archive pages (product_brand) — SEO landing styles.
 * Enqueued on /brand/<slug>/ and on the main /shop/ page (for the
 * "Shop by brand" strip). Pairs with firmware.css on brand archives,
 * because the brand archive template reuses the marketing components
 * already defined in firmware.css (buttons, hero, sections, faq, cta-band).
 * ------------------------------------------------------------------ */
.brand-page {
  background: #fff;
}

.brand-page__hero {
  position: relative;
  padding: 172px 0 64px;
  color: #fff;
  background:
    radial-gradient(circle at 22% 32%, rgba(78, 78, 78, 0.55), transparent 38%),
    radial-gradient(circle at 78% 28%, rgba(56, 56, 56, 0.45), transparent 36%),
    #1f1f1f;
}

.brand-page__hero--has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-hero-image, none) center/cover no-repeat;
  opacity: 0.32;
  filter: saturate(0.85);
}

.brand-page__hero--has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20, 20, 20, 0.92) 0%, rgba(20, 20, 20, 0.7) 50%, rgba(20, 20, 20, 0.85) 100%);
}

.brand-page__hero > .amg-container {
  position: relative;
  z-index: 1;
}

.brand-page__hero-grid {
  display: grid;
  gap: 24px;
}

.brand-page__hero-copy {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.brand-page__hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  width: fit-content;
}

.brand-page__hero-logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.brand-page__hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 1.02;
  display: grid;
  gap: 6px;
}

.brand-page__hero-tagline {
  display: block;
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.brand-page__hero-intro {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.brand-page__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.brand-page__facts li {
  display: inline-grid;
  gap: 2px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.brand-page__fact-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-page__fact-value {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

/* Firmware cross-promo strip (Antminer only) */
.brand-page__firmware-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-1);
}

.brand-page__firmware-copy h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.brand-page__firmware-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.brand-page__firmware-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.brand-page__firmware-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.brand-page__firmware-link:hover {
  color: #5d8513;
}

/* Pagination on the products grid. */
.brand-page .pagination,
.brand-page nav.pagination,
.brand-page .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.brand-page .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-weight: 700;
}

.brand-page .page-numbers.current {
  border-color: transparent;
  background: var(--accent);
}

.brand-page .page-numbers:hover {
  border-color: #9acd32;
  background: rgba(166, 226, 46, 0.1);
}

@media (max-width: 820px) {
  .brand-page__hero {
    padding: 150px 0 48px;
  }

  .brand-page__firmware-strip {
    grid-template-columns: 1fr;
  }

  .brand-page__firmware-actions {
    width: 100%;
  }

  .brand-page__firmware-actions .firmware-page__button {
    flex: 1;
  }
}

/* ------------------------------------------------------------------ *
 * "Shop by brand" strip on the main /shop/ page.
 * Single-row horizontal slider: never wraps to a second line — any
 * brands that do not fit are reachable via horizontal scroll.
 * ------------------------------------------------------------------ */
.amg-shop-brands {
  position: relative;
  margin: 0 0 40px;
  padding: 26px 26px 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.amg-shop-brands__head {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.amg-shop-brands__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #151515;
}

.amg-shop-brands__sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.amg-shop-brands__viewport {
  position: relative;
}

.amg-shop-brands__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0;
  padding: 2px;
  list-style: none;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox — hide native scrollbar */
  -ms-overflow-style: none; /* Old Edge / IE */
  -webkit-overflow-scrolling: touch;
}

.amg-shop-brands__list::-webkit-scrollbar {
  display: none; /* Chrome / Safari — hide native scrollbar */
}

/* Slider arrows */
.amg-shop-brands__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.12);
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, opacity 0.18s ease;
}

.amg-shop-brands__arrow:hover {
  border-color: transparent;
  background: var(--accent);
  color: #111827;
}

.amg-shop-brands__arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.amg-shop-brands__arrow:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(166, 226, 46, 0.35), 0 8px 20px rgba(17, 24, 39, 0.12);
}

.amg-shop-brands__arrow[hidden] {
  display: none;
}

.amg-shop-brands__arrow svg {
  width: 18px;
  height: 18px;
}

.amg-shop-brands__arrow--prev {
  left: 4px;
}

.amg-shop-brands__arrow--next {
  right: 4px;
}

.amg-shop-brands__item {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

.amg-shop-brands__card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: #111827;
  transition: 0.16s ease;
}

.amg-shop-brands__card:hover {
  border-color: #9acd32;
  background: rgba(166, 226, 46, 0.07);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

.amg-shop-brands__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  flex: 0 0 56px;
}

.amg-shop-brands__logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
}

.amg-shop-brands__logo-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.amg-shop-brands__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.amg-shop-brands__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amg-shop-brands__count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 720px) {
  .amg-shop-brands {
    padding: 22px 18px 18px;
  }
  .amg-shop-brands__item {
    flex: 0 0 170px;
  }
  .amg-shop-brands__arrow {
    width: 36px;
    height: 36px;
  }
}
