/* ═══════════════════════════════════════════════════════════════
   HW COLLECTOR — Dark Racing Aesthetic
   Fonts: Bebas Neue (display) + Barlow Condensed + Barlow
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:       #0a0a0c;
  --bg2:      #111116;
  --bg3:      #18181f;
  --surface:  #1e1e28;
  --border:   #2e2e3e;
  --red:      #e8152a;
  --red-dark: #b50f1f;
  --orange:   #ff6b1a;
  --yellow:   #ffd60a;
  --white:    #f4f4f6;
  --gray:     #8888a0;
  --gray-light: #bbbbcc;
  --font-display: 'Bebas Neue', sans-serif;
  --font-cond: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-red: 0 0 40px rgba(232,21,42,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ── UTILS ───────────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.text-accent { color: var(--red); }
.text-muted { color: var(--gray); font-size: 0.85rem; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,21,42,0.4); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--white);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--white); }

.btn-ghost-dark {
  display: inline-flex; align-items: center;
  background: transparent;
  color: var(--gray-light);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-ghost-dark:hover { border-color: var(--gray); }

.btn-full { width: 100%; justify-content: center; }

.btn-nav {
  background: var(--red);
  color: #fff;
  font-family: var(--font-cond);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.btn-nav:hover { background: var(--red-dark); }

.btn-nav-outline {
  color: var(--gray-light);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.btn-nav-outline:hover { border-color: var(--gray); }

.btn-card {
  background: var(--surface);
  color: var(--white);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-card:hover { background: var(--red); border-color: var(--red); }

.btn-outline-sm {
  color: var(--gray-light);
  font-family: var(--font-cond);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline-sm:hover { border-color: var(--gray); color: var(--white); }

/* ── FLASH MESSAGES ──────────────────────────────────────────── */
.flash-container {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px;
}
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 600;
  animation: slideInRight 0.3s ease;
  backdrop-filter: blur(12px);
}
.flash-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: #4ade80; }
.flash-error   { background: rgba(232,21,42,0.15); border: 1px solid rgba(232,21,42,0.4); color: #f87171; }
.flash-info    { background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.4); color: #a5b4fc; }
.flash-close { background: none; border: none; cursor: pointer; color: inherit; font-size: 1.2rem; line-height: 1; opacity: 0.7; padding: 0; }
.flash-close:hover { opacity: 1; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,12,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.logo-hw {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--red);
  letter-spacing: 0.02em;
  line-height: 1;
}
.logo-collector {
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-top: 4px;
}
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--white); background: var(--surface); }
.nav-link.active { color: var(--red); }

.nav-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-badge {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-cond);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-light);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: 0.3s; }

.mobile-menu {
  display: none; flex-direction: column;
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 12px 24px;
}
.mobile-menu a {
  font-family: var(--font-cond); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-light);
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--bg);
}
.hero-stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 60px,
    rgba(232,21,42,0.025) 60px, rgba(232,21,42,0.025) 62px
  );
}
.hero-glow {
  position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(232,21,42,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  padding-top: 80px; padding-bottom: 80px;
}
.hero-eyebrow {
  font-family: var(--font-cond); font-weight: 600;
  font-size: 0.95rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.9;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.hero-title-accent { color: var(--red); display: block; }
.hero-sub {
  font-size: 1.1rem; color: var(--gray-light);
  max-width: 500px; margin-bottom: 36px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; align-items: center; gap: 0; }
.hero-stat { text-align: center; padding: 0 32px; }
.hero-stat:first-child { padding-left: 0; }
.stat-num {
  display: block;
  font-family: var(--font-display); font-size: 2.8rem;
  color: var(--white); line-height: 1;
}
.stat-label {
  display: block;
  font-family: var(--font-cond); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
  margin-top: 4px;
}
.hero-stat-divider { width: 1px; height: 50px; background: var(--border); flex-shrink: 0; }

.hero-scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-cond); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.15em; color: var(--gray);
  animation: bounce 2s infinite;
}
.scroll-line { width: 1px; height: 32px; background: linear-gradient(to bottom, var(--gray), transparent); }
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ── MARCAS BAND ─────────────────────────────────────────────── */
.marcas-band {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.marcas-band-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.band-label {
  font-family: var(--font-cond); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray);
  flex-shrink: 0;
}
.marcas-list { display: flex; gap: 8px; flex-wrap: wrap; }
.marca-chip {
  font-family: var(--font-cond); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gray-light); background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 14px; border-radius: 100px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.marca-chip:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ── SECTIONS ────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 48px; gap: 20px;
}
.section-header.centered { flex-direction: column; align-items: center; text-align: center; }
.section-eyebrow {
  font-family: var(--font-cond); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--red);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 0.95; color: var(--white); letter-spacing: 0.02em;
}
.section-link {
  font-family: var(--font-cond); font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray);
  white-space: nowrap; padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.section-link:hover { color: var(--red); border-color: var(--red); }

