/* =============================================
   DEALERSHIP VEHICLES - Estilo profesional
   ============================================= */

/* --- GLOBAL --- */
:root {
  --dv-primary: #0E5EF3;
  --dv-primary-dark: #0a4ad0;
  --dv-dark: #1a1a2e;
  --dv-gray: #6c757d;
  --dv-light: #f8f9fa;
  --dv-border: #e0e0e0;
  --dv-radius: 10px;
  --dv-shadow: 0 2px 12px rgba(0,0,0,.08);
  --dv-shadow-hover: 0 8px 28px rgba(14,94,243,.18);
}

/* --- BÚSQUEDA --- */
.dv-search-form {
  background: linear-gradient(135deg, var(--dv-dark) 0%, #16213e 100%);
  padding: 28px 24px;
  border-radius: var(--dv-radius);
  margin-bottom: 30px;
  box-shadow: var(--dv-shadow);
}

.dv-search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.dv-search-fields input[type="text"],
.dv-search-fields input[type="number"],
.dv-search-fields select {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255,255,255,.95);
  color: #333;
  transition: border .2s;
}

.dv-search-fields input:focus,
.dv-search-fields select:focus {
  border-color: var(--dv-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14,94,243,.2);
}

.dv-range-fields {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.dv-range-fields input { flex: 1; min-width: 70px; }

.dv-search-btn {
  background: var(--dv-primary);
  color: #fff;
  border: none;
  padding: 10px 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: background .2s, transform .1s;
}

.dv-search-btn:hover { background: var(--dv-primary-dark); transform: translateY(-1px); }
.dv-search-btn:active { transform: translateY(0); }

/* --- HORIZONTAL SCROLL --- */
.dv-horizontal {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.dv-horizontal::-webkit-scrollbar { height: 8px; }
.dv-horizontal::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 4px; }
.dv-horizontal::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.dv-horizontal::-webkit-scrollbar-thumb:hover { background: #999; }

.dv-horizontal .dv-card {
  flex: 0 0 calc(100% / 3 - 14px);
  min-width: 260px;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .dv-horizontal .dv-card { flex: 0 0 280px; }
}

/* --- GRID DE TARJETAS --- */
.dv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.dv-card {
  background: #fff;
  border-radius: var(--dv-radius);
  overflow: hidden;
  box-shadow: var(--dv-shadow);
  transition: transform .25s, box-shadow .25s;
  position: relative;
}

.dv-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--dv-shadow-hover);
}

.dv-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.dv-card-body {
  padding: 20px 18px 18px;
}

.dv-card-body .dv-card-title {
  margin: 0 0 10px;
  font-size: 1.1em;
  line-height: 1.3;
}

.dv-card-body .dv-card-title a {
  text-decoration: none;
  color: var(--dv-dark);
  font-weight: 700;
}

.dv-card-body .dv-card-title a:hover { color: var(--dv-primary); }

.dv-card-body .dv-card-price {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--dv-primary);
  margin: 6px 0;
}

.dv-card-body .dv-card-price-old {
  font-size: .85em;
  color: var(--dv-gray);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.dv-card-body .dv-card-meta {
  color: var(--dv-gray);
  font-size: .85em;
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  line-height: 1.5;
}

.dv-card-body .dv-card-link {
  display: inline-block;
  margin-top: 12px;
  padding: 9px 22px;
  background: var(--dv-primary);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: .85em;
  font-weight: 600;
  transition: background .2s;
}

.dv-card-body .dv-card-link:hover { background: var(--dv-primary-dark); }

/* --- TARJETA: estilos base (no duplicar dentro de .dv-card-body) --- */



/* --- SINGLE VEHÍCULO --- */
.dv-single-wrap {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.dv-single-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
}

@media (max-width: 900px) {
  .dv-single-grid { grid-template-columns: 1fr; }
}

/* --- GALERÍA --- */
.dv-gallery-section { position: relative; }

.dv-gallery-main {
  position: relative;
  background: #000;
  border-radius: var(--dv-radius);
  overflow: hidden;
}

.dv-gallery-viewport { overflow: hidden; }

.dv-gallery-track {
  display: flex;
  transition: transform .4s ease;
}

.dv-gallery-slide {
  min-width: 100%;
  line-height: 0;
}

.dv-gallery-slide img {
  width: 100%;
  height: 450px;
  object-fit: contain;
  background: #111;
}

@media (max-width: 600px) {
  .dv-gallery-slide img { height: 280px; }
}

.dv-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  font-size: 2.2em;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s;
}

.dv-gallery-nav:hover { background: rgba(0,0,0,.8); }
.dv-gallery-prev { left: 12px; }
.dv-gallery-next { right: 12px; }

.dv-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dv-thumb {
  flex: 0 0 80px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  opacity: .5;
  transition: all .2s;
}

.dv-thumb:hover { opacity: .8; }
.dv-thumb.active { border-color: var(--dv-primary); opacity: 1; }

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

.dv-no-image {
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1.1em;
  background: #222;
}

