:root {
  --bg: #050505;
  --bg-soft: #101010;
  --panel: rgba(17, 17, 17, 0.8);
  --panel-strong: rgba(10, 10, 10, 0.95);
  --text: #f7f7f7;
  --muted: #bdbdbd;
  --red: #d90817;
  --red-strong: #ff2131;
  --white: #ffffff;
  --green: #25d366;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 28px 70px rgba(0, 0, 0, 0.5);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(circle at top right, rgba(217, 8, 23, 0.14), transparent 28%),
    radial-gradient(circle at left center, rgba(255, 33, 49, 0.08), transparent 22%),
    linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
  color: var(--text);
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { min-height: 60vh; }
.container { width: min(1220px, calc(100% - 16px)); margin: 0 auto; }
.section { padding: 90px 0; position: relative; }
.section-head, .buy-banner-inner, .footer-grid, .inventory-layout { display: flex; gap: 24px; }
.section-head, .buy-banner-inner { justify-content: space-between; align-items: center; }
.section-tag, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red-strong);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 700;
}
.section-tag::before, .eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { letter-spacing: -.03em; }
h1 { font-size: clamp(2.8rem, 5vw, 5.2rem); line-height: .95; }
h2 { font-size: clamp(2rem, 3.2vw, 3.1rem); margin-bottom: 12px; }
h3 { font-size: 1.25rem; }
p { color: var(--muted); line-height: 1.78; }
ul { color: var(--muted); line-height: 1.8; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease, background .32s ease, color .32s ease;
  will-change: transform;
}
.btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 30px rgba(217, 8, 23, .2);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  color: var(--white);
}
.btn-outline {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
}
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.34); }
.btn-light {
  background: var(--white);
  color: var(--bg);
  box-shadow: 0 16px 36px rgba(255, 255, 255, .12);
  max-width: auto;
}
.btn-whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.45);
  color: #c4ffd8;
}
.btn.small { padding: 10px 16px; font-size: .92rem; border-radius: 10px; }
.full { width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  backdrop-filter: blur(18px);
  background: rgba(5, 5, 5, .72);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(5, 5, 5, .92);
  box-shadow: 0 8px 30px rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.1);
}
.nav-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 92px;
  gap: 18px;
  position: relative;
}

.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease, filter .3s ease;
  z-index: 72;
}
.logo:hover { filter: drop-shadow(0 0 18px rgba(255,33,49,.25)); transform: translate(-50%, -2px); }
.logo img { height: 56px; width: auto; object-fit: contain; }
.header-contact-btn { justify-self: end; z-index: 72; }
.main-nav {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 5, 0.985);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform .42s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-nav.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.main-nav-inner { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 24px; width: 100%; padding: 24px; }
.main-nav a:not(.btn) {
  color: var(--muted);
  position: relative;
  transition: color .25s ease, transform .25s ease;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
}

.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--red-strong));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.main-nav a.active,
.main-nav a:hover:not(.btn) { color: var(--white); }
.main-nav a.active::after,
.main-nav a:hover:not(.btn)::after { transform: scaleX(1); }
.hamburger {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 90;
  justify-self: start;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: transform .28s ease, opacity .28s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: auto -10% -140px auto;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,33,49,.18), transparent 70%);
  filter: blur(18px);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .26;
  transform: scale(1.04);
  animation: heroZoom 12s ease-in-out infinite alternate;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at right, rgba(217,8,23,.36), transparent 45%),
    linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.88));
}
.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.16fr .84fr;
  gap: 32px;
  align-items: end;
}
.hero-copy p { max-width: 640px; font-size: 1.05rem; }
.search-card,
.info-card,
.filter-card,
.contact-form,
.admin-panel,
.auth-card,
.car-card,
.admin-sidebar,
.detail-card,
.spec-card,
.appointment-card,
.footer-map-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, background .35s ease;
}
.search-card:hover,
.info-card:hover,
.filter-card:hover,
.contact-form:hover,
.admin-panel:hover,
.auth-card:hover,
.car-card:hover,
.detail-card:hover,
.spec-card:hover,
.appointment-card:hover,
.footer-map-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(255,255,255,.14);
}
.search-card { padding: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
input, select, textarea {
  width: 100%;
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: var(--white);
  padding: 14px 16px;
  font: inherit;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease, background .25s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(255,33,49,.8);
  box-shadow: 0 0 0 4px rgba(255,33,49,.12);
  background: #0d0d0d;
}

.listing-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  touch-action: pan-x;
  align-items: stretch;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,33,49,.45) rgba(255,255,255,.05);
}
.listing-row::-webkit-scrollbar { height: 8px; }
.listing-row::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 999px; }
.listing-row::-webkit-scrollbar-thumb { background: rgba(255,33,49,.45); border-radius: 999px; }

