/* css/product_detail_image.css */

/* Contenedor para centrar galería igual que publicacion */
.images-wrapper {
  width: 100%;
  margin: 20px 5px;
  overflow: hidden;
}

.gallery {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.swiper {
  background: #f9f9f9;
  overflow: hidden;
}

.thumbs {
  width: 100%;
  min-width: 80px;
  max-width: 120px;
  height: auto;
  max-height: 298px;
  padding: 10px;
}

.thumbs .swiper-slide {
  aspect-ratio: 16/9;
  margin: 0 auto 10px;
  opacity: 0.6;
  cursor: pointer;
}

.thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid #46494d;
}

.main {
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-width: 552px;
  min-height: 310px;
}

.main .swiper-wrapper {
  height: 100% !important;
}

.main .swiper-slide {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  background: #fff; /* relleno blanco alrededor de la imagen */
  display: flex;
  align-items: center;
  justify-content: center;
}

.main .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* 👈 mantiene la proporción original */
  display: block;
  background: #fff; /* asegura que el relleno sea blanco */
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1010px) {
  .main {
    min-width: 370px;
    min-height: 207px;
  }
  .gallery {
    display: flex;
    flex-direction: column-reverse;
    gap: 16px;
    align-items: center;
  }
  .gallery .main {
    width: 85%;
    max-width: none;
  }
  .gallery .thumbs {
    width: auto;
    flex: none;
    max-width: none;
  }
  .thumbs .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 0;
  }
  .thumbs .swiper-slide {
    flex: 0 0 auto;
    width: 106px;
    height: 60px;
    margin-right: 10px;
    margin-bottom: 0;
  }
}