/* Excelencia Automotriz - negro, rojo y cromo (de su escudo) */
:root {
  --black: #000;
  --ink: #16181d;
  --red: #e23a20;
  --red-d: #b92c16;
  --chrome: #8b8e94;
  --line: #e4e6ea;
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --wa: #1faa59;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(11, 11, 12, .10);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: #6b6f77; }
.small { font-size: .85rem; }
.red { color: var(--red); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 800; color: var(--red); margin-bottom: 10px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important; transition: transform .12s, background .15s; min-height: 46px; }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-d); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #178a49; }
.btn-dark { background: var(--black); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-sm { padding: 8px 16px; min-height: 38px; }
.btn-block { width: 100%; }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); border-bottom: 1px solid #25272c; }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; }
.brand img { height: 50px; width: auto; }
.brand-text { display: grid; line-height: 1.05; text-transform: uppercase; }
.brand-text b { font-size: 1.15rem; letter-spacing: .14em; color: #fff; font-weight: 800; }
.brand-text i { font-style: normal; font-size: .82rem; letter-spacing: .38em; color: #c3c6cc; font-weight: 600; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: #e8e9ec; font-weight: 600; }
.nav a:not(.btn):hover { color: var(--red); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

/* Hero */
.hero { background: radial-gradient(900px 420px at 0% 100%, rgba(226, 58, 32, .20), transparent 65%), var(--black); color: #fff; padding: 56px 0 64px; }
.hero-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero .lead { font-size: 1.1rem; color: #cfd2d8; max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-logo { justify-self: center; width: 100%; max-width: 380px; }
.hero-logo img { width: 100%; height: auto; }

/* Secciones */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.link-arrow { font-weight: 700; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value-n { color: var(--red); font-weight: 800; font-size: .9rem; letter-spacing: .1em; }
.dark { background: var(--black); color: #fff; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.big { font-size: 1.2rem; color: #d9dbe0; }
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.visit-cta { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; }
.empty { padding: 28px; background: var(--bg-alt); border-radius: var(--radius); }
.page-head { background: var(--bg-alt); padding: 32px 0 24px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }

/* Filtros */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto auto; gap: 10px; }
input, select, textarea { font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-link { color: inherit; display: block; text-decoration: none !important; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #17181b; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-flag { position: absolute; top: 10px; left: 10px; }
.card-flag-star { background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { margin: 0; }
.card-ver { margin: 2px 0 6px; color: #6b6f77; font-size: .92rem; min-height: 1.4em; }
.card-meta { margin: 0 0 8px; font-size: .9rem; color: #4a4e56; }
.card-price { margin: 0; font-size: 1.4rem; font-weight: 800; }
.card-price s, .detail-price s { font-size: .9rem; font-weight: 500; color: #8b8e94; margin-left: 6px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.badge-ok { background: #dcf5e6; color: #0f6b36; }
.badge-warn { background: #fff0c9; color: #8a5a00; }
.badge-off { background: #e6e7ea; color: #444; }

/* Detalle */
.crumbs { font-size: .9rem; color: #6b6f77; margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.gallery-main { position: relative; background: #17181b; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--red); }
.buy { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; box-shadow: var(--shadow); }
.buy h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.detail-price { font-size: 2rem; font-weight: 800; margin: 0 0 6px; }
.detail-meta { margin: 0 0 16px; color: #4a4e56; }
.buy-actions { display: grid; gap: 10px; margin-bottom: 18px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.share span { font-weight: 700; font-size: .9rem; }
.share-b { font: inherit; font-size: .85rem; font-weight: 600; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none !important; }
.share-b:hover { border-color: var(--red); color: var(--red); }
.detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 1.3rem; }
.specs { margin: 0; display: grid; }
.specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs > div:last-child { border-bottom: 0; }
.specs dt { color: #6b6f77; }
.specs dd { margin: 0; font-weight: 700; text-align: right; }
.feat { margin: 0 0 1em; padding-left: 1.2em; columns: 2; }
.feat li { margin-bottom: 6px; break-inside: avoid; }
.desc { color: #3a3e46; }

/* Pie */
.site-footer { background: var(--black); color: #cfd2d8; padding: 48px 0 20px; border-top: 1px solid #25272c; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.foot-logo { height: 130px; width: auto; margin: -8px 0 8px -10px; }
.social a { margin-right: 14px; }
.foot-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid #2a2c31; font-size: .85rem; color: #8b8e94; }

/* Menú flotante */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab-main { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--wa); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transition: transform .15s; }
.fab-main:hover { transform: scale(1.06); }
.fab-items { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fab-items[hidden] { display: none; }
.fab-item { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); padding: 8px 8px 8px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .22); font-weight: 700; text-decoration: none !important; animation: pop .18s ease-out both; }
.fab-item i { font-style: normal; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-alt); display: grid; place-items: center; font-size: 1.1rem; }
.fab-wa i { background: var(--wa); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modal "Me interesa" */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(11, 11, 12, .6); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: #fff; border-radius: 18px; padding: 28px; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; }
.modal-x { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: #6b6f77; }
.modal-box label, .stack label, .admin-form label { display: grid; gap: 5px; font-weight: 600; font-size: .92rem; margin-bottom: 12px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { color: #a30b0b; background: #fdecec; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.form-msg:empty { display: none; }
.ok-msg { color: #0f6b36; background: #dcf5e6; padding: 12px 14px; border-radius: 8px; }

/* Admin */
body.admin { background: var(--bg-alt); }
.login-box { max-width: 400px; margin: 8vh auto; background: #fff; border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.login-box img { height: 120px; width: auto; margin: 0 auto 12px; border-radius: 14px; }
.login-box h1 { font-size: 1.6rem; text-align: center; }
.admin-bar { background: var(--black); color: #fff; }
.admin-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.admin-brand { color: #fff; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.admin-bar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.admin-bar nav a { color: #cfd2d8; font-weight: 600; }
.admin-main { padding-top: 28px; padding-bottom: 60px; }
.admin-main h1 { font-size: 1.8rem; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.table-wrap { background: #fff; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #fafafa; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #6b6f77; }
.thumb-sm { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: #17181b; }
.row-actions { white-space: nowrap; }
.row-actions > * { margin-right: 12px; }
form.inline { display: inline; }
form.inline select { width: auto; padding: 6px 8px; }
.link-danger { background: none; border: 0; color: #a30b0b; font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.admin-form fieldset { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; }
.admin-form legend { font-weight: 800; padding: 0 8px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 16px; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
.photo-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.photo-item { background: var(--bg-alt); padding: 8px; border-radius: 10px; }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.photo-item .check { font-size: .82rem; margin-bottom: 2px; }
.form-actions { display: flex; gap: 10px; }
.narrow { max-width: 420px; }
.stack { display: block; }

/* Móvil */
@media (max-width: 900px) {
  .hero-in, .about, .visit, .detail-grid, .detail-info, .foot-grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .hero-logo { max-width: 420px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .buy { position: static; }
  .feat { columns: 1; }
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--black); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; border-bottom: 1px solid #25272c; display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid #25272c; }
  .nav .btn { margin-top: 12px; }
  .site-header { position: sticky; }
}
@media (max-width: 520px) {
  .section { padding: 44px 0; }
  .hero { padding: 36px 0 44px; }
  .brand img { height: 42px; }
  .brand-text b { font-size: 1rem; }
  .brand-text i { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Páginas de texto (aviso de privacidad, términos) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin: 1.8em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--red-d); text-decoration: underline; }
.foot-bottom a { color: #c9ccd2; text-decoration: underline; }
