/* =========================
   🌐 Base & Global Styles
========================= */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica', sans-serif;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  min-height: 100vh;
  margin: 0;
}

/* =========================
   🏠 Main Container & Header
========================= */
.main-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin: 20px auto;
  max-width: 1200px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #2c3e50, #3498db);
  color: white;
  border-radius: 15px 15px 0 0;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.header h1 {
  margin: 0;
  font-size: 3em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
  font-size: 1.2em;
  margin: 10px 0 0 0;
  opacity: 0.9;
}

/* =========================
   🎛 Filter Section
========================= */
.filter-section {
  padding: 30px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.filter-section h3 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.filter-btn {
  margin: 5px;
  padding: 8px 20px;
  border: 2px solid #3498db;
  background: transparent;
  color: #3498db;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: bold;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: #3498db;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* =========================
   🛍 Product Grid & Cards
========================= */
.products-section {
  padding: 40px 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.product-image {
  position: relative;
  height: 250px;
  background: linear-gradient(45deg, #90a7e6, #c7e7c1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-image img:hover {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #e74c3c;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: bold;
}

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
}

.product-title6 {
  font-size: 1.1em;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
}

.product-title7 {
  font-size: 1em;
  font-weight: bold;
  color: #2c3e50;
  margin: 10px 0;
}

.product-description {
  color: #7f8c8d;
  margin-bottom: 15px;
  font-size: 0.9em;
  line-height: 1.5;
  flex: 1;
}

.product-bottom {
  margin-top: auto;
}

.rating {
  color: #f39c12;
  margin-bottom: 15px;
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.price {
  font-size: 1.5em;
  font-weight: bold;
  color: #ffffff;
}

.original-price {
  text-decoration: line-through;
  color: #ff0a0a;
  font-size: 1.2em;
  font-weight: 800;
}

.btn-purchase {
  width: 100%;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

.btn-purchase:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* =========================
   📈 Stats Section
========================= */
.stats-section {
  background: #2c3e50;
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  display: block;
}

.stat-label {
  font-size: 1em;
  opacity: 0.8;
  margin-top: 5px;
}

/* =========================
   🖼 Hero Search Section
========================= */
.hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url('https://images.unsplash.com/photo-1508780709619-79562169bc64?auto=format&fit=crop&w=1350&q=80')
              center center / cover no-repeat;
  min-height: 52vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  padding: 60px 20px 0;
  box-sizing: border-box;
}

.search-box {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 750px;
  box-sizing: border-box;
}

.search-box h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.input-group-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.input-group-flex .form-control,
.input-group-flex select {
  border-radius: 25px;
  padding: 12px 20px;
  border: 1px solid #ccc;
  height: 45px;
  flex: 1 1 auto;
  min-width: 120px;
  box-sizing: border-box;
}

.btn-search {
  border-radius: 25px;
  background-color: #337ab7;
  border: none;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  transition: background 0.3s ease;
  flex: 0 0 auto;
  height: 45px;
}

.btn-search:hover {
  background-color: #286090;
}

/* =========================
   🖼 Gallery Layout
========================= */
.gallery-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery-items li {
  flex: 0 0 calc(25% - 16px);
  max-width: calc(25% - 16px);
  box-sizing: border-box;
}

.gallery-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.05);
}

/* =========================
   ⚙ Animation & Utility
========================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-item.hidden { display: none; }
.product-item.show { display: block; }

.spacer25 { margin-bottom: 25px; }

/* =========================
   📱 Responsive Design
========================= */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 992px) {
  .gallery-items li {
    flex: 0 0 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
  }
}

@media (max-width: 768px) {
  .header h1 { font-size: 2em; }

  .main-container {
    margin: 10px;
    border-radius: 10px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filter-section {
    padding: 20px 15px;
  }

  .filter-btn {
    padding: 6px 15px;
    font-size: 0.9em;
    margin: 3px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-number { font-size: 2em; }

  .input-group-flex {
    flex-direction: column;
  }

  .input-group-flex .form-control,
  .input-group-flex select,
  .btn-search {
    width: 100%;
  }

  .gallery-items li {
    flex: 0 0 calc(50% - 16px);
    max-width: calc(50% - 16px);
  }
}

@media (max-width: 480px) {
  .header {
    padding: 30px 15px;
  }

  .header h1 {
    font-size: 1.8em;
  }

  .products-section {
    padding: 20px 15px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .gallery-items li {
    flex: 0 0 100%;
    max-width: 100%;
  }
}