/* ============================================
   ATODOCAR — Design System
   Dark Mode · Electric Blue · Premium
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

/* ─── Variables ─── */
:root {
  --primary:        #00D4FF;
  --primary-dark:   #0099BB;
  --primary-glow:   rgba(0, 212, 255, 0.15);
  --primary-glow2:  rgba(0, 212, 255, 0.05);

  --bg-base:        #070B15;
  --bg-card:        #0D1424;
  --bg-elevated:    #111827;
  --bg-input:       #141e30;
  --bg-hover:       #1a2540;
  --border:         rgba(255,255,255,0.07);
  --border-accent:  rgba(0, 212, 255, 0.25);

  --text-primary:   #F1F5F9;
  --text-muted:     #64748B;
  --text-sub:       #94A3B8;

  --success:        #10B981;
  --success-bg:     rgba(16,185,129,0.12);
  --warning:        #F59E0B;
  --warning-bg:     rgba(245,158,11,0.12);
  --danger:         #EF4444;
  --danger-bg:      rgba(239,68,68,0.12);

  /* DGT Labels */
  --dgt-zero:       #3B82F6;
  --dgt-eco:        #22C55E;
  --dgt-c:          #F59E0B;
  --dgt-b:          #EF4444;

  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-full:    999px;

  --shadow-sm:      0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:      0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow:    0 0 40px rgba(0,212,255,0.2);
  --shadow-card:    0 4px 24px rgba(0,0,0,0.5);

  --transition:     all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height:     68px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ─── Container ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── NAVIGATION ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
  padding: 0 32px;
}

.nav.scrolled {
  background: rgba(7,11,21,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 16px;
}

/* Links absolutely centered so they're always in the middle regardless of logo/actions widths */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
  /* prevent overlap: pointer events still work, just visually layered */
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: var(--bg-base);
  box-shadow: 0 0 20px rgba(0,212,255,0.4);
}

.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text span { color: var(--primary); }

.logo-img {
  height: 64px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: #f2a950;
  transition: var(--transition);
}

.nav-link:hover {
  color: #ffbe6b;
  background: rgba(242, 169, 80, 0.12);
}

.nav-link.active {
  color: #f2a950;
  background: rgba(242, 169, 80, 0.16);
  box-shadow: inset 0 0 0 1px rgba(242, 169, 80, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 10;
}

.nav-actions #btnLogin,
.nav-mobile-auth .btn-ghost {
  color: #f2a950;
  font-weight: 700;
  transition: var(--transition);
}

.nav-actions #btnLogin:hover,
.nav-mobile-auth .btn-ghost:hover {
  color: #ffbe6b;
  background: rgba(242, 169, 80, 0.12);
}

/* Mobile-only auth section in hamburger dropdown — hidden on desktop */
.nav-mobile-auth { display: none; }

/* ─── HAMBURGER MENU ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #f2a950;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-base);
  box-shadow: 0 0 0 0 rgba(0,212,255,0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 30px rgba(0,212,255,0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-height) + 60px) 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

@media (min-width: 2560px) {
  .hero-bg img { object-position: center 30%; }
  .hero-content { max-width: 1100px; }
}

@media (min-width: 1440px) and (max-width: 2559px) {
  .hero-bg img { object-position: center 20%; }
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7,11,21,0.55) 0%,
    rgba(7,11,21,0.4) 40%,
    rgba(7,11,21,0.85) 75%,
    rgba(7,11,21,1) 100%
  );
}

/* ─── HERO LOGO ─── */
/* Posición fija: 20px bajo el navbar, 20px desde el borde izquierdo */
/* z-index por debajo del contenido del hero — el texto flota sobre el logo */
.hero-logo {
  position: absolute;
  top: calc(var(--nav-height) + 20px);
  left: 20px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

/* BASE: tamaño para 1080p y monitores estándar */
.hero-logo img {
  height: clamp(200px, 20vh, 230px);
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.55)) drop-shadow(0 0 24px rgba(0,212,255,0.12));
  transition: filter 0.25s ease;
}

/* Ultrawide 2K y superiores: logo grande */
@media (min-width: 1921px) {
  .hero-logo img {
    height: clamp(260px, 30vh, 440px);
  }
}

.hero-logo:hover img {
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6)) drop-shadow(0 0 32px rgba(0,212,255,0.22));
}


