/* ================================
   PRODUCTS PAGE — CLEAN VERSION
   ================================ */

/* ---------- Section ---------- */
.products-section {
  padding: 2rem 1rem;
  text-align: center;
  background: #f9fdf9;
}

.products-section h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 0.5rem;
}

.products-section > p {
  color: #555;
  max-width: 600px;
  margin: 0.5rem auto 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- Info Box ---------- */
.products-info {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  padding: 1rem 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  border-radius: 8px;
  color: #555;
  font-size: 0.95rem;
}

.products-info p {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  line-height: 1.6;
}

.products-info i {
  color: #2e7d32;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* ---------- Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

/* ---------- Product Card ---------- */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* ---------- Badge ---------- */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}

.badge.available { background: #2e7d32; }
.badge.low { background: #e65100; }

/* ---------- Image (NO GAP FIXED) ---------- */
.product-image {
  width: 100%;
  line-height: 0; /* 🔑 removes hidden spacing */
}

.product-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 3px solid #43a047;

  /* disable click behaviour */
  pointer-events: none;
  cursor: default;
  user-select: none;
}

/* ---------- Product Info ---------- */
.product-info {
  padding: 0.8rem 1rem 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.4rem; /* 🔑 controls spacing tightly */
}

.product-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2e7d32;
  margin: 0;
}

.product-info p {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.price {
  font-weight: 700;
  color: #388e3c;
  margin-top: 0.3rem;
}

/* ---------- View Cart Button (Inline) ---------- */
.view-cart-wrapper {
  display: flex;
  justify-content: center;
  margin: 1.2rem 0 2rem;
}

.view-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #2e7d32;
  color: #fff;
  padding: 0.7rem 1.3rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, background 0.25s ease;
}

.view-cart-btn:hover {
  background: #1b5e20;
  transform: translateY(-2px);
}

.view-cart-btn span {
  background: #fff;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Quantity Row ---------- */
.quantity-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.qty-input {
  width: 60px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.qty-input:focus {
  outline: none;
  border-color: #43a047;
  box-shadow: 0 0 4px rgba(67,160,71,0.4);
}

/* ---------- Button ---------- */
.add-cart-btn {
  flex: 1;
  background: #43a047;
  color: #fff;
  border: none;
  padding: 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-cart-btn:hover {
  background: #2e7d32;
}

/* ---------- Trust ---------- */
.products-trust {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #2e7d32;
}

.products-trust i {
  color: #43a047;
  margin-right: 0.3rem;
}

/* ---------- Alert ---------- */
.alert-message {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #1b5e20;
  color: #fff;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  z-index: 2000;
}

.alert-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Floating Cart Button ---------- */
.floating-cart-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 58px;
  height: 58px;
  background: #43a047;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 3000;
  transition: transform 0.3s ease, background 0.3s ease;
}

.floating-cart-btn:hover {
  background: #2e7d32;
  transform: scale(1.05);
}

.floating-cart-btn span {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #fff;
  color: #2e7d32;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 50%;
  min-width: 20px;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .product-image img {
    height: 200px;
  }

  .products-section h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .product-image img {
    height: 180px;
  }

  .product-info h3 {
    font-size: 1rem;
  }

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

  .products-info {
    margin-bottom: 1.5rem;
    padding: 0.9rem;
  }

  .alert-message {
    top: 60px;
    right: 10px;
    font-size: 0.85rem;
  }
}

.add-cart-btn:disabled {
  background: #9e9e9e;
  cursor: not-allowed;
  transform: none;
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(67,160,71,0.1);
  border: 1px solid rgba(129,199,132,0.35);
  color: #23722a;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(129,199,132,0.3),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.pill:hover::before {
  transform: translateX(100%);
}

.pill:hover {
  color: #fff;
  background: linear-gradient(135deg,#2e7d32,#43a047);
  box-shadow: 0 0 15px rgba(67,160,71,0.45);
  transform: translateY(-2px) scale(1.05);
}

.products-pill-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0.8rem 0 1.5rem;
}

.products-trust-pill-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2rem;
}

.trust-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(67,160,71,0.1);
  border: 1px solid rgba(67,160,71,0.35);
  font-size: 0.75rem;
  font-weight: 700;
  color: #1b5e20;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.trust-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(67,160,71,0.35), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.trust-pill:hover::before {
  transform: translateX(100%);
}

.trust-pill:hover {
  background: linear-gradient(135deg,#2e7d32,#43a047);
  color: #fff;
  box-shadow: 0 0 12px rgba(67,160,71,0.45);
}

.badge.low {
  animation: pulseStock 1.6s infinite;
}

.badge.popular {
  background: linear-gradient(135deg, #ff6f00, #ff8f00);
  animation: glowPulse 1.8s infinite;
  box-shadow: 0 0 12px rgba(255,111,0,0.7);
}

.badge-right {
  left: auto;
  right: 10px;
}

@keyframes glowPulse {
  0%   { box-shadow: 0 0 5px rgba(255,111,0,0.4); }
  50%  { box-shadow: 0 0 16px rgba(255,111,0,0.9); }
  100% { box-shadow: 0 0 5px rgba(255,111,0,0.4); }
}

/* ---------- Search & Filter ---------- */
.search-filter-wrapper {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-box {
  flex: 1;
  min-width: 240px;
  background: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 0.55rem 1rem;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-box i {
  color: #2e7d32;
  font-size: 0.9rem;
}

.search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.95rem;
  background: transparent;
}

#type-filter {
  padding: 0.55rem 1rem;
  border-radius: 30px;
  border: 1px solid #c8e6c9;
  background: #fff;
  font-weight: 600;
  color: #2e7d32;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pill.active {
  background: #0ea5e9;
  color: #fff;
  transform: scale(1.05);
}

.no-results {
  text-align: center;
  padding: 50px 20px;
  color: #64748b;
}

.no-results i {
  font-size: 48px;
  color: #2e7d32;
  margin-bottom: 12px;
}

.no-results h3 {
  font-size: 22px;
  margin-bottom: 6px;
}

/* Disable top filter pills */
.products-pill-row {
  display: none !important;
}

