html, body {
  height: 100%;
  width: 100%;
  font-family: 'Arimo', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
}

header {
  padding: 2rem;
  text-align: center;
  /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
}

header h1 {
  margin: 100px 0px 0px 0px;
  font-size: 2rem;
  font-weight: 700;
}

header p {
  margin: 20px 0px 20px 0px;
  font-size: 1.1rem;
  opacity: 0.8;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* FOOD FILTERS */
.filter-container {
  text-align: center;
}

.filter-container h2 {
  /* margin: 0 0 1.5rem 0; */
  color: #333;
  font-size: 1rem;
}

.filter-buttons {
  display: block;
  justify-content: center;
  gap: 0.5rem;
}

.filter-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 0.75rem 1.5rem;
  margin: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  font-family: 'Arimo', sans-serif;
  color: #495057;
  border-radius: 5px;
}

.filter-btn:hover {
  background: #e9ecef;
  border-color: #ffbc0d;
  transform: translateY(-1px);
    transition: all 0.2s ease-in-out;
}

.filter-btn.active {
  background: #ffbc0d;
  border-color: #ffbc0d;
  transition: all 0.1s ease-in-out;
  color: #333;
  font-weight: 600;
}

/* TWO-COLUMN LAYOUT */
.content-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

/* NUTRITIONAL FILTERS - LEFT SIDEBAR */
.nutritional-filter-container {
  position: sticky;
  top: 5rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nutritional-filter-container h2 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.2rem;
  font-weight: 700;
}

.nutritional-filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nutritional-filter-group {
  display: flex;
  flex-direction: column;
}

.nutritional-filter-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  text-align: left;
  border-radius: 4px;
}

.nutritional-filter-btn:hover {
  background: #e9ecef;
  border-color: #da291c;
  transform: translateX(2px);
}

.nutritional-filter-btn.active {
  background: #da291c;
  border-color: #da291c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(218, 41, 28, 0.3);
}

.nutritional-filter-btn.clear-btn.active {
  background: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

/* Slider styles */
.slider-container {
  margin-top: 0.75rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.slider-container.hidden {
  display: none;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: #495057;
}

.range-display {
  font-weight: 600;
  color: #da291c;
}

.slider-wrapper {
  position: relative;
  padding: 0.5rem 0;
}

.range-slider {
  width: 100%;
  height: 6px;
  background: #dee2e6;
  outline: none;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #da291c;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #da291c;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* RESULTS CONTAINER - RIGHT SIDE */
.results-container {
  min-height: 400px;
}

.results-container section {
  margin-bottom: 2rem;
}

.results-container section h3 {
  margin: 20px 0px 0px 0px;
  color: #333;
  font-size: 1.3rem;
  font-weight: 700;
}

/* LISTINGS GRID - 5 items per row */
.results-container section {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

/* Make the heading and item count span all columns */
.results-container section h3 {
  grid-column: 1 / -1;
}

.results-container section .item-count {
  grid-column: 1 / -1;
  margin: 0 0 1rem 0;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Individual listing item */
.listing {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
}

.listing .open {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.listing .open:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #ffbc0d;
}

.listing .open img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.listing .open .item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  display: block;
}

.listing .open .item-grams {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffbc0d;
  display: block;
  margin-top: 0.5rem;
}

.listing .open .calories {
  font-size: 0.75rem;
  color: #6c757d;
  display: block;
  margin-top: 0.25rem;
}

.listing .open .nutritional-highlight {
  font-size: 0.7rem;
  color: #da291c;
  font-weight: 600;
  margin-top: 0.25rem;
  display: block;
}

/* Responsive layout */
@media (max-width: 1200px) {
  .results-container section {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .nutritional-filter-container {
    position: relative;
    top: 0;
  }
  
  .results-container section {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .results-container section {
    grid-template-columns: repeat(2, 1fr);
  }
}