/* ==========================================================================
   Brands page (templates/catalog/brands.tpl + catalog/_partials/brand-card.tpl), 2026-11. Loaded on that page only,
   linked from the template with a version. Same card language as the career page (career.css).
   New class names (vbrands-*, vbrand) so the old #manufacturer rules in custom-second.css no longer apply.
   ========================================================================== */
#manufacturer {
  --vb-green: var(--green-24, #25641c);
  --vb-green-hover: var(--green-10, #44a031);
  --vb-lime: #7cc242;
  --vb-anthracite: #2c2a2b;
  --vb-grey: #62686b;
  --vb-surface: #f4f6f4;
  --vb-line: #dde2de;
  --vb-shadow: 0 0.25rem 1.5rem rgb(44 42 43 / 7%);
  --vb-sticky-top: 4.5rem;
}

/* ---- Hero ---- */
.vbrands-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 1rem 0 1.5rem;
  padding: 1.75rem 3rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: linear-gradient(100deg, #fff 55%, #f1f7ec);
  box-shadow: var(--vb-shadow);
  isolation: isolate;
}
/* Brand rings coming out of the right corner */
.vbrands-hero::before,
.vbrands-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}
.vbrands-hero::before {
  top: -6rem;
  right: -4rem;
  width: 15rem;
  border: 1.125rem solid var(--vb-lime);
  opacity: 0.9;
}
.vbrands-hero::after {
  right: 11rem;
  bottom: -5rem;
  width: 7rem;
  border: 2px solid var(--vb-line);
}
.vbrands-hero__body {
  flex: 0 1 52rem;
  min-width: 0;
}
.vbrands-hero__title {
  position: relative;
  margin: 0 0 0.875rem;
  padding-bottom: 0.75rem;
  color: #111;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.vbrands-hero__title::after,
.vbrands-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4rem;
  height: 0.25rem;
  border-radius: 0.25rem;
  background: var(--vb-lime);
}
.vbrands-hero__lead {
  margin: 0 0 1.125rem;
  color: var(--vb-anthracite);
  font-size: 1rem;
  line-height: 1.55;
}
.vbrands-hero__count {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  aspect-ratio: 1;
  margin-right: 2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--vb-shadow);
}
.vbrands-hero__number {
  color: var(--vb-green);
  font-size: 2.125rem;
  font-weight: 800;
  line-height: 1;
}
.vbrands-hero__label {
  margin-top: 0.25rem;
  color: var(--vb-grey);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---- Search ---- */
.vbrands-search {
  position: relative;
  display: block;
  max-width: 30rem;
  margin: 0;
}
.vbrands-search__icon {
  position: absolute;
  top: 50%;
  left: 1.125rem;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--vb-green);
  stroke-width: 2;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}
.vbrands-search__input {
  width: 100%;
  height: 2.875rem;
  padding: 0 1.25rem 0 3.125rem;
  border: 1px solid var(--vb-line);
  border-radius: 999px;
  background: #fff;
  color: var(--vb-anthracite);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vbrands-search__input:focus {
  border-color: var(--vb-green);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgb(124 194 66 / 25%);
}
.vbrands-search__empty {
  margin: 1rem 0 0;
  color: var(--vb-grey);
  font-size: 0.9375rem;
}

/* ---- Featured brands ---- */
.vbrands-featured {
  margin: 0 0 2.5rem;
}
.vbrands-heading {
  position: relative;
  margin: 0 0 1.5rem;
  padding-bottom: 0.875rem;
  color: #111;
  font-size: 1.625rem;
  font-weight: 800;
}
.vbrands-featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- A-Z bar, stuck under the site header while scrolling ---- */
.vbrands-az {
  position: sticky;
  z-index: 5;
  top: var(--vb-sticky-top);
  margin: 0 0 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--vb-shadow);
  backdrop-filter: blur(6px);
}
.vbrands-az__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vbrands-az__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  color: var(--vb-anthracite);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
a.vbrands-az__letter:hover,
a.vbrands-az__letter:focus-visible {
  background: var(--vb-surface);
  color: var(--vb-green);
}
.vbrands-az__letter.is-active {
  background: var(--vb-green);
  color: #fff;
}
.vbrands-az__letter.is-empty,
.vbrands-az__letter.is-empty.is-active {
  background: none;
  color: #c4c9c5;
  pointer-events: none;
}

/* ---- Letter groups ---- */
/* The theme gives #center-column 4rem at the bottom; on this page the last group card ends the content, 2rem is enough */
#manufacturer #center-column {
  padding-bottom: 2rem;
}
.vbrands-list {
  margin: 0;
}
.vbrands-group:last-child {
  margin-bottom: 0;
}
.vbrands-group {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0 0 1.25rem;
  padding: 1.5rem 1.75rem;
  scroll-margin-top: calc(var(--vb-sticky-top) + 5rem);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: var(--vb-shadow);
}
.vbrands-group__letter {
  margin: 0;
  color: var(--vb-green);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
}
.vbrands-group__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Brand tile: the logo only, square ---- */
.vbrand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 0.5rem 0.875rem;
  border: 1px solid #edf0ed;
  border-radius: 0.75rem;
  background: #fff;
  color: var(--vb-anthracite);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.vbrand:hover,
.vbrand:focus-visible {
  border-color: var(--vb-lime);
  box-shadow: var(--vb-shadow);
  color: var(--vb-anthracite);
  transform: translateY(-0.125rem);
}
.vbrand__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.vbrand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vbrand__initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.375rem;
  border-radius: 50%;
  background: var(--vb-surface);
  color: var(--vb-green);
  font-size: 1.125rem;
  font-weight: 800;
}
.vbrand__name {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* ---- Tablets ---- */
@media (max-width: 991.98px) {
  .vbrands-hero {
    padding: 2rem 1.75rem;
  }
  .vbrands-hero__count {
    display: none;
  }
  .vbrands-hero::before {
    right: -9rem;
  }
  .vbrands-group__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ---- Phones: two columns of compact cards, A-Z as a horizontal strip ---- */
@media (max-width: 575.98px) {
  #manufacturer {
    /* Fallback below the mobile header + its search row; brands.js sets the exact value while scrolling */
    --vb-sticky-top: 8.75rem;
  }
  .vbrands-hero {
    margin: 0.5rem 0 1.25rem;
    padding: 1.5rem 1.125rem;
    border-radius: 1rem;
  }
  .vbrands-hero::before {
    top: -8rem;
    right: -9rem;
    width: 14rem;
    border-width: 1rem;
  }
  .vbrands-hero::after {
    display: none;
  }
  .vbrands-hero__title {
    margin-bottom: 1rem;
    font-size: 2rem;
  }
  .vbrands-hero__lead {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
  }
  .vbrands-az {
    margin: 0 0 1rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.875rem;
    transition: top 0.2s ease;
  }
  .vbrands-az__list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .vbrands-az__list::-webkit-scrollbar {
    display: none;
  }
  .vbrands-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
  }
  .vbrands-group__letter {
    font-size: 2rem;
  }
  .vbrands-group__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .vbrands-featured__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vbrand {
    padding: 0.5rem;
    border-radius: 0.75rem;
  }
  .vbrand__initials {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
  }
  .vbrand__name {
    font-size: 0.6875rem;
  }
}
