
.detalle-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 3rem;
  padding: 2rem;
}

/* ======== GALERÍA ======== */
.galeria-producto {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(1, 43, 126, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.galeria-producto:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(1, 43, 126, 0.12);
}

.foto-principal {
  width: 100%;
  max-width: 550px;
  border-radius: 14px;
  object-fit: contain;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.foto-principal.fade {
  opacity: 0;
  transform: scale(1.03);
}

/* ======== BOTONES DE NAVEGACIÓN ======== */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #012b7e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}
.nav-btn:hover {
  background: #012b7e;
  color: #fff;
  transform: scale(1.05);
}
.prev { left: 15px; }
.next { right: 15px; }

/* ======== MINIATURAS ======== */
.miniaturas {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}
.thumb {
  width: 75px;
  height: 75px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
}
.thumb:hover {
  border-color: #5dd3e9;
  transform: scale(1.05);
}
.thumb.activa {
  border-color: #012b7e;
  box-shadow: 0 0 8px rgba(1,43,126,0.3);
}

/* ======== BOTÓN EXTRA “+2” ======== */
.thumb-extra {
  width: 75px;
  height: 75px;
  border-radius: 10px;
  background: linear-gradient(135deg, #012b7e, #5dd3e9);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: all .2s ease;
}
.thumb-extra:hover {
  filter: brightness(1.15);
}

/* ======== INFO DEL PRODUCTO ======== */
.detalle-info h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: #012b7e;
}
.detalle-info .categoria {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: .9rem;
  color: #555;
  background: #e8eef5;
  padding: .3rem .8rem;
  border-radius: 20px;
}

.detalle-info .descripcion {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: #444;
}

/* ======== PRECIOS ======== */
.precios {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: .8rem;
}
.precio-actual {
  font-size: 1.6rem;
  font-weight: 700;
  color: #012b7e;
}
.precio-tachado {
  text-decoration: line-through;
  color: #999;
  font-weight: 500;
}
.precio-oferta {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e63946;
}

/* ======== META ======== */
.meta {
  margin-bottom: 1.5rem;
  font-size: .9rem;
  color: #666;
}

/* ======== BOTÓN CARRITO ======== */
.btn.btn-primary {
  background: linear-gradient(135deg, #012b7e, #5dd3e9);
  border: none;
  padding: .8rem 1.5rem;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(1,43,126,0.3);
}

/* ======== COMPARTIR ======== */
.compartir {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.compartir span {
  font-weight: 600;
  color: #333;
}
.compartir a, 
.compartir .btn-copy {
  font-size: 1.3rem;
  color: #555;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}
.compartir a:hover,
.compartir .btn-copy:hover {
  color: #012b7e;
  transform: scale(1.1);
}

/* ======== MODAL ======== */
.modal-galeria {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-galeria img {
  max-width: 85%;
  max-height: 80%;
  border-radius: 12px;
  transition: transform .3s ease;
}
.modal-galeria img:hover {
  transform: scale(1.03);
}
.modal-galeria .cerrar {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
  transition: color .2s;
}
.modal-galeria .cerrar:hover {
  color: #5dd3e9;
}
.modal-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s;
}
.modal-btn:hover {
  background: rgba(255,255,255,0.35);
}
.modal-btn.prev { left: 40px; }
.modal-btn.next { right: 40px; }
/* ======== RESPONSIVE TABLET ======== */
@media (max-width: 768px) {
  .detalle-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .galeria-producto {
    padding: 1rem;
    max-width: 100%;
    margin: 0 auto;
  }

  .foto-principal {
    max-width: 100%;
  }

  .detalle-info {
    text-align: center;
  }

  .detalle-info h1 {
    font-size: 1.6rem;
  }

  .detalle-info .descripcion {
    font-size: 0.95rem;
    color: #444;
    margin: 0 auto 1rem;
    max-width: 90%;
  }

  .precios {
    justify-content: center;
  }

  .meta {
    text-align: center;
  }

  .btn.btn-primary {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }

  .compartir {
    justify-content: center;
  }
}

/* ======== RESPONSIVE MÓVIL (≤ 480px) ======== */
@media (max-width: 480px) {
  main.detalle-producto {
    padding-top: 90px;
  }

  .detalle-wrap {
    padding: 1rem;
  }

  .galeria-producto {
    padding: 0.8rem;
    border-radius: 10px;
  }

  .foto-principal {
    border-radius: 10px;
    max-width: 100%;
  }

  /* miniaturas scroll horizontal */
  .miniaturas {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
  }

  .thumb,
  .thumb-extra {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
  }

  .detalle-info h1 {
    font-size: 1.3rem;
  }

  .detalle-info .descripcion {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0 0.5rem;
  }

  .precio-actual {
    font-size: 1.3rem;
  }

  .precio-oferta {
    font-size: 1.2rem;
  }

  .btn.btn-primary {
    font-size: 0.95rem;
    padding: 0.7rem 1.2rem;
  }

  .compartir {
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 1.1rem;
  }

  .compartir span {
    width: 100%;
    text-align: center;
    margin-bottom: 0.3rem;
  }
}

