/* Search Page Styles */
.new-search-page-filters .dropdown-menu {
  width: 150px !important;
  margin-top: 35px !important;
  left: 0 !important;
  right: auto !important;
  transform: none !important;
  position: absolute !important;
  z-index: 1000 !important;
}

/* Mobile Map Button Styles */
.mobile-map-toggle {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
}

.map-toggle-btn {
  background: linear-gradient(
    135deg,
    hsl(var(--base)) 0%,
    hsl(var(--base-d-200)) 100%
  );
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 191, 166, 0.3);
  transition: all 0.3s ease;
  min-width: 140px;
}

.map-toggle-btn:hover {
  background: linear-gradient(
    135deg,
    hsl(var(--base-d-200)) 0%,
    hsl(var(--base-d-300)) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 191, 166, 0.4);
}

.map-toggle-btn:active {
  transform: translateY(0);
}

.map-toggle-btn i {
  font-size: 16px;
}

/* Mobile Map Modal Styles */
#mobileMapModal .modal-content {
  border: none;
  border-radius: 0;
}

#mobileMapModal .modal-header {
  background: hsl(var(--base));
  color: white;
  border: none;
  padding: 15px 20px;
}

#mobileMapModal .modal-title {
  font-weight: 600;
}

#mobileMapModal .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

#mobileMapModal .btn-close:hover {
  opacity: 1;
}

/* Ensure mobile map takes full height */
#mobile-leaflet-map {
  min-height: calc(100vh - 60px);
}

/* Mobile Filter Button Styles */
.mobile-filter-toggle {
  background: linear-gradient(
    135deg,
    hsl(var(--base)) 0%,
    hsl(var(--base-d-200)) 100%
  );
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(0, 191, 166, 0.3);
  transition: all 0.3s ease;
  min-width: 140px;
}

.mobile-filter-toggle:hover {
  background: linear-gradient(
    135deg,
    hsl(var(--base-d-200)) 0%,
    hsl(var(--base-d-300)) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 191, 166, 0.4);
}

.mobile-filter-toggle:active {
  transform: translateY(0);
}

/* Mobile Filter Modal Styles */
.mobile-filters-container {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
}

.filter-section {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 1rem;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-title {
  color: #333;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.filter-title i {
  margin-right: 8px;
  font-size: 1.1rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-filter-option {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.mobile-filter-option:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.mobile-filter-option.active {
  background: hsl(var(--base));
  border-color: hsl(var(--base));
  color: white;
  box-shadow: 0 2px 8px rgba(0, 191, 166, 0.3);
}

.mobile-filter-option.active:hover {
  background: hsl(var(--base-d-200));
  border-color: hsl(var(--base-d-200));
}

/* Mobile Filter Modal Header */
#mobileFilterModal .modal-header {
  background: linear-gradient(
    135deg,
    hsl(var(--base)) 0%,
    hsl(var(--base-d-200)) 100%
  );
  color: white;
  border: none;
  padding: 20px;
}

#mobileFilterModal .modal-title {
  font-weight: 600;
  font-size: 1.2rem;
}

#mobileFilterModal .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

#mobileFilterModal .btn-close:hover {
  opacity: 1;
}

/* Mobile Filter Modal Footer */
#mobileFilterModal .modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 15px 20px;
  background: #f8f9fa;
}

/* Active filter count badge */
#active-filter-count {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Scrollbar styling for mobile filters */
.mobile-filters-container::-webkit-scrollbar {
  width: 6px;
}

.mobile-filters-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.mobile-filters-container::-webkit-scrollbar-thumb {
  background: hsl(var(--base));
  border-radius: 3px;
}

.mobile-filters-container::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--base-d-200));
}

/* Banner Section Styling */
.car-new-banner {
  padding: 100px 0;
}

.banner-content {
  text-align: left;
  margin-bottom: 0;
}