/* ── CARS GRID ───────────────────────────────────────────────── */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.car-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: default;
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,21,42,0.3);
  border-color: rgba(232,21,42,0.4);
}
.car-card-image {
  position: relative; height: 210px;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d14 100%);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.car-card-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
  transition: transform 0.4s;
}
.car-card:hover .car-card-image img { transform: scale(1.06); }
.car-no-image {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--border);
}
.car-no-image svg { width: 64px; height: 64px; }

.car-badge-featured {
  position: absolute; top: 10px; left: 10px;
  background: var(--yellow); color: #000;
  font-family: var(--font-cond); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.car-badge-stock {
  position: absolute; top: 10px; right: 10px;
  background: rgba(34,197,94,0.9); color: #fff;
  font-family: var(--font-cond); font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 4px;
}
.car-badge-agotado {
  position: absolute; top: 10px; right: 10px;
  background: rgba(100,100,120,0.9); color: var(--gray-light);
  font-family: var(--font-cond); font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 4px;
}

.car-card-body { padding: 18px; }
.car-brand {
  font-family: var(--font-cond); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--red);
}
.car-model {
  font-family: var(--font-cond); font-size: 1.25rem; font-weight: 700;
  color: var(--white); margin: 4px 0 8px; line-height: 1.2;
}
.car-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.car-year, .car-serie, .car-color {
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 600;
  color: var(--gray);
  background: var(--bg3); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 4px;
}
.car-desc {
  font-size: 0.88rem; color: var(--gray); line-height: 1.5;
  margin-bottom: 14px;
}
.car-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.car-price {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--yellow);
  letter-spacing: 0.02em;
}

/* ── HOW IT WORKS ────────────────────────────────────────────── */
.how-section { background: var(--bg2); border-top: 1px solid var(--border); }
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px;
}
.step {
  padding: 32px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--red), var(--orange));
}
.step-number {
  font-family: var(--font-display); font-size: 3.5rem;
  color: var(--border); line-height: 1; margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-cond); font-size: 1.2rem; font-weight: 700;
  color: var(--white); letter-spacing: 0.04em; margin-bottom: 8px;
}
.step p { font-size: 0.92rem; color: var(--gray); line-height: 1.6; }

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95; color: var(--white);
  letter-spacing: 0.02em;
}

/* ── FILTERS ─────────────────────────────────────────────────── */
.filters-bar { margin-bottom: 24px; }
.filters-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label {
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray);
}
.filter-input, .filter-select {
  background: var(--surface); color: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; font-size: 0.95rem; min-width: 180px;
  transition: border-color 0.2s;
}
.filter-input:focus, .filter-select:focus {
  outline: none; border-color: var(--red);
}
.filter-select option { background: var(--surface); }
.btn-filter {
  background: var(--red); color: #fff;
  font-family: var(--font-cond); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 10px 22px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background 0.2s;
}
.btn-filter:hover { background: var(--red-dark); }
.btn-clear {
  color: var(--gray); font-family: var(--font-cond); font-size: 0.9rem;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  transition: color 0.2s;
}
.btn-clear:hover { color: var(--white); }

.brand-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.brand-pill {
  font-family: var(--font-cond); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gray-light); background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 100px;
  transition: all 0.2s;
}
.brand-pill:hover { border-color: var(--red); color: var(--red); }
.brand-pill.active { background: var(--red); border-color: var(--red); color: #fff; }

.results-info {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px;
  font-family: var(--font-cond); font-size: 0.9rem; color: var(--gray);
}
.results-filter-tag {
  background: var(--surface); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.82rem;
}
.results-filter-tag a { color: var(--red); margin-left: 6px; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.empty-icon { font-size: 3.5rem; }
.empty-state h3 {
  font-family: var(--font-cond); font-size: 1.4rem; font-weight: 700; color: var(--white);
}
.empty-state p { color: var(--gray); max-width: 360px; }

/* ── ACCESO PAGE ─────────────────────────────────────────────── */
.acceso-section {
  position: relative; min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 24px;
}
.acceso-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(232,21,42,0.08), transparent 60%);
  pointer-events: none;
}
.acceso-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 500px;
  display: flex; flex-direction: column; gap: 8px;
}
.acceso-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.acceso-card-header { text-align: center; margin-bottom: 28px; }
.acceso-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.acceso-card-header h2 {
  font-family: var(--font-display); font-size: 2rem; color: var(--white);
}
.acceso-card-header p { color: var(--gray); font-size: 0.92rem; margin-top: 4px; }

