/* LUKE AUTO — global styles */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1d242e;
  --border: #2c3440;
  --text: #e8edf2;
  --muted: #8b98a5;
  --accent: #e60012;        /* Audi red */
  --accent-dark: #b3000e;
  --gold: #d4a437;
  --radius: 14px;
  --maxw: 1120px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Tahoma, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,17,23,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.brand .name { font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
#navMenu { display: flex; align-items: center; gap: 4px; }
#navMenu a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-size: 15px; transition: .2s; }
#navMenu a:hover, #navMenu a.active { color: var(--text); background: var(--surface2); }
#langSelect {
  margin-inline-start: 10px; background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 14px; cursor: pointer;
}
#navToggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 18px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; background:
  radial-gradient(ellipse 80% 60% at 70% 10%, rgba(230,0,18,.14), transparent),
  radial-gradient(ellipse 60% 50% at 15% 80%, rgba(212,164,55,.08), transparent); }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.25; max-width: 760px; }
.hero p { margin-top: 16px; color: var(--muted); max-width: 640px; font-size: 17px; }
.cta-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 13px 24px; border-radius: 12px; font-size: 16px; font-weight: 600;
  border: 1px solid transparent; transition: .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-wa { background: #25d366; color: #062b15; }
.btn-wa:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface2); }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 44px; }
.trust .item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.trust .ic { font-size: 22px; }
.trust b { display: block; font-size: 15px; }
.trust span { color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.sec { padding: 64px 0; }
.sec.alt { background: var(--surface); }
h2.sec-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
p.sec-lead { color: var(--muted); margin-bottom: 32px; font-size: 16px; }

/* ---------- vehicle cards ---------- */
.cars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.car-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.car-card:hover { border-color: #3d4754; }
.car-photo { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.car-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .3s; }
.car-photo .no-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 56px; background: var(--surface2); color: var(--muted); }
.car-photo:hover img { transform: scale(1.04); }
.car-photo .tag {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  background: rgba(13,17,23,.82); backdrop-filter: blur(4px);
  color: var(--gold); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(212,164,55,.4);
}
.car-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; }
.car-gallery img { aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: zoom-in; opacity: .85; transition: .2s; }
.car-gallery img:hover { opacity: 1; transform: scale(1.03); }
.car-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.car-body h3 { font-size: 18px; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 14px; }
.spec-item { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.spec-label { color: var(--muted); }
.spec-val { font-weight: 600; text-align: end; }
.spec-item-wide { grid-column: 1 / -1; }
.spec-vin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; word-break: break-all; }
.car-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { color: var(--gold); font-weight: 700; font-size: 15px; }
.btn-req { padding: 10px 18px; font-size: 14px; }

/* ---------- why / steps / markets ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.sec.alt .card { background: var(--surface2); }
.card .num { font-size: 26px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.step-card { position: relative; }
.step-card::after {
  content: ''; position: absolute; top: 34px; inset-inline-end: -18px; width: 22px; height: 2px;
  background: var(--accent); opacity: .5;
}
.step-card:last-child::after { display: none; }

/* ---------- about prose ---------- */
.prose { max-width: 820px; }
.prose p { margin-bottom: 16px; color: #c4cdd6; }

/* ---------- contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none; transition: .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; }
.form-note { color: var(--muted); font-size: 13px; margin: 12px 0; }
.submit-btn { width: 100%; padding: 15px; font-size: 17px; }
.ok-box, .err-box {
  margin-top: 16px; border-radius: 12px; padding: 16px; font-size: 15px; display: none;
}
.ok-box { background: rgba(37,211,102,.08); border: 1px solid rgba(37,211,102,.35); color: #7ee2a8; }
.err-box { background: rgba(230,0,18,.08); border: 1px solid rgba(230,0,18,.35); color: #f08b93; }
.err-box a { color: #25d366; font-weight: 600; text-decoration: underline; }
.contact-cards { display: flex; flex-direction: column; gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; transition: .2s;
}
.contact-card:hover { border-color: var(--accent); }
.contact-card .ic { font-size: 24px; width: 44px; height: 44px; border-radius: 12px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card b { display: block; font-size: 15px; }
.contact-card span { color: var(--muted); font-size: 13px; }

/* ---------- cta band ---------- */
.cta-band { background: linear-gradient(135deg, rgba(230,0,18,.16), rgba(212,164,55,.1)); border: 1px solid var(--border); border-radius: 18px; padding: 40px; text-align: center; }
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); }
.cta-band p { color: var(--muted); margin: 10px 0 24px; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--border); padding: 40px 0 28px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-grid p { color: var(--muted); font-size: 14px; margin-top: 10px; }
.contact-list { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-list a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; transition: .2s;
}
.contact-list a:hover { border-color: var(--accent); }
.disc { color: #5f6b77; font-size: 12px; border-top: 1px solid var(--border); padding-top: 18px; }

/* ---------- lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 8px; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); color: #fff; border: none; font-size: 30px;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; user-select: none;
}
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-prev { inset-inline-start: 18px; }
.lb-next { inset-inline-end: 18px; }
.lb-close { position: absolute; top: 18px; inset-inline-end: 18px; width: 44px; height: 44px; background: rgba(255,255,255,.1); color: #fff; border: none; border-radius: 50%; font-size: 20px; cursor: pointer; }

/* ---------- admin ---------- */
.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 900px; }
table.admin th, table.admin td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; }
table.admin th { color: var(--muted); font-weight: 600; background: var(--surface2); position: sticky; top: 0; }
table.admin td.msg { max-width: 300px; }

