/* ============================================
   ATODOCAR — Additional Styles
   Vehicle Detail + Search Results Page
   ============================================ */

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-sub); font-weight: 500; }

/* ─── PAGE HEADER ─── */
.page-header {
  padding: calc(var(--nav-height) + 32px) 0 0;
}

/* ─── GALLERY ─── */
.gallery-section { margin-bottom: 40px; }

.gallery-main {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: zoom-in;
  margin-bottom: 10px;
  scroll-margin-top: var(--nav-height);
  max-height: calc(100vh - var(--nav-height) - 90px); /* 90px ≈ miniaturas + margen */
}

/* Pantallas con poca altura (25" 1080p ≈ ~940px viewport, ≤1920px ancho) → recorte mayor */
@media (max-height: 1080px) and (max-width: 2100px) {
  .gallery-main {
    max-height: calc(100vh - var(--nav-height) - 200px);
  }
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-main:hover img { transform: scale(1.02); }

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(7,11,21,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}
.gallery-nav-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--bg-base); }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }

.gallery-counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(7,11,21,0.75);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  z-index: 2;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.gallery-thumb:hover { border-color: var(--border-accent); }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── GALLERY MEDIA BADGE & VIDEO THUMB ─── */
.gallery-media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(7, 11, 21, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  pointer-events: none;
}
.gallery-thumb-video {
  position: relative;
  overflow: hidden;
}
.gallery-thumb-video .thumb-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: var(--transition);
}
.gallery-thumb-video:hover .thumb-video-overlay {
  background: rgba(0,0,0,0.35);
}
.gallery-thumb-video.active {
  border-color: #f59e0b;
}
.gallery-thumb-video .thumb-play-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  padding-left: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}
.gallery-thumb-video:hover .thumb-play-icon {
  transform: scale(1.15);
}
.gallery-thumb-video .thumb-vip-tag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fbbf24;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; color: white;
  transition: var(--transition);
}
.lightbox-close:hover { background: var(--danger); }

/* ─── DETAIL LAYOUT ─── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.detail-sticky {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

/* ─── VEHICLE TITLE AREA ─── */
.vehicle-title-area { margin-bottom: 24px; }

.vt-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.vt-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  line-height: 1.2;
  word-spacing: 2px;
}

.vt-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.vt-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-sub);
}

/* ─── SPEC PILLS ─── */
.spec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.spec-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-sub);
  transition: var(--transition);
}
.spec-pill:hover { border-color: var(--border-accent); color: var(--text-primary); }
.spec-pill .pill-icon { font-size: 18px; }
.spec-pill .pill-label { font-size: 11px; color: var(--text-muted); display: block; }
.spec-pill .pill-value { font-weight: 600; color: var(--text-primary); display: block; }

/* ─── DGT SECTION ─── */
.dgt-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.dgt-label-big {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
  flex-shrink: 0;
}
.dgt-label-big.lbl-0   { background: var(--dgt-zero); color: white; }
.dgt-label-big.lbl-eco { background: var(--dgt-eco);  color: white; }
.dgt-label-big.lbl-c   { background: var(--dgt-c);    color: #1a1a1a; }
.dgt-label-big.lbl-b   { background: var(--dgt-b);    color: white; }

.dgt-info { flex: 1; }
.dgt-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.dgt-desc  { font-size: 13px; color: var(--text-muted); }

.zbe-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--warning-bg);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.zbe-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.zbe-text { font-size: 13px; color: var(--warning); line-height: 1.6; }

/* ─── PRICE HISTORY CHART ─── */
.price-history {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.ph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ph-title { font-size: 15px; font-weight: 600; }
.ph-change {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.ph-change.down { background: var(--success-bg); color: var(--success); }
.ph-change.up   { background: var(--danger-bg); color: var(--danger); }

.ph-chart-area {
  position: relative;
  height: 80px;
  width: 100%;
}

.ph-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ph-timeline {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.ph-timeline span { font-size: 11px; color: var(--text-muted); }

/* ─── DESCRIPTION ─── */
.description-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.desc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.desc-title { font-size: 15px; font-weight: 600; }

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(0,212,255,0.1));
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: #818CF8;
}

.desc-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* ─── EXTRAS GRID ─── */
.extras-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 40px;
}

.extras-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

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

.extra-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
}
.extra-item .extra-icon { font-size: 16px; }

