/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #eee;
  color: #333;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== HEADER ===== */
.header {
  background-color: #233143;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.header-nav a {
  color: #ccc;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: #fff;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  padding: 8px 22px;
  border: 2px solid #fff;
  border-radius: 25px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.header-contact:hover {
  background: #fff;
  color: #233143;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  display: flex;
  gap: 24px;
  padding: 24px 0;
}

/* ===== SIDEBAR FILTERS ===== */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.filter-box {
  background: #fff;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: sticky;
  top: 72px;
}

.filter-title {
  font-size: 22px;
  font-weight: 800;
  color: #233143;
  margin-bottom: 20px;
  text-transform: uppercase;
}

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

.filter-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  color: #555;
  background: #fff;
  transition: border-color 0.2s;
  text-transform: uppercase;
}

.filter-group input::placeholder {
  text-transform: uppercase;
  color: #aaa;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #233143;
}

.filter-group .filter-row {
  display: flex;
  gap: 10px;
}

.filter-group .filter-row select,
.filter-group .filter-row input {
  flex: 1;
}

.filter-search-wrapper {
  position: relative;
}

.filter-search-wrapper input {
  padding-right: 40px;
}

.filter-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #555;
  font-size: 16px;
  cursor: pointer;
}

.filter-type-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-type-tab {
  padding: 6px 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: all 0.2s;
  font-weight: 500;
}

.filter-type-tab:hover,
.filter-type-tab.active {
  background: #233143;
  color: #fff;
  border-color: #233143;
}

.filter-type-tab.active::before {
  content: "\00d7  ";
  font-weight: 700;
}

.filter-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 16px 0;
}

/* Collapsible filter sections */
.filter-collapsible {
  margin-bottom: 8px;
}

.filter-collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  border-bottom: 1px solid #eee;
}

.filter-collapsible-header i {
  font-size: 12px;
  transition: transform 0.2s;
  color: #888;
}

.filter-collapsible-header.open i {
  transform: rotate(180deg);
}

.filter-collapsible-body {
  display: none;
  padding: 10px 0;
}

.filter-collapsible-body.show {
  display: block;
}

.btn-filter {
  width: 100%;
  padding: 12px;
  background: #233143;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
  text-transform: uppercase;
}

.btn-filter:hover {
  background: #1a2535;
}

.btn-clear {
  width: 100%;
  padding: 12px;
  background: #233143;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-clear:hover {
  background: #1a2535;
}

.btn-clear i {
  font-size: 14px;
}

/* Checkbox */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 14px;
  color: #555;
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* Mobile filter toggle */
.filter-toggle-mobile {
  display: none;
  width: 100%;
  padding: 12px;
  background: #233143;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
}

/* ===== VEHICLE SECTION ===== */
.vehicle-section {
  flex: 1;
  min-width: 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.results-count {
  font-size: 15px;
  color: #555;
  font-weight: 500;
}

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

.results-sort select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: #555;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ===== VEHICLE CARD ===== */
.vehicle-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.vehicle-card.featured {
  border: 2px solid #e8a900;
  border-radius: 8px;
}

.card-img {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #f0f0f0;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-featured {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #233143;
  color: #fff;
  padding: 3px 12px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #233143;
  font-size: 14px;
  cursor: pointer;
}

.card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-model {
  font-size: 13px;
  font-weight: 800;
  color: #233143;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.card-year {
  font-size: 13px;
  color: #555;
  margin-bottom: 1px;
}

.card-store {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.card-city {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}

.card-price {
  font-size: 20px;
  font-weight: 800;
  color: #233143;
  margin-bottom: 8px;
  margin-top: auto;
}

.card-price span {
  font-size: 13px;
  font-weight: 600;
  margin-right: 2px;
}

.card-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #888;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.card-km,
.card-fuel {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  text-transform: uppercase;
}

/* ===== DETAIL PAGE ===== */
.detail-container {
  padding: 20px 0 40px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #233143;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.detail-back:hover {
  color: #1a2535;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

/* Gallery */
.gallery {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.gallery-main {
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  gap: 4px;
  padding: 8px;
  overflow-x: auto;
  background: #f5f5f5;
}

.gallery-thumb {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: #233143;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Vehicle Info */
.detail-info {
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.detail-model {
  font-size: 20px;
  font-weight: 800;
  color: #233143;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.detail-year-city {
  font-size: 14px;
  color: #777;
  margin-bottom: 16px;
}

.detail-price {
  font-size: 28px;
  font-weight: 800;
  color: #233143;
  margin-bottom: 20px;
}

.detail-price span {
  font-size: 16px;
}

/* Contact buttons */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 10px;
}

.btn-whatsapp:hover {
  background: #1fb855;
}

.btn-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: #233143;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 20px;
}

.btn-phone:hover {
  background: #1a2535;
}

/* Specs table */
.specs-title {
  font-size: 16px;
  font-weight: 700;
  color: #233143;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

.specs-table {
  width: 100%;
}

.specs-table tr {
  border-bottom: 1px solid #f5f5f5;
}

.specs-table td {
  padding: 10px 0;
  font-size: 14px;
}

.specs-table td:first-child {
  color: #999;
  width: 40%;
}

.specs-table td:last-child {
  color: #333;
  font-weight: 600;
}

/* Contact form */
.contact-form {
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-top: 24px;
}

.contact-form h3 {
  font-size: 16px;
  font-weight: 700;
  color: #233143;
  margin-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
  font-family: inherit;
}

.contact-form textarea {
  height: 80px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #233143;
}

.btn-send {
  width: 100%;
  padding: 12px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-send:hover {
  background: #1fb855;
}

/* ===== TRUST BAR (TOP - MARQUEE) ===== */
.trust-bar {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0;
  overflow: hidden;
}

.trust-track {
  display: flex;
  animation: trustScroll 25s linear infinite;
  width: max-content;
}

.trust-track:hover {
  animation-play-state: paused;
}

.trust-items {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 20px;
  white-space: nowrap;
}

.trust-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #233143;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.trust-item span {
  font-size: 12px;
  font-weight: 600;
  color: #444;
}

.trust-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  margin: 0 6px;
}

@keyframes trustScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== FOOTER ===== */
.footer {
  background: #233143;
  color: #ccc;
  padding: 30px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 25px;
}

.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 14px;
}

.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 12px;
}

.footer p,
.footer li {
  font-size: 13px;
  line-height: 1.8;
}

.footer a {
  color: #aaa;
  transition: color 0.2s;
}

.footer a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ccc;
  transition: all 0.2s;
}

.footer-social a:hover {
  background: #fff;
  color: #233143;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 15px 0;
  text-align: center;
  font-size: 12px;
  color: #888;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 16px 0;
}

.pagination-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #555;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: #f0f0f0;
  border-color: #233143;
  color: #233143;
}

