/* 🌟 FILTER SIDEBAR */
.filter-sidebar {
  position: fixed;
  left: -320px;
  top: 0;
  width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  padding: 20px;
  overflow-y: auto;
  transition: all 0.35s ease-in-out;
  z-index: 1100;
  border-radius: 0 10px 10px 0;
}
.filter-sidebar.active { left: 0; }

.filter-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

/* 🌟 PRODUCT GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 25px;
  transition: all 0.3s ease;
}

/* 🌟 PRODUCT CARD */
.product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* 🌟 IMAGE AREA (UNIFORM HEIGHT & CENTERED) */
.product-image {
  position: relative;
  width: 100%;
  height: 280px; /* fixed for equal height */
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ✅ Responsive, non-distorted image fitting */
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* show entire image */
  object-position: center center;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  transition: transform 0.4s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* ❌ No Image Placeholder (Product Name + Icon) */
.no-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #f2f2f2, #e3e3e3);
  border-radius: 12px 12px 0 0;
  color: #555;
  font-weight: 600;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
  text-align: center;
  font-size: 1rem;
}
.no-image-placeholder::before {
  content: "\f03e"; /* FontAwesome image icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 24px;
  color: #999;
  margin-bottom: 6px;
}

/* 🌟 PRODUCT DETAILS */
.product-details {
  padding: 12px 10px;
  text-align: center;
}
.product-details h5 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}
.product-details .price {
  color: #007bff;
  font-weight: 700;
  font-size: 1.05rem;
}

/* 🌟 ACTION BUTTONS (Add to Cart + Wishlist) */
.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem 1rem;
}
.product-actions .btn { height: 36px; }

.add-to-cart-btn {
  flex: 1;
  font-size: 0.9rem;
}

.wishlist-btn {
  border: 1px solid #ddd;
  background: #fff;
  width: 38px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wishlist-btn .bi-heart-fill { color: red; }

/* 🌟 RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .product-image { height: 220px; }
}

@media (max-width: 575px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-image { height: 190px; }

  .product-details h5 { font-size: 0.9rem; }
  .add-to-cart-btn {
    font-size: 0.75rem !important;
    padding: 4px 6px !important;
  }
  .wishlist-btn {
    margin-left: 6px !important;
    padding: 4px 6px !important;
    font-size: 0.85rem;
  }
  .wishlist-icon { font-size: 1rem; }
}

@media (max-width: 480px) {
  .product-image { height: 170px; }
  .product-details h5 { font-size: 0.9rem; }
}

/* 🌟 CLEANUP */
.product-icons { display: none !important; }
.cart-added-animate {
  transform: scale(1.15);
  transition: 0.2s;
}
/* 🏷️ Discount Badge */
.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff4d4d;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

/* 🖼️ Image Slider */
.productSwiper {
  width: 100%;
  height: 100%;
  border-radius: 12px 12px 0 0;
}
.productSwiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.productSwiper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px 12px 0 0;
}
.swiper-pagination {
  bottom: 5px !important;
}
.swiper-pagination-bullet {
  background: #999;
  opacity: 0.7;
}
.swiper-pagination-bullet-active {
  background: #007bff;
  opacity: 1;
}

/* 🧱 Ensure the discount badge stays above slider */
.product-image {
  position: relative;
}
.product-details .price {
  font-size: 16px;
}

.product-details del {
  font-size: 14px;
}

.product-details .text-success {
  font-size: 13px;
}
