/* ==============================
   GLOBAL FIX: horizontal scroll
================================ */
html, body{
  width: 100%;
  overflow-x: hidden;
}

:root{
  --header-h: 72px;
  --adminbar-h: 0px;
  --topbar-h: 0px;
}
/* ✅ WP Admin Bar height fallback */
body.admin-bar{ --adminbar-h: 32px; }
@media (max-width: 782px){
  body.admin-bar{ --adminbar-h: 46px; }
}
body{
  padding-top: calc(var(--header-h) + var(--adminbar-h));
}

/* body lock when drawer open */
body.drawer-open{
  overflow: hidden;
}

/* ==============================
   HEADER
================================ */
.tailor-header{
  position: fixed;
  top: var(--adminbar-h);
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
}

/* Transparent on Home (ACF toggle) */
.tailor-header.is-transparent{
  background: rgba(255,255,255,.20);
  border-bottom-color: rgba(255,255,255,.18);
}

/* Shadow on scroll */
.tailor-header.is-scrolled{
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* ==============================
   TOP HEADER BAR
================================ */
.header-topbar{
  background: #08090b;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.header-topbar__inner{
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 22px;
}

.header-topbar__swiper{
  overflow: hidden;
}

.header-topbar .swiper-slide{
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-topbar__link,
.header-topbar__text{
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: #fff;
  width: 100%;
}

.header-topbar__msg{
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.35;
}

.header-topbar__link:hover{
  color: #ffd400;
}

.tailor-header.is-transparent .header-topbar{
  background: rgba(8,9,11,.92);
  backdrop-filter: blur(8px);
}

@media (max-width: 1024px){
  .header-topbar__inner{
    padding: 9px 16px;
  }

  .header-topbar__msg{
    font-size: 11px;
    letter-spacing: .08em;
  }
}

@media (max-width: 640px){
  .header-topbar__msg{
    font-size: 10px;
    letter-spacing: .06em;
  }
}

.tailor-header .nav-inner{
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 22px;

  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
}

.tailor-header .nav-inner > *{ min-width: 0; }

/* Brand */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img{
  height: 45px;
  width: auto;
  display: block;
}
.brand-text{
  font-weight: 800;
  color: #111;
  letter-spacing: .2px;
}

/* Desktop nav */
.main-nav{
  justify-self: center;
  min-width: 0;
}
.main-nav ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}
.main-nav a{
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 6px;
  position: relative;
  opacity: .88;
  transition: opacity .2s ease, transform .2s ease;
}
.main-nav a:hover{
  opacity: 1;
  transform: translateY(-1px);
}
.main-nav a::after{
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 2px;
  border-radius: 99px;
  background: #111;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
  opacity: .9;
}
.main-nav a:hover::after{ transform: scaleX(1); }

/* Actions right */
.header-actions{
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-phone{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  color: #111;
  opacity: .85;
  padding: 10px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s ease, opacity .2s ease, transform .2s ease;
}
.header-phone:hover{
  opacity: 1;
  background: rgba(0,0,0,.05);
  transform: translateY(-1px);
}

.header-cta{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .2px;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.header-cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
}

/* ==============================
   BURGER (attractive + animated)
================================ */
.burger{
  width: 46px;
  height: 46px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
}
.burger:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.12);
}
.burger span{
  width: 20px;
  height: 2px;
  background: #111;
  display: block;
  border-radius: 99px;
  transition: transform .22s ease, opacity .22s ease, width .22s ease;
}
.burger.is-open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2){ opacity: 0; width: 14px; }
.burger.is-open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* ==============================
   DRAWER + BACKDROP (no scroll)
================================ */
.drawer-backdrop{
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.drawer-backdrop.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 92vw);
  background: #fff;
  z-index: 1001;
  transform: translateX(100%); /* IMPORTANT: 110% ki jagah 100% */
  transition: transform .28s ease;
  will-change: transform;
  box-shadow: -20px 0 40px rgba(0,0,0,.12);
  padding: 16px;
}
.mobile-drawer.is-open{
  transform: translateX(0);
}

