/* ============================================================
   TROY MOTORS — الهوية السوداء والذهبية
   ============================================================ */
:root {
  --black: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --gold: #d4af37;
  --gold-soft: #c9a227;
  --gold-dim: #8a7420;
  --white: #f5f2ea;
  --muted: #9a958a;
  --line: #2a2a2a;
  --danger: #c0392b;
  --ok: #2ecc71;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- شريط التنقل ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .brand { font-weight: 800; letter-spacing: 1px; color: var(--gold); font-size: 18px; }
.nav ul { display: flex; gap: 26px; list-style: none; }
.nav a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--gold); }

/* ---------- الرئيسية ---------- */
.hero {
  min-height: 82vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 34px; padding: 40px 20px; text-align: center;
}
.hero img.logo { max-width: min(420px, 80vw); border-radius: 8px; }
.tagline {
  color: var(--gold);
  font-size: clamp(24px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: .5px;
}
.hero-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.hero-nav a {
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 10px 26px; border-radius: 999px;
  font-size: 15px; transition: .25s;
}
.hero-nav a:hover { background: var(--gold); color: var(--black); }

/* ---------- عناوين الأقسام ---------- */
.section-head {
  text-align: center; padding: 56px 20px 30px;
}
.section-head h1 {
  color: var(--gold);
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 800;
}

/* ---------- شبكة البطاقات ---------- */
.grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px;
}
.empty { text-align: center; color: var(--muted); padding: 60px 20px; grid-column: 1/-1; }

/* ---------- بطاقة السيارة (نفس روح الصورة المرجعية) ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), #0f0f0f);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .25s, border-color .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold-dim); }
.card-body { padding: 20px 22px 10px; }
.card-title { font-size: 24px; font-weight: 800; color: var(--white); }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card-img {
  position: relative; height: 230px; overflow: hidden;
  background: radial-gradient(circle at 50% 60%, #242424, #0d0d0d);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .sold-badge, .card-img .reserved-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.sold-badge { background: var(--danger); color: #fff; }
.reserved-badge { background: var(--gold); color: var(--black); }
.card-price-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 22px;
}
.price { color: var(--gold); font-size: 26px; font-weight: 800; }
.currency { font-size: 14px; color: var(--gold-soft); margin-inline-start: 4px; }
.color-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 0 22px 16px;
}
.spec {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 6px; text-align: center;
}
.spec .v { font-size: 13px; font-weight: 700; color: var(--white); }
.spec .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.card-actions { display: flex; gap: 10px; padding: 0 22px 22px; }
.btn {
  flex: 1; text-align: center; padding: 12px 10px; border-radius: 12px;
  font-weight: 700; font-size: 15px; cursor: pointer; border: none; transition: .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover { background: var(--white); }
.btn-outline { background: transparent; border: 1px solid var(--gold-dim); color: var(--gold); }
.btn-outline:hover { border-color: var(--gold); }
.btn-wa { background: #1faa55; color: #fff; }
.btn-wa:hover { background: #23c463; }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: #e74c3c; }
.btn-sm { padding: 8px 14px; font-size: 13px; flex: none; }

/* ---------- صفحة السيارة ---------- */
.car-page { max-width: 1100px; margin: 0 auto; padding: 30px 24px 70px; }
.gallery { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #101010; }
.gallery img.main { width: 100%; height: min(60vh, 520px); object-fit: cover; }
.gallery .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: var(--gold); font-size: 22px;
  border: 1px solid var(--gold-dim); cursor: pointer;
}
.gallery .arrow:hover { background: var(--gold); color: var(--black); }
.arrow.next { left: 14px; } .arrow.prev { right: 14px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs img { width: 86px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.thumbs img.active, .thumbs img:hover { border-color: var(--gold); opacity: 1; }
.car-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; margin: 26px 0 4px; }
.car-price { color: var(--gold); font-size: 30px; font-weight: 800; margin: 12px 0 22px; }
.specs.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 0; }
.specs.big .spec { padding: 14px 8px; }
.specs.big .v { font-size: 15px; }
.options-box {
  margin-top: 26px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px;
}
.options-box h3 { color: var(--gold); margin-bottom: 10px; font-size: 18px; }
.options-box p { color: var(--white); line-height: 1.9; white-space: pre-line; }
.contact-row { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.contact-row .btn { flex: 1; min-width: 180px; padding: 15px; font-size: 17px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94);
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 10px; }
.lightbox .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--gold); font-size: 26px; border: 1px solid var(--gold-dim); cursor: pointer; }
.lightbox .close { position: absolute; top: 20px; left: 24px; background: none; border: none; color: var(--white); font-size: 34px; cursor: pointer; }

