/* ===========================================================
   CarTech GLOBAL v2 (B&W) — applies to every page.
   Kills purple, themes navbar, hides default footer, polishes
   policy & contact pages, adds topbar styling.
   =========================================================== */

/* ---- Kill Odoo theme purple everywhere ---- */
:root {
  --o-color-primary: #0A0A0A !important;
  --o-color-secondary: #0A0F1A !important;
}
.bg-primary { background-color: #0A0A0A !important; }
.text-primary { color: #0A0A0A !important; }
.btn-primary, .btn-fill-primary {
  background-color: var(--ct-ink, #0A0F1A) !important;
  border-color: var(--ct-ink, #0A0F1A) !important;
  color: #FFFFFF !important;
}
.btn-primary:hover, .btn-fill-primary:hover {
  background-color: #000 !important;
  border-color: #000 !important;
  color: #FFFFFF !important;
}
.btn-secondary, .btn-fill-secondary {
  background-color: #F0F0F0 !important;
  border-color: #F0F0F0 !important;
  color: var(--ct-ink, #0A0F1A) !important;
  font-weight: 700 !important;
}
.btn-secondary:hover, .btn-fill-secondary:hover {
  background-color: #0A0A0A !important;
  border-color: #0A0A0A !important;
  color: #FFFFFF !important;
}
.btn-outline-primary {
  border-color: #0A0A0A !important;
  color: #0A0A0A !important;
}
.btn-outline-primary:hover {
  background-color: #0A0A0A !important;
  color: #FFFFFF !important;
}
a, .link-primary {
  color: #0A0A0A;
}
a:hover {
  color: var(--ct-ink, #0A0F1A);
}
.text-primary, .badge.text-bg-primary, .badge-primary {
  color: #0A0A0A !important;
}
.badge.text-bg-primary, .badge-primary {
  background-color: #F0F0F0 !important;
}
/* Form focus */
.form-control:focus, .form-select:focus {
  border-color: #0A0A0A !important;
  box-shadow: 0 0 0 3px rgba(10,10,10,0.12) !important;
}

/* ---- TOPBAR — slim utility strip, very minimal ---- */
.ct-topbar {
  background: #050505;
  color: rgba(255,255,255,0.78);
  padding: 8px 24px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ct-topbar__link {
  color: rgba(255,255,255,0.78) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  transition: color .18s ease;
  font-weight: 400;
}
.ct-topbar__link:hover {
  color: #FFFFFF !important;
}
.ct-topbar__link svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: #25D366;
}
.ct-topbar__phone {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  direction: ltr;
  unicode-bidi: plaintext;
  letter-spacing: 0.01em;
}
.ct-topbar__label {
  opacity: 0.62;
  font-weight: 400;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  padding-inline-start: 10px;
  border-inline-start: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 600px) {
  .ct-topbar { font-size: 12px; padding: 8px 12px; }
  .ct-topbar__link { gap: 8px; padding: 4px 10px; }
  .ct-topbar__label { display: none; }   /* keep just icon + number on tight screens */
}
/* The standalone topbar is hidden by the fixed mobile header at <=991px; we use
   .ct-mob-wa (injected inside the nav) instead so the WA number stays visible. */
@media (max-width: 991.98px) {
  .ct-topbar { display: none !important; }
}

/* ---- Mobile WhatsApp button — minimal turquoise pill on black header ---- */
.ct-mob-wa {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: #0A0A0A !important;
  text-decoration: none !important;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: none;
  transition: background .18s ease;
}
.ct-mob-wa:hover, .ct-mob-wa:focus {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  transform: none;
}
.ct-mob-wa svg {
  width: 13px; height: 13px;
  color: #0A0A0A;
  flex-shrink: 0;
}
.ct-mob-wa__num { direction: ltr; unicode-bidi: plaintext; }
/* Only render the in-nav WA on mobile sizes */
@media (min-width: 992px) {
  .ct-mob-wa { display: none !important; }
}
/* At very narrow widths, hide the phone digits and keep just the icon pill */
@media (max-width: 359px) {
  .ct-mob-wa__num { display: none; }
  .ct-mob-wa { padding: 8px; }
}

/* ---- NAVBAR — pure black for luxury minimal (white logo pops) ---- */
header.o_main_header,
header.o_header_standard,
nav.navbar,
header > nav,
.o_header_mobile {
  background: #0A0A0A !important;
  background-color: #0A0A0A !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: none !important;
}
/* When scrolled, very subtle separation */
header.o_header_affixed,
header.o_header_standard.o_header_affixed {
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) !important;
}

/* Nav links — refined, light weight on dark */
header .nav-link,
header .navbar-nav .nav-link,
nav .nav-link,
.o_header_mobile .nav-link {
  color: rgba(255,255,255,0.86) !important;
  font-weight: 400 !important;
  font-size: 13.5px !important;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif !important;
  padding: 14px 16px !important;
  letter-spacing: 0.005em !important;
  text-shadow: none !important;
  transition: color .18s ease !important;
  border-radius: 0 !important;
  background: transparent !important;
}
header .nav-link:hover,
nav .nav-link:hover {
  color: #FFFFFF !important;
  background: transparent !important;
}
header .nav-link.active,
header .navbar-nav .nav-link.active {
  color: #FFFFFF !important;
  border-bottom: 0 !important;
}

/* Icons in the header (cart, burger, search) → white */
header .navbar-toggler,
header .navbar-toggler-icon,
.o_header_mobile .navbar-toggler,
header a[href*="cart"], header a[href*="cart"] *,
header .o_wsale_my_cart, header .o_wsale_my_cart * {
  color: rgba(255,255,255,0.92) !important;
  fill: rgba(255,255,255,0.92) !important;
}
header .navbar-toggler {
  border-color: rgba(255,255,255,0.18) !important;
  background: transparent !important;
}
header .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.10) !important; }

/* The hamburger icon SVG itself */
header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.92)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='1.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* "اطلب الآن" header CTA — white pill on the black header.
   Selectors strong enough to beat .navbar-nav .nav-link.active (white text). */
header a.nav-link[href*="autoapp"],
header .navbar-nav a.nav-link[href*="autoapp"],
header .navbar-nav .nav-link.active[href*="autoapp"],
header a.dropdown-item[href*="autoapp"] {
  background: #FFFFFF !important;
  color: #0A0A0A !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 100px !important;
  border-bottom: 0 !important;
  padding: 11px 24px !important;
  margin-inline-start: 16px !important;
  box-shadow: none !important;
  transition: background-color .18s ease !important;
  text-shadow: none !important;
  letter-spacing: 0.02em !important;
  align-self: center !important;
}
header a.nav-link[href*="autoapp"]:hover,
header .navbar-nav a.nav-link[href*="autoapp"]:hover {
  background: #E8E8E8 !important;
  color: #0A0A0A !important;
  transform: none !important;
}

/* Search + utility icons on the black header — force white */
header .o_searchbar_form,
header .o_searchbar_form a,
header .o_searchbar_form i,
header .o_searchbar_form svg,
header a.o_navlink_background,
header a.o_navlink_background i,
header a.o_navlink_background svg,
header a.text-reset,
header a.text-reset i {
  color: rgba(255,255,255,0.92) !important;
  fill: rgba(255,255,255,0.92) !important;
}
header a.o_navlink_background {
  background: rgba(255,255,255,0.08) !important;
}
header a.o_navlink_background:hover {
  background: rgba(255,255,255,0.16) !important;
}

/* Dropdown menus — dark to match the new black nav */
header .dropdown-menu {
  background: #0A0A0A !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 0 !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
  padding: 8px 0 !important;
}
header .dropdown-item {
  color: rgba(255,255,255,0.86) !important;
  text-shadow: none !important;
  padding: 10px 22px !important;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif !important;
  font-weight: 400 !important;
  font-size: 13.5px !important;
}
header .dropdown-item:hover {
  background: rgba(255,255,255,0.06) !important;
  color: #FFFFFF !important;
}

/* Logo sizing — force visible on all viewports, including mobile where Odoo's
   responsive header tries to hide it. */
.o_navbar_logo, .o_logo, .navbar-brand, .logo,
header .o_navbar_logo, header .navbar-brand, header .logo,
header a[href="/"], header a[href="/"] span,
nav .navbar-brand, nav .navbar-brand span {
  display: inline-flex !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
}
.o_navbar_logo img, .o_logo img, .navbar-brand img, .logo img,
header a[href="/"] img, header .navbar-brand img,
nav a[href="/"] img {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: 56px !important;
  height: 56px !important;
  width: auto !important;
  max-width: 200px !important;
  object-fit: contain !important;
}
@media (max-width: 991px) {
  .o_navbar_logo img, .o_logo img, .navbar-brand img, .logo img,
  header a[href="/"] img, header .navbar-brand img {
    max-height: 44px !important;
    height: 44px !important;
    max-width: 160px !important;
  }
}

/* ---- Kill horizontal overflow site-wide (RTL bug pushes body to x=342) ---- */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}
#wrapwrap {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* ---- STICKY HEADER on all viewports (desktop + mobile) ---- */
header.o_header_standard,
#wrapwrap > header,
header.o_top_fixed_element {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  transition: box-shadow .2s ease;
}
/* When scrolled, add a subtle shadow to separate from content */
header.o_header_standard.o_header_affixed,
#wrapwrap > header.o_header_affixed {
  box-shadow: 0 2px 18px rgba(10,15,26,0.06) !important;
}
@media (max-width: 991px) {
  /* Mobile: ensure header stays fixed at top */
  header.o_header_standard,
  #wrapwrap > header {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 1000 !important;
  }
  /* Push content down to clear the fixed mobile header (nav ~64px). The
     ct-topbar is hidden on mobile so we only clear the nav itself. */
  #wrapwrap {
    padding-top: 64px;
  }
  /* Don't double-pad the hero — it already covers viewport edge */
  .ct2-hero { margin-top: -64px; }
}