.banner-content h1 {
  font-size: 70px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.banner-content i {
  color: hsl(var(--base));
  padding: 0 0 0 10px;
}

.banner-content p {
  font-size: 1.2rem;
  border-bottom: 2px solid white;
  width: 43%;
  margin: 0 0 30px;
  color: #fff;
}
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.banner-btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 1.1rem;
  background-color: hsl(var(--base));
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.banner-btn:hover {
  background-color: hsl(var(--base));
  color: white;
}

.banner-image {
  text-align: center;
}

.banner-content span {
  color: hsl(var(--base));
}

.car-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  display: block;
  max-height: 560px;
  object-fit: contain;
}

.car-image:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Ensure banner image doesn’t overflow on smaller screens */
@media (max-width: 992px) {
  .car-image {
    max-height: 420px;
  }
}

@media (max-width: 576px) {
  .car-image {
    max-height: 320px;
  }
}

/* Common Enter Animation Classes */
.animate-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 1s forwards;
}

.animate-right {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideRight 1s forwards;
}

.animate-left {
  opacity: 0;
  transform: translateX(20px);
  animation: slideLeft 1s forwards;
}

/* Keyframes for Animations */
@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Recent Vehicles Section */
.recent-vehicle-sec {
  padding: 100px 0;
}

.recent-vehicle-sec .section-title {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 60px;
}

.vehicle-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.vehicle-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-bottom: 20px;
}

.line-first,
.line-third {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.car-rating {
  color: #7f7f7f;
  font-weight: 500;
}

.car-model {
  font-size: 0.9rem;
  color: #555;
  margin: 5px 0;
}

.car-price {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: hsl(var(--base));
}

.book-btn {
  background: hsl(var(--base));
  color: #fff;
  padding: 10px 15px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.book-btn:hover {
  background: hsl(var(--base));
  color: white;
}

.recent-vehicle-sec .carousel-control-prev {
  left: -6%;
}

.recent-vehicle-sec .carousel-control-next {
  right: -6%;
}

.carousel-control-next,
.carousel-control-prev {
  top: 32%;
  height: 40px;
  width: 40px;
  padding: 10px;
  border-radius: 50%;
  background-color: hsl(var(--base));
}

/* search */
.new-searchbar .search-container {
  background: #ffffff;
  border-radius: 50px;
  padding: 10px 20px 15px 20px;
  margin-top: -60px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.new-searchbar label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
  display: block;
}

.new-searchbar input {
  width: 100%;
  border: none;
  padding: 10px 0;
  outline: none;
  transition: border 0.3s ease;
}

.new-searchbar .search-btn {
  background: hsl(var(--base));
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 12px 14px;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 0 auto;
  transition: background 0.3s ease;
}

.new-searchbar .search-btn:hover {
  background: hsl(var(--base));
}

.new-searchbar .search-btn i {
  font-size: 1.2rem;
}

/* cities sec */
.new-cities-sec-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.new-cities-sec-card img:hover {
  transform: scale(1.05);
}

.new-cities-sec-card h5 {
  margin-top: 10px;
  font-weight: 600;
}

.new-cities-sec h2 {
  text-align: center;
  margin-bottom: 60px;
}

.new-cities-sec {
  background-color: #f6f8ff;
  padding: 100px 0;
}

.recent-vehicle-sec .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: hsl(var(--base));
  opacity: 0.5;
  /* slightly transparent inactive */
  border: none;
  margin: 0 6px;
  transition: opacity 0.3s, transform 0.3s;
}

.recent-vehicle-sec .carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.2);
}