/* Animated glow orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,0.15), transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
  bottom: 0; right: -50px;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 50;
  text-align: center;
  max-width: 860px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0,212,255,0.1);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 28px;
  animation: fadeSlideDown 0.6s ease both;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeSlideDown 0.6s ease 0.1s both;
  text-align: center;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary), #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: #d6c8b4;
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeSlideDown 0.6s ease 0.2s both;
}
.hero-sub .hero-hl {
  color: var(--primary);
  font-weight: 600;
}
.hero-sub .hero-key {
  color: #f2a950;
  font-weight: 700;
}

/* ─── SEARCH BOX ─── */
.search-wrapper {
  position: relative;
  z-index: 100;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 24px;
  animation: fadeSlideDown 0.6s ease 0.3s both;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(13,20,36,0.95);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 8px 8px 8px 24px;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 0 rgba(0,212,255,0.2);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,212,255,0.2);
}

.search-icon {
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0.7;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  min-width: 0;
}

.search-input::placeholder { color: var(--text-muted); }

.search-btn {
  flex-shrink: 0;
  background: var(--primary);
  color: var(--bg-base);
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 20px rgba(0,212,255,0.4);
}

/* ─── TYPEAHEAD AUTOCOMPLETE DROPDOWN ─── */
.typeahead-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0d1424 !important;
  border: 1.5px solid var(--border-accent, rgba(0, 212, 255, 0.35));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 212, 255, 0.18);
  z-index: 99999;
  padding: 12px;
  max-height: 460px;
  overflow-y: auto;
  text-align: left;
}

.typeahead-section {
  margin-bottom: 12px;
}
.typeahead-section:last-child {
  margin-bottom: 0;
}

.typeahead-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.typeahead-car-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
  text-decoration: none;
}
.typeahead-car-item:hover,
.typeahead-car-item.active {
  background: rgba(0, 212, 255, 0.1);
  outline: 1px solid var(--border-accent, rgba(0, 212, 255, 0.35));
}
.typeahead-car-thumb {
  width: 54px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
}
.typeahead-car-info {
  flex: 1;
  min-width: 0;
}
.typeahead-car-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.typeahead-car-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.typeahead-car-meta .price {
  color: var(--primary, #00d4ff);
  font-weight: 700;
}

.typeahead-sugg-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.typeahead-sugg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: var(--transition, all 0.15s ease);
}
.typeahead-sugg-item:hover,
.typeahead-sugg-item.active {
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary, #00d4ff);
}
.typeahead-sugg-item .icon {
  font-size: 14px;
  opacity: 0.8;
}

.typeahead-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-transform: none;
  letter-spacing: normal;
}
.typeahead-clear-btn:hover {
  color: var(--danger, #ef4444);
}

.search-suggestions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  animation: fadeSlideDown 0.6s ease 0.4s both;
}

.suggestion-pill {
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.suggestion-pill:hover {
  background: var(--primary-glow);
  border-color: var(--border-accent);
  color: var(--primary);
}

/* ─── QUICK FILTERS (hero) ─── */
.quick-filters {
  width: 100%;
  max-width: 760px;
  margin: 20px auto 0;
  background: rgba(13,20,36,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 20px 14px;
  animation: fadeSlideDown 0.6s ease 0.5s both;
}

.qf-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.qf-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}
.qf-tab:hover { color: var(--text-primary); }
.qf-tab.active {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--border-accent);
}

.qf-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.qf-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}
.qf-chip:hover {
  background: var(--primary-glow);
  border-color: var(--border-accent);
  color: var(--primary);
  transform: translateY(-1px);
}

.qf-advanced {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  transition: var(--transition);
}
.qf-advanced:hover { color: var(--primary); }

@media (max-width: 768px) {
  .quick-filters { padding: 14px 16px 12px; }
  .qf-chip { font-size: 12px; padding: 5px 11px; }
}