.acceso-divider {
  display: flex; align-items: center; gap: 16px;
  padding: 4px 32px;
}
.acceso-divider::before, .acceso-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.acceso-divider span {
  font-family: var(--font-cond); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--gray); text-transform: uppercase;
  white-space: nowrap;
}

.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 28px;
  background: var(--bg3); padding: 4px; border-radius: var(--radius);
}
.auth-tab {
  flex: 1; background: none; border: none; cursor: pointer;
  font-family: var(--font-cond); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gray); padding: 10px;
  border-radius: 6px; transition: all 0.2s;
}
.auth-tab.active { background: var(--surface); color: var(--white); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ── FORMS ───────────────────────────────────────────────────── */
.acceso-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
  font-family: var(--font-cond); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-light);
}
.form-group input, .form-group textarea, .form-group select {
  background: var(--bg3); color: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232,21,42,0.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select option { background: var(--bg3); }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }

.form-check-group .checkbox-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font-cond); font-size: 0.95rem; font-weight: 600; color: var(--gray-light);
  text-transform: none; letter-spacing: 0;
}
.form-check-group input[type="checkbox"] { display: none; }
.checkbox-custom {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid var(--border); border-radius: 4px;
  background: var(--bg3); transition: all 0.2s;
  position: relative;
}
.form-check-group input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--red); border-color: var(--red);
}
.form-check-group input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff; font-size: 0.8rem; font-weight: 700;
}

.form-actions { display: flex; gap: 12px; align-items: center; padding-top: 8px; }

/* File Upload */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--bg3); overflow: hidden; cursor: pointer;
  transition: border-color 0.2s;
}
.file-upload-area:hover { border-color: var(--red); }
.file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
  border: none !important; background: none !important; padding: 0 !important;
  box-shadow: none !important;
}
.file-upload-ui {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 32px; color: var(--gray); text-align: center;
}
.file-upload-ui svg { opacity: 0.4; }
.file-upload-ui p { font-size: 0.95rem; }
.file-upload-ui strong { color: var(--gray-light); }
.file-upload-ui span { font-size: 0.8rem; }

.file-preview {
  padding: 16px; display: flex; align-items: center; gap: 16px;
  background: var(--bg3);
}
.file-preview img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.file-preview span { font-size: 0.88rem; color: var(--gray-light); word-break: break-all; }

.current-image {
  display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
  padding: 12px; background: var(--bg3); border-radius: var(--radius);
}
.current-image img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.current-image-label { font-size: 0.85rem; color: var(--gray); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 56px 0 0;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px 48px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer-brand .logo-hw { font-size: 2.2rem; }
.footer-brand p { color: var(--gray); font-size: 0.9rem; margin-top: 12px; max-width: 280px; line-height: 1.6; }
.footer-links h4, .footer-info h4 {
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a {
  color: var(--gray-light); font-size: 0.92rem;
  padding: 4px 0; transition: color 0.2s;
}
.footer-links a:hover { color: var(--red); }
.footer-info p { color: var(--gray); font-size: 0.9rem; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  max-width: 1180px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { color: var(--gray); font-size: 0.85rem; }
.footer-admin-link {
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--border); transition: color 0.2s;
}
.footer-admin-link:hover { color: var(--gray); }

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */

.admin-body { background: #0d0d12; }

.admin-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(232,21,42,0.08), transparent 60%);
}
.admin-login-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
}
.admin-login-header { text-align: center; margin-bottom: 32px; }
.admin-login-header .logo-hw { font-size: 2.5rem; }
.admin-login-subtitle {
  font-family: var(--font-cond); font-size: 0.85rem; color: var(--gray);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 8px;
}
.admin-back-link {
  display: block; text-align: center; margin-top: 24px;
  font-family: var(--font-cond); font-size: 0.88rem; color: var(--gray);
  transition: color 0.2s;
}
.admin-back-link:hover { color: var(--white); }

/* Admin layout */
.admin-layout {
  display: flex; min-height: 100vh;
}
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: #0a0a0f; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.admin-sidebar-logo .logo-hw { font-size: 1.6rem; }
.admin-sidebar-logo .logo-collector { font-size: 0.75rem; }
.admin-nav { flex: 1; padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-cond); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--gray);
  padding: 10px 12px; border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.admin-nav-item:hover { background: var(--surface); color: var(--white); }
