@font-face {
  font-family: 'Roboto';
  src: url('/fonts/Roboto-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/fonts/Roboto-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url('/fonts/Roboto-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 5px 20px 20px 20px;
}

header {
  background-color: #ffffff;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

header h1 {
  font-size: 20px;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 8px;
  text-align: left;
  word-wrap: break-word;
  white-space: normal;
}

th {
  background-color: #f2f2f2;
  cursor: pointer;
  position: relative;
  user-select: none;
  font-weight: normal;
}

th:hover {
  background-color: #e9ecef;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:nth-child(odd) {
  background-color: #ffffff;
}

th.sort-asc::after {
  content: ' ▲';
  font-size: 12px;
}

th.sort-desc::after {
  content: ' ▼';
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.pagination button {
  margin: 0 5px;
  padding: 5px 10px;
  cursor: pointer;
}

.pagination button.active {
  background-color: #e9ecef;
}

.filters {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.filter-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
  position: relative;
  text-align: center;
}

/* .filter-toggle:hover {
  background-color: rgba(0, 123, 255, 0.1);
  border-radius: 4px;
} */

.filter-toggle h3 {
  margin: 0;
  color: #333;
  text-align: left;
  flex-grow: 1;
}

.toggle-icon {
  font-size: 16px;
  color: #666;
  transition: transform 0.3s ease;
  position: absolute;
  right: 0;
}

.filter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.filter-content.expanded {
  max-height: 1000px; /* Increased to accommodate all filters on mobile */
  overflow-y: auto; /* Add scroll if needed */
}

.filters h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  text-align: center;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0px;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 100px;
  max-width: 150px;
  margin: 10px; /* margin between filters on the side */
}

.filter-group label {
  font-weight: normal;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.filter-group input,
.filter-group select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin: 5px;
}

.filter-group input[type="number"] {
  width: 100%;
}

.filter-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 0px;
}

.filter-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: normal;
  transition: background-color 0.3s;
}

#apply-filters {
  background-color: #007bff;
  color: white;
}

#apply-filters:hover {
  background-color: #0056b3;
}

#clear-filters {
  background-color: #6c757d;
  color: white;
}

#clear-filters:hover {
  background-color: #545b62;
}

.table-container {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-actions button {
    padding: 6px 12px;
    font-size: 12px; /* Prevent zoom on iOS */
  }
}

.text-section {
  max-width: 1000px;
  margin: 10px auto;
  margin-top: 20px;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.text-section h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.text-section h3 {
  color: #333;
  margin-top: 30px;
  margin-bottom: 15px;
}

.text-section p {
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
}

.text-section ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.text-section li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: #333;
}

.text-section strong {
  color: #333;
}

a {
  color: #003366;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: #003366;
}

/* Bike detail page styles */
.bike-detail {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.bike-detail h1 {
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.bike-image {
  text-align: center;
  margin-bottom: 30px;
}

.bike-image img {
  max-width: min(100%, 500px);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bike-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.spec-group {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.spec-group h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

.spec-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spec-group li {
  margin-bottom: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #e9ecef;
}

.spec-group li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.back-link {
  text-align: center;
  margin-top: 30px;
}

.back-link a {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.back-link a:hover {
  background-color: #0056b3;
  color: white;
  text-decoration: none;
}