/* ---- MOBILE NAVBAR — fix RTL positioning bug pushing logo off-screen.
       SCOPED to <992px (Bootstrap lg breakpoint) — at desktop the
       .d-lg-none class hides this nav and we must NOT force display. */
@media (max-width: 991.98px) {
  .o_header_mobile,
  header nav.o_header_mobile,
  header > nav.d-lg-none {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 8px 14px !important;
    flex-wrap: nowrap !important;
  }
  .o_header_mobile > *,
  header nav.o_header_mobile > * {
    flex-shrink: 0 !important;
  }
  .o_header_mobile .navbar-brand,
  .o_header_mobile a[href="/"],
  header nav.o_header_mobile .navbar-brand {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* Hamburger + cart icons sized down so they don't crowd the logo */
  .o_header_mobile .navbar-toggler,
  .o_header_mobile .o_main_navbar_cart,
  .o_header_mobile button {
    padding: 6px !important;
    flex-shrink: 0 !important;
  }

  /* Inner wrapper that holds the brand: don't let it flex-grow off-screen */
  .o_header_mobile .d-flex.flex-grow-1,
  .o_header_mobile > .container,
  .o_header_mobile .o_main_nav {
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    max-width: 100% !important;
    padding-inline: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
  }
}

/* ---- FOOTER ----------------------------------------------------------
   The CarTech footer now lives INSIDE Odoo's own <footer id="bottom">
   (website.footer_custom, written by deploy_v2.py), so each page carries
   exactly one <footer> element. It used to be injected a second time
   through website.custom_code_footer, which shipped two footers per page
   and forced the display:none hack that used to sit here.
   ---------------------------------------------------------------------- */
#wrapwrap footer#bottom {
  padding: 0;
  margin: 0;
  background: #0A0A0A;
  border: 0;
}
#wrapwrap .ct-footer { background: #0A0A0A; color: rgba(255,255,255,0.78); padding: clamp(72px, 10vw, 120px) clamp(20px, 4vw, 56px) 32px; font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif; -webkit-font-smoothing: antialiased; }
#wrapwrap .ct-footer__inner { max-width: 1400px; margin: 0 auto; }
#wrapwrap .ct-footer__brandblock { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 96px); padding-bottom: clamp(56px, 8vw, 88px); border-bottom: 1px solid rgba(255,255,255,0.08); }
#wrapwrap .ct-footer__brand { font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif; font-weight: 300; font-size: clamp(34px, 4vw, 56px); line-height: 1.08; letter-spacing: -0.015em; color: #fff; margin: 0 0 24px; }
#wrapwrap .ct-footer__tag { color: rgba(255,255,255,0.62); font-size: 15px; line-height: 1.7; margin: 0; max-width: 42ch; }
#wrapwrap .ct-footer__contact { display: flex; flex-direction: column; gap: 20px; align-self: end; }
#wrapwrap .ct-footer__contact-row { display: flex; flex-direction: column; gap: 4px; }
#wrapwrap .ct-footer__contact-label { font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
#wrapwrap .ct-footer__contact-value { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 400; color: #fff; text-decoration: none; direction: ltr; unicode-bidi: plaintext; transition: opacity .18s; }
#wrapwrap .ct-footer__contact-value:hover { color: #fff; opacity: 0.7; }
#wrapwrap .ct-footer__contact-value--ar { direction: rtl; font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif; }
#wrapwrap .ct-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(32px, 5vw, 72px); padding: clamp(56px, 8vw, 80px) 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
#wrapwrap .ct-footer__col h4 { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.45); font-weight: 500; margin: 0 0 22px; }
#wrapwrap .ct-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
#wrapwrap .ct-footer__col a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 14px; transition: color .18s; font-weight: 400; }
#wrapwrap .ct-footer__col a:hover { color: #fff; }
#wrapwrap .ct-footer__bottom { padding-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,0.40); }
#wrapwrap .ct-footer__bottom-social { display: flex; gap: 18px; }
#wrapwrap .ct-footer__bottom-social a { color: rgba(255,255,255,0.55); transition: color .18s; }
#wrapwrap .ct-footer__bottom-social a:hover { color: #fff; }
#wrapwrap .ct-footer__bottom-social svg { width: 16px; height: 16px; }
  @media (max-width: 880px) {
  #wrapwrap .ct-footer__brandblock { grid-template-columns: 1fr; gap: 48px; }
#wrapwrap .ct-footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
#wrapwrap .ct-footer__contact { align-self: start; }
#wrapwrap .ct-footer__bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  }
  @media (max-width: 480px) {
  #wrapwrap .ct-footer__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---- POLICY / CONTACT page styling ---- */
.ct-policy {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ct-ink, #0A0F1A);
}
.ct-policy h3 {
  font-family: var(--ct-font-ar, 'Tajawal'), sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #0A0A0A;
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ct-line, #E4ECF3);
}
.ct-policy p {
  margin: 0 0 14px;
  color: var(--ct-text-mid, rgba(10,15,26,0.78));
}
.ct-policy strong { color: var(--ct-ink, #0A0F1A); font-weight: 700; }
.ct-policy ul, .ct-policy ol {
  padding-inline-start: 0;
  margin: 14px 0;
  list-style: none;
}
.ct-policy li {
  padding: 12px 32px 12px 0;
  position: relative;
  border-bottom: 1px solid #F0F4F8;
  color: var(--ct-text-mid, rgba(10,15,26,0.78));
}
.ct-policy li:last-child { border-bottom: 0; }
html[dir="rtl"] .ct-policy li { padding: 12px 32px 12px 0; }
html[dir="ltr"] .ct-policy li { padding: 12px 0 12px 32px; }
.ct-policy li::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  background: #0A0A0A;
  border-radius: 50%;
  position: absolute;
  top: 20px;
  box-shadow: 0 0 0 4px rgba(10,10,10,0.10);
}
html[dir="rtl"] .ct-policy li::before { right: 8px; }
html[dir="ltr"] .ct-policy li::before { left: 8px; }
.ct-policy ol { counter-reset: ol-counter; }
.ct-policy ol li::before {
  counter-increment: ol-counter;
  content: counter(ol-counter);
  width: 22px; height: 22px;
  background: #F0F0F0;
  color: #0A0A0A;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  top: 12px;
}
.ct-policy a {
  color: #0A0A0A;
  text-decoration: underline;
  font-weight: 600;
}

/* ---- CONTACT PAGE overrides (the default Odoo /contactus) ---- */
section.o_contact, .o_contact_us {
  background: linear-gradient(180deg, #FAFCFE 0%, #FFFFFF 100%) !important;
}
section.o_contact h1, .o_contact_us h1 {
  font-family: var(--ct-font-ar, 'Tajawal'), sans-serif !important;
  font-weight: 800 !important;
  color: var(--ct-ink, #0A0F1A) !important;
}
.o_contact_us .btn-primary,
section.o_contact .btn-primary {
  background: #0A0A0A !important;
  border-color: #0A0A0A !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}
.o_contact_us .form-control,
section.o_contact .form-control {
  border-color: var(--ct-line, #E4ECF3) !important;
  border-radius: 10px !important;
}

/* ---- Floating WhatsApp button (injected by cartech-pdp-v2.js) ----------
   Sits on every page, including the Odoo-owned ones we do not author.
   Brand palette, not WhatsApp green: the design system permits one accent. */
.ct-wa-fab {
  position: fixed;
  z-index: 1040;                 /* over page content, under Odoo modals */
  /* inline-start = the right-hand side in this RTL site. The PDP's sticky
     checkout pill sits inline-end on desktop, so they cannot collide. */
  inset-inline-start: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px;
  border-radius: 100px;
  background: #0A0A0A;
  color: #fff;
  text-decoration: none;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.ct-wa-fab:hover,
.ct-wa-fab:focus-visible {
  background: #3DDDD6;
  color: #0A0A0A;
  transform: translateY(-2px);
}
.ct-wa-fab svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* The PDP's sticky checkout bar is full-width and 74px tall below 981px;
   lift the button clear of it so it never covers the buy button. Above that
   the bar becomes a pill on the opposite side, so no offset is needed. */
@media (max-width: 980px) {
  body.lux-pdp .ct-wa-fab { bottom: 94px; }
}

/* on small screens drop the label so the button never crowds the checkout bar */
@media (max-width: 600px) {
  .ct-wa-fab { padding: 0; width: 54px; justify-content: center; }
  .ct-wa-fab__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-wa-fab { transition: none; }
  .ct-wa-fab:hover, .ct-wa-fab:focus-visible { transform: none; }
}
