/* ============================================================
   📌 Layout general del detalle del producto
============================================================ */
.producto-detalles {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}


/* ============================================================
   🖼 Swiper Principal (Imagen grande)
============================================================ */
.mainSwiper {
  width: 100%;
  max-height: 550px;
  background: #faf5ef;
  border-radius: 14px;
  overflow: hidden;
}

.mainSwiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mainSwiper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* 🔁 Flechas navegación */
.swiper-button-next,
.swiper-button-prev {
  color: #111;
  opacity: .75;
  transition: .2s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  opacity: 1;
}


/* ============================================================
   🖼 Mini-thumbnails (Swiper secundario)
============================================================ */
.miniSwiper {
  width: 100%;
  margin-top: 18px;
}

.miniSwiper .swiper-slide {
  width: 75px;
  height: 95px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.miniSwiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swiper-slide-thumb-active img {
  border: 2px solid #111827;
  padding: 1px;
  border-radius: 12px;
}


/* ============================================================
   ℹ Información del producto
============================================================ */
.info-producto h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.estrellas-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calif {
  font-size: 14px;
  color: #6b7280;
}

.precio {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.descripcion {
  margin-top: 16px;
  font-size: 16px;
  color: #4b5563;
  line-height: 1.6;
}

.btn-agregar-carrito {
  margin-top: 24px;
  width: 100%;
  border-radius: 999px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  background-color: #111827;
  color: white;
  border: none;
  cursor: pointer;
  transition: .2s ease;
}

.btn-agregar-carrito:hover {
  background-color: #000;
}


/* ============================================================
   ⭐ Opiniones del producto
============================================================ */
.opiniones-producto {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 16px;
}

.opinion-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 26px 0;
}

.usuario {
  display: flex;
  align-items: center;
  gap: 12px;
}

.usuario img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
}

.opinion-titulo {
  font-size: 18px;
  font-weight: 600;
  margin-top: 14px;
}

.verificado {
  color: #16a34a;
  font-size: 13px;
  font-weight: 600;
}

.foto-opinion img {
  width: 120px;
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  object-fit: cover;
}


/* ============================================================
   🔎 LIGHTBOX PANTALLA COMPLETA
============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  cursor: zoom-out;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0 }
  to { opacity: 1 }
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}


/* ============================================================
   📱 RESPONSIVE SYSTEM Optimizado
============================================================ */

/* Tablet / Mobile Grande */
@media(max-width:1024px){
  .producto-detalles {
    text-align: center;
  }
}

/* Mobile */
@media(max-width:768px){
  .mainSwiper {
    max-height: 75vh;
    border-radius: 10px;
  }

  .miniSwiper {
    justify-content: center;
  }

  .miniSwiper .swiper-slide {
    width: 65px;
    height: 85px;
  }

  .opinion-item {
    text-align: left;
  }
}

/* Mobile pequeño */
@media(max-width:480px){
  .miniSwiper .swiper-slide {
    width: 58px;
    height: 78px;
  }
  .info-producto h1 {
    font-size: 22px;
  }
}


/* ============================================================
   🖥 Desktop — Layout PRO 3 Columnas
============================================================ */
@media(min-width:1025px){
  .producto-detalles {
    grid-template-columns: 110px 1fr 420px;
    grid-template-areas:
      "mini main info";
  }

  .miniSwiper {
    grid-area: mini;
  }

  .mainSwiper {
    grid-area: main;
  }

  .info-producto {
    grid-area: info;
  }

  /* Miniaturas en columna */
  .miniSwiper .swiper-wrapper {
    flex-direction: column;
  }

  .miniSwiper .swiper-slide {
    width: 100px;
    height: 120px;
  }
}
