:root {
  --aldi-navy: #0D3A93;
  --lidl-blue: #0050aa;
  --lidl-yellow: #fff000;

  --brand-primary: var(--lidl-blue);
  --brand-secondary: var(--aldi-navy);
  --brand-accent: var(--lidl-yellow);

  --gray: #f5f5f5;
  --white: #ffffff;
  --black: #000000;
  --text-color: #333;
}

body {
  margin: 0;
  padding: 1rem;
  font-family: Arial, sans-serif;
  color: var(--text-color);
  background: var(--gray);
  overflow-x: hidden;
}

header {
  margin-bottom: 1rem;
}

.header-top {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.project-logo {
  width: 80px;
  height: 80px;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #555;
}

.header-info {
  flex: 1;
}

.header-info h1 {
  margin: 0;
  font-size: 1.5rem;
}

.page-last-updated,
.last-visit-info {
  display: block;
  align-items: center;
  padding: 0.3rem 0;
  border-radius: 10px;
  font-size: 1rem;
  color: #333;
}

.header-icon {
  width: 1em;
  height: 1em;
  vertical-align: middle;
  fill: #666;
  margin-right: 0.3em;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.filters-row button {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--brand-primary);
  background-color: var(--white);
  color: var(--brand-primary);
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

.filters-row button:hover {
  background-color: var(--brand-primary);
  color: var(--white);
}

.filters-row button.active {
  background-color: var(--brand-primary);
  color: var(--white);
}

.filters-row button.active:hover {
  background-color: var(--brand-secondary);
}

.filters-row input[type="text"] {
  background-color: var(--white);
  color: var(--brand-primary);
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  font-size: 0.9rem;
}

.filters-row input::placeholder {
  opacity: 0.5;
  color: var(--brand-primary);
}

.category-wrapper {
  position: relative;
  display: inline-block;
}

.category-wrapper select {
  appearance: none;
  background: var(--white);
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  padding: 0 1.5rem 0 0.9rem;
  height: 2.25rem;
  font-size: 0.9rem;
  color: var(--brand-primary);
  cursor: pointer;
  line-height: 2.25rem;
  width: 250px;
}

.category-wrapper select:hover {
  background: var(--brand-primary);
  color: var(--white);
}

.category-wrapper::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--brand-primary);
  font-size: 0.7rem;
}

.sortby-wrapper {
  position: relative;
  display: inline-block;
}

.sortby-wrapper select {
  appearance: none;
  background: var(--white);
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  padding: 0 1.5rem 0 0.9rem;
  height: 2.25rem;
  font-size: 0.9rem;
  color: var(--brand-primary);
  cursor: pointer;
  line-height: 2.25rem;
}

.sortby-wrapper select:hover {
  background: var(--brand-primary);
  color: var(--white);
}

.sortby-wrapper::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--brand-primary);
  font-size: 0.7rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-wrapper {
  position: relative;
  display: inline-block;
}

.price-wrapper::before {
  content: "€";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--euro-color, var(--brand-primary));
  pointer-events: none;
}

.filters-row .price-wrapper input {
  padding-left: 25px;
}

.clear-price-btn {
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: red !important;
}

.search-container {
  position: relative;
  display: inline-block;
}

.filters-row .search-container input {
  padding-left: 0.9rem;
} 

.clear-search-btn {
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: red !important;
}

#availability-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#availability-filters button {
  white-space: nowrap;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: auto;
  gap: 1rem;
  margin-bottom: 1rem;
}

.product-card {
  position: relative;
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.product-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-title {
  display: flex;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.product-title img {
  width: 16px;
  height: 16px;
  margin-right: 0.4rem;
}

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

.product-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  color: #555;
}

.product-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: bold;
}

.desc-tooltip {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 200px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 0.5rem;
  font-size: 0.8rem;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  white-space: pre-line;
}

.pagination {
  text-align: center;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.pagination button {
  background: var(--brand-primary);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  height: 2.25rem;
}

.pagination button:hover {
  background-color: var(--brand-secondary);
}

.pagination button svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.page-number-btn.active-page {
  background-color: var(--brand-secondary);
  color: #fff;
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

footer a {
  color: #0077cc;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}