/* === HOME / PRODUCTS PAGE === */

.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 24px 100px;
  background-color: #0a0a0a;
  min-height: calc(100vh - 180px);
}

/* Hero Banner */
.hero-banner {
  height: 420px;
  background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.85)), url('https://picsum.photos/id/1015/2000/1200') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-top: 72px; /* accounts for fixed header */
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 20px;
  max-width: 600px;
  margin: 0 auto 28px;
  opacity: 0.95;
}

.shop-now-btn {
  display: inline-block;
  background-color: #00d4ff;
  color: #000;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s;
}

.shop-now-btn:hover {
  background-color: #00eaff;
  transform: scale(1.05);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 32px;
  color: #ffffff;
  font-weight: 700;
}

.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  width: 100%;
}

/* Product Card */
.product-container {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.product-container:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 212, 255, 0.15);
  border-color: #00d4ff;
}

/* Product Image */
.product-image-container {
  height: 260px;
  background-color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.product-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-container:hover .product-image {
  transform: scale(1.08);
}

/* Product Info */
.product-name {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  margin: 20px 20px 8px;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 12px;
}

.product-rating-stars {
  height: 18px;
}

.product-rating-count {
  color: #888;
  font-size: 14px;
}

/* Price */
.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #00d4ff;
  margin: 0 20px 16px;
}

/* Quantity Selector */
.product-quantity-container, .products-link {
  margin: 0 20px 18px;
}

.product-quantity {
  background-color: #222;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  width: 100%;
}

/* Add to Cart Button */
.add-to-cart-button {
  width: 100%;
  margin: 0 20px 24px;
  padding: 14px;
  background-color: #00d4ff;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-to-cart-button:hover {
  background-color: #00b8d4;
  transform: scale(1.04);
}

/* Added to Cart Message */
.added-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #00d4ff;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.added-to-cart img {
  width: 20px;
  height: 20px;
}

.added-to-cart-visible {
  opacity: 1;
  visibility: visible;
  animation: slideDown 0.4s ease;
}

.no-products-found {
  grid-column: span 5;
  text-align: center;
  padding: 50px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
  }

  .main {
    padding: 100px 16px 80px;
  }

  .product-image-container {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
