/* =============================================
   MEGA MENÚ - GRILLA DE LOGOS DE MARCAS
   Optimizado para Core Web Vitals
   Subir a: /static/css/marcas-megamenu.css
   ============================================= */

/* =============================================
   DESKTOP
   ============================================= */
.marcas-logo-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 20px 0;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  contain: layout style;
}

.marca-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  text-decoration: none;
  color: #444;
  background: #fff;
  min-height: 100px;
  box-sizing: border-box;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.marca-logo-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
  border-color: #ccc;
  text-decoration: none;
  color: #222;
}

.marca-logo-item img {
  width: 120px;
  height: 65px;
  object-fit: contain;
  aspect-ratio: 120 / 65;
  filter: grayscale(20%) opacity(0.85);
  transition: filter 0.18s ease;
}

.marca-logo-item:hover img {
  filter: grayscale(0%) opacity(1);
}

.marca-logo-nombre {
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: inherit;
}

/* =============================================
   TABLET
   ============================================= */
@media (max-width: 1024px) {
  .marcas-logo-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .marca-logo-item img {
    width: 90px;
    height: 50px;
    aspect-ratio: 90 / 50;
  }
}

/* =============================================
   MOBILE HAMBURGER - Grilla de marcas
   ============================================= */
.marcas-logo-grid-mobile {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

.marca-logo-item-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  text-decoration: none;
  color: #444;
  background: #fff;
  box-sizing: border-box;
  min-height: 90px;
  overflow: hidden;
}

.marca-logo-item-mobile:active {
  border-color: #ccc;
  background: #f9f9f9;
}

.marca-logo-item-mobile img {
  width: auto;
  max-width: 100%;
  height: 45px;
  object-fit: contain;
  display: block;
}

.marca-logo-nombre-mobile {
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: inherit;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