.admin-nav-item.active { background: rgba(232,21,42,0.15); color: var(--red); }
.admin-nav-item.danger:hover { background: rgba(232,21,42,0.1); color: var(--red); }
.admin-sidebar-bottom { padding: 10px; border-top: 1px solid var(--border); }

.admin-main {
  flex: 1; padding: 32px; overflow-x: auto;
  background: #0d0d12;
}

.admin-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 16px;
}
.admin-page-title {
  font-family: var(--font-display); font-size: 2rem; color: var(--white);
  display: flex; align-items: center; gap: 12px;
}

.count-badge {
  font-family: var(--font-cond); font-size: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--gray); padding: 2px 10px; border-radius: 100px;
}

/* Admin stats */
.admin-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
  margin-bottom: 32px;
}
.admin-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.admin-stat-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; border-radius: 10px; flex-shrink: 0;
}
.admin-stat-icon.orange { background: rgba(255,107,26,0.15); }
.admin-stat-icon.red    { background: rgba(232,21,42,0.15); }
.admin-stat-icon.yellow { background: rgba(255,214,10,0.15); }
.admin-stat-icon.green  { background: rgba(34,197,94,0.15); }
.admin-stat-info { display: flex; flex-direction: column; }
.admin-stat-num {
  font-family: var(--font-display); font-size: 2rem; color: var(--white); line-height: 1;
}
.admin-stat-label {
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray);
  margin-top: 2px;
}

/* Admin section */
.admin-section { margin-bottom: 32px; }
.admin-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.admin-section-header h2 {
  font-family: var(--font-cond); font-size: 1.2rem; font-weight: 700;
  color: var(--white); letter-spacing: 0.04em;
}

