:root {
  --bg: #03060a;
  --panel: #0a1018;
  --line: #16212f;
  --blue: #1e88ff;
  --text: #f2f6fa;
  --mute: #93a1b3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #03060a;
  }
}

:root[data-theme="dark"] {
  --bg: #03060a;
}

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

html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 Barlow, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
.brand {
  font-family: "Exo 2", Barlow, sans-serif;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.01em;
}

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Header & Barra Principal */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 6, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.bar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 90px;
  position: relative;
}

.bar a:first-child {
  display: flex;
  align-items: center;
  height: 100%;
}

.bar img {
  height: 110px !important;
  max-height: 110px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
  mix-blend-mode: screen;
  transform: scale(1.4);
  transform-origin: left center;
}

/* Navegación Escritorio */
nav {
  display: flex;
  align-items: center;
  gap: 40px !important;
  font-weight: 600;
  font-size: 17px;
}

nav a {
  color: var(--mute);
  transition: color 0.2s ease;
  padding: 6px 12px;
}

nav a:hover {
  color: #fff;
}

/* Componentes principales */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 4px;
  transform: skewX(-10deg);
}

.btn span {
  display: inline-block;
  transform: skewX(10deg);
}

.btn.ghost {
  background: none;
  border: 1px solid var(--blue);
}

.hero {
  text-align: center;
  padding: 64px 20px 80px;
  background: radial-gradient(ellipse at 50% 30%, #0b2547 0%, var(--bg) 62%);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 8px auto 14px;
  max-width: 760px;
}

.hero p {
  color: var(--mute);
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero .cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 20px;
  width: 100%;
}

h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 8px;
}

.sub {
  color: var(--mute);
  margin-bottom: 32px;
  max-width: 60ch;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filters button {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 99px;
  font: inherit;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.car {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.car .ph {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.car .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.car:hover .ph img {
  transform: scale(1.05);
}

.sold-ribbon {
  position: absolute;
  top: 22px;
  right: -35px;
  background: #e63946;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 6px 40px;
  transform: rotate(45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  text-transform: uppercase;
}

.car .in {
  padding: 16px 18px 20px;
}

.car h3 {
  font-size: 20px;
}

.car .meta {
  color: var(--mute);
  font-size: 15px;
  margin: 2px 0 10px;
}

.car .price {
  font-weight: 600;
  color: var(--blue);
  font-size: 20px;
}

.band {
  background: var(--panel);
  border-block: 1px solid var(--line);
  width: 100%;
}

.svc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 8px;
}

.svc div {
  border-left: 3px solid var(--blue);
  padding-left: 16px;
}

.svc h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.svc p {
  color: var(--mute);
  font-size: 16px;
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: start;
}

form {
  display: grid;
  gap: 12px;
}

input,
textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 4px;
  font: inherit;
}

.info p {
  color: var(--mute);
  margin-bottom: 10px;
}

.info strong {
  color: var(--text);
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 20px;
  text-align: center;
  color: var(--mute);
  font-size: 14px;
  margin-top: auto;
  background: var(--bg);
  width: 100%;
}

/* Botón flotante de WhatsApp */
.wsp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  transition: transform 0.2s ease;
}

.wsp-float:hover {
  transform: scale(1.1);
}

.wsp-float svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

/* Menú hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
}

/* Optimización para Celulares */
@media (max-width: 768px) {
  .bar {
    height: 85px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .bar a:first-child {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
  }

  .bar img {
    height: 75px !important;
    max-height: 75px !important;
    width: auto !important;
    transform: scale(1.3) !important;
    transform-origin: center center !important;
  }

  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 2;
  }

  nav {
    display: none;
    position: absolute;
    top: 85px;
    left: 0;
    width: 100%;
    background: #0a1018;
    flex-direction: column;
    padding: 20px;
    gap: 18px !important;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    z-index: 100;
  }

  nav.active {
    display: flex;
  }

  .hero {
    padding: 40px 16px 52px;
  }

  .hero h1 {
    font-size: 26px;
    line-height: 1.3;
  }

  .hero p {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .hero .cta {
    flex-direction: column;
    gap: 12px;
  }

  .hero .cta .btn {
    width: 100%;
    text-align: center;
  }

  section {
    padding: 44px 16px;
  }

  h2 {
    font-size: 24px;
  }

  .sub {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .filters button {
    white-space: nowrap;
    font-size: 14px;
    padding: 6px 14px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .svc {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .wsp-float {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .wsp-float svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
  }
}