/* Variables globales */
:root {
  --primario: #e91e63;
  --primarioOscuro: #c2185b;
  --secundario: #f5e9f6;
  --secundarioOscuro: #e6d0e8;
  --blanco: #ffffff;
  --negro: #333333;
  --gris: #dddddd;
}

/* General styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: var(--negro);
  background-color: var(--secundario);
  padding-top: 60px;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header y navegación */
/* 🔥 HEADER QUE SE OCULTA AL BAJAR Y APARECE AL SUBIR */
header {
  background-color: var(--blanco);
  padding: 0.8rem 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;
}

/* Cuando el usuario baja, oculta el header */
header.hide {
  transform: translateY(-100%);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primario);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

nav ul {
  display: flex;
  list-style: none;
  align-items: center;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  position: relative;
  text-decoration: none;
  color: var(--negro);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primario);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 6px;
  border: 1px solid var(--gris);
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.1);
}

.search-bar button {
  padding: 6px 10px;
  background-color: var(--primario);
  color: var(--blanco);
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  background-color: var(--primarioOscuro);
  transform: translateY(-1px);
}

/* Hero section */
#hero {
  background-image: url("img/hero.jpg");
  background-size: cover;
  background-position: center;
  color: var(--primario);
  text-align: center;
  padding: 4rem 0;
}

#hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: slideInFromLeft 1s ease-out;
}

#hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: slideInFromRight 1s ease-out;
}

/* Sections */
section {
  padding: 3rem 0;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
  color: var(--negro);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

#featured-products-grid {
  grid-template-columns: repeat(4, 1fr);
}

.product-card {
  background-color: var(--blanco);
  border: 1px solid var(--gris);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.product-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 4px;
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.1);
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--negro);
}

.product-card p {
  margin-bottom: 12px;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Estilo para el botón de Agregar al Carrito */
.btn {
  display: inline-block;
  background-color: #f57c00; /* Naranja brillante */
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px; /* Bordes redondeados */
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s ease-in-out; /* Efecto suave al pasar el mouse */
}

.btn:hover {
  background-color: #ff0000; /* Naranja oscuro al pasar el mouse */
  transform: translateY(-4px); /* Levantar el botón cuando pasa el mouse */
}

.btn:active {
  transform: translateY(0); /* El botón vuelve a su lugar cuando se hace clic */
}

.btn-primary {
  background-color: #ff0000; /* Verde para un toque de frescura */
}

.btn-primary:hover {
  background-color: #388e3c; /* Verde más oscuro al pasar el mouse */
}


/* Filters */
.filters {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.filters select {
  margin: 0 8px;
  padding: 8px;
  border: 1px solid var(--gris);
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: var(--blanco);
  transition: all 0.3s ease;
}

.filters select:focus {
  outline: none;
  border-color: var(--primario);
  box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.1);
}

/* Footer */
footer {
  background-color: #333;
  color: var(--blanco);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  margin-bottom: 1.5rem;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  color: var(--primario);
}

.footer-section ul li {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.footer-section ul li a {
  color: var(--blanco);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primario);
  transform: translateX(5px);
}

.social-icons a {
  color: var(--blanco);
  font-size: 1.4rem;
  margin-right: 1.2rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.social-icons a:hover {
  color: var(--primario);
  transform: translateY(-3px) scale(1.1);
}

.footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

/* Modal y Carrito */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.modal-content {
  background-color: var(--blanco);
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 60%;
  position: relative;
  border: 2px solid var(--primario);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.close {
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--negro);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--primario);
}

.modal-content h2 {
  color: var(--primario);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secundario);
}

#cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

#cart-items div {
  padding: 10px;
  border-bottom: 1px solid var(--secundario);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

#cart-total {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primario);
  margin: 1rem 0;
  padding: 0.5rem;
  text-align: center;
  background-color: var(--secundario);
  border-radius: 4px;
}

