/* ============================================================================
   brands-premium.css
   Polished /marcas/ page — featured brands + alphabet index + groups.
   ============================================================================ */

/* --- Page header ------------------------------------------------------- */
.brands-page .brands-header {
  margin-bottom: 24px;
}

/* --- Featured brands section ----------------------------------------- */
.brands-featured {
  margin: 0 0 28px;
}
.brands-featured__title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #334155;
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  position: relative;
}
.brands-featured__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--primary, #2563eb);
  border-radius: 2px;
}
.brands-featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

/* Featured card: premium panel */
.brand-featured-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #eef2f6;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 108px;
}
.brand-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.1), 0 4px 10px -3px rgba(15, 23, 42, 0.05);
  border-color: rgba(37, 99, 235, 0.25);
  text-decoration: none;
}
.brand-featured-card__name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
  text-align: center;
  line-height: 1.3;
}
.brand-featured-card__count {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.09);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

/* --- Search box ------------------------------------------------------- */
.brands-search {
  margin: 0 0 18px;
  position: relative;
}
.brands-search::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  pointer-events: none;
}
.brands-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.brands-search__input::placeholder {
  color: #94a3b8;
}
.brands-search__input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* --- Alphabet navigation ---------------------------------------------- */
.brands-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  margin-bottom: 24px;
  position: sticky;
  top: 16px;
  z-index: 10;
}
.brands-nav a,
.brands-nav__link {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.brands-nav a:hover,
.brands-nav__link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  text-decoration: none;
  transform: scale(1.08);
}
.brands-nav a.is-empty,
.brands-nav__link.is-empty {
  opacity: 0.35;
  pointer-events: none;
}

/* --- Letter groups ---------------------------------------------------- */
.brand-group {
  margin: 0 0 18px;
  scroll-margin-top: 80px;
}
.brand-group__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary, #2563eb) 0%, #1e40af 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.2px;
  border-radius: 10px;
  margin: 0 0 12px;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.35);
}

.brand-group__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.brand-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.brand-card:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 4px 10px -3px rgba(15, 23, 42, 0.08);
  transform: translateX(2px);
  text-decoration: none;
}
.brand-card__name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.1px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-card:hover .brand-card__name {
  color: var(--primary, #2563eb);
}
.brand-card__count {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.1px;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-card:hover .brand-card__count {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary, #2563eb);
}
