/* Products Container */
.products-container {
  padding-top: 70px;
  min-height: 100vh;
}
/* Header Styling */
.products-header {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 80px;
  /* background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)); */
  border-bottom: 2px solid #dea402;
}

.products-header h1 {
  font-family: "Courgette", cursive;
  color: #ffce09;
  font-size: 3rem;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.products-header p {
  color: #ececec;
  font-family: "Poppins", sans-serif;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}
/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 140px auto 0;
}

.product-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.product-title {
  color: #ffce09;
  font-family: "Courgette", cursive;
  font-size: 1.2rem;
  margin: 0.4rem 0;
}

/* .product-description {
  color: #ececec;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0.5rem 0;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 100px;
  font-family: "Poppins", sans-serif;
}

.product-description::-webkit-scrollbar {
  width: 4px;
}

.product-description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.product-description::-webkit-scrollbar-thumb {
  background: #dea402;
  border-radius: 4px;
}

.product-price {
  color: #dea402;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.4rem 0;
  padding-top: 0.5rem;
  font-family: "Montserrat", sans-serif;
} */

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .products-container {
    padding-top: 60px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .product-card img {
    height: 160px;
  }

  .product-title {
    font-size: 1.1rem;
  }

  .product-description {
    font-size: 0.85rem;
    max-height: 80px;
  }
  .products-header {
    margin-top: 60px;
    padding: 1.5rem 1rem;
  }
  
  .products-header h1 {
    font-size: 2.5rem;
  }
  
  .products-header p {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .products-container {
    padding-top: 50px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .product-card {
    padding: 0.8rem;
  }

  .product-card img {
    height: 140px;
  }
  .products-header h1 {
    font-size: 2rem;
  }
}
/* Product image container */
.image-container {
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 6px;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-container:hover .product-image {
  transform: scale(1.05);
}

/* Image Preview Modal Styles */
.product-image-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.zoomable-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.zoomable-image:hover {
  transform: scale(1.05);
}

.image-preview-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#previewImage {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  margin: auto;
}

.close-preview {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-preview:hover {
  color: #dea402;
  background: rgba(0, 0, 0, 0.8);
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .zoomable-image {
      height: 160px;
  }
  
  .close-preview {
      top: 10px;
      right: 15px;
      font-size: 30px;
  }

  .image-preview-modal {
      padding: 10px;
  }
}

@media screen and (max-width: 480px) {
  .zoomable-image {
      height: 140px;
  }
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Category Navigation */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  margin: 20px auto;
  max-width: 1200px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 0.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #dea402;
  border-radius: 25px;
  color: #ffce09;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: rgba(222, 164, 2, 0.2);
}

.category-btn.active {
  background: #dea402;
  color: #fff;
}

/* Hide products when filtered out */
.product-card.hidden {
  display: none;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .category-nav {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .category-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
}