#share-cart {
  background-color: var(--primario);
  color: var(--blanco);
  border: none;
  padding: 10px;
  width: 100%;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#share-cart:hover {
  background-color: var(--primarioOscuro);
  transform: translateY(-2px);
}

.remove-item {
  background-color: #ff4444;
  color: var(--blanco);
  border: none;
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.remove-item:hover {
  background-color: #cc0000;
  transform: scale(1.05);
}

/* Product details page */
#product-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px 20px;
  background-color: var(--blanco);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-images {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.product-images img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.product-images img:hover {
  transform: scale(1.02);
}

.product-info {
  flex: 1;
}

.product-info h1 {
  font-size: 2rem;
  color: var(--primario);
  margin-bottom: 1rem;
}

.product-info p {
  font-size: 1rem;
  color: var(--negro);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primarioOscuro);
  margin-bottom: 1.5rem;
}

/* Estilos para el formulario de producto */
.product-form {
  background: var(--blanco);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--negro);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--gris);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: var(--blanco);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primario);
}



/* About Us page */
.nosotros-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
}

.nosotros-image {
  max-width: 300px;
}

.nosotros-image img {
  width: 100%;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.nosotros-image img:hover {
  transform: scale(1.05);
}

.nosotros-text {
  text-align: center;
  max-width: 800px;
}

.nosotros-intro {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--primario);
}

.nosotros-values {
  display: flex;
  justify-content: space-around;
  margin: 40px 0;
}

.value-item {
  text-align: center;
  max-width: 200px;
}

.value-item i {
  font-size: 2.5rem;
  color: var(--primario);
  margin-bottom: 15px;
}

.value-item h3 {
  margin-bottom: 10px;
  color: var(--negro);
}

.nosotros-mission {
  font-style: italic;
  color: var(--negro);
}

/* FAQ page styles */
#faq {
  padding: 40px 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--blanco);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.faq-item h1 {
text-align: center;
}
.faq-item h3 {
  display: flex;
  align-items: center;
  color: var(--primario);
  margin-bottom: 10px;
}

.faq-item h3 i {
  margin-right: 10px;
}

.faq-item p {
  color: var(--negro);
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nosotros-values {
    flex-direction: column;
    align-items: center;
  }

  .value-item {
    margin-bottom: 30px;
  }
}

/* Animaciones */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 992px) {
  .nosotros-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* Ajustes globales para navegación */
  nav {
    flex-direction: column;
    align-items: center;
  }

  nav ul {
    margin-top: 1rem;
    flex-direction: column;
    width: 100%;
  }

  nav ul li {
    margin: 0.5rem 0;
    text-align: center;
  }

  .search-bar {
    width: 100%;
    margin-top: 1rem;
  }

  #featured-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ajustes específicos para la página de detalles del producto */
  #product-details {
    padding: 20px 10px;
  }

  .product-images {
    width: 100%;
    max-width: 100%;
  }

  .product-images img {
    max-height: 300px;
  }

  .product-info h1 {
    font-size: 1.5rem;
  }

  .product-info p {
    font-size: 0.9rem;
  }

  .price {
    font-size: 1.3rem;
  }

  .product-form {
    padding: 15px;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 0.9rem;
    padding: 8px;
  }

  .product-form .btn-primary {
    font-size: 1rem;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  #featured-products-grid {
    grid-template-columns: 1fr;
  }

  .product-card .btn,
  #share-cart {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  nav ul li a {
    font-size: 0.8rem;
  }

  .product-card img {
    max-width: 80%;
  }

  #hero h1 {
    font-size: 1.5rem;
  }

  #hero p {
    font-size: 0.9rem;
  }

  .product-images img {
    max-height: 250px;
  }

  .product-info h1 {
    font-size: 1.3rem;
  }

  .product-info p {
    font-size: 0.85rem;
  }

  .price {
    font-size: 1.2rem;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 0.85rem;
    padding: 6px;
  }

  .product-form .btn-primary {
    font-size: 0.9rem;
    padding: 8px;
  }
}

