/**
 * Washin Auto - Car Listing Page Styles
 */

:root {
  --primary-color: var(--main-color);
  --primary-dark: #005d96;
  --primary-light: #e6f3ff;
  --accent-color: #ff6b35;
  --accent-dark: #e55a2b;
  --accent-light: #ffece5;
  --text-dark: #1a1a2e;
  --text-medium: #4a4a68;
  --text-light: #6e7191;
  --bg-light: #f8f9fa;
  --bg-dark: #16213e;
  --white: #ffffff;
  --black: #000000;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 30px;
  --box-shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
  --box-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --transition-fast: all 0.3s ease;
  --transition-medium: all 0.5s ease;
  --transition-slow: all 0.8s ease;
  --font-primary: "Noto Sans", sans-serif;
  --font-secondary: "Oswald", sans-serif;
}

/* Breadcrumb */
.breadcrumb-wrapper {
  background-color: var(--bg-light);
  padding: 15px 0;
  border-bottom: 1px solid var(--gray-200);
}

.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 0;
}

.breadcrumb-item a {
  color: var(--text-medium);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--text-light);
}

/* Inventory Header */

.inventory-search {
  max-width: 500px;
  margin-left: auto;
}

.inventory-search .form-control {
  height: 50px;
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  box-shadow: var(--box-shadow-sm);
}

.inventory-search .btn {
  height: 50px;
  width: 50px;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  background-color: var(--primary-color);
  border: none;
  font-size: 18px;
}

.inventory-search .btn:hover {
  background-color: var(--primary-dark);
}

/* Inventory Section */
.inventory-section {
  padding: 20px 0 80px 0px;
  background-color: var(--bg-light);
}

/* Filters */
.filters-wrapper {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  padding: 25px;
  margin-bottom: 30px;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--gray-200);
}

.filters-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-dark);
}

.btn-reset-filters {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-reset-filters:hover {
  color: var(--primary-dark);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.custom-select {
  height: 45px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--gray-300);
  padding: 0 15px;
  font-size: 15px;
  color: var(--text-dark);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e7191' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.custom-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 114, 186, 0.1);
}

.price-slider-wrapper {
  padding: 10px 5px;
}

.price-range {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.price-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

#price-slider {
  height: 6px;
  background-color: var(--gray-300);
  border-radius: 3px;
  position: relative;
  margin-bottom: 20px;
}

#price-slider .ui-slider-range {
  background-color: var(--primary-color);
  height: 100%;
  position: absolute;
  border-radius: 3px;
}

#price-slider .ui-slider-handle {
  width: 18px;
  height: 18px;
  background-color: var(--white);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  position: absolute;
  top: -6px;
  margin-left: -9px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

#price-slider .ui-slider-handle:hover,
#price-slider .ui-slider-handle:focus {
  transform: scale(1.1);
  outline: none;
}

.btn-apply-filters {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-fast);
}

.btn-apply-filters:hover {
  box-shadow: 0 10px 20px rgba(0, 114, 186, 0.2);
  transform: translateY(-3px);
}

/* Featured Car Widget */
.featured-car-widget {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  padding: 25px;
  margin-bottom: 30px;
}

.featured-car-widget h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 15px;
}

.featured-car-widget h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  border-radius: 3px;
}

.featured-car-card {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--box-shadow-sm);
}

.featured-car-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.featured-car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

.featured-car-card:hover .featured-car-image img {
  transform: scale(1.1);
}

.featured-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--accent-color);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  z-index: 1;
}

.featured-car-content {
  padding: 20px;
  background-color: var(--white);
}

.featured-car-content h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.featured-car-content h4 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-fast);
}

.featured-car-content h4 a:hover {
  color: var(--primary-color);
}

.featured-car-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.featured-car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.featured-car-specs .spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--text-medium);
}

.featured-car-specs .spec-item i {
  color: var(--primary-color);
}

.no-featured-car {
  text-align: center;
  padding: 20px 0;
}

.no-featured-car p {
  color: var(--text-medium);
  margin-bottom: 0;
}

/* Help Widget */
.help-widget {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  padding: 25px;
}

.help-widget h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 15px;
}

.help-widget h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  border-radius: 3px;
}

.help-widget p {
  color: var(--text-medium);
  margin-bottom: 20px;
}

.help-contact {
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-item i {
  width: 40px;
  height: 40px;
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 16px;
}

.contact-item a {
  color: var(--text-dark);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.contact-item a:hover {
  color: var(--primary-color);
}

.btn-outline-primary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--border-radius-md);
  padding: 10px 20px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 5px 15px rgba(0, 114, 186, 0.2);
}

/* Inventory Toolbar */
.inventory-toolbar {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  padding: 15px 25px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.results-info {
  color: var(--text-medium);
  font-size: 15px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sort-by {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-by label {
  color: var(--text-medium);
  font-size: 15px;
  margin-bottom: 0;
}

.sort-by .custom-select {
  width: auto;
  min-width: 200px;
  height: 40px;
}

.view-options {
  display: flex;
  gap: 10px;
}

.btn-view {
  width: 40px;
  height: 40px;
  background-color: var(--bg-light);
  border: none;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-medium);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-view:hover,
.btn-view.active {
  background-color: var(--primary-color);
  color: var(--white);
}

/* No Results */
.no-results {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  padding: 50px 30px;
  text-align: center;
}

.no-results-icon {
  width: 80px;
  height: 80px;
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
}

.no-results-icon i {
  font-size: 36px;
  color: var(--primary-color);
}

.no-results h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.no-results p {
  color: var(--text-medium);
  max-width: 600px;
  margin: 0 auto 30px;
}

.no-results .btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-md);
  padding: 12px 30px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.no-results .btn-primary:hover {
  box-shadow: 0 10px 20px rgba(0, 114, 186, 0.2);
  transform: translateY(-3px);
}

/* Car Grid/List View */
.car-view {
  margin-bottom: 40px;
}

.car-item-wrapper {
  margin-bottom: 30px;
}

.car-item {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  overflow: hidden;
  transition: var(--transition-fast);
  height: 100%;
}

.car-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-md);
}

