/* ========== PRODUKTE HEADER ========== */
.products-header {
  background: linear-gradient(rgba(248,245,240,0.9), rgba(248,245,240,0.9)), url('../bilder/produkte-bg.png');
  background-size: cover;
  background-position: center;
  padding: 4rem 0;
  text-align: center;
}

.products-header h1 {
  color: var(--primary);
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.products-header p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  color: var(--dark);
}

/* ========== TOOLBAR ========== */
.products-toolbar {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 2rem 0;
}

.toolbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.filter-section,
.sort-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-section h4,
.sort-section h4 {
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  background: white;
  border: 2px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Sort Select */
.sort-select {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.sort-select:hover {
  border-color: var(--primary);
}

/* ========== PRODUCT GRID ========== */
.products-grid-section {
  padding: 3rem 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 2rem 0;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 4rem;
  font-size: 1.2rem;
  color: var(--gray);
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.product-card h3 {
  padding: 1.2rem 1rem 0.5rem;
  font-size: 1.2rem;
  color: var(--dark);
  font-weight: 600;
}

.origin {
  padding: 0 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.price {
  padding: 0 1rem;
  font-weight: bold;
  color: var(--secondary);
  font-size: 1.3rem;
}

.stock {
  padding: 0 1rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.stock.low {
  color: var(--flag-red);
  font-weight: 600;
}

.btn-add-to-cart {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: auto;
  border-top: 1px solid #eee;
}

.btn-add-to-cart:hover {
  background: #1e4a25;
}

.btn-add-to-cart:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .products-header h1 {
    font-size: 2.2rem;
  }

  .toolbar-content {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-section,
  .sort-section {
    width: 100%;
    justify-content: center;
  }

  .filter-buttons {
    justify-content: center;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card {
    border-radius: 8px;
  }
}