/* ---------- الاستمارات ---------- */
.form-wrap { max-width: 640px; margin: 0 auto; padding: 30px 24px 70px; }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.field { margin-bottom: 18px; }
.field label { display: block; color: var(--gold); font-size: 14px; margin-bottom: 8px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--white); font-family: inherit; font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 110px; resize: vertical; }
.radio-row { display: flex; gap: 12px; }
.radio-row label {
  flex: 1; text-align: center; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); cursor: pointer; font-weight: 700;
}
.radio-row input { display: none; }
.radio-row input:checked + span { color: var(--gold); }
.radio-row label:has(input:checked) { border-color: var(--gold); background: rgba(212,175,55,.08); }
.drop {
  border: 2px dashed var(--gold-dim); border-radius: 14px;
  padding: 30px; text-align: center; color: var(--muted); cursor: pointer; transition: .2s;
}
.drop:hover, .drop.drag { border-color: var(--gold); color: var(--gold); }
.preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.preview-grid .pimg { position: relative; width: 92px; height: 68px; }
.preview-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.preview-grid .rm {
  position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--danger); color: #fff; border: none; cursor: pointer; font-size: 12px;
}
.msg { margin-top: 16px; padding: 14px; border-radius: 10px; text-align: center; font-weight: 700; display: none; }
.msg.ok { display: block; background: rgba(46,204,113,.12); color: var(--ok); border: 1px solid var(--ok); }
.msg.err { display: block; background: rgba(231,76,60,.12); color: #e74c3c; border: 1px solid var(--danger); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 10px; padding: 0 24px 50px; }
.pager button {
  min-width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 15px;
}
.pager button.cur { background: var(--gold); color: var(--black); border-color: var(--gold); font-weight: 800; }

/* ---------- فوتر بسيط ---------- */
.footer { border-top: 1px solid var(--line); padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.footer b { color: var(--gold); }

/* ---------- استجابة ---------- */
@media (max-width: 640px) {
  .nav { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .nav ul { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .specs { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   TROY MOTORS — هوية فاخرة: علامة مائية + حركات + تواصل
   ============================================================ */
:root {
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Cinzel', serif;
}
body { font-family: var(--font-ar); }
.brand, .section-head h1, .tagline { font-family: var(--font-en); }

/* ---------- العلامة المائية: اللوجو الأصلي في منتصف خلفية الرئيسية ---------- */
.hero { position: relative; overflow: hidden; }
.hero .watermark {
  position: absolute; top: 50%; left: 50%;
  width: min(78vmin, 720px); height: min(78vmin, 720px);
  transform: translate(-50%, -50%);
  background: url('/assets/logo.jpg') center/contain no-repeat;
  opacity: .08;
  filter: saturate(.9);
  pointer-events: none;
  z-index: 0;
  animation: wmFloat 12s ease-in-out infinite;
}
.hero > *:not(.watermark) { position: relative; z-index: 1; }
@keyframes wmFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -52%) scale(1.02); }
}

/* ---------- اللوجو الرئيسي: إطار ذهبي فاخر ---------- */
.hero img.logo {
  max-width: min(340px, 72vw);
  border-radius: 14px;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 0 0 6px rgba(212,175,55,.06), 0 24px 70px rgba(0,0,0,.65);
}

/* ---------- أزرار الهيرو الفاخرة ---------- */
.btn-outline-gold, .btn-gold-solid {
  border-radius: 999px; padding: 13px 34px; font-size: 16px; font-weight: 800;
  transition: all .3s cubic-bezier(.2,.7,.3,1); letter-spacing: .3px;
}
.btn-outline-gold { border: 1px solid var(--gold-dim); color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: var(--black); box-shadow: 0 8px 30px rgba(212,175,55,.35); transform: translateY(-2px); }
.btn-gold-solid { background: var(--gold); color: var(--black); border: 1px solid var(--gold); }
.btn-gold-solid:hover { background: var(--white); border-color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245,242,234,.25); }

/* ---------- حركات ظهور راقية ---------- */
.reveal { animation: fadeUp .9s cubic-bezier(.2,.7,.3,1) both; }
.reveal:nth-child(2) { animation-delay: .15s; }
.reveal:nth-child(3) { animation-delay: .3s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.card { animation: fadeUp .6s cubic-bezier(.2,.7,.3,1) both; }

/* ---------- بطاقات بتوهج ذهبي عند التمرير ---------- */
.card:hover { box-shadow: 0 14px 44px rgba(0,0,0,.55), 0 0 0 1px var(--gold-dim); }
.card-title { transition: color .25s; }
.card:hover .card-title { color: var(--gold); }

/* ---------- فوتر التواصل ---------- */
.footer-contact { margin-bottom: 14px; }
.fc-title { color: var(--gold); font-weight: 800; margin-bottom: 10px; font-size: 14px; }
.fc-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fc-link {
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line); color: var(--white); transition: all .25s;
  direction: ltr; display: inline-block;
}
.fc-link:hover { transform: translateY(-2px); }
.fc-wa { border-color: rgba(31,170,85,.5); } .fc-wa:hover { background: #1faa55; border-color: #1faa55; color: #fff; }
.fc-tel { border-color: var(--gold-dim); color: var(--gold); } .fc-tel:hover { background: var(--gold); color: var(--black); }

/* ---------- زر المشاركة ---------- */
.btn-share { background: transparent; border: 1px solid var(--line); color: var(--muted); flex: 0 0 auto; min-width: 52px; }
.btn-share:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- تحسينات فاخرة عامة ---------- */
.nav { box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.section-head h1 { text-shadow: 0 0 40px rgba(212,175,55,.25); }
.pager button { transition: all .2s; }
.pager button:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 640px) {
  .hero .watermark { width: 96vmin; height: 96vmin; }
  .fc-links { flex-direction: column; align-items: center; }
}

/* ============================================================
   TROY MOTORS — الشريط العلوي الموحد (تصميم مرجعي جديد)
   لوجو يمين ← روابط وسط ← زر تواصل شمال
   ============================================================ */
.eb-nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: #0c0c0b;
  border-bottom: 1px solid rgba(212,175,55,.18);
  padding: 12px clamp(16px, 4vw, 56px);
  z-index: 10;
}
.eb-nav-logo { flex: 0 0 auto; line-height: 0; }
.eb-nav-logo img {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(212,175,55,.5);
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.eb-nav-links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(18px, 3vw, 44px);
}
.eb-nav-links a {
  color: #d9d3c3; text-decoration: none;
  font-size: 15.5px; font-weight: 600;
  padding: 6px 2px; position: relative;
  transition: color .2s;
  white-space: nowrap;
}
.eb-nav-links a::after {
  content: ''; position: absolute; bottom: 0; right: 0; left: 0;
  height: 2px; background: var(--gold, #d4af37);
  transform: scaleX(0); transition: transform .25s;
}
.eb-nav-links a:hover { color: var(--gold, #d4af37); }
.eb-nav-links a.active { color: var(--gold, #d4af37); }
.eb-nav-links a.active::after { transform: scaleX(1); }
.eb-nav-cta {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold, #d4af37);
  border: 1px solid rgba(212,175,55,.55);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  transition: all .22s;
  white-space: nowrap;
}
.eb-nav-cta::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .8; }
.eb-nav-cta:hover { background: var(--gold, #d4af37); color: #111; border-color: var(--gold, #d4af37); }

@media (max-width: 820px) {
  .eb-nav { justify-content: space-between; }
  .eb-nav-links {
    position: static; transform: none;
    order: 3; width: 100%;
    justify-content: center; gap: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(212,175,55,.12);
  }
  .eb-nav-links a { font-size: 14px; }
  .eb-nav-cta { padding: 8px 16px; font-size: 13.5px; }
}