/* ---------- RTL ---------- */
[dir="rtl"] body, [dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select, [dir="rtl"] button { font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  #navToggle { display: block; }
  #navMenu {
    display: none; position: absolute; top: 64px; inset-inline: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 12px 20px; gap: 6px;
  }
  #navMenu.open { display: flex; }
  #navMenu a { padding: 12px 14px; }
  #langSelect { margin: 8px 0 0; width: 100%; }
  .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .cta-band { padding: 28px 20px; }
}

/* ---------- floating contact widget ---------- */
.contact-fab { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab-panel {
  display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; width: 250px; box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.contact-fab.open .fab-panel { display: block; animation: fabIn .18s ease-out; }
@keyframes fabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fab-panel-title { font-size: 12px; color: var(--muted); font-weight: 600; margin: 2px 2px 10px; letter-spacing: .3px; }
.fab-row {
  display: flex; align-items: center; gap: 11px; padding: 8px 9px; border-radius: 11px;
  font-size: 14px; font-weight: 500; transition: .15s;
}
.fab-row:hover { background: var(--surface2); }
.fab-ic { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; }
.fab-ic svg { width: 18px; height: 18px; }
.fab-wa { background: #25d366; }
.fab-tg { background: #2aabee; }
.fab-vk { background: #0077ff; }
.fab-mail { background: #5f6b77; }
.fab-call { background: var(--accent); }
.fab-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(230,0,18,.45); transition: transform .18s;
  position: relative;
}
.fab-btn:hover { transform: scale(1.07); }
.fab-btn svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fab-btn .fab-x { display: none; }
.contact-fab.open .fab-btn .fab-chat { display: none; }
.contact-fab.open .fab-btn .fab-x { display: block; }
.fab-btn::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(230,0,18,.55); animation: fabPulse 2.2s ease-out infinite;
}
@keyframes fabPulse { 0% { transform: scale(1); opacity: 1; } 70% { transform: scale(1.35); opacity: 0; } 100% { opacity: 0; } }
.contact-fab.open .fab-btn::after { animation: none; opacity: 0; }
@media (max-width: 860px) { .contact-fab { bottom: 14px; inset-inline-end: 14px; } }

/* ---------- vehicle video thumbs & lightbox video ---------- */
.tag-video { background: rgba(212,164,55,.9); color: #1a1408; inset-inline-start: auto; inset-inline-end: 12px; }
.car-video { position: relative; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: .85; transition: .2s; background: var(--surface2); }
.car-video:hover { opacity: 1; transform: scale(1.03); }
.car-video video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.car-video .play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.55);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; padding-inline-start: 3px;
}
#lightbox video.lb-video { max-width: 92vw; max-height: 86vh; border-radius: 8px; background: #000; }
