/* ==============================
   Total Tech - Pro Menu (Blue/Black) - FINAL FIX (Desktop + Mobile)
   File: css/menu-pro.css

   ============================== */
   
:root{
  --tt-black: #0b1220;
  --tt-black-2: #0e1a2f;
  --tt-blue: #1f79ff !important; 
  --tt-blue-2: #056bd8 !important;
  --tt-text: #e7eefc;
  --tt-muted: rgba(231,238,252,.78);
  --tt-card: rgba(255,255,255,.07);
  --tt-border: rgba(255,255,255,.14);
}

/* Prevent horizontal scroll */
html, body { overflow-x: hidden; }

/* IMPORTANT: some templates set transforms/overflow that break fixed/sticky */
.boxed_wrapper, .mainmenu-bg { overflow: visible !important; }

/* =======================
   TOPBAR
   ======================= */

.tt-topbar{
  background: linear-gradient(90deg, var(--tt-black), var(--tt-black-2));
  color: var(--tt-text);
  font-size: 13px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-topbar-inner{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding:10px 0;
}
.tt-topbar-left, .tt-topbar-right{
  display:flex;
  gap:10px;
  align-items:center;
  color: var(--tt-muted);
}
.tt-topbar i{ color: var(--tt-blue-2); }

/* =======================
   HEADER
   ======================= */
   
.tt-header{
  background:#fff;
  border-bottom: 1px solid #eef2f7;
}
.tt-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
}
.tt-logo img{
   height:46px; 
   width:auto; 
   display:block; 
}
.tt-header-actions{
  display:flex;
  justify-content: center;
  align-items:center;
  width: 100%;
  justify-items: center;
  align-content: center; 
  gap:14px;
}
.tt-action{
  display:flex;
  gap:10px;
  align-items:center;
  text-decoration:none;
  color:#111827;
  padding:10px 12px;
  border-radius:12px;
  background:#f7f9fc;
  border:1px solid #eef2f7;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.tt-action:hover{
  transform: translateY(-1px);
  background:#f2f6ff;
  border-color:#dbe7ff;
}
.tt-ico{
  width:38px;height:38px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(31,111,255,.10);
  color: var(--tt-blue, #1f79ff) !important;
}
.tt-action-text small{
  display:block;
  font-size:12px;
  color:#6b7280;
  line-height:1.1;
}
.tt-action-text strong{
  display:block;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
}

/* CTA button */
.tt-btn{
  background: linear-gradient(90deg, var(--tt-blue), var(--tt-blue-2)) !important;
  color:#fff !important;
  text-decoration:none;
  padding:12px 16px;
  border-radius:12px;
  font-weight:800;
  box-shadow: 0 10px 24px rgba(31,111,255,.25);
  transition: transform .2s ease, opacity .2s ease;
  white-space:nowrap;
}
.tt-btn:hover{ transform: translateY(-1px); opacity:.97; }

/* Burger button (mobile) */
.tt-burger{
  display:none;
  width:46px;height:46px;
  border-radius:12px;
  border:1px solid #eef2f7;
  background:#fff;
  cursor:pointer;
  margin-left: 0;
}
.tt-burger span{
  display:block;
  width:20px;
  height:2px;
  background:#111827;
  margin:5px auto;
  border-radius:2px;
}

/* =======================
   NAV WRAP + STICKY ANIM
   ======================= */
   
.tt-nav-wrap{
  width: 100%;
  background: linear-gradient(90deg, var(--tt-black), var(--tt-black-2));
  border-bottom: 1px solid var(--tt-border);
  position: relative;
  z-index: 99999 !important; /* always on top */
}

/* becomes fixed after scroll via JS */
.tt-nav-wrap.is-sticky{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  animation: ttSlideDown .25s ease forwards;
  box-shadow: 0 14px 40px rgba(0,0,0,.30);

  /* iOS/Chrome mobile stability */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* slide down */
@keyframes ttSlideDown{
  from{ transform: translateY(-100%); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

/* reserve space only when sticky is active (JS sets exact padding too) */
body.has-sticky-nav{ padding-top: 60px; }

/* Nav layout */
.tt-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
}
.tt-nav-links{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:6px;
}
.tt-item{ position:relative; }
.tt-item > a{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  color: var(--tt-text);
  text-decoration:none;
  font-weight:750;
  letter-spacing:.2px;
  transition: background .2s ease, color .2s ease;
}
.tt-item > a:hover{
  background: var(--tt-card);
  color:#fff;
}

/* Dropdown */
.tt-has-sub:hover .tt-sub{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}
.tt-sub{
  position:absolute;
  top:46px;
  left:0;
  min-width:230px;
  background: rgba(13,22,40,.97);
  border: 1px solid var(--tt-border);
  border-radius:14px;
  padding:8px;
  list-style:none;
  margin:0;
  opacity:0;
  transform: translateY(8px);
  pointer-events:none;
  transition: all .2s ease;
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
}
.tt-sub a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  color: var(--tt-text);
  text-decoration:none;
  font-weight:650;
}
.tt-sub a:hover{ background: rgba(255,255,255,.08); }

/* Search */
.tt-nav-right{ display:flex; align-items:center; }
.tt-search{
  display:flex;
  align-items:center;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--tt-border);
  border-radius:14px;
  overflow:hidden;
}
.tt-search input{
  border:0;
  outline:0;
  background: transparent;
  color:#fff;
  padding:10px 12px;
  width:220px;
}
.tt-search input::placeholder{ color: rgba(255,255,255,.6); }
.tt-search button{
  border:0;
  background: transparent;
  color:#fff;
  padding:10px 12px;
  cursor:pointer;
}
.tt-search button:hover{ background: rgba(255,255,255,.08); }

/* =======================
   MOBILE DRAWER
   ======================= */
.tt-drawer{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
  z-index: 100000 !important; /* above nav */
}
.tt-drawer.is-open{
  opacity:1;
  pointer-events:auto;
}

.tt-drawer-panel{
  position:absolute;
  top:0; right:0;
  width:min(360px, 92vw);
  height:100%;
  background: linear-gradient(180deg, var(--tt-black), var(--tt-black-2));
  border-left: 1px solid var(--tt-border);
  padding:16px;
  transform: translateX(14px);
  transition: transform .2s ease;
}
.tt-drawer.is-open .tt-drawer-panel{ transform: translateX(0); }

.tt-drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#fff;
  padding:8px 6px 14px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-drawer-close{
  background: transparent;
  border:0;
  color:#fff;
  font-size:30px;
  line-height:1;
  cursor:pointer;
}
.tt-drawer-links{
  list-style:none;
  padding:14px 0 0;
  margin:0;
}
.tt-drawer-links a{
  display:block;
  padding:12px 12px;
  border-radius:14px;
  color: var(--tt-text);
  text-decoration:none;
  font-weight:800;
  border: 1px solid transparent;
}
.tt-drawer-links a:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}
.tt-drawer-sep{
  height:1px;
  background: var(--tt-border);
  margin: 12px 0;
}
.tt-drawer-btn{
  background: linear-gradient(90deg, var(--tt-blue), var(--tt-blue-2));
  color:#fff !important;
  text-align:center;
  font-weight:900;
}