/* --- INFO VEHÍCULO --- */
.dv-badge-container {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.dv-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--dv-light);
  color: var(--dv-dark);
  border: 1px solid var(--dv-border);
}

.dv-badge-dest {
  background: var(--dv-primary);
  color: #fff;
  border-color: var(--dv-primary);
}

.dv-title {
  font-size: 1.6em;
  margin: 0 0 4px;
  color: var(--dv-dark);
}

.dv-subtitle {
  font-size: 1em;
  color: var(--dv-gray);
  margin: 0 0 12px;
}

.dv-precio-anterior {
  font-size: 1.05em;
  color: var(--dv-gray);
  text-decoration: line-through;
}

.dv-precio {
  font-size: 2em;
  font-weight: 800;
  color: var(--dv-primary);
  margin: 6px 0 18px;
}

.dv-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: .95em;
  transition: all .2s;
}

.dv-btn-phone {
  background: var(--dv-primary);
  color: #fff;
}

.dv-btn-phone:hover { background: var(--dv-primary-dark); color: #fff; }

.dv-btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.dv-btn-whatsapp:hover { background: #1da851; color: #fff; }

/* --- FEATURES GRID --- */
.dv-grid-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.dv-feature {
  background: var(--dv-light);
  border: 1px solid var(--dv-border);
  border-radius: 6px;
  padding: 10px 14px;
  text-align: center;
}

.dv-feature-value {
  display: block;
  font-weight: 700;
  font-size: .95em;
  color: var(--dv-dark);
}

.dv-feature-label {
  display: block;
  font-size: .75em;
  color: var(--dv-gray);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 2px;
}

/* --- DESCRIPCIÓN --- */
.dv-desc-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--dv-border);
}

.dv-desc-section h2 {
  font-size: 1.3em;
  margin: 0 0 16px;
  color: var(--dv-dark);
}

.dv-desc-content {
  line-height: 1.8;
  color: #444;
}

/* --- CATEGORY WIDGET --- */
.dv-category-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.dv-cat-group {
  background: #fff;
  border-radius: var(--dv-radius);
  padding: 20px;
  box-shadow: var(--dv-shadow);
}

.dv-cat-title {
  margin: 0 0 14px;
  font-size: 1em;
  color: var(--dv-dark);
  border-bottom: 2px solid var(--dv-primary);
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.dv-cat-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dv-cat-item {
  background: var(--dv-light);
  border: 1px solid var(--dv-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .82em;
  text-decoration: none;
  color: #555;
  transition: all .2s;
}

.dv-cat-item:hover {
  background: var(--dv-primary);
  color: #fff;
  border-color: var(--dv-primary);
}

.dv-count { font-size: .8em; color: var(--dv-gray); }

/* --- WIDGETS --- */
.dv-widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dv-widget-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--dv-border);
}

.dv-widget-list li:last-child { border-bottom: none; }

.dv-widget-list li a {
  text-decoration: none;
  color: #555;
  font-size: .9em;
}

.dv-widget-list li a:hover { color: var(--dv-primary); }

.dv-featured-widget .dv-featured-item {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--dv-border);
}

.dv-featured-widget .dv-featured-item:last-child { border-bottom: none; }

.dv-featured-widget .dv-featured-item h4 {
  margin: 8px 0 4px;
  font-size: .9em;
}

.dv-featured-widget .dv-featured-item h4 a {
  text-decoration: none;
  color: var(--dv-dark);
}

.dv-featured-widget .dv-featured-item h4 a:hover { color: var(--dv-primary); }

.dv-price {
  font-weight: 700;
  color: var(--dv-primary);
  font-size: 1.05em;
}

/* --- LOADING --- */
.dv-loading {
  text-align: center;
  padding: 50px;
  font-size: 1.1em;
  color: var(--dv-gray);
}

.dv-loading::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-left: 10px;
  border: 3px solid var(--dv-border);
  border-top-color: var(--dv-primary);
  border-radius: 50%;
  animation: dv-spin .6s linear infinite;
  vertical-align: middle;
}

@keyframes dv-spin { to { transform: rotate(360deg); } }

/* --- ARCHIVE --- */
.dv-archive {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.dv-archive h1 {
  font-size: 1.8em;
  color: var(--dv-dark);
  margin-bottom: 24px;
}

/* --- SHARE --- */
.dv-share {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--dv-border);
  font-size: .88em;
  color: var(--dv-gray);
}

.dv-share a {
  color: var(--dv-primary);
  text-decoration: none;
  margin-left: 8px;
  font-weight: 600;
}

.dv-share a:hover { text-decoration: underline; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .dv-search-fields { flex-direction: column; }
  .dv-search-fields input,
  .dv-search-fields select { width: 100%; }
  .dv-range-fields { flex-direction: column; }
  .dv-category-widgets { grid-template-columns: 1fr; }
  .dv-grid-features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .dv-grid-features { grid-template-columns: 1fr; }
  .dv-actions { flex-direction: column; }
  .dv-btn { justify-content: center; }
}
