/* ============================================
   Brand Section — "Sell your car by brand"
   Static multi-row pill-button grid
   ============================================ */

.brand-section {
  padding: 64px 0 48px;
  overflow: hidden;
  background-color: #f2f2f2;
}

.brand-section__container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand-section__heading {
  font-family: "Poppins", sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #000000;
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.3;
}

.brand-section__subtitle {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #6b7280;
  text-align: center;
  margin: 0 0 40px;
  line-height: 1.5;
}

/* ---------- pill grid ---------- */
.brand-section__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 16px;
}

/* ---------- brand pill button ---------- */
.brand-section__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.brand-section__pill:hover,
.brand-section__pill:focus-visible {
  border-color: #42cbb2;
  box-shadow: 0 2px 10px rgba(66, 203, 178, 0.2);
  background-color: #f0fdf9;
  outline: none;
}

.brand-section__pill:focus-visible {
  outline: 2px solid #42cbb2;
  outline-offset: 2px;
}

/* ---------- loading state ---------- */
.brand-section__loading {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 16px;
}

.brand-section__skeleton {
  width: 100px;
  height: 40px;
  border-radius: 50px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: brand-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes brand-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ---------- empty / error state ---------- */
.brand-section__empty {
  display: none; /* hidden by default; shown by JS when needed */
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  .brand-section {
    padding: 48px 0 32px;
  }

  .brand-section__heading {
    font-size: 26px;
  }

  .brand-section__subtitle {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .brand-section__grid {
    gap: 10px;
  }

  .brand-section__pill {
    padding: 8px 18px;
    font-size: 13px;
  }

  .brand-section__loading {
    gap: 10px;
  }

  .brand-section__skeleton {
    width: 90px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .brand-section__heading {
    font-size: 22px;
  }

  .brand-section__grid {
    gap: 8px;
  }

  .brand-section__pill {
    padding: 7px 14px;
    font-size: 12px;
  }

  .brand-section__loading {
    gap: 8px;
  }

  .brand-section__skeleton {
    width: 80px;
    height: 32px;
  }
}
