/* =====================================================
   BRANDS CAROUSEL
===================================================== */

:root {
  --br-2: 8px;
  --br-3: 12px;
  --br-4: 16px;
  --fs-3: 0.833rem;
  --fs-5: 1.2rem;
  --c-grey-light-8: #f9f9fc;
  --c-grey-light-7: #f3f3f7;
  --c-grey-light-6: #ebebef;
  --c-grey-light-5: #e8e8ec;
  --c-grey-light-4: #d1d1d8;
  --c-grey:         #919199;
  --c-grey-dark-2:  #636369;
  --c-text-1:       #1f1a1e;
  --c-red-3:        #b32a65;
  --white:          #ffffff;
}

/* ═══════════════════════════════════════════════════════
   WRAPPER
═══════════════════════════════════════════════════════ */
.brands-section {
  padding: 50px 0;
  background: var(--c-grey-light-8);
}

.brands-section .page-container {
  max-width: 100%;
  overflow: hidden;
}

.brands-section .page-width {
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  max-width: 1220px;
}

/* ═══════════════════════════════════════════════════════
   SWIPER
═══════════════════════════════════════════════════════ */
.brands-swiper {
  overflow: hidden;
  padding: 4px 0 10px;
}

.brands-swiper .swiper-wrapper {
  align-items: stretch;
}

/* ═══════════════════════════════════════════════════════
   BRAND CARD
═══════════════════════════════════════════════════════ */
.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 14px 14px;
  background: var(--white);
  border: 1px solid var(--c-grey-light-5);
  border-radius: var(--br-3);
  text-decoration: none;
  color: inherit;
  height: auto;
  min-height: 130px;
  transition: 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.brand-card:hover {
  border-color: var(--c-red-3);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -12px rgba(179, 42, 101, .28);
}

/* لوگو */
.brand-logo {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform .3s ease;
}

.brand-card:hover .brand-logo {
  transform: scale(1.08);
}

.brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(80%);
  opacity: .75;
  transition: filter .3s ease, opacity .3s ease;
}

.brand-card:hover .brand-logo img {
  filter: grayscale(0);
  opacity: 1;
}

/* حالت بدون لوگو */
.brand-logo-text {
  background: var(--c-grey-light-6);
  border-radius: 50%;
  color: var(--c-red-3);
  font-size: 1.8rem;
  font-weight: 900;
  transition: background .3s ease;
}

.brand-card:hover .brand-logo-text {
  background: var(--c-red-3);
  color: var(--white);
}

/* نام برند */
.brand-name {
  font-size: var(--fs-3);
  font-weight: 700;
  color: var(--c-text-1);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color .2s ease;
}

.brand-card:hover .brand-name {
  color: var(--c-red-3);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .brands-section {
    padding: 32px 0;
  }

  .brand-card {
    min-height: 110px;
    padding: 14px 10px 10px;
    gap: 8px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand-logo-text {
    font-size: 1.4rem;
  }

  .brand-name {
    font-size: .75rem;
  }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════ */
[data-theme="dark"] .brands-section {
  background: #121014;
}

[data-theme="dark"] .brand-card {
  background: #1e1b22;
  border-color: #2a242f;
}

[data-theme="dark"] .brand-card:hover {
  border-color: var(--c-red-3);
}

[data-theme="dark"] .brand-name {
  color: #f8f4f7;
}

[data-theme="dark"] .brand-logo-text {
  background: #2a242f;
  color: #e879a8;
}

[data-theme="dark"] .brand-card:hover .brand-logo-text {
  background: var(--c-red-3);
  color: var(--white);
}