/* Estilos para el encabezado principal y filtros */
.main-header {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(to right, #f9f9f9, #f0f0f0, #f9f9f9);
  border-bottom: 1px solid #e6e6e6;
  margin-bottom: 40px;
}

.main-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #2d3436;
  letter-spacing: 1px;
  margin-bottom: 25px;
  font-family: 'Playfair Display', serif;
  position: relative;
  display: inline-block;
}

.main-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: #9b59b6;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.categories-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.category-btn {
  padding: 10px 20px;
  background-color: transparent;
  border: 1px solid #8e44ad;
  color: #2d3436;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background-color: #8e44ad;
  color: white;
}

.category-btn.active {
  background-color: #8e44ad;
  color: white;
  box-shadow: 0 3px 10px rgba(142, 68, 173, 0.3);
}

/* Contenedor de productos */
.productos-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas por defecto */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.subcategoria-contenedor {
  margin: 60px 0;
}

.subcategoria-titulo {
  font-size: 2.2rem;
  font-weight: 400;
  text-align: center;
  color: #2d3436;
  text-transform: capitalize;
  margin: 0 0 40px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 10px;
  margin-top: 7%;
}

.subcategoria-titulo::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 2px;
  background-color: #e84393;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Tarjetas de productos - asegurando tamaño uniforme */
.items {
  background-color: #ffffff;
  border: none;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
  height: 500px; /* Altura fija para todos los elementos */
  display: flex;
  flex-direction: column;
}

.items:hover {
  transform: translateY(-10px);
  box-shadow: 0px 10px 25px rgba(142, 68, 173, 0.2);
}

.items img {
  width: 100%;
  height: 300px; 
  object-fit: cover; 
  object-position: center;
  transition: all 0.5s ease;
}

.items:hover img {
  transform: scale(1.03);
}

.info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  align-items: center; /* Centra el contenido horizontalmente */
  text-align: center;
  height: 200px; /* Altura fija para la sección de información */
}

.info h3 {
  font-size: 1.3rem;
  color: #2d3436;
  margin-bottom: 10px;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.info p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
  text-align: center;
  width: 100%;
  height: 60px; /* Altura fija para la descripción */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limita a 3 líneas */
  -webkit-box-orient: vertical;
}

.precio {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  margin: 10px 0;
  height: 30px; /* Altura fija para la sección de precio */
}

.precio p {
  font-size: 1.5rem;
  color: #e84393;
  margin: 0;
  height: auto;
}

.ver-detalles {
  padding: 10px 25px;
  width: auto;
  background-color: transparent;
  border: 2px solid #8e44ad;
  color: #8e44ad;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 10px auto; /* Centra horizontalmente */
  display: inline-block;
}

.ver-detalles:hover {
  background-color: #8e44ad;
  color: white;
}

/* Estilos del modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  margin: 50px auto;
  animation: modalFadeIn 0.4s;
}

@keyframes modalFadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal-container {
  display: flex;
  padding: 30px;
}

.modal-img-container {
  flex: 1;
  margin-right: 30px;
}

.modal-img-container img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.modal-details h2 {
  margin-bottom: 15px;
  font-size: 2.2rem;
  text-align: left;
  color: #2d3436;
  font-weight: 600;
}

.modal-precio {
  font-size: 1.8rem;
  font-weight: 500;
  color: #e84393;
  margin-bottom: 25px;
  text-align: left;
}

.modal-selects {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}

.select-group {
  flex: 1;
}

label {
  font-size: 0.95rem;
  color: #2d3436;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
  text-align: left;
}

select {
  width: 100%;
  padding: 12px 15px;
  font-size: 0.95rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #2d3436;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

select:hover {
  border-color: #9b59b6;
}

select:focus {
  border-color: #9b59b6;
  box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.2);
}

#colores, #tallas {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%232d3436' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20px' height='20px'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  padding-right: 30px;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #777;
  font-size: 28px;
  font-weight: normal;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10;
}

.close:hover {
  color: #e84393;
}

/* Botones de acción */
.btn {
  padding: 12px 25px;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.btn-agregar {
  background: linear-gradient(135deg, #8e44ad, #e84393);
  width: 100%;
  margin: 15px 0;
}

.btn-agregar:hover {
  background: linear-gradient(135deg, #9b59b6, #fd79a8);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.btn-w-100 {
  width: 100%;
  background: linear-gradient(135deg, #2d3436, #636e72);
  margin: 15px 0;
}

.btn-w-100:hover {
  background: linear-gradient(135deg, #2d3436, #2d3436);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Mensaje cuando no hay productos */
.no-products {
  text-align: center;
  padding: 50px 20px;
  font-size: 1.2rem;
  color: #777;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  margin: 30px auto;
  max-width: 600px;
}

/* Agregar estos estilos a tu archivo galeria.css */
.search-container {
  width: 100%;
  max-width: 600px;
  margin: 40px auto; /* Centrado horizontal */
  display: flex;
  gap: 10px;
  margin-top: 10%;
}


.search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: #ff69b4; /* Color rosa para combinar con una tienda de moda */
}

.search-button {
  background: #ff69b4;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.search-button:hover {
  background: #ff5aa7;
}

.no-results-message {
  text-align: center;
  padding: 30px;
  font-size: 18px;
  color: #666;
}

/* Asegúrate de que los productos se muestren correctamente en la cuadrícula */
.producto-item {
  transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .search-container {
    width: 95%;
    margin: 30px auto;
    margin-top: 35%;
  }
  .productos-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas */
  }
}

@media (max-width: 900px) {
  .main-title {
    font-size: 2.8rem;
  }

  .modal-container {
    flex-direction: column;
  }
  
  .modal-img-container {
    margin-right: 0;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .main-header {
    padding: 40px 15px 30px;
  }
  
  .main-title {
    font-size: 2.4rem;
  }
  
  .categories-filter {
    flex-direction: row;
    justify-content: center;
    max-width: 600px;
    margin: 20px auto 0;
  }
  
  .category-btn {
    margin-bottom: 10px;
  }
  
  .modal-content {
    width: 95%;
    margin: 30px auto;
  }
  
  .modal-container {
    padding: 20px;
  }
  .productos-container {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 12px;
  }

  .productos-container {
   grid-template-columns: 1fr; 
   max-width: 70%;
   
  }
  
  .modal-selects {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-container {
    flex-direction: column;
    width: 90%;
  }
  
  .search-input, 
  .search-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .productos-container {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .categories-filter {
    flex-direction: column;
    align-items: center;
  }
  
  .category-btn {
    width: 100%;
    max-width: 250px;
  }
  
}