:root {
  --bg-color: #f9f9f9;
  --text-color: #333;
  --table-bg-even: #fdfdfd;
  --table-bg-odd: #f7f7f7;
  --header-bg: #f0f0f0;
  --button-bg: #007bff;
  --button-hover: #0056b3;
  --buy-bg: #3FE593;
  --buy-hover: #37c980;
}

body {
  --bg-color: #1e1e1e;
  --text-color: #eee;
  --table-bg-even: #2a2a2a;
  --table-bg-odd: #242424;
  --header-bg: #333;
  --button-bg: #EA9A66;
  --button-hover: #c88457;
  --buy-bg: #28a745;
  --buy-hover: #218838;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.subtitle {
  text-align: center;
  margin-bottom: 20px;
}

/* .dark-mode-toggle {
  font-size: 14px;
  display: flex;
  align-items: center;
} */

.toggle-label {
  margin-left: 8px;
  /* adds space after the toggle */
  font-size: 14px;
  color: var(--text-color);
  user-select: none;
  /* prevent text selection on toggle click */
  vertical-align: middle;
}

.store-selector {
  text-align: center;
  margin: 20px 0;
}

.store-selector button {
  margin: 0 5px 10px;
  padding: 8px 16px;
  border: none;
  background-color: var(--button-bg);
  color: black;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.store-selector button.active,
.store-selector button:hover {
  background-color: var(--button-hover);
}

.filters-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  /* removed gap to control spacing manually */
  flex-wrap: nowrap;
  margin-bottom: 20px;
  max-width: 100%;
}

.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-color);
  min-width: 0;
}

/* .price-filter {
  min-width: 220px;
  flex-shrink: 0;
  margin-right: 30px;
}

.price-range-filter {
  margin-right: 4px;
} */

.brand-filter {
  flex-shrink: 0;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-right: 30px;
  /* added gap */
}

.search-filter {
  min-width: 200px;
  flex-shrink: 0;
  margin-right: 0;
  /* no margin on last */
}

.search-filter input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  height: 36px; /* You can adjust this as needed */
  line-height: 1.2;
  padding: 0 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: var(--table-bg-even);
  color: var(--text-color);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center; /* ensures vertical centering */
}



/* Make all filter labels bold and the same size */
.price-filter>label,
.brand-filter>label:first-of-type,
.search-filter>label {
  font-weight: bold;
  font-size: 14px;
}

/* Adjust price slider width to fit in row */
/* #priceSlider {
  width: 160px !important;
  margin-left: 6px;
} */

/* Price labels smaller */
/* .price-values {
  margin-left: 12px;
  font-weight: 600;
  font-size: 12px;
  min-width: 90px;
  white-space: nowrap;
} */

.table-wrapper {
  overflow-x: auto;
}

/* Hide DataTables default search */
.dataTables_filter {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px 8px;
  font-size: 14px;
  text-align: left;
}

th {
  background-color: var(--header-bg);
}

tbody tr:nth-child(even) {
  background-color: var(--table-bg-even);
}

tbody tr:nth-child(odd) {
  background-color: var(--table-bg-odd);
}

/* Buy buttons style */
.buy-button {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--buy-bg);
  color: black;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.buy-button:hover {
  background-color: var(--buy-hover);
  text-decoration: none;
}

/* Responsive tweaks */
@media (max-width: 700px) {
  .filters-container {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.go-back {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  text-decoration: underline;
  color: var(--text-color);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  z-index: 10;
}

/* Dark mode toggle switch styles */
/* .switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  border-radius: 22px;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:checked + .slider:before {
  transform: translateX(20px);
}
.disclaimer-footer {
  margin-top: 40px;
  padding: 20px;
  font-size: 13px;
  text-align: center;
  color: var(--text-color);
  background-color: var(--header-bg);
  border-top: 1px solid #ccc;
} */
/* [Everything else as you had it remains unchanged] */

/* Footer */
.disclaimer-footer {
  margin-top: 40px;
  padding: 20px;
  font-size: 13px;
  text-align: center;
  color: var(--text-color);
  background-color: var(--header-bg);
  border-top: 1px solid #ccc;
}

.footer-link {
  color: inherit;
  text-decoration: underline;
  font-weight: inherit;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .filter {
    width: 100%;
    flex-wrap: wrap;
  }

  .store-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .store-selector button {
    flex: 1 0 auto;
    min-width: 120px;
  }

  table,
  th,
  td {
    font-size: 13px;
  }

  .search-filter input[type="search"],
  .memory-filter select {
    width: 100%;
  }

  /* #priceSlider {
    width: 100% !important;
    margin-left: 0;
  } */

  /* .price-values {
    margin-left: 0;
    font-size: 13px;
  } */
}

.custom-dropdown {
  position: relative;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 5px;
  user-select: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
}

.custom-dropdown .dropdown-header {
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-dropdown .dropdown-header::after {
  content: "▾";
  font-size: 12px;
  transition: transform 0.3s ease;
}

.custom-dropdown.open .dropdown-header::after {
  transform: rotate(180deg);
}

.custom-dropdown .dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-color);
  border: 1px solid #ccc;
  border-top: none;
  max-height: 180px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-dropdown.open .dropdown-list {
  display: block;
}

.custom-dropdown .dropdown-list label {
  display: block;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
}

.custom-dropdown .dropdown-list label:hover {
  background-color: var(--button-bg);
  color: white;
}

.custom-dropdown .dropdown-list input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Adjust brand-filter container spacing */
.brand-filter {
  flex-shrink: 0;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-right: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-filter>label {
  font-weight: bold;
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
  padding: 10px 0;
}

/* .dark-mode-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
} */
.custom-dropdown {
  position: relative;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 5px;
  user-select: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
}

.custom-dropdown .dropdown-header {
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-dropdown .dropdown-header::after {
  content: "▾";
  font-size: 12px;
  transition: transform 0.3s ease;
}

.custom-dropdown.open .dropdown-header::after {
  transform: rotate(180deg);
}

.custom-dropdown .dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-color);
  border: 1px solid #ccc;
  border-top: none;
  max-height: 180px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-dropdown.open .dropdown-list {
  display: block;
}

.custom-dropdown .dropdown-list label {
  display: block;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
}

.custom-dropdown .dropdown-list label:hover {
  background-color: var(--button-bg);
  color: white;
}

.custom-dropdown .dropdown-list input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Adjust brand-filter container spacing */
.brand-filter {
  flex-shrink: 0;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-right: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-filter>label {
  font-weight: bold;
}