
/* Estilos página de producto */


/* --- Contenedor principal --- */
.producto-main {
  background-color: #f8f9fa;
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

/* --- Contenedor del producto (imagen + info) --- */
.producto-container {
  display: flex;
  gap: 3rem;
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(139, 184, 217, 0.25);
  border: 2px solid #8bb8d9;
}

/* --- Contenedor de la imagen del producto --- */
.producto-imagen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 15px;
  overflow: hidden;
  /* Altura máxima para que la imagen no exceda */
  max-height: 450px;
  min-height: auto;
}

/* --- Imagen del producto (se adapta al contenedor) --- */
.producto-imagen img {
  /* Se adapta al ancho disponible */
  max-width: 100%;
  /* No excede la altura máxima del contenedor */
  max-height: 450px;
  width: auto;
  height: auto;
  /* Mantiene proporciones sin distorsión */
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Efecto hover en la imagen */
.producto-imagen:hover img {
  transform: scale(1.02);
}

/* --- Sección de información del producto --- */
.producto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Marca del producto --- */
.producto-marca {
  font-size: 0.9rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

/* --- Nombre/título del producto --- */
.producto-titulo {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* --- Precio del producto --- */
.producto-precio {
  font-size: 2rem;
  font-weight: 700;
  color: #3a7bd5;
  margin-bottom: 1.5rem;
}

/* --- Contenedor de acciones (cantidad + botón) --- */
.producto-acciones {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* --- Selector de cantidad --- */
.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quantity-selector label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #555;
}

/* Controles del selector (botones +/- y input) */
.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  overflow: hidden;
  background: white;
}

/* Botones +/- */
.quantity-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #3a7bd5;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: #f0f8ff;
  color: #00d2ff;
}

.quantity-btn:active {
  background: #e0f4ff;
}

/* Input de cantidad */
.quantity-input {
  width: 50px;
  height: 40px;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  -moz-appearance: textfield;
}

/* Oculta flechas de incremento/decremento en Firefox */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input:focus {
  outline: none;
}

/* --- Botón de favoritos --- */
.btn-favorito {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 22px;
  border-radius: 50px;
  border: 2px solid #e0e0e0;
  background: white;
  color: #666;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.btn-favorito:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.15);
}

.btn-favorito i {
  font-size: 1.1rem;
  color: #ccc;
  transition: color 0.3s ease;
}

.btn-favorito:hover i {
  color: #e74c3c;
}

.btn-favorito.favorito-activo {
  border-color: #e74c3c;
  color: #e74c3c;
  background: #fff5f5;
}

.btn-favorito.favorito-activo i {
  color: #e74c3c;
}

/* --- Botón añadir al carrito --- */
.btn-anadir {
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-anadir:hover {
  transform: translateY(-2px);
  color: white;
  box-shadow: 0 5px 25px rgba(0, 210, 255, 0.5);
}

/* Estilo del botón azul (gradiente) */
.btn-azul {
  background: linear-gradient(45deg, #00d2ff, #3a7bd5);
  box-shadow: 0 3px 15px rgba(0, 210, 255, 0.3);
  color: white !important;
}

/* --- Descripción breve del producto --- */
.producto-descripcion {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

  /*  ACORDEONES DESPLEGABLES */


.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Cada item del acordeón */
.accordion-item {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: #8bb8d9;
}

/* Header/título del acordeón (botón clickeable) */
.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
}

.accordion-header:hover {
  background: #f8f9fa;
}

.accordion-header span {
  text-align: left;
}

/* Icono de flecha del acordeón */
.accordion-icon {
  color: #3a7bd5;
  transition: transform 0.3s ease;
}

/* Cuando está abierto, la flecha apunta hacia arriba */
.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

/* Contenido del acordeón (oculto por defecto) */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Cuando está activo, se muestra el contenido */
.accordion-item.active .accordion-content {
  max-height: none;
}

/* Contenido interior del acordeón */
.accordion-inner {
  padding: 0 1.25rem 1.25rem;
  color: #666;
  line-height: 1.8;
}

.accordion-inner p {
  margin-bottom: 0.5rem;
}

.accordion-inner p:last-child {
  margin-bottom: 0;
}

/*  RESPONSIVE - Tablet y móvil*/
@media (max-width: 992px) {
  .producto-container {
    flex-direction: column;
    gap: 2rem;
  }

  .producto-imagen {
    /* En móvil la imagen ocupa menos altura */
    max-height: 300px;
  }

  .producto-imagen img {
    max-height: 300px;
  }

  .producto-acciones {
    flex-direction: column;
    align-items: stretch;
  }

  .quantity-controls {
    justify-content: center;
  }

  .btn-anadir {
    width: 100%;
    justify-content: center;
  }
}

/*  RESPONSIVE - Móvil pequeño */
@media (max-width: 576px) {
  .producto-main {
    padding: 1.5rem 0;
  }

  .producto-container {
    padding: 1.5rem;
  }

  .producto-titulo {
    font-size: 1.5rem;
  }

  .producto-precio {
    font-size: 1.5rem;
  }
}

/* SECCIÓN DE VALORACIONES*/

.valoraciones-section {
  background-color: #f8f9fa;
  padding: 3rem 0;
}

.valoraciones-titulo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
}

.valoracion-formulario {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  border: 2px solid #8bb8d9;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.valoracion-invito {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-grupo {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.estrellas-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.estrellas-selector i {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s ease;
}

.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: #3a7bd5;
}

.form-textarea::placeholder {
  color: #aaa;
}

.btn-enviar {
  display: block;
  margin: 0 auto;
  padding: 12px 40px;
}

.valoraciones-resumen {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  border: 2px solid #8bb8d9;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resumen-nota {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nota-grande {
  font-size: 3.5rem;
  font-weight: 700;
  color: #333;
}

.nota-detalles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.estrellas i {
  color: #ffd700;
  font-size: 1.2rem;
}

.total-valoraciones {
  color: #777;
  font-size: 0.9rem;
}

.valoraciones-lista {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.valoracion-item {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

.valoracion-header {
  margin-bottom: 0.75rem;
}

.valoracion-estrellas {
  display: flex;
  gap: 0.25rem;
}

.valoracion-estrellas i {
  color: #ffd700;
  font-size: 1rem;
}

.valoracion-texto {
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.valoracion-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.valoracion-autor {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.valoracion-fecha {
  color: #999;
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  .valoraciones-section {
    padding: 2rem 0;
  }

  .valoraciones-titulo {
    font-size: 1.5rem;
  }

  .valoracion-formulario {
    padding: 1.5rem;
  }

  .nota-grande {
    font-size: 2.5rem;
  }

  .resumen-nota {
    flex-direction: column;
    text-align: center;
  }

  .valoracion-meta {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