/* =======================
   RESPONSIVE (IMPORTANT)
   ======================= */
@media (max-width: 991px){
  .tt-action{ display:none; }
  .tt-btn{ display:none; }
  .tt-search{ display:none; }

  /* Force burger always visible */
  .tt-burger{ display:inline-block !important; }
}

@media (max-width: 767px){
  .tt-topbar-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }

  /* Desktop links hidden on small screens */
  .tt-nav-links{ display:none !important; }

  /* If old theme hides something, force show */
  .tt-nav-wrap,
  .tt-nav-wrap.is-sticky{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Optional: more stable on mobile when sticky */
@media (max-width: 767px){
  body.has-sticky-nav{
    padding-top: 60px;
  }
}
@media (max-width: 991px){
  .tt-nav-right{
    display:flex;
    align-items:center;
    gap:10px;
  }

  .tt-nav-right .tt-burger{
    display:inline-block !important;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
  }

  .tt-nav-right .tt-burger span{
    background: #ffffff;
  }
}
.tt-cart-link{
  position: relative;
}

.tt-cart-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  margin-left: 8px;
  background: var(--tt-blue-2);
  color: #06111f;
}

.tt-cart-badge.is-zero{
  opacity: .55;
}

/* =======================
   CART DRAWER
   ======================= */
.tt-cart-drawer{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 100001;
}
.tt-cart-drawer.is-open{
  opacity: 1;
  pointer-events: auto;
}

.tt-cart-drawer-panel{
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 94vw);
  height: 100%;
  background: #fff;
  box-shadow: -10px 0 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.tt-cart-drawer.is-open .tt-cart-drawer-panel{
  transform: translateX(0);
}

.tt-cart-drawer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(90deg, var(--tt-black), var(--tt-black-2));
  color: #fff;
}
.tt-cart-drawer-head strong{
  font-size: 16px;
  font-weight: 800;
}
.tt-cart-drawer-close{
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: opacity .2s;
}
.tt-cart-drawer-close:hover{
  opacity: .7;
}

.tt-cart-drawer-body{
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.tt-cart-empty{
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 15px;
}

/* Cart Item */
.tt-cart-item{
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}
.tt-cart-item:last-child{
  border-bottom: 0;
}
.tt-cart-item-img{
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  background: #f7f9fc;
}
.tt-cart-item-info{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tt-cart-item-title{
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  margin: 0;
}
.tt-cart-item-price{
  font-size: 13px;
  color: #6b7280;
}
.tt-cart-item-qty{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.tt-cart-item-qty button{
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: background .15s, border-color .15s;
}
.tt-cart-item-qty button:hover{
  background: #f3f4f6;
  border-color: #d1d5db;
}
.tt-cart-item-qty span{
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}
.tt-cart-item-remove{
  background: transparent;
  border: 0;
  color: #ef4444;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s;
}
.tt-cart-item-remove:hover{
  opacity: 1;
}

/* Footer */
.tt-cart-drawer-footer{
  padding: 16px 20px 20px;
  border-top: 1px solid #eef2f7;
  background: #f9fafb;
}

.tt-cart-summary{
  margin-bottom: 16px;
}
.tt-cart-summary-row{
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: #6b7280;
}
.tt-cart-summary-total{
  font-weight: 800;
  font-size: 16px;
  color: #111827;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  margin-top: 6px;
}

.tt-cart-drawer-btn{
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
  border: 0;
}
.tt-cart-drawer-btn:hover{
  transform: translateY(-1px);
}

.tt-cart-drawer-btn-primary{
  background: linear-gradient(90deg, var(--tt-blue), var(--tt-blue-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(31,111,255,.25);
}
.tt-cart-drawer-btn-secondary{
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  margin-top: 10px;
}
.tt-cart-drawer-btn-secondary:hover{
  background: #f9fafb;
}

/* Cart toggle button style fix */
.tt-cart-toggle{
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.tt-nav-links .tt-cart-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--tt-text);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: .2px;
  transition: background .2s ease, color .2s ease;
}
.tt-nav-links .tt-cart-toggle:hover{
  background: var(--tt-card);
  color: #fff;
}

/* Mobile drawer cart button */
.tt-drawer-cart-btn{
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--tt-text);
  font-weight: 800;
  border: 1px solid transparent;
}
.tt-drawer-cart-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}