/* Galería de imágenes */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.image-modal .modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  margin: 40px auto;
  background: transparent;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.gallery-nav.prev {
  left: 20px;
}

.gallery-nav.next {
  right: 20px;
}

.gallery-thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail.active {
  border-color: var(--primario);
}

/* Carrusel de productos relacionados */
#related-products {
  position: relative;
  padding: 40px 0;
  background: #f8f8f8;
}

#related-products h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #333;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 0 20px;
}

/* Carrusel controls */
.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 10;
}

.carousel-nav {
  width: 40px;
  height: 40px;
  background-color: var(--primario);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.carousel-nav:hover {
  opacity: 1;
  transform: scale(1.1);
  background-color: var(--primarioOscuro);
}

.carousel-nav.prev {
  left: -20px;
  position: absolute;
}

.carousel-nav.next {
  right: -20px;
  position: absolute;
}

/* Animación de confirmación */
.add-to-cart-confirmation {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primario);
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 1.7s;
  z-index: 2000;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Ajuste para la transición suave entre páginas */
.product-grid {
  min-height: 400px;
}

/* 🔥 Ícono del menú hamburguesa */
.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--primario);
  transition: transform 0.3s ease;
}

/* Cambiar el ícono cuando el menú está abierto */
.menu-toggle.open i::before {
  content: "\f00d"; /* X para cerrar */
}

/* 🔥 Ajustes para móviles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1001;
  }

  nav {
    position: relative;
  }

  .nav-menu {
    display: none; /* 🔥 Asegura que no aparece por defecto */
    flex-direction: column;
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 50px;
    left: 0;
    background: var(--blanco);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }

  .nav-menu.active {
    display: flex; /* 🔥 Asegura que el menú se muestre cuando esté activo */
  }

  .nav-menu li {
    text-align: center;
    padding: 15px 0;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--gris);
    width: 80%;
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu a {
    color: var(--negro);
    text-decoration: none;
    font-weight: bold;
    display: block;
    width: 100%;
    padding: 15px 0;
  }

  .nav-menu a:hover {
    color: var(--primario);
  }
}
@media (max-width: 768px) {
  .product-images img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* Ajustes responsivos para la página de producto */
@media (max-width: 768px) {
  #product-details {
    gap: 20px;
    padding: 20px;
  }

  .product-images {
    max-width: 100%;
  #product-details {
    gap: 20px;
    padding: 20px;
  }

  .product-images {
    max-width: 100%;
    margin: 0 auto;
  }

  .product-images img {
    max-height: 300px;
    width: 100%;
    object-fit: contain;
  }

  .product-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .product-info p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .price {
    font-size: 1.3rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group select,
  .form-group input {
    font-size: 0.9rem;
    padding: 8px;
  }

  .product-form .btn-primary {
    font-size: 1rem;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  #product-details {
    padding: 15px;
  }

  .product-images img {
    max-height: 250px;
  }

  .product-info h1 {
    font-size: 1.3rem;
  }

  .product-info p {
    font-size: 0.85rem;
  }

  .price {
    font-size: 1.2rem;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .form-group select,
  .form-group input {
    font-size: 0.85rem;
    padding: 6px;
  }

  .product-form .btn-primary {
    font-size: 0.9rem;
    padding: 8px;
  }
}

/* Ensure form elements don't overflow on small screens */
@media (max-width: 350px) {
  .form-group select,
  .product-form .btn-primary {
    font-size: 0.8rem;
    padding: 6px;
  }

  .product-images img {
    max-height: 200px;
  }

  .product-info h1 {
    font-size: 1.2rem;
  }

  .product-info p {
    font-size: 0.8rem;
  }

  .price {
    font-size: 1.1rem;
  }
}

/* Mejoras en la experiencia táctil para dispositivos móviles */

@media (max-width: 768px) {
  #producto-imagen {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
}
  .gallery-nav {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
  }

  .carousel-nav {
    opacity: 1;
  }
}


/* Fin del archivo CSS */