/**
 * Section: Brands Section (Slider)
 *
 * @package Alpaya_x_Retodi
 */

/* Arka plan tam genişlik */
.entry-content .section--brands,
.entry-content .wp-block-alpaya-section .section--brands {
  width: 100vw;
  min-width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
  box-sizing: border-box;
}

.section--brands {
  padding: calc(var(--spacing, 1rem) * 3) 0;
}

.section__brands-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header: Başlık ---- View All <> */
.section__brands-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--section-title-content-gap);
  flex-wrap: wrap;
}

.section__brands-title {
  margin: 0;
  font-size: var(--section-title-font-size);
  font-weight: 100;
}

.section__brands-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section__brands-view-all {
  font-size: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.section__brands-view-all:hover {
  opacity: 0.7;
}

.section__brands-arrows {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Oklar - Hero slider ile aynı stil */
.brands-slider__arrow {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-secondary, #1e293b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}

.brands-slider__arrow:hover {
  background: #fff;
  color: #000;
}

.brands-slider__arrow:focus {
  outline: 1px solid #000;
  outline-offset: 1px;
}

.brands-slider__arrow svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Slider - grid 5 desktop, grid 2 mobil, yatay scroll */
.brands-slider {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.brands-slider::-webkit-scrollbar {
  display: none;
}

.brands-slider__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  width: max-content;
  padding-bottom: 4px;
}

/* 4 öğe görünür - desktop, daha büyük görseller */
.brands-slider__item {
  flex: 0 0 275px;
  width: 275px;
  scroll-snap-align: start;
}

.brands-slider__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brands-slider__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.brands-slider__link:hover {
  opacity: 0.9;
}

.brands-slider__main {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 0.75rem;
}

.brands-slider__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brands-slider__logo {
  width: 100%;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brands-slider__logo img {
  max-width: 100%;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .brands-slider__item {
    flex: 0 0 180px;
    width: 180px;
  }

  .brands-slider__track {
    gap: 1rem;
  }

  .section__brands-header {
    margin-bottom: var(--section-title-content-gap);
  }

  .brands-slider__logo {
    min-height: 72px;
  }

  .brands-slider__logo img {
    max-height: 72px;
  }

  .brands-slider__arrow {
    width: 32px;
    height: 32px;
  }

  .brands-slider__arrow svg {
    width: 16px;
    height: 16px;
  }
}
