/* Plus Auto Inc — hoja de estilos compartida */

:root {
  --color-bg: #0a0a0b;
  --color-bg-alt: #141416;
  --color-surface: #1b1b1e;
  --color-border: #333338;
  --color-text: #f2f2f3;
  --color-text-muted: #a3a3a9;
  --color-accent: #e0322d;
  --color-accent-dark: #b8241f;
  --color-silver: #c7cbd1;
  --radius: 10px;
  --max-width: 1180px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

.brand .brand-plus { color: var(--color-accent); }

.brand-logo {
  height: 44px;
  width: auto;
}

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

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--color-surface);
  color: var(--color-text);
}

.nav-cta {
  background: var(--color-accent) !important;
  color: #fff !important;
}
.nav-cta:hover { background: var(--color-accent-dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--color-text);
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 20px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */

.hero {
  background:
    linear-gradient(180deg, rgba(10,10,11,0.4), rgba(10,10,11,0.95)),
    radial-gradient(circle at 30% 20%, rgba(224,50,45,0.28), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(199,203,209,0.08), transparent 50%);
  padding: 90px 20px 70px;
  text-align: center;
}

.hero--home {
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55), rgba(10,10,11,0.6) 45%, rgba(10,10,11,0.9)),
    radial-gradient(circle at 30% 20%, rgba(224,50,45,0.2), transparent 55%),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center 65%;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 14px;
  font-weight: 700;
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 28px;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.12s, background 0.15s;
}

.btn:hover { transform: translateY(-1px); }

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-accent); }

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */

section { padding: 64px 20px; }

.section-title {
  text-align: center;
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

.alt-bg { background: var(--color-bg-alt); }

/* ---------- Cards / Grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}

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

.card-media {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #29292d, #141415);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  position: relative;
}

.card-media svg { width: 46px; height: 46px; opacity: 0.35; }

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

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }

.card-title { font-size: 1.15rem; font-weight: 600; margin: 0 0 4px; }

.card-meta {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: 0 0 14px;
}

.card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-silver);
  margin: 0 0 14px;
}

.card-price .price-before {
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-size: 0.95rem;
  font-weight: 400;
  margin-right: 8px;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.spec-list strong { color: var(--color-text); font-weight: 500; }

.card-body .btn { margin-top: auto; text-align: center; }

/* ---------- Info blocks ---------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.info-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
}

.info-block h3 { margin-top: 0; color: var(--color-silver); }

.placeholder-note {
  display: inline-block;
  background: rgba(199, 203, 209, 0.12);
  border: 1px dashed var(--color-silver);
  color: var(--color-silver);
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

.social-strip { padding: 8px 20px 44px; }

.social-strip-inner {
  display: flex;
  gap: 16px;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.social-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.social-badge:hover { transform: translateY(-3px); }

.social-badge svg { width: 26px; height: 26px; }

.social-badge.facebook { background: #1877f2; }
.social-badge.facebook svg { fill: #fff; }

.social-badge.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.social-badge.instagram svg { fill: #fff; }

.social-badge.tiktok { background: #000; border: 1px solid var(--color-border); }
.social-badge.tiktok svg { fill: #fff; }

/* ---------- Forms ---------- */

.form-wrap {
  max-width: 620px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row { margin-bottom: 18px; }

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .two-col { grid-template-columns: 1fr; }
}

.form-success {
  display: none;
  background: rgba(52, 168, 83, 0.12);
  border: 1px solid #34a853;
  color: #7fd99a;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.form-success.show { display: block; }

/* ---------- Filters (inventario) ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto 36px;
}

.filters select,
.filters input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 20px;
  grid-column: 1 / -1;
}

/* ---------- Vehicle detail modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(10, 10, 11, 0.7);
  border: 1px solid var(--color-border);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-gallery {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.modal-gallery-nav.prev { left: 14px; }
.modal-gallery-nav.next { right: 14px; }

.modal-gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  z-index: 2;
}

.modal-gallery-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.modal-gallery-dots span.active { background: #fff; }

.modal-body { padding: 30px; }

.modal-title { margin: 0 0 8px; font-size: 1.5rem; }

.modal-meta { color: var(--color-text-muted); margin: 0 0 14px; }

.modal-price { margin: 0 0 18px; }

.modal-specs { margin-bottom: 24px; }

.modal-cta { display: inline-block; }

@media (max-width: 560px) {
  .modal-body { padding: 22px; }
  .modal-gallery { aspect-ratio: 4 / 3; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 20px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  max-width: var(--max-width);
  margin: 0 auto 24px;
}

.footer-grid h4 { color: var(--color-silver); margin: 0 0 12px; font-size: 1rem; }

.footer-grid p, .footer-grid a { color: var(--color-text-muted); font-size: 0.9rem; }

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--color-text); }

.footer-bottom {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