.car-card { overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.car-card-link { display: block; height: 100%; }
.car-card img {
  height: 230px;
  width: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
}
.car-card:hover img { transform: scale(1.06); filter: saturate(1.08); }
.car-card-body { padding: 20px; }
.car-card-body strong { display: block; margin: 10px 0 16px; font-size: 1.3rem; color: var(--white); }
.card-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 14px; }
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .84rem;
  border: 1px solid rgba(255,255,255,.05);
}

.buy-banner {
  background: linear-gradient(90deg, #680007, #cb0b17 55%, #ff1c27);
  position: relative;
  overflow: hidden;
}
.buy-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255,255,255,.08) 45%, transparent 65%);
  transform: translateX(-120%);
  animation: shimmer 6s linear infinite;
}
.dark-panel { background: #090909; }
.split-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: start; gap: 24px; }
.info-card { padding: 28px; }
.info-card ul { margin: 0; padding-left: 20px; }

.site-footer {
  background: #050505;
  border-top: 1px solid var(--border);
  padding-top: 44px;
  position: relative;
}
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr .8fr; }
.footer-grid a {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  transition: color .25s ease, transform .25s ease;
}
.footer-grid a:hover { color: var(--white); transform: translateX(4px); }
.footer-logo { width: 260px; margin-bottom: 14px; }
.footer-map-card {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  margin-top: 30px;
}
.footer-bottom {
  text-align: center;
  padding: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  margin-top: 30px;
}
.map-pin {
  display: inline-flex;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--red-strong);
  box-shadow: 0 0 0 6px rgba(255,33,49,.12);
}

