/* Directorio de marcas: colores y proporciones del tema Regaladito. */
.rg-brands-page {
  --rg-brands-red: var(--rg-action, #d93d42);
  --rg-brands-teal: var(--rg-action-hover, #2697a3);
  --rg-brands-border: var(--rg-card-border, rgba(0, 0, 0, .08));
  --rg-brands-radius: var(--rg-card-radius, 6px);
  padding-bottom: 36px;
  color: #333;
}
.rg-brands-hero {
  margin-bottom: 28px;
  padding: 24px 26px;
  border-left: 4px solid var(--rg-brands-red);
  background: var(--rg-soft-bg, #f7f7f7);
}
.rg-brands-hero h1 {
  margin: 0 0 6px;
  color: #222;
  font-size: clamp(25px, 2.7vw, 34px);
  font-weight: 700;
  line-height: 1.2;
}
.rg-brands-hero p {
  margin: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.5;
}
.rg-brands-total {
  display: inline-block;
  margin-top: 10px;
  color: #666;
  font-size: 13px;
}
.rg-brands-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}
.rg-brands-toolbar h2 {
  margin: 0;
  color: #222;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}
.rg-brands-search-wrap { display: none; width: min(100%, 320px); }
.rg-brands-ready .rg-brands-search-wrap { display: block; }
.rg-brands-search-label {
  display: block;
  margin-bottom: 5px;
  color: #444;
  font-size: 13px;
  font-weight: 600;
}
.rg-brands-search {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: var(--rg-brands-radius);
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 14px;
}
.rg-brands-search:focus-visible {
  outline: 2px solid var(--rg-brands-teal);
  outline-offset: 1px;
}
.rg-brands-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rg-brands-item { min-width: 0; }
.rg-brands-item[hidden] { display: none; }
.rg-brands-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-height: 164px;
  padding: 15px 12px;
  border: 1px solid var(--rg-brands-border);
  border-radius: var(--rg-brands-radius);
  background: #fff;
  color: #333;
  text-align: center;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.rg-brands-card:hover,
.rg-brands-card:focus-visible {
  border-color: var(--rg-brands-red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  color: var(--rg-brands-red);
  text-decoration: none;
}
.rg-brands-card:focus-visible { outline: 2px solid var(--rg-brands-teal); outline-offset: 2px; }
.rg-brands-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 95px;
  margin-bottom: 9px;
}
.rg-brands-logo img {
  display: block;
  max-width: 95%;
  max-height: 85px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.rg-brands-initial {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #e4e4e4;
  border-radius: var(--rg-brands-radius);
  background: var(--rg-soft-bg, #f7f7f7);
  color: var(--rg-brands-red);
  font-size: 26px;
  font-weight: 700;
}
.rg-brands-name {
  display: block;
  width: 100%;
  margin-top: auto;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.rg-brands-arrow { display: none; }
.rg-brands-empty,
.rg-brands-empty-static {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--rg-brands-border);
  border-radius: var(--rg-brands-radius);
  background: var(--rg-soft-bg, #f7f7f7);
  color: #444;
  text-align: center;
}
.rg-brands-empty[hidden],
.rg-brands-results[hidden] { display: none; }
.rg-brands-results { margin-top: 15px; color: #666; font-size: 13px; }
@media (max-width: 1199px) {
  .rg-brands-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .rg-brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .rg-brands-hero { margin-bottom: 24px; padding: 20px; }
  .rg-brands-toolbar { align-items: stretch; flex-direction: column; gap: 14px; }
  .rg-brands-search-wrap { width: 100%; }
  .rg-brands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rg-brands-card { min-height: 146px; padding: 10px 8px; }
  .rg-brands-logo { height: 80px; }
  .rg-brands-logo img { max-height: 72px; }
  .rg-brands-name { font-size: 12px; }
}
@media (max-width: 340px) {
  .rg-brands-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-brands-card { transition: none; }
}