/* search page */
/* Filters */
.new-search-page-filters {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Car Cards */
.modern-car-card {
  border-radius: 20px;
  padding: 20px;
  margin: 25px 0;
  border: 2px solid #ededef;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.modern-car-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.car-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: hsl(var(--base));
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.price-tag {
  font-size: 1.1rem;
  color: hsl(var(--base));
}

.modern-btns {
  background: hsl(var(--base));
  color: #fff;
  border-radius: 12px;
  padding: 0.5rem 1rem;
  font-weight: 500;
}
.filter-check {
  margin-right: 8px;
  font-size: 14px;
}
.dropdown-item.active {
  background-color: transparent;
  color: inherit;
}
.dropdown-item:hover {
  background-color: #f8f9fa;
}
/* Fix dropdown z-index to appear above map */
.dropdown-menu {
  z-index: 1050 !important;
}
.filter-chip {
  z-index: 1051 !important;
}

/* Ensure map has lower z-index */
#leaflet-map {
  z-index: 1 !important;
}
.modern-btns:hover {
  background: hsl(var(--base));
  color: #fff;
  border-radius: 12px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transform: translateY(-5px);
}

.new-search-page-sec {
  padding: 20px;
}

/* Map */
.map-container {
  border-radius: 20px;
  margin-top: 20px;
  background: hsl(var(--base));
  width: 100%;
  height: 100vh;
}

/* search */
.new-search-page-filters {
  background: #fff;
  border-radius: 16px;
  padding: 15px 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Filter Chip Buttons */
.filter-chip {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  color: #333;
  cursor: pointer;
  position: relative;
}

.filter-chip i {
  font-size: 1rem;
  opacity: 0.7;
  transition: color 0.3s ease;
}

.filter-chip:hover,
.filter-chip:focus {
  background: hsl(var(--base));
  color: #fff;
  border-color: hsl(var(--base));
  box-shadow: 0 6px 12px rgba(0, 191, 166, 0.2);
  transform: translateY(-2px);
}

.filter-chip:hover i,
.filter-chip:focus i {
  color: #fff;
  opacity: 1;
}

/* Active Filter State */
.filter-chip.active-filter {
  background: hsl(var(--base)) !important;
  color: #fff !important;
  border-color: hsl(var(--base)) !important;
  box-shadow: 0 6px 12px rgba(0, 191, 166, 0.3);
}

.filter-chip.active-filter i {
  color: #fff !important;
  opacity: 1 !important;
}

/* Dropdown Menu Styling */
.dropdown-menu {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  margin-top: 8px;
  min-width: 200px;
}

.dropdown-item {
  padding: 10px 20px;
  font-size: 0.9rem;
  color: #333;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: hsl(var(--base));
}

.dropdown-item:active {
  background: hsl(var(--base));
  color: #fff;
}

/* Clear Filters Button */
.filter-chip.clear-filters {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

.filter-chip.clear-filters:hover {
  background: #c82333;
  border-color: #bd2130;
  transform: translateY(-2px);
}

.filter-chip.clear-filters i {
  color: #fff;
  opacity: 1;
}

/* Scrollable Vehicles Container */
.scrollable-vehicles {
  scroll-behavior: smooth;
}

.scrollable-vehicles::-webkit-scrollbar {
  width: 8px;
}

.scrollable-vehicles::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.scrollable-vehicles::-webkit-scrollbar-thumb {
  background: hsl(var(--base));
  border-radius: 10px;
}

.scrollable-vehicles::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--base-d-200));
}

/* For Firefox */
.scrollable-vehicles {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--base)) #f1f1f1;
}
/* Show tick only on the selected option */
.new-search-page-filters .dropdown-menu .filter-check {
  display: none !important;
}
.new-search-page-filters .dropdown-menu .dropdown-item.active .filter-check {
  display: inline-block !important;
  color: #000000;
  margin-right: 6px;
}

/* Grid View Styles */
.vehicles-container.grid-view {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding-bottom: 0;
}

.vehicles-container.grid-view .mb-4 {
  margin-bottom: 0 !important;
}

.vehicles-container.grid-view s {
  margin-bottom: 0 !important;
  height: 100%;
}

.vehicles-container.grid-view .cards .row {
  flex-direction: column;
}

.vehicles-container.grid-view .cards .col-md-5 {
  width: 100%;
  max-width: 100%;
}

.vehicles-container.grid-view .cards .col-md-7 {
  width: 100%;
  max-width: 100%;
}

/* List View Styles (default) */
.vehicles-container.list-view {
  display: block;
}

.vehicles-container.list-view .mb-4 {
  margin-bottom: 1.5rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vehicles-container.grid-view {
    grid-template-columns: 1fr;
  }
}
.leaflet-popup-close-button {
  display: none;
}
.leaflet-popup-content-wrapper {
  background: transparent;
}

/* Mobile Image Consistency */
@media (max-width: 991.98px) {
  .modern-car-card .col-md-5 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

@media (max-width: 576px) {
  .modern-car-card .col-md-5 img {
    height: 100% !important;
  }
}
