.tm-brands {
  --tm-brand-ring: #e5e7eb;
  --tm-brand-text: #111827;
  --tm-brand-muted: #6b7280;
  padding: 24px 0 12px;
  background: #fff;
  overflow-x: clip;
  max-width: 100%;
}

.tm-brands__inner {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
}

.tm-brands__head {
  text-align: left;
  margin-bottom: 14px;
}

.tm-brands__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tm-brand-text);
  line-height: 1.25;
}

.tm-brands__subtitle {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--tm-brand-muted);
  line-height: 1.4;
}

/* Trendyol-style: single-row horizontal scroll */
.tm-brands__grid {
  list-style: none;
  margin: 0;
  padding: 2px 2px 8px;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}

.tm-brands__grid::-webkit-scrollbar {
  display: none;
}

.tm-brands__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 88px;
}

.tm-brands__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 12px;
  text-decoration: none !important;
  color: var(--tm-brand-text) !important;
  -webkit-tap-highlight-color: transparent;
}

.tm-brands__card:hover,
.tm-brands__card:focus-visible {
  outline: none;
}

.tm-brands__card:focus-visible .tm-brands__logo {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e87722;
}

.tm-brands__logo {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--tm-brand-ring);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tm-brands__card:hover .tm-brands__logo,
.tm-brands__card:focus-visible .tm-brands__logo {
  border-color: #d1d5db;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.tm-brands__img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.tm-brands__fallback {
  font-size: 1.25rem;
  font-weight: 800;
  color: #9ca3af;
}

.tm-brands__name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}

@media (min-width: 640px) {
  .tm-brands {
    padding: 28px 0 16px;
  }

  .tm-brands__grid {
    gap: 12px;
  }

  .tm-brands__item,
  .tm-brands__logo {
    width: 100px;
  }

  .tm-brands__logo {
    height: 100px;
    border-radius: 14px;
    padding: 14px;
  }

  .tm-brands__name {
    font-size: 0.875rem;
  }
}

@media (min-width: 990px) {
  .tm-brands__inner {
    width: min(1200px, calc(100% - 48px));
  }

  .tm-brands__head {
    margin-bottom: 16px;
  }

  .tm-brands__item,
  .tm-brands__logo {
    width: 112px;
  }

  .tm-brands__logo {
    height: 112px;
    border-radius: 16px;
    padding: 16px;
  }
}
