/* =========================================================
   UDON CAR RENT 2026 — GLOBAL HEADER v3.0 — UNIFIED ALL PAGES
   Applies to ALL site pages, including the homepage.
   One header system now controls every page.
========================================================= */

:root{
  --udc26-orange:#f97316;
  --udc26-orange2:#ea580c;
  --udc26-blue:#2563eb;
  --udc26-ink:#172033;
  --udc26-border:#e2e8f0;
}

body header:has(.carrental-logo) > hr,
body header:has(.carrental-logo) + hr{
  display:none!important;
}

/* v3 FIX: Homepage already has body.home * { box-sizing:border-box },
   but inner pages do not. Without this, min-height:84px + 20px padding
   becomes ~104px on /our-cars/ while the homepage stays ~84px. */
body header:has(.carrental-logo),
body header:has(.carrental-logo) *{
  box-sizing:border-box!important;
}

/* ---------- DESKTOP HEADER ---------- */
body header:has(.carrental-logo){
  position:sticky;
  top:0;
  z-index:10000;
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid rgba(226,232,240,.9)!important;
  box-shadow:0 5px 24px rgba(15,23,42,.055)!important;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

body.admin-bar header{
  top:32px;
}

body header:has(.carrental-logo) .container{
  width:100%!important;
  max-width:1180px!important;
  min-height:84px!important;
  margin:0 auto!important;
  padding:10px 22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
}

body header:has(.carrental-logo) .container > a{
  display:block!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}

body header:has(.carrental-logo) .carrental-logo{
  display:block!important;
  width:240px!important;
  max-width:240px!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 auto!important;
}

body header:has(.carrental-logo) .container > hr{
  display:none!important;
}

body header:has(.carrental-logo) .header-right{
  flex:1 1 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:18px!important;
  float:none!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
}

body header:has(.carrental-logo) .header-right > p{
  order:2!important;
  margin:0!important;
  padding:0!important;
  white-space:nowrap!important;
  font-size:13px!important;
  line-height:1!important;
}

body header:has(.carrental-logo) .header-right > p a{
  display:inline-flex!important;
  align-items:center!important;
  min-height:38px!important;
  padding:9px 12px!important;
  border-radius:999px!important;
  color:#0f172a!important;
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  font-weight:750!important;
  text-decoration:none!important;
  transition:background .2s ease,border-color .2s ease,color .2s ease!important;
}

body header:has(.carrental-logo) .header-right > p a:hover{
  background:#eff6ff!important;
  border-color:#bfdbfe!important;
  color:#1d4ed8!important;
}

body header:has(.carrental-logo) .header-right > p span{
  display:none!important;
}

body header:has(.carrental-logo) nav{
  order:1!important;
  margin:0!important;
  padding:0!important;
  float:none!important;
}

body header:has(.carrental-logo) .navigation-header-trigger{
  display:none!important;
}

body header:has(.carrental-logo) .navigation-header{
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}

body header:has(.carrental-logo) .navigation-header > li{
  margin:0!important;
  padding:0!important;
  float:none!important;
  border:0!important;
}

body header:has(.carrental-logo) .navigation-header > li > a{
  display:block!important;
  padding:11px 10px!important;
  color:#334155!important;
  background:transparent!important;
  border:0!important;
  border-radius:9px!important;
  font-size:13px!important;
  font-weight:750!important;
  line-height:1.2!important;
  text-decoration:none!important;
  transition:background .2s ease,color .2s ease!important;
}

body header:has(.carrental-logo) .navigation-header > li > a:hover,
body header:has(.carrental-logo) .navigation-header > .current-menu-item > a,
body header:has(.carrental-logo) .navigation-header > .current_page_item > a{
  color:#1d4ed8!important;
  background:#eff6ff!important;
}

body .udc26-header-book{
  order:3!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:40px!important;
  padding:10px 15px!important;
  border-radius:10px!important;
  color:#fff!important;
  background:var(--udc26-orange)!important;
  border:0!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1.2!important;
  text-decoration:none!important;
  box-shadow:0 8px 20px rgba(249,115,22,.22)!important;
  white-space:nowrap!important;
  transition:background .2s ease,transform .2s ease!important;
}

body .udc26-header-book:hover{
  background:var(--udc26-orange2)!important;
  transform:translateY(-1px)!important;
}

body header:has(.carrental-logo) .udc26-mobile-extra{
  display:none!important;
}

/* ---------- TABLET ---------- */
@media(max-width:1200px){
  body header:has(.carrental-logo) .carrental-logo{
    width:220px!important;
    max-width:220px!important;
  }
}

@media(max-width:1050px){
  body header:has(.carrental-logo) .header-right > p{
    display:none!important;
  }
}

/* ---------- MOBILE ---------- */
@media(max-width:820px){
  body.admin-bar header{
    top:46px!important;
  }

  body header:has(.carrental-logo){
    overflow:visible!important;
  }

  body header:has(.carrental-logo) .container{
    min-height:64px!important;
    padding:6px 14px!important;
    gap:12px!important;
    overflow:visible!important;
  }

  body header:has(.carrental-logo) .carrental-logo{
    width:185px!important;
    max-width:185px!important;
    height:auto!important;
  }

  body header:has(.carrental-logo) .header-right{
    flex:0 0 auto!important;
    margin-left:auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:0!important;
    width:auto!important;
    overflow:visible!important;
  }

  body header:has(.carrental-logo) .header-right > p,
  body .udc26-header-book{
    display:none!important;
  }

  body header:has(.carrental-logo) nav{
    order:1!important;
    position:relative!important;
    float:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }

  /* Isolated hamburger: prevents the legacy theme arrow/sprite appearing. */
  body header:has(.carrental-logo) .navigation-header-trigger{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 46px!important;
    width:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #dbe3ee!important;
    border-radius:14px!important;
    color:#0f172a!important;
    background:#fff!important;
    background-image:none!important;
    box-shadow:0 4px 14px rgba(15,23,42,.08)!important;
    font-size:0!important;
    line-height:0!important;
    text-indent:0!important;
    text-shadow:none!important;
    cursor:pointer!important;
    user-select:none!important;
    overflow:hidden!important;
    appearance:none!important;
    -webkit-appearance:none!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }

  body header:has(.carrental-logo) .navigation-header-trigger:before,
  body header:has(.carrental-logo) .navigation-header-trigger:after{
    content:none!important;
    display:none!important;
    width:0!important;
    height:0!important;
    border:0!important;
    background:none!important;
  }

  body header:has(.carrental-logo) .navigation-header-trigger .udc26-hamburger{
    position:relative!important;
    display:block!important;
    width:22px!important;
    height:16px!important;
    margin:0!important;
    padding:0!important;
    pointer-events:none!important;
  }

  body header:has(.carrental-logo) .navigation-header-trigger .udc26-hamburger-bar{
    position:absolute!important;
    left:0!important;
    display:block!important;
    width:22px!important;
    height:2px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:999px!important;
    background:#0f172a!important;
    opacity:1!important;
    transform-origin:center!important;
    transition:transform .2s ease,opacity .16s ease,top .2s ease!important;
  }

  body header:has(.carrental-logo) .navigation-header-trigger .udc26-hamburger-bar:nth-child(1){top:0!important}
  body header:has(.carrental-logo) .navigation-header-trigger .udc26-hamburger-bar:nth-child(2){top:7px!important}
  body header:has(.carrental-logo) .navigation-header-trigger .udc26-hamburger-bar:nth-child(3){top:14px!important}

  body header:has(.carrental-logo) .navigation-header-trigger.udc26-menu-open .udc26-hamburger-bar:nth-child(1){
    top:7px!important;
    transform:rotate(45deg)!important;
  }
  body header:has(.carrental-logo) .navigation-header-trigger.udc26-menu-open .udc26-hamburger-bar:nth-child(2){
    opacity:0!important;
    transform:scaleX(.2)!important;
  }
  body header:has(.carrental-logo) .navigation-header-trigger.udc26-menu-open .udc26-hamburger-bar:nth-child(3){
    top:7px!important;
    transform:rotate(-45deg)!important;
  }

  body header:has(.carrental-logo) .navigation-header{
    display:none!important;
    position:absolute!important;
    z-index:10050!important;
    top:calc(100% + 8px)!important;
    right:0!important;
    left:auto!important;
    width:min(340px,calc(100vw - 30px))!important;
    max-height:calc(100vh - 100px)!important;
    max-height:calc(100dvh - 100px - env(safe-area-inset-bottom))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:2px!important;
    margin:0!important;
    padding:8px!important;
    list-style:none!important;
    background:#fff!important;
    border:1px solid #dfe7f1!important;
    border-radius:16px!important;
    box-shadow:0 22px 55px rgba(15,23,42,.18)!important;
    transform:none!important;
    float:none!important;
  }

  body header:has(.carrental-logo) .navigation-header.udc26-mobile-open{
    display:flex!important;
  }

  body header:has(.carrental-logo) .navigation-header > li{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    float:none!important;
    position:static!important;
    border:0!important;
    background:transparent!important;
  }

  body header:has(.carrental-logo) .navigation-header > li > a{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    min-height:44px!important;
    margin:0!important;
    padding:11px 13px!important;
    border:0!important;
    border-radius:10px!important;
    background:transparent!important;
    color:#26354b!important;
    font-size:14px!important;
    font-weight:750!important;
    line-height:1.35!important;
    text-align:left!important;
    white-space:normal!important;
    text-decoration:none!important;
    box-shadow:none!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }

  body header:has(.carrental-logo) .navigation-header > li > a:hover,
  body header:has(.carrental-logo) .navigation-header > .current-menu-item > a,
  body header:has(.carrental-logo) .navigation-header > .current_page_item > a{
    background:#eff6ff!important;
    color:#1d4ed8!important;
  }

  body header:has(.carrental-logo) .navigation-header > li.udc26-mobile-extra{
    display:block!important;
  }

  body header:has(.carrental-logo) .navigation-header > li.udc26-mobile-divider{
    border-top:1px solid #e7edf5!important;
    margin-top:6px!important;
    padding-top:6px!important;
  }

  body header:has(.carrental-logo) .navigation-header > li.udc26-mobile-line > a{
    color:#087a3f!important;
    background:#f0fdf4!important;
  }

  body header:has(.carrental-logo) .navigation-header > li.udc26-mobile-call > a{
    color:#334155!important;
    background:#f8fafc!important;
  }

  body header:has(.carrental-logo) .navigation-header > li.udc26-mobile-book > a{
    justify-content:center!important;
    margin-top:4px!important;
    background:#f97316!important;
    color:#fff!important;
    font-weight:850!important;
  }

  body header:has(.carrental-logo) .navigation-header-trigger:focus-visible,
  body header:has(.carrental-logo) .navigation-header > li > a:focus-visible{
    outline:3px solid rgba(37,99,235,.22)!important;
    outline-offset:2px!important;
  }

  body.udc26-nav-open{
    overflow:hidden!important;
  }
}

@media(max-width:480px){
  body header:has(.carrental-logo) .carrental-logo{
    width:175px!important;
    max-width:175px!important;
  }
}

@media(max-width:360px){
  body header:has(.carrental-logo) .carrental-logo{
    width:160px!important;
    max-width:160px!important;
  }
}
