/* ── Inicio: laptops destacadas (debajo del hero) ── */
.nexlap-spotlight-grid {
  --nexlap-spotlight-gap: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--nexlap-spotlight-gap);
}

.nexlap-spotlight-card {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  height: 8.25038rem;
  min-height: 8.25038rem;
  max-height: 8.25038rem;
  padding: 0.25rem 0;
  background-color: #f5f5f5;
  text-decoration: none;
  overflow: hidden;
}

/* Tablet: 2×2 */
@media (min-width: 768px) {
  .nexlap-spotlight-grid {
    --nexlap-spotlight-gap: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nexlap-spotlight-card {
    flex: 0 0 calc((100% - var(--nexlap-spotlight-gap)) / 2);
    width: calc((100% - var(--nexlap-spotlight-gap)) / 2);
    max-width: calc((100% - var(--nexlap-spotlight-gap)) / 2);
  }
}

/* PC grande: 4 en fila */
@media (min-width: 1200px) {
  .nexlap-spotlight-card {
    flex: 0 0 calc((100% - (var(--nexlap-spotlight-gap) * 3)) / 4);
    width: calc((100% - (var(--nexlap-spotlight-gap) * 3)) / 4);
    max-width: calc((100% - (var(--nexlap-spotlight-gap) * 3)) / 4);
  }
}

.nexlap-spotlight-card:hover,
.nexlap-spotlight-card:focus {
  text-decoration: none;
}

.nexlap-spotlight-card__media {
  flex: 0 0 42%;
  max-width: 42%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.35rem 0.5rem 0.5rem;
}

.nexlap-spotlight-card__media img {
  max-width: 100%;
  max-height: 7rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nexlap-spotlight-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.75rem 0.5rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nexlap-spotlight-card__title {
  margin: 0 0 0.5rem;
  padding-bottom: 0.25rem;
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.28;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.88rem;
}

.nexlap-spotlight-card__link {
  color: #000 !important;
  white-space: nowrap;
}

/* ── Inicio: pestañas por marca (mismo ancho) ── */
.nexlap-brand-tabs {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

.nexlap-brand-tabs .nav-item {
  flex: 1 1 0;
  min-width: 0;
}

.nexlap-brand-tabs .nav-link {
  width: 100%;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.nexlap-brand-tabs .nav-link > div {
  width: 100%;
  justify-content: center !important;
}

/* Móvil: máximo 4 pestañas de marca (evita pegado con 6–8 marcas) */
@media (max-width: 767.98px) {
  .nexlap-brand-tabs .nav-item:nth-child(n + 5),
  #pills-tabContent > .tab-pane:nth-child(n + 5) {
    display: none !important;
  }

  .nexlap-brand-tabs .nav-link {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.78rem;
  }
}

/* Pestañas por marca:
   móvil      → 2×3 (6)
   laptop 15" → 3×2 (6)
   PC grande  → 4×2 (8) */
.nexlap-brand-tab-products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  grid-auto-flow: row;
  gap: 0;
  overflow: hidden;
  margin: 0 !important;
  padding: 0;
}

.nexlap-brand-tab-products > .product-item {
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0;
  padding: 0;
}

.nexlap-brand-tab-products > .product-item:nth-child(n + 7) {
  display: none !important;
}

@media (min-width: 768px) {
  .nexlap-brand-tab-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1480px) {
  .nexlap-brand-tab-products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nexlap-brand-tab-products > .product-item:nth-child(n + 7) {
    display: block !important;
  }

  .nexlap-brand-tab-products > .product-item:nth-child(n + 9) {
    display: none !important;
  }
}

/* Más Vendidos (tarjetas horizontales originales):
   móvil      → 3 visibles (d-none d-md-block en 4–6)
   laptop 15" → 6 visibles
   PC 24"     → 8 visibles */
.nexlap-bestseller-products > .product-item.nexlap-bestseller-item--wide-only {
  display: none !important;
}

@media (min-width: 1480px) {
  .nexlap-bestseller-products > .product-item.nexlap-bestseller-item--wide-only {
    display: block !important;
  }
}

/* NexLap: mantiene la tarjeta elevada al hover sin que salte el contenido de abajo */
@media (min-width: 1200px) {
  .product-item__inner:not(.remove-prodcut-hover) {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .product-item:hover .product-item__inner:not(.remove-prodcut-hover) {
    position: relative !important;
    width: 100%;
    height: auto !important;
    min-height: unset !important;
    transform: translateY(-5px);
    box-shadow: 0 0 6px 0 rgba(1, 1, 1, 0.3);
    background-color: #fff;
    z-index: 2;
  }

  .products-group-4-1-4 .products-group-1 .product-item:hover .product-item__inner,
  .products-group-8-1 .products-group-1 .product-item:hover .product-item__inner,
  .products-group-4-1-4 .products-group-1 .product-item:hover .product-item__body,
  .products-group-8-1 .products-group-1 .product-item:hover .product-item__body {
    height: auto !important;
  }
}
