.brands-section {
  padding: 46px 0 52px;
  background: #fff;
  border-top: 1px solid #eee8df;
  border-bottom: 1px solid #eee8df;
}

.brands-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brands-heading h2 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--color-navy);
  font-size: 17px;
  font-weight: 700;
}

.brands-line {
  height: 1px;
  flex: 1;
  background: #b6a58d;
}

.brands-slider {
  direction: ltr;
}

.brands-slider .owl-stage {
  display: flex;
}

.brands-slider .owl-item {
  display: flex;
}

.brands-slider .brand-card-shell {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}

.brand-card {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 138px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 12px 12px;
  border: 1px solid #eee8df;
  border-radius: 14px;
  background: #fff;
  color: var(--color-navy);
  box-shadow: 0 5px 18px rgba(7, 26, 46, 0.05);
  text-align: center;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.brand-card:hover,
.brand-card-shell:hover .brand-card {
  border-color: #b79b73;
  box-shadow: 0 10px 24px rgba(7, 26, 46, 0.1);
  transform: translateY(-4px);
}

.brand-card-detail {
  position: absolute;
  z-index: 2;
  inset-block-start: 9px;
  right: auto;
  left: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(16, 42, 67, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-navy);
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  box-shadow: 0 4px 14px rgba(7, 26, 46, 0.14);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.brand-card-shell:is(:hover, :focus-within) .brand-card-detail {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.brand-card-detail:is(:hover, :focus-visible) {
  border-color: var(--color-navy);
  background: var(--color-navy);
  color: var(--color-gold);
}

.brand-card-detail:focus-visible {
  outline: 3px solid rgba(246, 197, 21, 0.75);
  outline-offset: 2px;
}

@media (hover: none) {
  .brand-card-detail {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-card-detail {
    transition: none;
  }
}


.brand-card > strong {
  overflow: hidden;
  max-width: 100%;
  color: #66717a;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .brands-section {
    padding: 34px 0 40px;
  }

  .brands-heading {
    gap: 10px;
    margin-bottom: 20px;
  }

  .brands-heading h2 {
    font-size: 15px;
  }

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


  .brand-card > strong {
    font-size: 12px;
  }
}

/* Prevent brand cards and their shadows from being clipped by Owl Carousel. */
.brands-slider .owl-stage-outer {
  padding-top: 5px;
  padding-bottom: 20px;
}

.brands-slider .owl-stage {
  align-items: stretch;
}

.brands-slider .owl-item {
  height: auto !important;
  padding-bottom: 1px;
}

.brands-slider .brand-card {
  box-sizing: border-box;
  min-height: 138px;
  height: 100%;
  margin-bottom: 0;
}


.brands-section {
  padding-bottom: 40px;
}

@media (max-width: 767px) {
  .brands-slider .owl-stage-outer {
    padding-bottom: 16px;
  }
  .brands-slider .brand-card {
    min-height: 138px;
  }
  }
