/* =====================================================
   COMPLETE FIXED CSS - HEADER + PRODUCTS CARDS
===================================================== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f8faff;
  line-height: 1.6;
  color: #333;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================
   HEADER WITH FILTERS
===================================================== */
.header {
  background-color: #fff;
  padding: 15px 0;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
  color: #2c3e50;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav a:hover {
  color: #40b1b6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-shrink: 0;
}

/* Filter Container */
.filter-container {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f8f9fa;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Price Filter */
.filter-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.filter-price label {
  font-weight: 600;
  color: #495057;
  font-size: 0.8rem;
}

.price-range {
  display: flex;
  gap: 8px;
}

.price-range input {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.price-range input:focus {
  outline: none;
  border-color: #40b1b6;
  box-shadow: 0 0 0 3px rgba(64,177,182,0.1);
}

/* Brand Filter */
.filter-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.filter-brand label {
  font-weight: 600;
  color: #495057;
  font-size: 0.8rem;
}

.filter-brand select {
  padding: 8px 10px;
  border: 1.5px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-brand select:focus {
  outline: none;
  border-color: #40b1b6;
  box-shadow: 0 0 0 3px rgba(64,177,182,0.1);
}

/* Sort Section */
.sort-by {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  white-space: nowrap;
}

.sort-by label {
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
}

.sort-by select {
  padding: 6px 12px;
  border: 1.5px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
  min-width: 140px;
}

.sort-by select:focus {
  outline: none;
  border-color: #40b1b6;
}

/* =====================================================
   PRODUCTS GRID
===================================================== */
/* General styles */
.products-grid {
  padding: 60px 20px;
  background: #f9f9f9;
}

.products-header {
  text-align: center;
  margin-bottom: 40px;
}

.products-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #333;
}

.products-subtitle {
  font-size: 1.1rem;
  color: #555;
}

/* Product Grid Layout */
.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 40px;
  padding: 40px 0;
}

/* Product Card */
/* Adjusting the product card size */
.product-card {
  background: #f5f5f5;
  border-radius: 18px;
  padding: 30px;
  text-align: center;
  transition: 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Adjust the image size */
.product-card img {
  width: 100%;
  height: 250px; /* Increase the height of the image */
  object-fit: contain; /* Ensures the image covers the area without distortion */
  margin-bottom: 25px; /* Space between the image and the text */
}

/* Increase the font size of the product name and price */
.product-card h4 {
  font-size: 1.5rem; /* Larger font size for the product name */
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.product-card p {
  font-size: 1.2rem; /* Larger font size for the price */
  font-weight: 700;
  color: #1850a0;
  margin-bottom: 15px;
}

/* Styling the action buttons */
.product-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.product-actions .btn-cart,
.product-actions .btn-buy {
  padding: 12px 20px;
  font-size: 1.1rem; /* Slightly larger text for the buttons */
}

/* Optional: Hover effects for the product cards */
.product-card:hover {
  transform: translateY(-8px);
}

/* Product Information */
.product-info {
  padding: 20px;
}

.product-name {
  font-size: 1.6rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}

.product-brand {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 10px;
}

.product-price {
  font-size: 1.6rem;
  font-weight: bold;
  color: #1850a0;
  margin-bottom: 20px;
}

.price-old {
  text-decoration: line-through;
  color: #aaa;
  font-size: 1rem;
  margin-left: 8px;
}

/* Buttons */
.product-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-cart, .btn-buy {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.btn-cart {
  background: #f0f0f0;
  color: #333;
}

.btn-cart:hover {
  background: #e0e0e0;
}

.btn-buy {
  background: linear-gradient(135deg, #1850a0, #40b1b6);
  color: #fff;
}

.btn-buy:hover {
  transform: translateY(-2px);
}



/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1200px) {
  .header-wrapper {
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
  }
  
  .header-actions {
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
  }
  
  .filter-container {
    flex-wrap: wrap;
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 15px 15px;
  }
  
  .header-wrapper {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav {
    gap: 20px;
    order: 3;
  }
  
  .nav a {
    font-size: 0.9rem;
  }
  
  .filter-container {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  .filter-box {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .price-range {
    flex-direction: column;
  }
  
  .price-range input,
  .filter-brand select {
    width: 100%;
  }
  
  .products-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .product-card {
    height: 360px;
  }
  
  .products-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .header-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .sort-by {
    width: 100%;
    justify-content: center;
  }
  
  .products-list {
    grid-template-columns: 1fr;
  }
}