.page-hero {
  padding: 150px 0 56px;
  background: linear-gradient(180deg, rgba(217,8,23,.2), transparent), #070707;
}
.small-hero h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
.inventory-layout { display: grid; grid-template-columns: 320px 1fr; align-items: start; }
.filter-card, .contact-form { padding: 24px; position: sticky; top: 110px; }
.filter-form { display: grid; gap: 12px; }
.inventory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid img {
  border-radius: 20px;
  height: 280px;
  object-fit: cover;
  transition: transform .4s ease, box-shadow .4s ease;
}
.gallery-grid img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-soft);
}
.contact-form { position: static; }
iframe {
  border: 0;
  width: 100%;
  min-height: 320px;
  border-radius: 18px;
  margin-top: 12px;
}
.alert-success, .alert-error { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert-success { background: rgba(0,128,0,.18); border: 1px solid rgba(0,128,0,.4); }
.alert-error { background: rgba(217,8,23,.16); border: 1px solid rgba(217,8,23,.38); }

.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
}
.detail-card,
.appointment-card { padding: 28px; }
.detail-gallery-main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.thumbnail-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.thumbnail-row img {
  height: 110px;
  width: 100%;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.spec-card { padding: 18px; }
.spec-card span { display: block; color: var(--muted); font-size: .86rem; margin-bottom: 5px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.detail-price { font-size: clamp(2rem, 4vw, 3rem); color: var(--white); margin-bottom: 8px; }

.admin-body, .admin-auth-body {
  background:
    radial-gradient(circle at top right, rgba(217,8,23,0.12), transparent 26%),
    linear-gradient(180deg, #050505, #101010);
  color: var(--white);
}
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.admin-sidebar {
  padding: 28px;
  border-right: 1px solid var(--border);
  background: var(--panel-strong);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-sidebar-logo { width: 190px; margin-bottom: 8px; }
.admin-sidebar a {
  color: var(--muted);
  transition: color .25s ease, transform .25s ease;
}
.admin-sidebar a:hover { color: var(--white); transform: translateX(4px); }
.admin-main { padding: 28px; display: grid; gap: 24px; }
.admin-panel { padding: 24px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-form-grid textarea, .admin-form-grid button { grid-column: 1 / -1; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 14px; border-bottom: 1px solid var(--border); text-align: left; }
.delete-link { color: #ff6b6b; }
.auth-card { width: min(440px, calc(100% - 32px)); padding: 32px; margin: 10vh auto; }

.whatsapp-sticky {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366, #1eb957);
  color: #fff;
  box-shadow: 0 18px 35px rgba(0,0,0,.28);
  animation: floatPulse 2.8s ease-in-out infinite;
}
.whatsapp-sticky:hover { transform: translateY(-3px) scale(1.02); }
.whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}
@keyframes shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,33,49,.18); }
  50% { box-shadow: 0 0 0 12px rgba(255,33,49,0); }
}
@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.btn-primary { animation: pulseGlow 3.4s ease-in-out infinite; }

@media (max-width: 1100px) {
  .hero-content,
  .split-grid,
  .footer-grid,
  .inventory-grid,
  .gallery-grid,
  .detail-layout,
  .footer-map-card { grid-template-columns: 1fr 1fr; }
  .inventory-layout { grid-template-columns: 1fr; }
  .filter-card { position: static; }
}

@media (max-width: 768px) {
  body,
  p,
  h1,
  h2,
  h3,
  h4,
  .section-tag,
  .eyebrow,
  .info-card,
  .car-card-body,
  .buy-banner-inner,
  .footer-grid,
  .footer-grid a,
  .hero-copy,
  .contact-form,
  .filter-card,
  .auth-card,
  .admin-panel,
  .admin-sidebar,
  .page-hero,
  .section-head,
  .split-grid,
  .inventory-layout,
  .inventory-grid,
  .gallery-grid,
  .admin-main,
  .admin-form-grid,
  .detail-card,
  .appointment-card,
  .footer-map-card,
  .footer-map-copy {
    text-align: center;
  }

  .nav-wrap {
    grid-template-columns: auto 1fr auto;
    min-height: 78px;
  }
  .logo img { height: 42px; }
  .header-contact-btn { padding: 12px 16px; font-size: .88rem; }
  .main-nav { width: 100vw; height: 100vh; }
  .main-nav-inner {
    flex-direction: column;
    gap: 22px;
    text-align: center;
    width: 100%;
    padding: 24px;
  }
  .main-nav a:not(.btn) {
    font-size: 1.8rem;
    font-weight: 600;
  }
  .hero { min-height: auto; padding: 122px 0 72px; }
  .hero-content,
  .split-grid,
  .footer-grid,
  .gallery-grid,
  .inventory-grid,
  .form-grid,
  .admin-shell,
  .admin-form-grid,
  .detail-layout,
  .footer-map-card,
  .spec-grid { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .hero-copy p,
  .section-head,
  .buy-banner-inner,
  .split-grid > div,
  .page-hero .container,
  .detail-actions,
  .thumbnail-row { margin-inline: auto; }
  .section-head,
  .buy-banner-inner,
  .detail-actions { flex-direction: column; }
  .info-card ul {
    padding-left: 0;
    list-style-position: inside;
  }
  .admin-table th,
  .admin-table td { text-align: center; }
  .car-card .btn,
  .detail-actions .btn,
  .contact-form .btn,
  .filter-form .btn,
  .appointment-card .btn,
  .search-card .btn { width: 100%; }
  .detail-gallery-main img { height: 260px; }
  .thumbnail-row img { height: 90px; }
  .whatsapp-sticky span:last-child { display: none; }
  .whatsapp-sticky { padding: 14px; }
}


@media (min-width: 769px) {
  .main-nav a:not(.btn)::after { bottom: -10px; }
}


.file-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.file-field input[type="file"] {
  width: 100%;
}
.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.edit-link,
.delete-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.edit-link {
  background: rgba(255,255,255,.08);
  color: var(--white);
  border: 1px solid var(--border);
}
.delete-link {
  background: rgba(255, 0, 43, .14);
  color: #ff7a92;
  border: 1px solid rgba(255, 0, 43, .24);
}
.admin-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.refresh-note {
  color: var(--muted);
  font-size: .94rem;
}
.thumb-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}
.thumb-btn.active {
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 2px rgba(255,0,43,.18);
}
.detail-gallery-main {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 3000;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  border-radius: 12px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: white;
  font-size: 28px;
  cursor: pointer;
}
.edit-gallery img {
  width: 110px;
  height: 82px;
  object-fit: cover;
}
@media (max-width: 768px) {
  .admin-actions {
    flex-direction: column;
  }
  .admin-panel-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
