/* Products Section */
.products-section {
  background-color: #f3f5d7;
  padding: 100px 5%;
  position: relative;
}

.products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.products-content {
  background-color: rgba(243, 245, 215, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 50px;
  width: 90%;
  max-width: 1200px;
}

.section-title {
  text-align: center;
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 40px;
  position: relative;
  font-family: 'Ralsteda Medium', sans-serif;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  border-radius: 2px;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background: white;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  color: #4caf50;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: #4caf50;
  color: white;
}

.filter-btn:hover:not(.active) {
  background: #f1f1f1;
}

.products-scroll-container {
  max-height: 700px;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: #4caf50 #f1f1f1;
}

/* Scrollbar styling */
.products-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.products-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.products-scroll-container::-webkit-scrollbar-thumb {
  background: #4caf50;
  border-radius: 10px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  padding: 10px;
}

.product-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.product-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.product-info {
  padding: 20px;
  text-align: center;
}

.product-info h3 {
  color: #000000;
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-family: 'Ralsteda Medium', sans-serif;
}

.view-more-btn {
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 120px;
  padding: 8px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.view-more-btn:hover {
  background: #3e8e41;
}

/* Product Modal */
/* Clase para ocultar navbar */
.navbar.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Deshabilitar scroll */
.body-no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
/* Estilo mejorado para el modal */
.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow-y: auto;
  font-size: 0.7rem;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  margin: 2% auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  top: 40px;
}

/* Contenedor de imagen mejorado */
.modal-image-container {
  width: 100%;
  height: 350px; /* Altura aumentada */
  position: relative;
  overflow: hidden;
  margin-top: -20px; /* Sube el contenedor 20px */
}

.modal-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px 20px 0 0;
}

/* Contenido de texto */
.modal-info {
  padding: 30px;
}

/* Botón de cerrar mejorado */
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10px auto;
  }
  
  .modal-image-container {
    height: 250px;
    margin-top: -10px;
  }
  
  .modal-info {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .modal-image-container {
    height: 200px;
  }
  
  .close-modal {
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 992px) {
  .products-content {
    padding: 40px 30px;
    width: 95%;
  }

  .modal-content {
    flex-direction: column;
    max-height: 90vh;
    width: 90%;
  }

  .modal-image-container {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .products-section {
    padding: 80px 3%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }

  .filter-buttons {
    flex-wrap: wrap;
  }

  .section-title {
    font-size: 2.2rem;
  }
}