/* BlackPhone Málaga · 13-11-2026
   Ajuste de imágenes EN LA PORTADA, sin modificar fotos ni bases de datos.
   Usa el mismo encuadre sin recortes que las fotografías de /tienda/.
*/

/* La imagen de cabecera (móvil/PC/consola) conserva proporción sin hacer zoom. */
.hero .hero-visual {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  right: 0 !important;
  width: min(59%, 690px) !important;
  max-width: 100% !important;
}

/* Cuatro bloques de servicios: incluso la foto del teléfono se ve completa. */
.categories .cards > a.category .category-img {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #f6f5f2;
}
.categories .cards > a.category { min-width: 0; }

/* Productos destacados de la INDEX: mismos marcos 4:3 que /tienda/. */
#bp-escaparate .bp-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  align-items: stretch;
  gap: 20px;
  min-width: 0;
}
#bp-escaparate .bp-showcase-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
#bp-escaparate .bp-showcase-card .bp-showcase-media {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  flex: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f4f3f0 !important;
}
#bp-escaparate .bp-showcase-card .bp-showcase-media > img {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  aspect-ratio: auto !important;
  padding: 10px !important;
  margin: 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
}
#bp-escaparate .bp-showcase-card .bp-showcase-state { z-index: 2; }
#bp-escaparate .bp-showcase-card .bp-showcase-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
#bp-escaparate .bp-showcase-card .bp-showcase-content h3 {
  min-height: 2.5em;
  max-height: 2.5em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
#bp-escaparate .bp-showcase-card .bp-showcase-price { margin-top: auto; }
#bp-escaparate .bp-showcase-card .bp-showcase-btn { margin-top: auto; }

@media (max-width: 760px) {
  .hero .hero-visual {
    width: 65% !important;
    right: 0 !important;
    background-position: right center !important;
  }
}
@media (max-width: 620px) {
  .hero .hero-visual {
    top: 265px !important;
    right: 0 !important;
    width: 100% !important;
    height: 260px !important;
    background-size: contain !important;
    background-position: center center !important;
  }
  #bp-escaparate .bp-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  #bp-escaparate .bp-showcase-card .bp-showcase-media { aspect-ratio: 1 / 1 !important; }
  #bp-escaparate .bp-showcase-card .bp-showcase-media > img { padding: 6px !important; }
}
