@charset "UTF-8";
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* ⛔️ Prevent sideways scroll */
}

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

.vehicle-card {
  margin: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
}

.vehicle-card:hover {
  background-color: #f0f0f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vehicle-card img {
  max-width: 100%;
  height: auto;
}

.vehicle-detail {
  min-height: 100vh;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vehicle-detail h1,
.vehicle-detail p {
  width: 100%;
  margin: 10px 0;
}

.details-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 600px;
}

.details-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
  line-height: 1.5;
  transition: background 0.2s ease;
}

.details-list li:last-child {
  border-bottom: none;
}

.details-list li:hover {
  background: #f0f0f0;
}

.details-list li strong {
  flex: 1;
  color: #333;
  font-weight: 600;
}

.details-list li span {
  flex: 2;
  color: #555;
  text-align: right;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.pagination-button {
  padding: 8px 16px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.pagination-button:hover {
  background: #555;
}

.pagination-button:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 16px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.header {
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  margin: 0;
}

.header-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.header-logo {
  height: 150px; /* Adjust size as needed */
}

.header-title {
  margin: 0;
  font-size: 24px; /* Adjust size as needed */
}

.slider-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slider-image {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.nav-button {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background-color: #333;
  color: white;
  padding: 0.5rem;
  border: none;
}

.nav-button.prev {
  left: 1rem;
}

.nav-button.next {
  right: 1rem;
}

.thumbnail-container {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox hide scrollbar */
  -ms-overflow-style: none; /* IE 10+ */
}

.thumbnail-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.thumbnail-container::-webkit-scrollbar-thumb {
  background-color: #9ca3af;
  border-radius: 4px;
}

.thumbnail-container::-webkit-scrollbar-track {
  background-color: #f3f4f6;
}

.thumbnail {
  width: 140px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  margin: 0 4px;
  flex-shrink: 0;
}

.thumbnail.active {
  border: 2px solid #333;
}

.error {
  color: red;
  text-align: center;
}

.success {
  color: green;
  text-align: center;
}

.contact-seller {
  max-width: 600px;
  width: 80%;
  margin: 20px 0;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.contact-seller h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.contact-seller form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.form-group input,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

.form-group input[type=number] {
  max-width: 100px; /* Smaller width for anti-spam input */
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-seller button {
  padding: 10px 20px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.contact-seller button:hover {
  background: #555;
}

a {
  color: #000000;
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: #000000;
}

a:visited {
  color: #000000;
}

a:active {
  color: #000000;
}

.header-link {
  color: #000000;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.header-link:hover {
  color: #000000;
}

.footer {
  color: #534c4c;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5px;
  width: 100%;
  font-size: 0.9em;
}

.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 10px;
  background-color: #f4f4f4;
  box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}

.menu a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 5px 5px;
  white-space: nowrap; /* Prevent text wrapping */
  flex-shrink: 0; /* Prevent shrinking */
}

.menu a:hover {
  background-color: #e0e0e0;
  border-radius: 5px;
}

.menu-logo {
  height: 16px;
}

.contact-logo {
  height: 70px;
}

.back-to-top {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: white;
  border: 2px solid black;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.contact-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

ul {
  list-style-type: none;
  padding-left: 0; /* Optional: remove indentation */
}

a {
  text-decoration: none;
}

.search-page {
  max-width: 500px;
  margin: 0 auto;
}

.search-page h2 {
  text-align: center;
}

.search-page form {
  display: grid;
  gap: 15px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-page form div {
  display: flex;
  align-items: center;
}

.search-page label {
  font-weight: 600;
  color: #333;
  min-width: 100px;
}

.search-page input {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.search-page button {
  padding: 10px 20px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.search-page .start-search {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: #333;
  margin: 20px 0;
  min-height: 100px;
}

.search-page button:hover {
  background-color: #555;
}

.search-page button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.search-page .error {
  color: #d32f2f;
  font-size: 16px;
  text-align: center;
  margin-top: 10px;
}

.search-page .results {
  margin-top: 20px;
}

.search-page .results h2 {
  font-size: 20px;
  color: #000000;
  margin-bottom: 15px;
}

.search-page .button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

/* Show only on mobile devices (screens smaller than 768px) when visible class is applied */
@media screen and (max-width: 768px) {
  .back-to-top.visible {
    display: flex;
  }
}
/* Responsive adjustments */
@media (max-width: 600px) {
  .vehicle-detail {
    padding: 10px;
  }
  .slider-wrapper {
    max-width: 100%;
  }
  .details-list {
    max-width: 100%;
  }
  .contact-seller {
    max-width: 100%;
    padding: 15px;
  }
  .details-list li {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    font-size: 14px;
  }
  .details-list li strong {
    margin-bottom: 4px;
  }
  .details-list li span {
    text-align: left;
  }
  .slider-arrow {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .menu a {
    font-size: 14px;
    padding: 3px 3px;
  }
  .search-page {
    max-width: 300px;
    margin: 0 auto;
  }
  .search-page form {
    padding: 15px;
  }
  .search-page form div {
    flex-direction: column;
  }
  .search-page label {
    min-width: auto;
    margin-bottom: 5px;
  }
  .search-page button {
    width: 100%;
  }
}
@media screen and (max-width: 480px) {
  .header-logo {
    height: 120px;
  }
  .header-title {
    font-size: 24px;
  }
  .slider-image {
    height: 250px;
  }
  .vehicle-grid {
    grid-template-columns: none;
    justify-content: center;
    align-items: center;
  }
  .vehicle-card {
    max-width: 320px;
  }
}
/* HamburgerMenu */
.menu-container {
  position: sticky;
  top: 0;
  right: 0;
  display: flex;
  justify-content: flex-end; /* pushes hamburger to the right */
  z-index: 10;
  background: transparent; /* change if you want a background on the sticky bar */
}

.hamburger {
  position: fixed;
  display: inline-block;
  cursor: pointer;
  padding: 20px;
  border: none;
  background: none;
  z-index: 11;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 3px;
  margin: 6px 0;
  background-color: #000000;
  transition: 0.4s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.3s ease;
  z-index: 10;
}

.overlay.visible {
  background: rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0; /* change from left to right */
  width: 220px;
  height: 100%;
  background: #fff;
  padding: 20px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3); /* shadow on the left side */
  transform: translateX(100%); /* start off-screen to the right */
  transition: transform 0.3s ease;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 180px;
}

.sidebar li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

.sidebar li.active {
  background: #f0f0f0;
  font-weight: bold;
}

.icon {
  display: inline-flex;
  width: 30px;
  height: 20px;
}

.sidebar .header {
  margin-bottom: 20px;
}

.footer-ham {
  margin-top: 20px;
  padding: 10px 0;
  text-align: center;
  color: #555;
  font-size: 0.9em;
}

/* HamburgerMenu Mobile responsiveness */
@media (min-width: 768px) {
  .menu-container {
    display: none;
  }
  .hamburger {
    display: none;
  }
  .sidebar {
    position: static;
    width: auto;
    box-shadow: none;
    transform: none;
    transition: none;
    display: flex;
    height: auto;
  }
  .overlay {
    background: none;
    position: static;
    height: auto;
    width: auto;
    pointer-events: auto;
  }
  .sidebar ul {
    display: flex;
    gap: 20px;
  }
  .sidebar li {
    border: none;
    padding: 0;
  }
}