/* ─── STATS STRIP ─── */
.stats-strip {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
  animation: fadeSlideDown 0.6s ease 0.5s both;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-number span { color: var(--primary); }

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── CATEGORY SECTION ─── */
.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-title span { color: var(--primary); }

.see-all {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.see-all:hover { gap: 8px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.category-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.category-card.active {
  background: var(--primary-glow);
  border-color: var(--primary);
}

.category-icon {
  font-size: 28px;
  line-height: 1;
}

.category-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.category-count {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── VEHICLE CARDS ─── */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.vehicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.vehicle-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.vehicle-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
}

.vehicle-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-card-img img {
  transform: scale(1.06);
}

.reserved-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-dgt-0   { background: var(--dgt-zero); color: white; }
.badge-dgt-eco { background: var(--dgt-eco); color: white; }
.badge-dgt-c   { background: var(--dgt-c); color: #1a1a1a; }
.badge-dgt-b   { background: var(--dgt-b); color: white; }

.badge-new {
  background: rgba(99,102,241,0.9);
  color: white;
}

.card-save {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(7,11,21,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  opacity: 0;
}

.vehicle-card:hover .card-save { opacity: 1; }

.card-save:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.card-save.saved { opacity: 1; color: var(--danger); border-color: var(--danger); }

.vehicle-card-body {
  padding: 16px;
}

.card-brand {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-specs {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.card-spec {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-spec-icon { font-size: 11px; }

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

.card-price {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.card-price-monthly {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Price thermometer */
.price-thermo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.thermo-deal {
  background: var(--success-bg);
  color: var(--success);
}

.thermo-fair {
  background: var(--warning-bg);
  color: var(--warning);
}

.thermo-high {
  background: var(--danger-bg);
  color: var(--danger);
}

.card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ─── FEATURES / HOW IT WORKS ─── */
.features-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg-base) 0%, rgba(0,212,255,0.02) 50%, var(--bg-base) 100%);
}

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

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow2), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover::before { opacity: 1; }

.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

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

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

/* ─── CTA SELL BANNER ─── */
.sell-banner {
  margin: 0 0 80px;
}

.sell-banner-inner {
  background: linear-gradient(135deg, #0D1F3C 0%, #0D2440 50%, #0A1628 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 64px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.sell-banner-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,0.08), transparent 60%);
  pointer-events: none;
}

.sell-banner-text .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.sell-banner-text h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.sell-banner-text p {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 460px;
}

.sell-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  text-align: center;
}

.sell-banner-actions .btn-primary {
  padding: 16px 40px;
  font-size: 16px;
}

.sell-banner-actions .note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── TRUST BAR ─── */
.trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
}

.trust-item .icon {
  width: 32px;
  height: 32px;
  background: var(--primary-glow);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* ─── FOOTER ─── */
.footer {
  background: linear-gradient(180deg, var(--bg-card) 0%, #060913 100%);
  border-top: 1px solid rgba(0, 212, 255, 0.14);
  padding: 64px 0 36px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  max-width: 90%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}

/* Pre-footer Value Perks */
.footer-perks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.footer-perk {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-perk-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  transition: var(--transition);
}

.footer-perk:hover .footer-perk-icon {
  background: rgba(0, 212, 255, 0.16);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

.footer-perk-text h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-perk-text p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Footer Main Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 310px;
  margin-top: 14px;
  line-height: 1.7;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-top: 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: #34D399;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: footerPulse 2s infinite ease-in-out;
}

@keyframes footerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.footer-contact-link:hover {
  color: var(--primary);
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.06);
  transform: translateY(-1px);
}

.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

/* Footer Bottom Bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 18px;
}

.footer-bottom-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.footer-bottom-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-badge-tag {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.footer-back-to-top:hover {
  color: var(--primary);
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 212, 255, 0.2);
}

/* ─── FAB (Floating Action Button) ─── */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--bg-base);
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(0,212,255,0.45);
  transition: var(--transition);
  cursor: pointer;
}

.fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 40px rgba(0,212,255,0.5);
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SKELETON LOADER ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── FILTER TAGS ─── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  color: var(--text-sub);
  background: var(--bg-card);
}

.filter-tag:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.filter-tag.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── SEARCH RESULTS COUNTER ─── */
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.results-count strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ─── PRICE CHART (SPARKLINE) ─── */
.price-chart {
  width: 100%;
  height: 40px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .vehicles-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-perks { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .sell-banner-inner { padding: 48px 40px; }

  /* Navigation responsive on mobile & tablet (<= 1024px) */
  .nav { padding: 0 16px; }
  .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    box-sizing: border-box;
    background: var(--bg-base);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    z-index: 999;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; text-align: center; padding: 12px 16px; }
  .hamburger {
    display: flex !important;
    flex-shrink: 0 !important;
    z-index: 1002;
  }
  .nav-publish-text { display: none; }
  .nav-publish-btn { padding: 10px 14px !important; flex-shrink: 0 !important; }
  #btnLogin { display: none; }
  .nav-mobile-auth { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--border); margin-top: 4px; }
  .nav-mobile-auth .btn { width: 100%; justify-content: center; padding: 11px 16px; }

  /* Compact navigation elements to ensure hamburger is never pushed off-screen */
  .logo-img { height: 40px !important; }
  .nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .user-btn {
    padding: 6px 10px !important;
    max-width: none !important;
    gap: 6px !important;
  }
  .user-nav-name,
  .user-badge-pro,
  .user-badge-part {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .logo-img { height: 36px !important; }
  .vehicles-grid { grid-template-columns: repeat(1, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .footer-perks { grid-template-columns: 1fr; gap: 18px; padding-bottom: 32px; margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-bottom-badges { width: 100%; justify-content: flex-start; }
  .footer-back-to-top { width: 100%; justify-content: center; }
  .hero-title { font-size: 32px; }

  /* Logo: de absolute a bloque centrado arriba en móvil */
  .hero {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: calc(var(--nav-height) + 6px);
  }
  .hero-logo {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
  }
  .hero-logo img { height: clamp(300px, 56vw, 440px); }
  .hero-content { width: 100%; }
  .sell-banner-inner {
    flex-direction: column;
    padding: 32px 20px;
    text-align: center;
  }
  .sell-banner-actions .btn-primary { padding: 14px 24px; font-size: 14px; }
  .sell-banner-text p { max-width: 100%; }
  .stats-strip { gap: 16px; flex-wrap: wrap; }
  .section { padding: 48px 0; }
  .trust-bar { gap: 16px; flex-wrap: wrap; }
  .fab {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px;
    font-size: 0;
    gap: 0;
  }
  .fab svg { width: 22px; height: 22px; }
  .fab::after { content: 'Vender'; font-size: 13px; margin-left: 8px; }
}

@media (max-width: 480px) {
  .search-btn span { display: none; }
  .search-btn { padding: 13px 16px; }
  .fab { bottom: 12px; right: 12px; padding: 12px; }
  .fab::after { display: none; }
  .hero-title { font-size: 26px; }
  .hero-logo img { height: clamp(260px, 48vw, 380px); }
  .sell-banner-actions .btn { width: 100%; }
}

/* ============================================
   SHARED MODALS, AUTH & DASHBOARD STYLES
   ============================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.82);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  visibility: hidden;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 212, 255, 0.1);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  background: var(--bg-hover);
}

/* ─── AUTH MODAL PREMIUM ─── */
.auth-modal-premium {
  display: grid;
  grid-template-columns: 340px 480px;
  background: #090E1A;
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 212, 255, 0.12);
  position: relative;
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Panel izquierdo decorativo */
.auth-panel-left {
  background: linear-gradient(165deg, rgba(0, 212, 255, 0.14) 0%, rgba(99, 102, 241, 0.18) 50%, rgba(10, 15, 29, 0.95) 100%), #0A0F1D;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.25), transparent 70%);
  pointer-events: none;
}

.auth-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-panel-hero {
  margin-bottom: 24px;
}

.auth-hero-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.auth-hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #00D4FF, #38BDF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-hero-sub {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.5;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-benefit-icon {
  font-size: 18px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-benefits li strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
  line-height: 1.3;
}

.auth-benefits li span {
  font-size: 11px;
  color: #94A3B8;
}

.auth-panel-testimonial {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-testi-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00D4FF, #6366F1);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-testi-text {
  font-size: 12px;
  color: #E2E8F0;
  font-style: italic;
  line-height: 1.35;
  margin: 0 0 2px 0;
}

.auth-testi-author {
  font-size: 10px;
  color: #64748B;
  font-weight: 600;
  margin: 0;
}

/* Panel derecho: formulario */
.auth-panel-right {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  max-height: 92vh;
}

.auth-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-close-btn:hover {
  color: #FFFFFF;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg);
}

.auth-right-header {
  margin-bottom: 20px;
  padding-right: 32px;
}

.auth-right-title {
  font-size: 22px;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: -0.4px;
  margin: 0 0 4px 0;
}

.auth-right-sub {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
}

/* Tabs */
.auth-tabs-premium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
  position: relative;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #94A3B8;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #00D4FF;
  color: #030816;
  box-shadow: 0 4px 14px rgba(0, 212, 255, 0.35);
}

/* Selector de tipo de cuenta */
.auth-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-type-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.auth-type-btn:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.04);
}

.auth-type-btn.active {
  border-color: #00D4FF;
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.15);
}

.auth-type-icon {
  font-size: 20px;
  line-height: 1;
}

.auth-type-name {
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
  line-height: 1.2;
}

.auth-type-desc {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 2px;
}

.auth-type-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00D4FF;
  color: #030816;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Campos del formulario */
.auth-field {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: #64748B;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px 10px 38px;
  font-size: 13px;
  color: #F8FAFC;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #00D4FF;
  background: rgba(0, 212, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
  color: #00D4FF;
}

.auth-input::placeholder {
  color: #475569;
}

.auth-input.is-invalid {
  border-color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.07) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
}

.auth-input.is-invalid + .auth-input-icon,
.auth-input-wrap.is-invalid .auth-input-icon {
  color: #EF4444 !important;
}

.auth-field-inline-error {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
  font-size: 12px;
  line-height: 1.4;
  animation: authFadeIn 0.25s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Botón de envío */
.auth-submit-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #00D4FF 0%, #0284C7 100%);
  border: none;
  border-radius: 11px;
  color: #030816;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.45);
  filter: brightness(1.06);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-switch-hint {
  text-align: center;
  font-size: 12px;
  color: #64748B;
  margin-top: 14px;
  margin-bottom: 0;
}

/* Alertas de auth */
.auth-alert,
.auth-alert-premium {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-alert.error,
.auth-alert-premium.error {
  background: rgba(239, 68, 68, 0.12);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.auth-alert.success,
.auth-alert-premium.success {
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Responsive auth modal */
@media (max-width: 820px) {
  .auth-modal-premium {
    grid-template-columns: 1fr;
    max-width: 460px;
  }
  .auth-panel-left {
    display: none;
  }
  .auth-panel-right {
    padding: 28px 22px 24px;
  }
}

/* ─── NAV USER DROPDOWN ─── */
.user-dropdown-wrapper {
  position: relative;
}
.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid rgba(242, 169, 80, 0.3);
  color: #f2a950;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  max-width: 240px;
}
.user-nav-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}
.user-btn:hover {
  border-color: #f2a950;
  background: rgba(242, 169, 80, 0.12);
  color: #ffbe6b;
}
.user-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3B82F6);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-badge-pro {
  background: rgba(0, 212, 255, 0.15);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.user-badge-part {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── BOTÓN FAVORITOS NAVBAR ─── */
.nav-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  color: #f2a950;
  background: rgba(242, 169, 80, 0.06);
  border: 1px solid rgba(242, 169, 80, 0.28);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.nav-fav-btn:hover {
  background: rgba(242, 169, 80, 0.15);
  color: #ffbe6b;
  border-color: rgba(242, 169, 80, 0.55);
}
.nav-fav-badge {
  background: var(--primary);
  color: var(--bg-base);
  font-size: 11px;
  font-weight: 800;
  border-radius: var(--radius-full);
  padding: 1px 7px;
  min-width: 18px;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}
@media (max-width: 768px) {
  .nav-fav-btn {
    display: none !important;
  }
}
@media (min-width: 1025px) {
  .nav-mobile-fav {
    display: none !important;
  }
}
@media (max-width: 1024px) {
  .nav-mobile-fav {
    display: block;
    width: 100%;
    text-align: center;
  }
  .nav-mobile-fav .nav-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.user-dropdown-menu.show {
  display: block;
}
.user-dd-header {
  padding: 8px 12px 10px;
}
.user-dd-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.user-dd-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.user-dd-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.user-dd-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: var(--transition);
}
.user-dd-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.user-dd-item.text-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ─── DASHBOARD MODAL ─── */
.dashboard-modal-window,
.modal-window.dashboard-modal-window {
  max-width: 880px !important;
  width: 95% !important;
}
.dash-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.dash-user-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.dash-user-role {
  font-size: 13px;
  color: var(--text-muted);
}
.dash-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.dash-tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.dash-tab:hover {
  color: var(--text-primary);
}
.dash-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.dash-car-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: var(--transition);
}
.dash-car-item:hover {
  border-color: var(--border-accent);
}
.dash-car-item.sold {
  opacity: 0.6;
}
.dash-car-img-wrap {
  position: relative;
  width: 80px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.dash-car-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.reserved-badge-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.dash-car-info {
  flex: 1;
  min-width: 0;
}
.dash-car-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-car-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-car-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  flex-shrink: 0;
}
.dash-car-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.dash-car-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.dash-msg-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.dash-msg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dash-msg-sender {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.dash-msg-body {
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  line-height: 1.5;
}
.dash-msg-contact {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── CHAT SYSTEM (Dashboard & Embedded) ─── */
.dash-conv-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
}
.dash-conv-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
}
.dash-conv-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.dash-conv-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(0,153,187,0.4));
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--border-accent);
}
.dash-conv-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-conv-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  display: inline-block;
}
.dash-conv-time {
  font-size: 12px;
  color: var(--text-muted);
}
.dash-conv-car-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}
.dash-conv-car-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}
.dash-conv-preview {
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255,255,255,0.03);
}
.dash-conv-preview strong {
  color: var(--text-primary);
}
.dash-conv-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Chat Modal */
.chat-modal-window {
  width: 95%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.chat-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-header-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.chat-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}
