/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

/* Cabecera y navegación */
header {
  background-color: #fff;
  color: #fff;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* Dividir el header en tres columnas */
.header-left,
.header-center,
.header-right {
  flex: 1;
}
.header-center {
  text-align: center;
}

/* Contenedor derecho: autenticación y carrito */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px; /* Espacio entre elementos */
}
.header-right > .user-auth {
  order: 1;
  position: relative; /* Para que el dropdown se posicione relativo a este contenedor */
}
.header-right > .shopping-cart {
  order: 2;
}

/* Estilos de las imágenes de los botones (login y carrito) */
.user-auth img,
.shopping-cart img {
  width: 32px;  /* Ajusta el tamaño deseado */
  height: auto;
  max-width: 32px;
}

/* Menú principal */
.menu {
  position: static;
  transform: none;
}
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.menu ul li {
  margin: 0 30px; /* Espacio entre elementos */
}
.menu ul li a {
  color: #000;         /* Color negro */
  white-space: nowrap;
  text-decoration: none; /* Sin subrayado */
}

/* Estilos del logo */
.logo h1 {
  font-size: 24px;
}

/* ----- MENÚ DESPLEGABLE DEL LOGIN ----- */

.dropdown-menu {
  display: none;  /* Oculto inicialmente */
  position: absolute;
  top: 100%;  /* Justo debajo del botón */
  right: 0;
  background-color: #fff;
  color: #333;
  width: 250px;  /* Ajusta el ancho según convenga */
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transform: scaleY(0);
  transform-origin: top;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.dropdown-menu.active {
  display: block;
  transform: scaleY(1);
  opacity: 1;
}
.dropdown-menu ul {
  list-style: none;
  margin: 0;
  padding: 10px;
}
.dropdown-menu ul li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.dropdown-menu ul li:last-child {
  border-bottom: none;
}
.dropdown-menu ul li a {
  text-decoration: none;
  color: #333;
  display: block;
  padding: 0 10px;
}

/* Quitar estilos predeterminados del botón */
.user-auth button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ----- SLIDESHOW ----- */
.slideshow {
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  position: relative;
  height: 400px;
  border-radius: 10px;
}
.slides {
  display: flex;
  width: 500%; /* Ajusta según la cantidad de slides */
  height: 100%;
  animation: slideAnimation 25s infinite;
}
.slide {
  width: 20%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 10px;
}
.slide img {
  max-width: 90%;
  max-height: 250px;
  border-radius: 5px;
  margin-bottom: 10px;
}
.slide h3 {
  font-size: 18px;
}
@keyframes slideAnimation {
  0% { transform: translateX(0%); }
  16% { transform: translateX(0%); }
  20% { transform: translateX(-20%); }
  36% { transform: translateX(-20%); }
  40% { transform: translateX(-40%); }
  56% { transform: translateX(-40%); }
  60% { transform: translateX(-60%); }
  76% { transform: translateX(-60%); }
  80% { transform: translateX(-80%); }
  96% { transform: translateX(-80%); }
  100% { transform: translateX(0%); }
}

/* ----- PERSONALIZACIÓN DEL PRODUCTO ----- */
.product-detail {
  padding: 40px 20px;
  background-color: #fff;
  text-align: center;
  margin: 20px auto;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.product-detail h2 {
  margin-bottom: 10px;
  font-size: 28px;
  color: #008CBA;
}
.product-detail p {
  margin-bottom: 20px;
  font-size: 16px;
}
.preview-section {
  margin-bottom: 20px;
}
.preview-container {
  width: 300px;
  height: 300px;
  margin: 0 auto 10px;
  border: 2px solid #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
}
.preview-container img {
  max-width: 100%;
  max-height: 100%;
}
.upload-form {
  margin-bottom: 20px;
}
.upload-form label {
  font-size: 16px;
  margin-right: 10px;
}
.buy-button {
  background-color: #008CBA;
  border: none;
  color: #fff;
  padding: 15px 25px;
  font-size: 18px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.buy-button:hover {
  background-color: #005f75;
}

/* ----- TARJETAS DE PRODUCTO ----- */
.product-category {
  padding: 40px 20px;
  background-color: #fff;
  margin: 20px auto;
  max-width: 1200px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
}
.product-category h2 {
  margin-bottom: 15px;
  font-size: 28px;
  color: #008CBA;
}
.product-category p {
  margin-bottom: 30px;
  font-size: 16px;
}
.product-card {
  background: #fff;
  border: 1px solid #ddd;
  width: 280px;
  border-radius: 5px;
  margin: 10px;
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.product-card img {
  width: 100%;
  height: auto;
}
.product-card h3 {
  font-size: 20px;
  margin: 10px;
}
.product-card p {
  font-size: 16px;
  color: #008CBA;
  margin: 10px;
}

/* ----- FORMULARIO DE CONTACTO ----- */
.contacto {
  padding: 40px 20px;
  background-color: #fff;
  max-width: 600px;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
}
.contact-form label {
  display: block;
  margin: 10px 0 5px;
}
.contact-form input, .contact-form textarea {
  width: 90%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ----- PIE DE PÁGINA ----- */
footer {
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}
.product-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.add-to-cart-button {
  padding: 10px 20px;
  background-color: #28a745; /* Color de ejemplo, cámbialo según tu diseño */
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}
.add-to-cart-button:hover {
  background-color: #218838;
}
/* Posicionar el globo de notificación sobre el ícono del carrito */
.shopping-cart {
   position: relative;
}

.cart-notification {
   position: absolute;
   top: -5px;
   right: -5px;
   background: red;
   color: white;
   border-radius: 50%;
   padding: 2px 6px;
   font-size: 12px;
   animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Animación para el ícono del carrito (efecto shake) */
.animate-cart {
   animation: shake 0.5s;
}

@keyframes shake {
   0% { transform: translateX(0); }
   25% { transform: translateX(-5px); }
   50% { transform: translateX(5px); }
   75% { transform: translateX(-5px); }
   100% { transform: translateX(0); }
}
/* ===================== */
/* ESTILOS DE PRODUCT DETAIL */
/* ===================== */

/* Contenedor principal de detalle del producto */
.product-detail-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px auto;
  max-width: 1000px;
}

/* Columna izquierda: imagen del producto */
.product-detail-left {
  flex: 1;
  min-width: 300px;
  text-align: center;
  padding: 20px;
}
.product-detail-left img {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

/* Columna derecha: información del producto */
.product-detail-right {
  flex: 1;
  min-width: 300px;
  padding: 20px;
}
.product-detail-right h2 {
  margin-bottom: 10px;
  font-size: 28px;
  color: #008CBA;
}
.product-detail-right .product-price {
  font-size: 1.5em;
  color: #b12704;
  margin-bottom: 20px;
}
.product-detail-right p {
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Sección de opiniones */
.reviews {
  margin-top: 30px;
  text-align: left;
}
.reviews h3 {
  margin-bottom: 10px;
  font-size: 22px;
  color: #008CBA;
}
.review {
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}
.review p {
  margin: 5px 0;
}
