body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: rgb(245, 247, 250);
    color: rgb(51, 51, 51);
    overflow-x: hidden;
    background: linear-gradient(to bottom right, rgb(250, 250, 250), rgb(240, 242, 245));
}

header::before {
    margin: 0;
    padding: 0;
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right,
            rgb(248, 113, 113),
            rgb(251, 191, 36),
            rgb(52, 211, 153),
            rgb(96, 165, 250),
            rgb(167, 139, 250));
}

/* .logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 80%;
  height: 80%;
  object-fit: cover;
  z-index: -1;
} */

.top-bar {
    background-color: rgb(255, 255, 255);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.search-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}


.gallery-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 3px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: relative;
}

.gallery-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: rgb(79, 70, 229);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgb(255, 255, 255);
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 0.2rem 0.4rem;
  transition: box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-form:focus-within {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

#search-input {
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  width: 38vw;
  max-width: 500px;
  color: rgb(51, 51, 51);
  background: transparent;
}

#search-input::placeholder {
  color: rgb(153, 153, 153);
}

.search-btn {
  background: linear-gradient(135deg, rgb(79, 70, 229), rgb(99, 102, 241));
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-btn:hover{
  background: linear-gradient(135deg, rgb(67, 56, 202), rgb(79, 70, 229));
  transform: scale(1.05);
}
#search-input:hover {
    background-color: rgb(228, 226, 226);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

@media (max-width: 700px) {
  .gallery-title {
    font-size: 1.6rem;
  }

  #search-input {
    width: 70vw;
    font-size: 0.95rem;
  }

  .search-btn {
    width: 2rem;
    height: 2rem;
  }
}


.filters-panel {
  background: rgb(255, 255, 255);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  width: 90%;
  max-width: 1100px;
  margin: 1rem auto;
}

.filters-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: rgb(68, 68, 68);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem 1.5rem;
}

.filters-grid label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgb(68, 68, 68);
}

.filters-grid select,
.filters-grid input {
  margin-top: 0.25rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgb(204, 204, 204);
  border-radius: 6px;
  background: rgb(250, 250, 250);
  transition: border-color 0.2s;
}

.filters-grid select:focus,
.filters-grid input:focus {
  border-color: rgb(79, 70, 229);
  outline: none;
  box-shadow: 0 0 3px rgba(79,70,229,0.4);
}
.filters-grid select:hover,
.filters-grid input:hover{
  border-color: rgb(144, 158, 230);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.55rem 2.2rem 0.55rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgb(30, 41, 59);
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(209, 213, 219);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}


.filters-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.filters-actions button {
  height: 2.4rem;
  min-width: 120px;
  font-size: 0.9rem;
}

.btn-primary {
  background: rgb(79, 70, 229);
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: rgb(67, 56, 202);
}

.btn-secondary {
  text-decoration: none;
  background: rgb(243, 244, 246);
  color: rgb(51, 51, 51);
  border: 1px solid rgb(209, 213, 219);
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-secondary:hover {
  background: rgb(154, 160, 170);
}

@media (max-width: 700px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

header::after {
  content: "";
  display: block;
  width: 80%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
}


.cars-container {
    padding: 0rem 1rem;
    margin: 2rem 0 0 0;
    width: 100%;
    box-sizing: border-box;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.car-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: rgb(255, 255, 255);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.car-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.car-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 0, 0, 0.65);
    color: rgb(255, 255, 255);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.car-name {
    font-size: 1rem;
    font-weight: 600;
}

.car-checkbox {
    transform: scale(1.3);
    accent-color: rgb(79, 70, 229);
    z-index: 2;
}

@media (max-width: 768px) {
    #search-input {
        width: 80%;
    }

    .filters-group {
        flex-direction: column;
    }

    .cars-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

.car-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    color: rgb(255, 255, 255);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem 1rem 2.5rem 1rem;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    transition: opacity 0.3s ease-in-out;
    overflow: hidden;
    word-wrap: break-word;
     white-space: normal;
     line-height: 1.2em;
}

.car-info-overlay p {
    margin-bottom: 0.5rem;
      color: rgb(255, 255, 255);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
  .car-info-overlay p{
    margin-bottom: 0.1rem;
  }
}

.car-image:hover .car-info-overlay {
    opacity: 1;
    z-index: 1;
}

.year-range {
    display: flex;
    gap: 1rem;
}

.year-range input[type="number"] {
    width: 6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 5px;
    border: 1px solid rgb(204, 204, 204);
    background-color: rgb(250, 250, 250);
    font-size: 0.9rem;
}

.compare-bottom-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  z-index: 2;
  text-align: center;
  margin: 1.5rem 0;
}