/* ============================================================
   TAGHLEEFY HEADER v1.2 — Glassmorphic | RTL Arabic
   Includes wp_nav_menu() structure styles
   ============================================================ */

.tagh-header, .tagh-header * { box-sizing: border-box; }
.tagh-header a { text-decoration: none; }

/* -- Wrapper -------------------------------------------- */
.tagh-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background  380ms cubic-bezier(0.4,0,0.2,1),
    border-color 380ms cubic-bezier(0.4,0,0.2,1),
    box-shadow  380ms cubic-bezier(0.4,0,0.2,1);
}

/* -- Scrolled ------------------------------------------- */
.tagh-header.tagh-hdr--scrolled {
  background: rgba(10, 15, 30, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(0, 212, 255, 0.13);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.38);
}

/* -- Inner layout --------------------------------------- */
.tagh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  gap: 24px;
}

/* -- Logo ----------------------------------------------- */
.tagh-header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.tagh-header__logo img {
  height: 40px;
  width: auto;
  transition: filter 380ms ease, opacity 380ms ease;
}
.tagh-header:not(.tagh-hdr--scrolled) .tagh-header__logo img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* ============================================================
   wp_nav_menu() — Desktop Nav
   WordPress outputs: <nav.tagh-header__nav-wrap>
                        <ul.tagh-header__nav>
                          <li> <a>
   ============================================================ */

/* Container <nav> */
.tagh-header__nav-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

/* UL */
.tagh-header__nav-wrap ul.tagh-header__nav,
ul.tagh-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* LI */
.tagh-header__nav-wrap ul.tagh-header__nav > li,
ul.tagh-header__nav > li {
  position: relative;
}

/* A */
.tagh-header__nav-wrap ul.tagh-header__nav > li > a,
ul.tagh-header__nav > li > a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  transition: color 220ms ease, background 220ms ease;
  white-space: nowrap;
}

/* Hover + active (WordPress adds these classes automatically) */
.tagh-header__nav-wrap ul.tagh-header__nav > li > a:hover,
.tagh-header__nav-wrap ul.tagh-header__nav > li.current-menu-item > a,
.tagh-header__nav-wrap ul.tagh-header__nav > li.current_page_item > a,
ul.tagh-header__nav > li > a:hover,
ul.tagh-header__nav > li.current-menu-item > a,
ul.tagh-header__nav > li.current_page_item > a {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.08);
}

/* Scrolled state */
.tagh-hdr--scrolled .tagh-header__nav-wrap ul.tagh-header__nav > li > a,
.tagh-hdr--scrolled ul.tagh-header__nav > li > a {
  color: rgba(226, 232, 240, 0.9);
}

/* ============================================================
   wp_nav_menu() — Mobile Nav
   WordPress outputs: <ul.tagh-header__mobile-nav>
                        <li> <a>
   ============================================================ */
ul.tagh-header__mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
ul.tagh-header__mobile-nav > li > a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  transition: all 220ms ease;
}
ul.tagh-header__mobile-nav > li > a:hover,
ul.tagh-header__mobile-nav > li.current-menu-item > a,
ul.tagh-header__mobile-nav > li.current_page_item > a {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.08);
}

/* -- Actions group -------------------------------------- */
.tagh-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Cart icon */
.tagh-hdr-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 220ms ease, background 220ms ease;
}
.tagh-hdr-cart:hover {
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.1);
}
.tagh-hdr-cart__badge {
  position: absolute;
  top: 2px; left: 2px;
  min-width: 18px; height: 18px;
  background: #FF6B35;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
  transition: transform 220ms cubic-bezier(0.34,1.56,0.64,1);
}
.tagh-hdr-cart__badge.tagh-badge--bump { transform: scale(1.4); }
.tagh-hdr-cart__badge[data-count="0"]  { display: none; }

/* Login button */
.tagh-hdr-login {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  transition: all 220ms ease;
  white-space: nowrap;
}
.tagh-hdr-login:hover {
  border-color: rgba(0, 212, 255, 0.5);
  color: #00D4FF;
  background: rgba(0, 212, 255, 0.07);
}

/* Vendor register button */



/* -- Hamburger ------------------------------------------ */
.tagh-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.tagh-header__burger span {
  display: block;
  width: 22px; height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: all 300ms cubic-bezier(0.4,0,0.2,1);
  transform-origin: center;
}
.tagh-hdr--open .tagh-header__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tagh-hdr--open .tagh-header__burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.tagh-hdr--open .tagh-header__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -- Mobile menu panel ---------------------------------- */
.tagh-header__mobile {
  overflow: hidden;
  max-height: 0;
  transition: max-height 380ms cubic-bezier(0.4,0,0.2,1), opacity 280ms ease;
  opacity: 0;
  background: rgba(10, 15, 30, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}
.tagh-hdr--open .tagh-header__mobile { max-height: 600px; opacity: 1; }
.tagh-header__mobile-inner {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* .tagh-header__mobile-actions replaced by .tagh-header__mobile-cta */


/* ============================================================
   Mobile CTA — تسجيل الدخول وتسجيل كمورد في قائمة الجوال
   ============================================================ */
.tagh-header__mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 0;
  margin-top: 12px;
  border-top: 1px solid rgba(0, 212, 255, 0.12);
}

/* Base button */
.tagh-mob-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none !important;
  transition: all 240ms ease;
  text-align: center;
  box-sizing: border-box;
}

/* Login button — outline style */
.tagh-mob-btn--login {
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}
.tagh-mob-btn--login:hover {
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.1);
  color: #00D4FF !important;
}

/* Vendor button — solid cyan (primary CTA) */


/* Cart button — subtle */
.tagh-mob-btn--cart {
  color: rgba(255,255,255,0.75) !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 600;
  position: relative;
}
.tagh-mob-btn--cart:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

/* Cart badge */
.tagh-mob-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: #FF6B35;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 100px;
  padding: 0 5px;
  line-height: 1;
}

/* -- Page body offset ----------------------------------- */
body { padding-top: 70px !important; }
.tagh-hero { margin-top: -70px; padding-top: calc(120px + 70px) !important; }

/* -- Admin Bar offset ----------------------------------- */
.admin-bar .tagh-header { top: 32px !important; }
@media screen and (max-width: 782px) {
  .admin-bar .tagh-header { top: 46px !important; }
}
.admin-bar body { padding-top: calc(70px + 32px) !important; }
@media screen and (max-width: 782px) {
  .admin-bar body { padding-top: calc(60px + 46px) !important; }
}

/* -- Responsive ----------------------------------------- */
@media (max-width: 1024px) {
  .tagh-header__nav-wrap ul.tagh-header__nav > li > a,
  ul.tagh-header__nav > li > a { padding: 8px 10px; font-size: 13px; }
  .tagh-hdr-login { display: none; }
}
@media (max-width: 768px) {
  .tagh-header__nav-wrap { display: none; }
  .tagh-hdr-login, .tagh-hdr-cart { display: none; }
  .tagh-header__burger { display: flex; }
  .tagh-header {
    background: rgba(10,15,30,0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0,212,255,0.1) !important;
  }
  body { padding-top: 60px !important; }
  .tagh-header__inner { height: 60px; }
  .tagh-hero { margin-top: -60px; padding-top: calc(100px + 60px) !important; }
}