/* ============================================
   PRODUCTO DETALLE & LIGHTBOX
   ============================================ */
.producto-detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.producto-detalle-imagen {
  position: sticky;
  top: calc(var(--topbar-height) + var(--navbar-scrolled-height) + 2rem);
}

.producto-detalle-main-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--verde-menta);
  box-shadow: var(--shadow-lg);
}

.producto-detalle-main-img img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.producto-detalle-main-img:hover img {
  transform: scale(1.03);
}

.btn-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  color: var(--verde-oscuro);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.btn-zoom:hover {
  background: var(--verde-lima);
  color: var(--blanco);
  transform: scale(1.08);
}

.producto-detalle-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition);
  opacity: 0.6;
}

.thumb:hover {
  opacity: 0.9;
  border-color: var(--verde-claro);
}

.thumb.active {
  opacity: 1;
  border-color: var(--verde-lima);
  box-shadow: 0 0 0 2px rgba(78,168,59,0.2);
}

.producto-detalle-info h2 {
  font-family: var(--font-titulo);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--verde-oscuro);
  margin-bottom: 1.2rem;
}

.producto-detalle-desc {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--gris-600);
  margin-bottom: 2rem;
}

.producto-detalle-meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.5rem;
  background: var(--verde-menta);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--gris-600);
}

.meta-item i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--verde-lima);
  flex-shrink: 0;
}

.producto-detalle-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- GALERÍA SECTION --- */
.galeria-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: start;
}

.galeria-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blanco);
  box-shadow: var(--shadow-md);
}

.galeria-main img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.galeria-main img:hover {
  transform: scale(1.02);
}

.galeria-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.galeria-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition);
  opacity: 0.6;
}

.galeria-thumb:hover {
  opacity: 0.9;
}

.galeria-thumb.active {
  opacity: 1;
  border-color: var(--verde-lima);
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(12,25,16,0.95);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox.abierto {
  display: flex;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.8rem;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: var(--verde-lima);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@media (max-width: 992px) {
  .producto-detalle {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .producto-detalle-imagen {
    position: static;
  }
  .galeria-grid {
    grid-template-columns: 1fr;
  }
  .galeria-thumbs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .galeria-thumb {
    width: calc(33.33% - 8px);
    height: 90px;
  }
}

@media (max-width: 480px) {
  .producto-detalle-main-img img {
    height: 280px;
  }
  .galeria-main img {
    height: 280px;
  }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}