.chat-status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}
.chat-car-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 12px;
}
.chat-car-banner strong {
  color: var(--text-primary);
}

/* Chat Messages Stream */
.chat-body {
  flex: 1;
  min-height: 320px;
  max-height: 440px;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(7, 11, 21, 0.6);
  border-radius: var(--radius-md);
  margin: 12px 0;
  border: 1px solid var(--border);
  scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar {
  width: 6px;
}
.chat-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
}
.chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: fadeIn 0.2s ease;
}
.chat-msg-row.from-me {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-msg-row.from-other {
  align-self: flex-start;
  align-items: flex-start;
}
.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-msg-row.from-me .chat-bubble {
  background: linear-gradient(135deg, #00D4FF 0%, #0099BB 100%);
  color: #070B15;
  font-weight: 500;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 212, 255, 0.25);
}
.chat-msg-row.from-other .chat-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-msg-meta {
  font-size: 11px;
  margin-top: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-msg-row.from-me .chat-msg-meta {
  color: rgba(255,255,255,0.45);
}

/* Chat Input Bar */
.chat-input-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-input-form input,
.chat-input-form textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 18px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
  resize: none;
}
.chat-input-form input:focus,
.chat-input-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.chat-send-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #070B15;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  width: 100%;
}
.chat-send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,212,255,0.35);
}
.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Live Chat embedded in vehicle detail page */
.detail-live-chat {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  overflow: hidden;
}
.detail-live-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.detail-live-chat-header h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-live-chat-body {
  height: 220px;
  overflow-y: auto;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

/* ─── Phone Reveal (coches.net style) ─── */
.cp-phone-wrapper {
  margin-top: 14px;
}
.phone-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}
.phone-divider::before,
.phone-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.phone-divider span {
  padding: 0 10px;
}
.btn-show-phone {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-accent, rgba(0, 212, 255, 0.35));
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-show-phone:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  box-shadow: 0 0 16px var(--primary-glow);
  transform: translateY(-1px);
}
.btn-phone-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: #10b981;
  flex-shrink: 0;
}
.btn-phone-labels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.btn-phone-masked {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}
.btn-phone-action {
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
}