.car-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

.car-item:hover .car-image img {
  transform: scale(1.1);
}

.car-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 700;
  z-index: 1;
}

.car-badge.special-offer {
  background-color: var(--accent-color);
  color: var(--white);
}

.car-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1;
  opacity: 0;
  transform: translateX(20px);
  transition: var(--transition-fast);
}

.car-item:hover .car-actions {
  opacity: 1;
  transform: translateX(0);
}

.car-action {
  width: 35px;
  height: 35px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition-fast);
}

.car-action:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

.car-content {
  padding: 25px;
}

.car-top {
  margin-bottom: 15px;
}

.car-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.car-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-fast);
}

.car-title a:hover {
  color: var(--primary-color);
}

.car-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.car-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-medium);
}

.spec-item i {
  color: var(--primary-color);
  font-size: 16px;
}

.car-description {
  margin-bottom: 20px;
}

.car-description p {
  font-size: 15px;
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 0;
}

.car-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--gray-200);
}

.car-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--text-medium);
}

.car-location i {
  color: var(--primary-color);
}

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-details i {
  transition: var(--transition-fast);
}

.btn-details:hover {
  color: var(--primary-dark);
}

.btn-details:hover i {
  transform: translateX(5px);
}

/* List View Specific Styles */
.list-view .car-item {
  display: flex;
  flex-direction: row;
}

.list-view .car-image {
  width: 35%;
  height: auto;
}

.list-view .car-content {
  width: 65%;
}

.list-view .car-specs {
  grid-template-columns: repeat(4, 1fr);
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination {
  display: flex;
  gap: 5px;
}

.page-item .page-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  color: var(--text-medium);
  border: none;
  background-color: var(--white);
  box-shadow: var(--box-shadow-sm);
  transition: var(--transition-fast);
}

.page-item .page-link:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  color: var(--white);
}

.page-item.disabled .page-link {
  color: var(--gray-400);
  pointer-events: none;
  background-color: var(--gray-100);
}

/* Quick View Modal */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.modal-header {
  background-color: var(--primary-color);
  color: var(--white);
  border-bottom: none;
  padding: 15px 25px;
}

.modal-title {
  font-weight: 700;
}

.modal-header .close {
  color: var(--white);
  opacity: 0.8;
  text-shadow: none;
  transition: var(--transition-fast);
}

.modal-header .close:hover {
  opacity: 1;
}

.modal-body {
  padding: 25px;
}

/* CTA Section */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  position: relative;
  overflow: hidden;
}

.cta-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cta-shapes .shape {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

.cta-shapes .shape-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -100px;
}

.cta-shapes .shape-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -50px;
}

.cta-wrapper {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 60px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-content h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(255, 255, 0.2);
}

.cta-content h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition-fast);
  gap: 10px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-custom i {
  transition: var(--transition-fast);
}

.btn-custom:hover i {
  transform: translateX(5px);
}

.btn-primary-custom {
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
}

.btn-primary-custom:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
  opacity: 0;
  transition: var(--transition-fast);
  z-index: -1;
}

.btn-primary-custom:hover {
  box-shadow: 0 10px 20px rgba(0, 114, 186, 0.3);
  transform: translateY(-3px);
  color: var(--white);
}

.btn-primary-custom:hover:before {
  opacity: 1;
}

.btn-outline-light-custom {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline-light-custom:hover {
  background-color: var(--white);
  color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
  .inventory-title {
    font-size: 32px;
  }

  .cta-wrapper {
    padding: 50px;
  }

  .cta-content h2 {
    font-size: 32px;
  }
}

@media (max-width: 991.98px) {
  .inventory-header {
    padding: 50px 0;
  }

  .inventory-search {
    margin-top: 30px;
    max-width: 100%;
  }

  .list-view .car-item {
    flex-direction: column;
  }

  .list-view .car-image {
    width: 100%;
    height: 220px;
  }

  .list-view .car-content {
    width: 100%;
  }

  .list-view .car-specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-buttons {
    justify-content: center;
    margin-top: 30px;
  }

  .cta-content {
    text-align: center;
  }
}

@media (max-width: 767.98px) {
  .inventory-section {
    padding: 60px 0;
  }

  .inventory-title {
    font-size: 28px;
  }

  .inventory-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .sort-by .custom-select {
    min-width: 150px;
  }

  .car-specs {
    gap: 10px;
  }

  .cta-wrapper {
    padding: 40px 30px;
  }

  .cta-content h2 {
    font-size: 28px;
  }
}

@media (max-width: 575.98px) {
  .inventory-header {
    padding: 40px 0;
  }

  .inventory-title {
    font-size: 24px;
  }

  .inventory-subtitle {
    font-size: 16px;
  }

  .toolbar-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .sort-by {
    width: 100%;
  }

  .sort-by .custom-select {
    flex-grow: 1;
  }

  .view-options {
    width: 100%;
    justify-content: flex-end;
  }

  .car-specs {
    grid-template-columns: 1fr;
  }

  .cta-content h2 {
    font-size: 24px;
  }

  .cta-content p {
    font-size: 16px;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn-custom {
    width: 100%;
  }
}