/* Admin table */
.admin-table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow-x: auto;
}
.admin-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.admin-table th {
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray);
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td {
  padding: 12px 16px; color: var(--gray-light);
  border-bottom: 1px solid rgba(46,46,62,0.5);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table code {
  font-size: 0.82rem; background: var(--bg3); padding: 2px 8px; border-radius: 4px;
  color: var(--orange);
}
.empty-row { text-align: center; color: var(--gray); padding: 40px !important; }
.empty-row a { color: var(--red); }

/* Admin thumb */
.admin-thumb {
  width: 60px; height: 44px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
}
.admin-thumb-empty {
  width: 60px; height: 44px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  color: var(--border); font-size: 1.2rem;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 100px;
}
.badge-reg  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.badge-guest{ background: rgba(148,163,184,0.15); color: #94a3b8; }
.badge-star { background: rgba(255,214,10,0.15);  color: var(--yellow); }

/* Action buttons */
.action-btns { display: flex; gap: 6px; }
.btn-action {
  font-family: var(--font-cond); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 6px; border: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-action.edit { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.btn-action.edit:hover { background: rgba(99,102,241,0.35); }
.btn-action.delete { background: rgba(232,21,42,0.12); color: #f87171; }
.btn-action.delete:hover { background: rgba(232,21,42,0.3); }

/* Admin form card */
.admin-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  max-width: 720px;
}
.admin-form { display: flex; flex-direction: column; gap: 20px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .nav-user { display: none; }
  .hamburger { display: flex; margin-left: auto; }

  .hero-title { font-size: 4rem; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .hero-stat-divider { display: none; }
  .hero-stat { padding: 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .section-header { flex-direction: column; align-items: flex-start; }

  .admin-sidebar { display: none; }
  .admin-main { padding: 20px 16px; }
  .admin-form-card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { min-height: 70vh; }
  .hero-title { font-size: 3rem; }
  .hero-actions { flex-direction: column; }
  .acceso-card { padding: 24px; }
  .filters-form { flex-direction: column; }
  .filter-input, .filter-select { min-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE AUTO
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1; pointer-events: all;
}

.modal-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(232,21,42,0.15);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

/* Close button */
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gray-light);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: rgba(232,21,42,0.2); color: var(--red); }

/* GALLERY SIDE */
.modal-gallery {
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a10 100%);
  border-radius: 20px 0 0 20px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 400px;
}

.modal-img-main {
  position: relative;
  flex: 1;
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}
.modal-img-main img {
  max-width: 100%; max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  transition: opacity 0.25s ease;
}
.modal-img-main img.fading { opacity: 0; }

/* Gallery nav arrows */
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.5rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
}
.gallery-nav:hover { background: var(--red); border-color: var(--red); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav:disabled { opacity: 0.2; cursor: default; pointer-events: none; }

/* Counter */
.gallery-counter {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  font-family: var(--font-cond); font-size: 0.78rem; font-weight: 700;
  color: var(--gray-light); letter-spacing: 0.06em;
  padding: 3px 12px; border-radius: 100px;
  white-space: nowrap;
}

/* Thumbnails strip */
.modal-thumbnails {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.modal-thumb {
  width: 58px; height: 46px;
  object-fit: contain;
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  padding: 2px;
}
.modal-thumb:hover { transform: scale(1.08); border-color: var(--gray); }
.modal-thumb.active { border-color: var(--red); }

/* INFO SIDE */
.modal-info {
  padding: 36px 32px 36px 28px;
  display: flex; flex-direction: column; gap: 12px;
  justify-content: center;
}

.modal-info-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.modal-brand {
  font-family: var(--font-cond); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--red);
}
.modal-stock-badge {
  font-family: var(--font-cond); font-size: 0.8rem; font-weight: 700;
  padding: 4px 12px; border-radius: 100px;
}
.modal-stock-badge.in-stock  { background: rgba(34,197,94,0.15); color: #4ade80; }
.modal-stock-badge.out-stock { background: rgba(100,100,120,0.2); color: var(--gray); }

.modal-modelo {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 0.95; color: var(--white);
  letter-spacing: 0.02em;
}

.modal-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.modal-tag {
  font-family: var(--font-cond); font-size: 0.8rem; font-weight: 600;
  color: var(--gray); background: var(--bg3); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 4px;
}

.modal-desc {
  font-size: 0.92rem; color: var(--gray-light); line-height: 1.65;
  border-top: 1px solid var(--border); padding-top: 12px;
}

.modal-price-row {
  display: flex; align-items: center;
  padding-top: 8px;
}
.modal-price {
  font-family: var(--font-display); font-size: 2.4rem;
  color: var(--yellow); letter-spacing: 0.02em;
}

/* Responsive modal */
@media (max-width: 680px) {
  .modal-box {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }
  .modal-gallery { border-radius: 20px 20px 0 0; min-height: 260px; }
  .modal-info { padding: 24px 20px 28px; }
  .modal-img-main { min-height: 220px; }
  .modal-img-main img { max-height: 240px; }
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN FOTOS GRID
   ═══════════════════════════════════════════════════════════════ */

.fotos-section-label {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.fotos-hint {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 400;
  color: var(--gray); letter-spacing: 0; text-transform: none;
}

.fotos-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.foto-slot {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg3);
  min-height: 130px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.foto-slot:hover { border-color: var(--gray); }
.foto-slot.has-image { border-style: solid; border-color: var(--border); }
.foto-slot.marked-delete {
  border-color: var(--red);
  opacity: 0.5;
}

.foto-slot-badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-family: var(--font-cond); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.05em; color: var(--gray);
  background: rgba(0,0,0,0.65); padding: 2px 7px; border-radius: 4px;
  pointer-events: none;
}
.slot-badge-principal { color: var(--yellow); }

.foto-slot-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; height: 100%; min-height: 130px;
  cursor: pointer; color: var(--gray);
  font-family: var(--font-cond); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: color 0.2s;
  padding: 12px;
}
.foto-slot-empty:hover { color: var(--white); }
.foto-slot-empty svg { opacity: 0.4; }

.foto-slot-preview {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; height: 100%;
}
.foto-slot-preview img {
  width: 100%; height: 90px; object-fit: contain;
  background: var(--bg3); padding: 6px;
}
.foto-slot-actions {
  display: flex; flex-direction: column; gap: 4px;
  width: 100%; padding: 6px;
}
.btn-slot-replace, .btn-slot-delete {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-cond); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 6px; border-radius: 5px; cursor: pointer;
  text-align: center; transition: background 0.15s;
}
.btn-slot-replace {
  background: rgba(99,102,241,0.15); color: #a5b4fc;
}
.btn-slot-replace:hover { background: rgba(99,102,241,0.3); }
.btn-slot-delete {
  background: rgba(232,21,42,0.1); color: #f87171;
}
.btn-slot-delete input[type="checkbox"] { display: none; }
.btn-slot-delete:hover { background: rgba(232,21,42,0.25); }

.foto-file-input {
  display: none !important;
}
.preview-name {
  font-size: 0.72rem; color: var(--gray); padding: 4px 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%;
  text-align: center;
}

.fotos-tip {
  font-size: 0.82rem; color: var(--gray); margin-top: 8px;
}

/* Badge fotos en card */
.car-badge-fotos {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.7);
  font-family: var(--font-cond); font-size: 0.72rem; font-weight: 700;
  color: var(--gray-light); padding: 3px 8px; border-radius: 4px;
}

@media (max-width: 768px) {
  .fotos-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .fotos-grid { grid-template-columns: repeat(2, 1fr); }
}