/* Revealed state */
.phone-revealed-card {
  animation: phoneFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes phoneFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.phone-revealed-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.btn-phone-call {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}
.btn-phone-call:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}
.btn-phone-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #25d366;
  color: #fff !important;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}
.btn-phone-wa:hover {
  background: #20ba59;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  transform: translateY(-1px);
}
.btn-phone-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}
.btn-phone-copy:hover {
  border-color: var(--primary);
  background: var(--bg-elevated);
}

/* Chat header phone action button */
.btn-chat-call-reveal {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-chat-call-reveal:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}
.btn-chat-call-revealed {
  background: #10b981;
  color: #fff !important;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}
.btn-chat-call-revealed:hover {
  background: #059669;
}
.phone-unavailable-box {
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* ============================================
   DESKTOP DENSITY — optimizado para 1080p (≤1600px)
   En ultrawide no cambia nada: todo va bajo estas medias.
   ============================================ */
@media (max-width: 1600px) {
  /* Hero compacto */
  .hero {
    min-height: 84vh;
    padding: calc(var(--nav-height) + 40px) 24px 56px;
  }
  .hero-badge { margin-bottom: 18px; }
  .hero-title {
    font-size: clamp(34px, 4.5vw, 56px);
    margin-bottom: 14px;
  }
  .hero-sub { margin-bottom: 28px; }
  .search-wrapper { margin-bottom: 18px; }
  .stats-strip { margin-top: 36px; gap: 28px; }

  /* Secciones */
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 24px; }
  .section-title { font-size: 24px; }

  /* Categorías: rejilla flexible + cards compactas */
  .category-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .category-card { padding: 14px 10px; }
  .category-icon { font-size: 24px; }

  /* Cards de coche compactas */
  .vehicle-card-img { aspect-ratio: 16/10; }
  .vehicle-card-body { padding: 12px 14px; }
  .card-name { font-size: 15px; margin-bottom: 6px; }
  .card-specs { margin-bottom: 8px; }
  .card-footer { padding-top: 8px; }
  .card-price { font-size: 18px; }
  .card-location { margin-top: 6px; }

  /* Features */
  .features-section { padding: 56px 0; }
  .features-grid { gap: 16px; }
  .feature-card { padding: 24px; }
  .feature-icon { width: 44px; height: 44px; font-size: 20px; }

  /* Chat de ficha: acotado con scroll interno */
  .detail-live-chat-body { height: 200px; max-height: 44vh; }
}

/* Pantallas bajas (25" 1080p con chrome del navegador: ~920px de vista) */
@media (max-height: 900px) {
  .hero {
    min-height: 78vh;
    justify-content: flex-start;
    padding-top: calc(var(--nav-height) + 20px);
  }
  .hero-sub { margin-bottom: 22px; }
  .stats-strip { margin-top: 24px; }
  .detail-live-chat-body { max-height: 40vh; }
}

/* Ultrawide (≥21:9) — bajar imagen del hero para que se vea el logo */
@media (min-aspect-ratio: 21/9) {
  .hero-bg img {
    object-position: center 5%;
  }
  .hero-content .hero-title {
    text-align: center;
  }
  .hero-bg-overlay {
    background: linear-gradient(
      to bottom,
      rgba(7,11,21,0.35) 0%,
      rgba(7,11,21,0.25) 40%,
      rgba(7,11,21,0.65) 75%,
      rgba(7,11,21,1) 100%
    );
  }
}

/* Texto con gradiente reutilizable (fuera del hero) */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #818CF8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── PRICING (precios.html) ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.price-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(0,212,255,0.12);
}
.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #070B15;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.price-name { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-sub); }
.price-amount { font-size: 42px; font-weight: 800; letter-spacing: -1px; color: var(--text-primary); margin-top: 6px; }
.price-period { font-size: 12px; color: var(--text-muted); }
.price-limit {
  margin: 12px 0 6px;
  padding: 8px 12px;
  background: var(--primary-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}
.price-extras { list-style: none; margin: 8px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.price-extras li { font-size: 13px; color: var(--text-sub); }
/* Variante compacta: franja pro en portada (3 tarjetas, sin extras) */
.pricing-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.price-card.compact { padding: 22px 20px; }
.price-card.compact .price-amount { font-size: 32px; }
.price-card.compact .price-extras { display: none; }
.price-card.compact .price-limit { margin-bottom: 14px; }
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .price-amount { font-size: 36px; }
}

/* ─── DASHBOARD BILLING & SUBSCRIPTION ─── */
.dash-billing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.dash-billing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), #3b82f6);
}
.dash-billing-card.warning::before {
  background: linear-gradient(180deg, var(--warning), #f97316);
}
.dash-billing-card.danger::before {
  background: linear-gradient(180deg, var(--danger), #e11d48);
}
.dash-billing-card.no-plan::before {
  background: var(--text-muted);
}
.dash-billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dash-billing-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-billing-item.highlight {
  border-color: rgba(0, 212, 255, 0.3);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.05), rgba(13, 20, 36, 0.95));
}
.dash-billing-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.dash-billing-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-billing-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}
.dash-billing-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.dash-billing-price small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.dash-billing-countdown {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.dash-billing-countdown.warning {
  color: var(--warning);
}
.dash-billing-countdown.danger {
  color: var(--danger);
}
.dash-billing-sub {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}
.dash-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}
.dash-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.dash-progress-fill.warning {
  background: linear-gradient(90deg, var(--warning), #f97316);
}
.dash-progress-fill.danger {
  background: linear-gradient(90deg, var(--danger), #e11d48);
}

/* ─── Utilities for Badges & Actions ─── */
.text-danger {
  color: var(--danger) !important;
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-primary {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--border-accent);
}
.badge-secondary {
  background: var(--bg-input);
  color: var(--text-sub);
  border: 1px solid var(--border);
}
.btn-ghost.text-danger:hover {
  background: var(--danger-bg);
  color: #fff !important;
  border-color: var(--danger) !important;
}

/* ── Cómo funciona page ────────────────────────────────────── */
.how-card, .benefit-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow .2s;
}
.how-card:hover, .benefit-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.how-card h3, .benefit-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.how-card p, .benefit-card p {
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.6;
}
.how-step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.benefit-icon {
  font-size: 32px;
  line-height: 1;
}

/* Toast global de notificaciones */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card, #131722);
  border: 1px solid var(--border-accent, #00d4ff);
  border-radius: var(--radius-full, 9999px);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 212, 255, 0.2);
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Estados de plan en precios.html */
.benefit-card.current-plan-card {
  border-color: var(--primary, #00d4ff) !important;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.25) !important;
  position: relative;
}
.plan-active-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #00d4ff, #0088cc);
  color: #030a16;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

/* Acordeón FAQ y Sección de Políticas en precios.html */
.policy-card {
  background: var(--bg-card, #131722);
  border: 1px solid var(--border-accent, #00d4ff);
  border-radius: var(--radius-lg, 16px);
  padding: 28px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.policy-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.policy-item:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}
.policy-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.policy-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border, rgba(255, 255, 255, 0.1));
}
.policy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 8px 14px;
  border-radius: var(--radius-full, 9999px);
  font-size: 12.5px;
  color: var(--text-primary, #ffffff);
}
.policy-pill b {
  color: var(--primary, #00d4ff);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}
.faq-details {
  background: var(--bg-card, #131722);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq-details[open] {
  border-color: rgba(0, 212, 255, 0.35);
  background: var(--bg-elevated, #1a2030);
}
.faq-summary {
  padding: 16px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-summary::after {
  content: '＋';
  font-size: 18px;
  color: var(--primary, #00d4ff);
  transition: transform 0.2s ease;
  font-weight: 700;
}
.faq-details[open] .faq-summary::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-body {
  padding: 0 22px 18px 22px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-sub, #94a3b8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

/* ─── LEGAL PAGE STYLES ─── */
.legal-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-top: 24px;
}

.legal-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - var(--nav-height) - 40px);
  overflow-y: auto;
}

.legal-sidebar-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  padding: 0 8px 10px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.legal-nav-link {
  font-size: 13px;
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
  text-decoration: none;
}

.legal-nav-link:hover {
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.08);
  color: var(--primary);
  transform: translateX(3px);
}

.legal-article {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-sub);
}

.legal-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: var(--transition);
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.legal-section:hover {
  border-color: rgba(0, 212, 255, 0.2);
}

.legal-section h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 10px;
}

.legal-section p {
  margin-bottom: 14px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul, .legal-section ol {
  padding-left: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section li {
  line-height: 1.7;
}

.legal-callout {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 18px 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.65;
}

.legal-callout.warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
  border-left: 4px solid var(--warning);
}

.legal-callout.danger {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
  border-left: 4px solid var(--danger);
}

.legal-callout h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.legal-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .legal-sidebar {
    position: static;
    max-height: none;
  }
  .legal-section {
    padding: 24px 18px;
  }
}



/* --- Plan Badges en tarjetas --- */
.badge-plan-vip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
  animation: shimmerVIP 3s ease-in-out infinite;
}
.badge-plan-pro {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
@keyframes shimmerVIP {
  0%, 100% { box-shadow: 0 0 6px rgba(245,158,11,0.4); }
  50%       { box-shadow: 0 0 14px rgba(245,158,11,0.8); }
}

/* --- Video en ficha --- */
.video-section video {
  width: 100%;
  max-height: 360px;
  background: #000;
  border-radius: var(--radius-md);
  display: block;
}

/* --- Banner del dealer en ficha --- */
.dealer-banner-wrap {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.dealer-banner-wrap:hover {
  border-color: var(--border-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.dealer-banner-wrap img {
  display: block;
  width: 100%;
  max-height: 120px;
  object-fit: cover;
}

/* --- Video upload zone (vender) --- */
#videoUploadZone { cursor: pointer; transition: var(--transition); }
#videoUploadZone:hover, #videoUploadZone.dragover {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.06);
}

/* ─── MODAL DE EDICIÓN DE VEHÍCULO (FOTOS + VÍDEO + DETALLES) ─── */
.vehicle-edit-modal-window {
  max-width: 760px;
  width: 100%;
  padding: 28px 26px;
  max-height: 92vh;
  overflow-y: auto;
}

.edit-veh-section {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.edit-veh-section:last-of-type {
  border-bottom: none;
  margin-bottom: 10px;
  padding-bottom: 0;
}

.edit-veh-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.edit-veh-section-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.edit-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.edit-photo-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-base);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.edit-photo-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.edit-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-photo-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.edit-photo-badge.is-cover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 800;
}

.edit-photo-delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.edit-photo-delete-btn:hover {
  transform: scale(1.15);
  background: #dc2626;
}

.edit-photo-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(4, 7, 15, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
}

.edit-photo-move-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  opacity: 0.85;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.edit-photo-move-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.edit-photo-add-card {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}

.edit-photo-add-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 212, 255, 0.04);
}

.edit-video-preview-box {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 10px;
}

.vehicle-edit-modal-window {
  max-width: 680px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

/* --- form-input / form-textarea / form-label dentro del modal de edición ---
   Estos estilos se definen aquí (styles.css) para que el modal funcione
   correctamente en TODAS las páginas, no solo en las que cargan detail.css.  */
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.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%;
  box-sizing: border-box;
  resize: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ===================== PAGINATION ===================== */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
}

.page-btn.active {
  background: var(--primary);
  color: var(--bg-base);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 4px;
}

/* ===================== BOTÓN FLOTANTE VOLVER ARRIBA ===================== */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(13, 20, 36, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s,
              background 0.2s,
              color 0.2s,
              border-color 0.2s,
              box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 15px rgba(0, 212, 255, 0.15);
  outline: none;
  padding: 0;
}

.scroll-top-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
  stroke: currentColor;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.scroll-top-btn:hover {
  background: var(--primary);
  color: #070B15;
  border-color: var(--primary);
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.55);
  transform: translateY(-3px) scale(1.06);
}

.scroll-top-btn:hover svg {
  transform: translateY(-2px);
}

.scroll-top-btn:active {
  transform: translateY(0) scale(0.95);
}

@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  .scroll-top-btn svg {
    width: 20px;
    height: 20px;
  }
}


