/* ================= MEGA MENU FIX ================= */

.mega-dropdown {
  position: static !important;
}

.mega-dropdown .dropdown-menu {
  width: 100%;
  right: 0;
  left: 0;
  top: 100%;
  border: 0;
  border-radius: 0 0 16px 16px;
  padding: 2rem 0;
  margin-top: 0;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

/* الأعمدة */
.mega-title {
  font-weight: 800;
  margin-bottom: .75rem;
}

.mega-link {
  display: block;
  padding: .35rem 0;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.mega-link:hover {
  color: #ff6a00;
  transform: translateX(-4px);
}

/* hover على الديسكتوب */
@media (min-width: 992px) {
  .mega-dropdown:hover > .dropdown-menu {
    display: block;
  }
}

    :root {
      --brand-dark: #0f172a;
      /* header dark */
      --brand-accent: #ff4d2d;
      /* orange/red accent */
      --brand-accent-2: #ff7a18;
      --muted: #6b7280;
      --soft: #f5f7fb;
      --radius: 14px;
    }

    html,
    body {
      height: 100%;
    }

    body {
      font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background: #fff;
      color: #111827;
    }

    /* ---------- Helpers ---------- */
    .text-muted-2 {
      color: var(--muted) !important;
    }

    .bg-soft {
      background: var(--soft);
    }

    .shadow-soft {
      box-shadow: 0 10px 28px rgba(2, 6, 23, .08);
    }

    .rounded-2xl {
      border-radius: var(--radius);
    }

    /* ---------- Top Bar ---------- */
    .topbar {
      background: #0b1222;
      color: #e5e7eb;
      font-size: .92rem;
    }

    .topbar a {
      color: #e5e7eb;
      text-decoration: none;
    }

    .topbar a:hover {
      color: #fff;
      text-decoration: underline;
    }

    /* ---------- Sticky Header ---------- */
    .main-header {
      position: sticky;
      top: 0;
      z-index: 1040;
      background: rgba(255, 255, 255, .95);
      backdrop-filter: saturate(180%) blur(10px);
      border-bottom: 1px solid rgba(15, 23, 42, .08);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: .6rem;
      text-decoration: none;
      color: #0f172a;
      font-weight: 800;
      letter-spacing: .2px;
      white-space: nowrap;
    }

    .brand-badge {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
      display: grid;
      place-items: center;
      color: #fff;
      font-weight: 900;
    }

    .search-wrap {
      border: 1px solid rgba(15, 23, 42, .14);
      border-radius: 999px;
      overflow: hidden;
      background: #fff;
    }

    .search-wrap .form-control {
      border: 0;
      box-shadow: none;
    }

    .search-wrap .btn {
      border-radius: 0;
    }

    .icon-btn {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: #fff;
      border: 1px solid rgba(15, 23, 42, .12);
      color: #0f172a;
      position: relative;
    }

    .icon-btn:hover {
      background: #f8fafc;
    }

    .cart-count {
      position: absolute;
      top: -7px;
      left: -7px;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      border-radius: 999px;
      background: var(--brand-accent);
      color: #fff;
      font-size: .75rem;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #fff;
      line-height: 1;
    }

    /* ---------- Mega Menu ---------- */
    .nav-dark {
      background: var(--brand-dark);
    }

    .nav-dark .nav-link,
    .nav-dark .navbar-brand,
    .nav-dark .navbar-toggler {
      color: #e5e7eb;
    }

    .nav-dark .nav-link:hover {
      color: #fff;
    }

    .mega-dropdown .dropdown-menu {
      width: 100%;
      border: 0;
      margin-top: 0;
      border-radius: 0 0 18px 18px;
      box-shadow: 0 22px 50px rgba(2, 6, 23, .18);
      padding: 1.25rem 0;
    }

    .mega-title {
      font-weight: 800;
      font-size: 1rem;
      color: #0f172a;
    }

    .mega-link {
      display: block;
      padding: .35rem 0;
      color: #374151;
      text-decoration: none;
    }

    .mega-link:hover {
      color: var(--brand-accent);
      text-decoration: none;
    }

    /* Open mega menu on hover (desktop only) */
    @media (min-width: 992px) {
      .mega-dropdown:hover>.dropdown-menu {
        display: block;
      }
    }

    /* ---------- Hero ---------- */
    .hero {
      background:
        linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .45)),
        url('https://picsum.photos/seed/car-hero/1600/700') center/cover no-repeat;
      color: #fff;
    }

    .hero .badge {
      background: rgba(255, 255, 255, .12);
      border: 1px solid rgba(255, 255, 255, .22);
    }

    .btn-accent {
      background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
      border: 0;
      color: #fff;
      font-weight: 700;
      border-radius: 12px;
      padding: .75rem 1rem;
    }

    .btn-accent:hover {
      filter: brightness(0.95);
      color: #fff;
    }

    /* Vehicle selector card like screenshot */
    .vehicle-card {
      background: #eef3ff;
      border: 1px solid rgba(37, 99, 235, .10);
      border-radius: 18px;
    }

    .vehicle-card .form-select,
    .vehicle-card .form-control {
      border-radius: 12px;
      border-color: rgba(15, 23, 42, .14);
      padding: .85rem .95rem;
    }

    /* ---------- Category Cards ---------- */
    .cat-card {
      background: #fff;
      border: 1px solid rgba(15, 23, 42, .10);
      border-radius: 16px;
      overflow: hidden;
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
      height: 100%;
    }

    .cat-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 18px 38px rgba(2, 6, 23, .12);
      border-color: rgba(255, 77, 45, .35);
    }

    .cat-img {
      height: 130px;
      background: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .cat-img img {
      max-height: 92px;
      width: auto;
      object-fit: contain;
    }

    .cat-title {
      font-weight: 800;
    }

    /* ---------- Product Cards ---------- */
    .product-card {
      border: 1px solid rgba(15, 23, 42, .10);
      border-radius: 18px;
      overflow: hidden;
      background: #fff;
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
      height: 100%;
    }

    .product-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 18px 38px rgba(2, 6, 23, .12);
      border-color: rgba(255, 77, 45, .35);
    }

    .product-img {
      background: #f8fafc;
      height: 190px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .product-img img {
      max-height: 150px;
      width: auto;
      object-fit: contain;
    }

    .product-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: var(--brand-accent);
      color: #fff;
      border-radius: 999px;
      padding: .35rem .6rem;
      font-size: .78rem;
      font-weight: 700;
      box-shadow: 0 10px 20px rgba(255, 77, 45, .25);
    }

    .stars {
      color: #f59e0b;
      letter-spacing: 1px;
    }

    /* ---------- Promo Tiles ---------- */
    .promo-tile {
      border-radius: 18px;
      overflow: hidden;
      background: linear-gradient(135deg, #0b1222, #111827);
      color: #fff;
      position: relative;
      min-height: 180px;
    }

    .promo-tile .overlay {
      position: absolute;
      inset: 0;
      /* background:linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.1)); */
    }

    .promo-tile .content {
      position: relative;
      z-index: 2;
    }

    /* ---------- Footer ---------- */
    footer {
      background: #0b1222;
      color: #e5e7eb;
    }

    footer a {
      color: #cbd5e1;
      text-decoration: none;
    }

    footer a:hover {
      color: #fff;
      text-decoration: underline;
    }

    .footer-input {
      background: #0f172a;
      border: 1px solid rgba(255, 255, 255, .16);
      color: #fff;
      border-radius: 12px;
    }

    .footer-input::placeholder {
      color: #9ca3af;
    }

    /* ---------- Mobile tweaks ---------- */
    @media (max-width: 575.98px) {
      .brand-text {
        display: none;
      }

      .hero {
        padding-top: 1rem !important;
      }
    }