/* ─── CONTACT PANEL ─── */
.contact-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.cp-price {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cp-price-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 8px;
}

.cp-price-monthly {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cp-thermo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.cp-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cp-seller-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 2px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.cp-seller-info .cp-seller-name { font-size: 15px; font-weight: 600; }
.cp-seller-info .cp-seller-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--success); font-weight: 600;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.form-input, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  width: 100%;
  resize: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-contact {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--bg-base);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn-contact:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 24px rgba(0,212,255,0.4);
  transform: translateY(-1px);
}

.cp-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.cp-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-outline-sm {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: none;
}
.btn-outline-sm:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ─── SIMILAR VEHICLES ─── */
.similar-section { padding: 60px 0; }

/* ─── SEARCH PAGE ─── */
.search-page { padding: calc(var(--nav-height) + 32px) 0 80px; }

.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}
.search-layout.sidebar-collapsed {
  grid-template-columns: 0 1fr;
  gap: 0;
}
.search-layout.sidebar-collapsed .sidebar {
  display: none;
}
/* Desktop sidebar toggle button */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.sidebar-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.sidebar-toggle-btn.active { background: var(--primary); color: var(--bg-base); border-color: var(--primary); }
@media (max-width: 1024px) {
  .sidebar-toggle-btn { display: none; }
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-height: calc(100vh - var(--nav-height) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-reset {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
}

.filter-group { margin-bottom: 24px; }
.filter-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-select {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 36px 10px 14px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' 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 14px center;
  background-size: 14px;
}
.filter-select:hover {
  border-color: var(--border-accent);
}
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.filter-select option {
  background-color: #0d1424;
  color: #f1f5f9;
  padding: 8px 12px;
}

.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sub);
  transition: var(--transition);
}
.filter-checkbox:hover { color: var(--text-primary); }

.filter-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-checkbox .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

/* Range slider */
.range-group { margin-bottom: 8px; }
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.range-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Search header */
.search-header {
  position: relative;
  z-index: 100;
  margin-bottom: 20px;
}

.search-header-top {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.search-header-input-wrap {
  position: relative;
  z-index: 100;
  flex: 1;
}

.search-header-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 11px 20px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.search-header-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.results-info { font-size: 14px; color: var(--text-muted); }
.results-info strong { color: var(--text-primary); }

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}
.sort-select:focus { border-color: var(--primary); }

/* Active filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* Smart search feedback banner */
.search-smart-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-primary);
  animation: fadeIn 0.25s ease-out;
}
.search-smart-notice .badge-ai {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.active-filter-tag:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.active-filter-tag .remove { font-size: 14px; line-height: 1; }

/* Search grid - 3 columns */
.search-vehicles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Load more */
.load-more-wrapper { text-align: center; margin-top: 32px; }
.btn-load-more {
  padding: 13px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}
.btn-load-more:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── MAP placeholder ─── */
.map-placeholder {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.map-placeholder .map-icon { font-size: 32px; }

/* ─── RESPONSIVE DETAIL ─── */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sticky { position: static; }
  .extras-grid { grid-template-columns: repeat(2, 1fr); }
  .search-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .search-vehicles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .spec-pills { gap: 8px; }
  .extras-grid { grid-template-columns: repeat(2, 1fr); }
  .search-vehicles-grid { grid-template-columns: 1fr; }
  .vt-name { font-size: 24px; }
  .cp-price-amount { font-size: 30px; }
}

/* ─── DESKTOP DENSITY ≤1600px (1080p) ─── */
@media (max-width: 1600px) {
  .detail-layout { gap: 24px; }
  .gallery-section { width: 70%; margin-inline: auto; margin-bottom: 28px; }
  .gallery-main { aspect-ratio: 16/9; max-height: none; }
  .vehicle-title-area { margin-bottom: 18px; }
  .vt-name { font-size: 27px; }
  .spec-pills { margin: 14px 0; }
  .similar-section { padding: 36px 0; }
  .search-page { padding-bottom: 48px; }
  .map-placeholder { height: 140px; margin-bottom: 18px; }
  .search-layout { gap: 20px; }
  .sidebar { padding: 20px; }
  .filter-group { margin-bottom: 18px; }
}

/* Pantallas bajas: los filtros nunca empujan el contacto fuera de vista */
@media (max-height: 900px) {
  .sidebar { max-height: calc(100vh - var(--nav-height) - 24px); }
}
