/* Estilos generales */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
}
/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
  .container {
      width: 100%;
      padding: 10px;
  }

  .header {
      font-size: 1.5rem;
  }

  .menu {
      flex-direction: column;
      text-align: center;
  }
}

header {
  background-color: #d9648f;
  color: white;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo img {
  height: 50px;
  margin-left: 20px;
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: black;
}

main {
  padding: 20px;
  text-align: center;
}

h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #2c3e50;
}

.products {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.product {
  background: white;
  padding: 20px;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  width: 300px; /* Ajustado de 100px a 300px */
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
}

.product img {
  width: 250px !important;
  height: 250px !important;
  border-radius: 8px !important;
}

.product h3 {
  font-size: 1.5em;
  margin: 15px 0;
  color: #2c3e50;
}

.product p {
  font-size: 1em;
  color: #7f8c8d;
}

.product span {
  display: block;
  margin: 10px 0;
  font-size: 1.2em;
  color: #e67e22;
}

.add-to-cart {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 1em;
  color: white;
  background-color: #e74c3c;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-to-cart:hover {
  background-color: #c0392b;
}

.cart-icon {
  position: relative;
  margin-right: 35px;
  cursor: pointer;
  width: 30px;
}

.cart-icon img {
  height: 40px;
}

.cart-icon-notification {
  position: absolute;
  top: 10px;
  right: 9px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 5px 10px;
  font-size: 0.8em;
  display: flex;
}

/* Estilos del modal */
#cart-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  padding: 20px;
  overflow-y: auto; /* Añadir scroll si el contenido es muy grande */
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #d9648f;
  color: white;
  padding: 10px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.modal-close {
  cursor: pointer;
}

.modal-title {
  font-size: 1.5em;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-top: 1px solid #ddd;
}

.btn-primary {
  padding: 10px 20px;
  background-color: #d9648f;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #c0392b;
}

.product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quantity {
  display: flex;
  justify-content: center;
  align-items: center;
}

.quantity-btn-decrease,
.quantity-btn-increase {
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin: 0 5px;
}

.quantity-input {
  width: 40px;
  text-align: center;
}

.price {
  font-size: 1.2em;
  color: #e67e22;
  margin-top: 10px;
}

.delete-product {
  cursor: pointer;
  color: #e74c3c;
  margin-top: 10px;
}

#cart-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  width: 90%;
  max-width: 600px; /* Ancho máximo ajustable */
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  z-index: 1001;
}

.modal-content {
  padding: 20px;
  max-height: 80vh; /* Altura máxima ajustable */
  overflow-y: auto; /* Habilitar el desplazamiento vertical si el contenido excede la altura máxima */
}


.cart-item-image {
  width: 50px;
  height: 50px;
}

/* Fondo del modal */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

/* Contenido del modal */
.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Botón de cerrar */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Título del carrito */
.modal-content h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

/* Contenido del carrito */
#cart-content {
  margin-bottom: 20px;
}

/* Total del carrito */
#cart-total {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: right;
  color: #333;
  margin-bottom: 20px;
}

/* Estilos del formulario */
#shippingForm {
  display: flex;
  flex-direction: column;
}

#shippingForm input {
  margin-bottom: 10px;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

#shippingForm button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
}

#shippingForm button:hover {
  background-color: #218838;
}

/* Estilos para el formulario y mensajes de error */
#shippingForm input {
  border: 1px solid #ccc;
  padding: 10px;
  margin: 5px 0;
  width: 100%;
  box-sizing: border-box;
}

#shippingForm input:focus {
  border-color: #0066cc;
}

#shippingForm button {
  background-color: #28a745;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  margin-top: 10px;
}

#shippingForm button:hover {
  background-color: #218838;
}

.offer .original-price {
  text-decoration: line-through;
  color: red;
}

/* Estilo básico para el botón */
button.product-details {
  background-color: #4CAF50; /* Verde */
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Estilo cuando el botón está en foco o se pasa el ratón por encima */
button.product-details:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* Estilo cuando el botón es presionado */
button.product-details:active {
  background-color: #3e8e41;
  transform: scale(1);
}

/* Estilo cuando el botón está deshabilitado */
button.product-details:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
}

.product.offer {
  position: relative;
}

.product.offer::before {
  content: 'Sale';
  position: absolute;
  top: 0;
  left: 0;
  background-color: red; /* Color de fondo del cartel */
  color: white; /* Color del texto */
  padding: 5px 10px; /* Espaciado interior */
  font-weight: bold;
  z-index: 1; /* Asegura que el cartel esté encima del contenido del producto */
  transform: rotate(-30deg); /* Rotación del cartel para un efecto inclinado */
}

.product.offer img {
  transition: filter 0.5s ease; /* Transición para el efecto de imagen */
}

.product.offer:hover img {
  filter: brightness(70%); /* Efecto de atenuación en la imagen al pasar el mouse */
}

.swiper {
  width: 100%;
  height: 300px; /* Ajusta esto según sea necesario */
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Cambiar el color de las flechas de navegación */
.swiper-button-next,
.swiper-button-prev {
    color: #f72882 !important; /* Cambia este valor al color que desees */
}

/* Cambiar el color de las flechas al pasar el cursor */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: #e52cf6 !important; /* Cambia este valor al color que desees */
}
/* Cambiar el color de fondo de las flechas (opcional) */
.swiper-button-next,
.swiper-button-prev {
    background-color: rgba(247, 243, 243, 0.966); /* Fondo negro semitransparente */
    border-radius: 50%; /* Hacer las flechas redondas */
    padding: 10px;
}

/* Cambiar el color de fondo al pasar el cursor */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(255, 255, 255, 0.5); /* Fondo blanco semitransparente */
}
