/* category-styles.css - For individual category pages */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Category Header */
.category-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.category-header h1 {
  font-size: 32px;
  color: #333;
  margin: 0 0 15px;
  position: relative;
  padding-bottom: 15px;
}

.category-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #4e88c7;
}

.category-description {
  max-width: 800px;
  margin: 0 auto 30px;
  color: #666;
  line-height: 1.6;
}

/* Category Banner Image */
.category-banner {
  width: 100%;
  height: 300px;
  background-position: center;
  background-size: cover;
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Grid - Using same styling as the products page */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.out-of-stock {
  background-color: #ff6b6b;
  color: white;
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #333;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #f25c54;
  margin-bottom: 15px;
}

.btn {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-secondary {
  background-color: #4e88c7;
  color: white;
  margin-top: auto;
}

.btn-secondary:hover {
  background-color: #3a6fa0;
}

/* No Products */
.no-products {
  text-align: center;
  padding: 50px 20px;
  background: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 40px;
}

.no-products h2 {
  color: #333;
  margin-bottom: 10px;
}

.no-products p {
  color: #666;
  margin-bottom: 20px;
}

/* Back to Categories */
.back-link {
  display: inline-flex;
  align-items: center;
  color: #4e88c7;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #3a6fa0;
}

.back-link i {
  margin-right: 5px;
}

/* CTA Section */
.categories-cta {
  background: #f0f7ff;
  border-radius: 10px;
  padding: 40px;
  margin: 50px 0;
  text-align: center;
}

.cta-content h2 {
  color: #333;
  margin-bottom: 15px;
}

.cta-content p {
  color: #666;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  background: #4e88c7;
  color: white;
  border: 2px solid #4e88c7;
}

.btn-primary:hover {
  background: #3a6fa0;
  border-color: #3a6fa0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .category-banner {
    height: 250px;
  }
  
  .category-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .product-image {
    height: 180px;
  }
  
  .category-banner {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .product-image {
    height: 150px;
  }
  
  .product-title {
    font-size: 14px;
  }
  
  .product-price {
    font-size: 16px;
  }
  
  .btn-secondary {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .category-header h1 {
    font-size: 24px;
  }
}