.drawer-close{
  border: 0;
  background: rgba(0,0,0,.06);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu{
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
}
.mobile-menu a{
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #111;
  font-weight: 800;
}
.mobile-menu a:hover{ background: rgba(0,0,0,.06); }

/* ==============================
   RESPONSIVE (1024 and below)
================================ */
@media (max-width: 1024px){
  .main-nav{ display: none; }
  .header-phone, .header-cta{ display: none; }
  .burger{ display: inline-flex; }
}

/* Safety: Desktop pe drawer/backdrop force off */
@media (min-width: 1025px){
  .mobile-drawer{ transform: translateX(100%) !important; }
}



/* ==============================
   FIX: Header scroll + Burger not clickable
   (append at end of header.css)
================================ */

/* 1) Ensure backdrop truly disappears when hidden (so it can’t block clicks) */
#drawerBackdrop[hidden]{
  display: none !important;
}

/* 2) Force drawer/backdrop to stay fixed (in case any other css overrides it)
      This prevents header getting extra height / internal scroll */
#drawerBackdrop.drawer-backdrop{
  position: fixed !important;
  inset: 0 !important;
}

#mobileDrawer.mobile-drawer{
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  height: 100dvh !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Safety: header should never become scroll container */
#siteHeader{
  overflow: visible !important;
}
#siteHeader, .drawer-backdrop, .mobile-drawer{
  z-index: 9998 !important;
}

/* 3) Keep burger always above header/backdrop layers (so click works) */
#burgerBtn.burger{
  position: relative;
  z-index: 1205;
}

/* Fix: ensure drawer/backdrop stay on top of header */
#drawerBackdrop{ z-index: 9998; }
#mobileDrawer{ z-index: 9999; }

#drawerBackdrop[hidden]{ display:none !important; }






/* ==============================
   MOBILE DRAWER: show phone + CTA
================================ */

/* Drawer inner layout so bottom actions stay visible */
.mobile-drawer__inner{
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mobile-drawer__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.mobile-drawer__title{
  font-weight: 900;
  font-size: 16px;
  color: #111;
}

.mobile-menu{
  margin-top: 12px;
  flex: 1; /* takes space, pushes bottom actions down */
}

.mobile-drawer__bottom{
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* IMPORTANT: override the responsive hide for drawer-only */
@media (max-width: 1024px){
  .mobile-drawer__bottom .header-phone,
  .mobile-drawer__bottom .header-cta{
    display: inline-flex;   /* undo display:none */
    width: 100%;
  }

  .mobile-drawer__bottom .header-cta{
    justify-content: center;
  }
}





/* ==============================
   Layering + click safety
================================ */

/* Backdrop truly gone when hidden (prevents blocking clicks) */
#drawerBackdrop[hidden]{
  display: none !important;
}

/* Keep drawer/backdrop fixed even if other CSS overrides */
#drawerBackdrop.drawer-backdrop{
  position: fixed !important;
  inset: 0 !important;
  z-index: 1100;
}

#mobileDrawer.mobile-drawer{
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  height: 100dvh !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1101;
}

/* Header should sit above page content but below drawer */
#siteHeader{
  z-index: 1000;
}



/* ==============================
   MOBILE HOME HEADER LIKE ZEST
================================ */
@media (max-width: 1024px){
  body.home #siteHeader{
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.home #siteHeader .nav-inner{
    position: relative;
    min-height: 72px;
    grid-template-columns: 40px 1fr 40px;
    padding: 12px 16px;
    gap: 0;
  }

  body.home #siteHeader .header-actions{
    grid-column: 1;
    justify-self: start;
    gap: 0;
  }

  body.home #siteHeader .nav-inner::after{
    content: "";
    width: 40px;
    height: 40px;
    justify-self: end;
  }

  body.home #siteHeader .brand{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
  }

  body.home #siteHeader .brand img{
    height: 45px;
    width: auto;
  }

  body.home #siteHeader .burger{
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.home #siteHeader .burger:hover{
    transform: none;
    box-shadow: none;
  }

  body.home #siteHeader .burger span{
    background: #fff;
  }

  body.home #siteHeader.is-scrolled{
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    backdrop-filter: blur(10px);
  }

  body.home #siteHeader.is-scrolled .brand{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.home #siteHeader.is-scrolled .burger{
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,.08);
  }

  body.home #siteHeader.is-scrolled .burger span{
    background: #111;
  }
}

@media (max-width: 575px){
  body.home #siteHeader .brand img{
    height: 40px;
    width: auto;
  }
}