/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f4f7f6;
  color: #333;
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Header */
header {
  background: #ffac33;
  color: #333;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
header h1 {
  font-weight: 500;
  font-size: 2rem;
}
.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
}
.info-button {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}
.header-buttons {
  position: absolute;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
}
.header-button {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
}
.header-button:hover {
  opacity: 0.8;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: left;
}
.modal-content h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}
.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}
.modal-body {
  margin-top: 1rem;
  text-align: left;
}
.modal-body p {
  margin-bottom: 1rem;
}
.modal-body ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.modal-body li {
  margin-bottom: 0.5rem;
}
.modal-body a {
  color: #0066cc;
  text-decoration: underline;
}
.modal-body a:hover {
  color: #004499;
}

/* Layout & Containers */
.container {
  max-width: 1200px;
  margin: 0.5rem auto;
  padding: 0 1rem;
}
.row {
  margin-bottom: 0.25rem;
  text-align: center;
}

/* Search & Filter Layout */
.fixed-width {
  width: 480px;
  margin: 0 auto;
}
.search-row {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 0.2rem;
  width: 480px;
  margin: 0 auto;
}
.filter-row {
  display: flex;
  gap: 0.2rem;
  width: 480px;
  margin: 0 auto;
}
.input-search {
  width: 100%;
  padding: 0.4rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 0;
}
.toggle-filters {
  width: 100%;
  white-space: nowrap;
  margin: 0;
}

/* Filter Buttons */
.filter-button {
  flex: 1;
  padding: 0.4rem;
  font-size: 0.9rem;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #FFC107;
  color: #000;
  cursor: pointer;
  transition: background 0.3s;
}
.filter-button:not(.active) {
  background: #f4f7f6;
}
.filter-button.active {
  background: #FFC107 !important;
  color: #000;
}
.sticky-filters .filter-button {
  background: #FFC107;
}
.sticky-filters .filter-button:not(.active) {
  background: #f4f7f6;
}
.sticky-filters .filter-button.active {
  background: #FFC107 !important;
}
.filter-button.reset-button {
  background: #FFC107 !important;
  color: #000;
}

/* Beer Grid & Cards */
.beer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.beer-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s;
}
.beer-card:hover {
  transform: translateY(-5px);
}
.beer-content {
  padding: 0.2rem 1rem 1rem;
}
.beer-title {
  font-size: 1.2rem;
  margin: 0.1rem 0 0.5rem;
  font-weight: 500;
  color: #000;
}
.beer-details-and-image {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.beer-details {
  flex: 1 1 auto;
  min-width: 0;
}
.beer-image-container {
  flex-shrink: 0;
  margin-left: 0;
  margin-top: auto;
  width: 140px;
}
.beer-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #fff;
}
.beer-info {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.beer-info span {
  font-weight: 500;
}
.standard-price {
  font-size: 1.2rem;
  font-weight: 500;
  color: #000;
  text-align: center;
  margin-bottom: 0.5rem;
}
.no-results {
  text-align: center;
  margin-top: 2rem;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin: 2rem 0;
}
.btn-load-more {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 4px;
  background: #FFC107;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  margin: 0.3rem;
  transition: background 0.3s;
}
.btn-load-more:hover {
  background: #FFB300;
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(51, 51, 51, 0.9);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  z-index: 1000;
  font-size: 1.1rem;
  text-align: center;
  animation: fadeInOut 2s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* Sticky Filters & Animated Section */
.filters-section {
  transition: max-height 0.3s ease-out;
  overflow: hidden;
  margin-top: 0.25rem;
}
.sticky-filters {
  position: sticky;
  top: 0;
  background: #f4f7f6;
  z-index: 100;
  padding: 0.25rem 0;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.sticky-filters .input-search,
.sticky-filters .filter-button {
  background: white;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .fixed-width,
  .search-row,
  .filter-row {
    width: 100%;
    padding: 0 1rem;
  }
  .beer-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .header-content {
    padding: 0 2.5rem;
  }
  .header-buttons {
    right: 0.25rem;
  }
  .header-button {
    font-size: 1.1rem;
    padding: 0.3rem;
  }
  header h1 {
    font-size: 1.5rem;
  }
}