.pagination-btn.active {
  background: #233143;
  color: #fff;
  border-color: #233143;
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination-dots {
  min-width: 30px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* ===== BADGE VERIFIED ===== */
.badge-verified {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(37,211,102,0.9);
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== CARD VIEWS ===== */
.card-views {
  font-size: 10px;
  color: #999;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-views i {
  font-size: 10px;
  color: #bbb;
}

/* ===== FADE IN ANIMATION ===== */
.vehicle-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInCard 0.4s ease forwards;
}

@keyframes fadeInCard {
  to { opacity: 1; transform: translateY(0); }
}

.vehicle-card:nth-child(1) { animation-delay: 0s; }
.vehicle-card:nth-child(2) { animation-delay: 0.05s; }
.vehicle-card:nth-child(3) { animation-delay: 0.1s; }
.vehicle-card:nth-child(4) { animation-delay: 0.15s; }
.vehicle-card:nth-child(5) { animation-delay: 0.2s; }
.vehicle-card:nth-child(6) { animation-delay: 0.25s; }
.vehicle-card:nth-child(7) { animation-delay: 0.3s; }
.vehicle-card:nth-child(8) { animation-delay: 0.35s; }
.vehicle-card:nth-child(9) { animation-delay: 0.4s; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: #233143;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  background: #e8a900;
  transform: scale(1.1);
}

/* ===== SSL BADGE FOOTER ===== */
.footer-ssl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-ssl i {
  color: #25D366;
  font-size: 18px;
}

.footer-ssl span {
  font-size: 11px;
  color: #999;
  line-height: 1.4;
}

/* ===== NO RESULTS ===== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ddd;
}

.no-results p {
  font-size: 16px;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 992px) {
  .vehicle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .gallery-main {
    height: 320px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #233143;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .header-nav.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 12px 0;
    gap: 12px;
  }

  .sidebar {
    width: 100%;
  }

  .filter-box {
    display: none;
    position: relative;
    top: 0;
  }

  .filter-box.show {
    display: block;
  }

  .filter-toggle-mobile {
    display: flex;
  }

  .vehicle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card-img {
    height: 150px;
  }

  .card-body {
    padding: 10px;
  }

  .card-model {
    font-size: 11px;
  }

  .card-price {
    font-size: 16px;
  }

  .card-price span {
    font-size: 10px;
  }

  .card-year,
  .card-store,
  .card-city {
    font-size: 11px;
  }

  .card-details {
    font-size: 10px;
  }

  .detail-model {
    font-size: 16px;
  }

  .detail-price {
    font-size: 22px;
  }

  .gallery-main {
    height: 260px;
  }

  .gallery-thumb {
    width: 60px;
    height: 45px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .results-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
  }

  .results-sort {
    width: 100%;
  }

  .results-sort select {
    width: 100%;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .vehicle-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .card-img {
    height: 120px;
  }

  .card-body {
    padding: 8px;
  }

  .card-model {
    font-size: 10px;
  }

  .card-price {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .card-year {
    font-size: 10px;
  }

  .card-store,
  .card-city {
    display: none;
  }

  .card-details {
    font-size: 9px;
    padding-top: 4px;
  }

  .header-logo {
    font-size: 20px;
  }

  .gallery-main {
    height: 200px;
  }
}
