body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f0e9f5;
}
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
h1 {
  color: #333;
  margin: 0;
}
#buscador,
#filtro {
  padding: 8px;
  font-size: 14px;
}
#carrito-icono {
  font-size: 24px;
  cursor: pointer;
  position: relative;
}
#contador-carrito {
  background-color: red;
  color: white;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -8px;
  right: -10px;
}
input[type="number"] {
  width: 50px;
  margin-top: 5px;
}
button {
  margin-top: 10px;
  background-color: #c7a2cd;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}
button:hover {
  background-color: #c7a2cd;
} /* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10000; /* Más alto que el header */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}
.modal-contenido {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  position: relative;
  z-index: 10001; /* Por si acaso */
}
.cerrar {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
#lista-carrito li {
  margin-bottom: 10px;
}
.alerta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #c7a2cd;
  color: #fff;
  padding: 15px;
  border-radius: 5px;
  font-weight: bold;
  display: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
} /* Contenedor general */
#catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px; /* 🔑 espacio uniforme entre columnas y filas */
  padding: 20px;
} /* Card de producto */
.producto {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  min-height: 350px; /* 🔑 asegura altura mínima consistente */
} /* Imagen del producto */
.producto img {
  max-height: 180px;
  object-fit: contain;
  margin-bottom: 10px;
} /* Nombre del producto */
.producto h3 {
  min-height: 50px;
  text-align: center;
}
.modal-contenido img {
  margin: 5px 0;
}
.cerrar {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
#formulario-cliente {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  max-width: 500px;
}
#formulario-cliente form label {
  display: block;
  margin: 10px 0;
}
#formulario-cliente button {
  margin-top: 15px;
  padding: 10px 15px;
} /* HEADER */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: #f0e9f5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 9999; /* Menor que el modal */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.site-header nav a {
  color: #333;
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.5rem;
}
.site-header nav a:hover {
  color: #e8499a;
}
.site-header nav i {
  font-size: 1.5rem;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-controls input[type="text"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  width: 260px;
}
.header-controls select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 56px;
  height: auto;
  border-radius: 8px;
} /* FOOTER */
.site-footer {
  margin-top: 40px;
  padding: 18px 20px;
  background: #f0e9f5;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  text-align: center;
}
.site-footer a {
  color: #d12b7a;
  text-decoration: none;
}
.detalle-flex {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center; /* Centra horizontalmente */
  margin-bottom: 16px;
}
.detalle-flex img,
#detalle-producto > .detalle-flex img {
  max-width: 440px; /* Más chica */
  width: 100%;
  display: block;
  margin: 0 auto; /* Centrado horizontal */
  border-radius: 8px;
  background: #fafafa;
}
.detalle-controles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
} /* Carrusel */
.carrusel-imagen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.carrusel-imagen img {
  max-width: 340px;
  max-height: 340px;
  border-radius: 8px;
  background: #fafafa;
  display: block;
}
.carrusel-flecha {
  background: #e0c6e6;
  border: none;
  color: #a03e8b;
  font-size: 2em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.carrusel-flecha:hover {
  background: #c7a2cd;
  color: #fff;
} /* Banner Carrusel */
.banner-carrusel {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 28px auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: #fff;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-slides {
  width: 100%;
  display: flex;
  transition: transform 0.5s;
}
.banner-slide {
  display: none;
}
.banner-slide.active {
  display: block;
}
.banner-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.5s;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.banner-slide.active {
  opacity: 1;
  position: relative;
  z-index: 2;
}
.banner-slide img {
  width: 100%;
  max-height: 960px;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
  display: block;
}
.banner-texto {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 1.4em;
  font-weight: bold;
  text-shadow: 0 2px 8px #0008;
  background: linear-gradient(180deg, transparent 60%, #0006 100%);
  padding: 18px 0 12px 0;
  border-radius: 0 0 18px 18px;
  z-index: 3;
}
.banner-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff8;
  border: none;
  font-size: 2.2em;
  color: #a03e8b;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-flecha:hover {
  background: #e0c6e6;
  color: #fff;
}
#banner-prev {
  left: 2px;
}
#banner-next {
  right: 2px;
}
.banner-puntos {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 11;
}
.banner-puntos span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  margin: 0 5px;
  cursor: pointer;
}
.banner-puntos span.activo {
  background: #e8499a;
} /* Producto page styles */
.producto-page {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.producto-imagenes {
  flex: 0 0 50%;
  max-width: 500px;
}
.producto-page-img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}
.producto-galeria {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.producto-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.producto-thumb:hover {
  border-color: #e8499a;
}
.producto-page-info {
  flex: 1;
  min-width: 300px;
}
.producto-descripcion {
  white-space: pre-line;
  margin: 1rem 0;
  line-height: 1.5;
}
.variantes-container {
  margin: 1.5rem 0;
}
.variant-select {
  appearance: none;
  background-color: white;
  border: 2px solid #e0c6e6;
  border-radius: 8px;
  padding: 10px 36px 10px 12px;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a03e8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.variant-select:hover {
  border-color: #c7a2cd;
}
.variant-select:focus {
  outline: none;
  border-color: #e8499a;
  box-shadow: 0 0 0 3px rgba(232, 73, 154, 0.1);
}
.variant-label {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-size: 0.9rem;
}
.variant-price {
  display: block;
  margin-top: 8px;
  color: #e8499a;
  font-weight: bold;
  font-size: 1.2rem;
}
.cantidad-minima-aviso {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  color: #856404;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0;
} /* responsive  */
@media (max-width: 720px) {
  .header-controls input {
    width: 120px;
  }
  .site-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    padding: 12px 5vw;
    box-sizing: border-box;
  }
  .logo-container {
    width: 100%;
    justify-content: flex-start;
  }
  .header-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .header-controls input[type="text"],
  .header-controls select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  #carrito-icono {
    align-self: flex-end;
    margin-top: 8px;
  }
  .modal-contenido {
    width: 98vw;
    max-width: 99vw;
    margin: 10vw auto;
    padding: 12px 6px;
    border-radius: 8px;
    font-size: 15px;
  }
  .modal-contenido h2 {
    font-size: 1.2em;
  }
  #lista-carrito {
    padding-left: 0;
    font-size: 15px;
  }
  #lista-carrito li {
    word-break: break-word;
    font-size: 15px;
  }
  #formulario-cliente {
    max-width: 100vw;
    padding: 6px;
    font-size: 15px;
  }
  #formulario-cliente form {
    flex-direction: column;
    gap: 6px;
  }
  #formulario-cliente form label,
  #formulario-cliente form input,
  #formulario-cliente form select {
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
  }
  #detalle-producto img,
  .modal-contenido img {
    max-width: 95vw;
    height: auto;
  }
  .cerrar {
    font-size: 28px;
    margin-top: -8px;
    margin-right: -8px;
  }
  .detalle-flex {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: center; /* Centra horizontalmente */
    margin-bottom: 16px;
  }
  .detalle-flex img,
  #detalle-producto > .detalle-flex img {
    max-width: 120px; /* Más chica */
    width: 100%;
    display: block;
    margin: 0 auto; /* Centrado horizontal */
    border-radius: 8px;
    background: #fafafa;
  }
  .detalle-controles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
  }
  @media (max-width: 600px) {
    .detalle-flex {
      flex-direction: column;
      align-items: center;
    }
    .detalle-flex img,
    #detalle-producto > .detalle-flex img {
      max-width: 60vw;
    }
  }
}
#imagenes-extra-detalle img {
  max-width: 440px;
  max-height: 440px;
  margin: 6px 6px 0 0;
  border-radius: 6px;
  object-fit: contain;
  display: inline-block;
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  vertical-align: middle;
}
.cupon-section {
  margin-top: 1.5rem;
  padding: 1rem;
  border-top: 1px solid #ddd;
}
.cupon-inputs {
  display: flex;
  gap: 10px;
  margin-top: 0.5rem;
}
#codigo-cupon {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
#aplicar-cupon {
  padding: 8px 14px;
  background-color: #e8499a;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
#aplicar-cupon:hover {
  background-color: #d63f8a;
}
#mensaje-cupon {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
#img-carrusel-modal {
  max-width: 320px;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
