/* ===========================================
   Header Categories Pro (Desktop + Mobile)
   Keep it AFTER style.css & index.css
   =========================================== */

/* ---------- Variables (optional) ---------- */
:root{
  --hc-primary:#1565C0;
  --hc-primary-dark:#0D47A1;
  --hc-accent:#FF9800;
  --hc-text:#111827;
  --hc-muted:#6B7280;
  --hc-line: rgba(0,0,0,.08);
  --hc-card:#FFFFFF;
  --hc-shadow: 0 18px 55px rgba(0,0,0,.14);
}

/* ===========================================
   DESKTOP: Vertical menu (RTL Mega menu)
   =========================================== */
.offcanvas-menu,
.offcanvas-menu * {
  touch-action: manipulation;
}

/* هم‌راستا شدن دکمه دسته‌بندی + منوی لینک‌ها */
.header-three-area .row.align-items-center > .col-auto.d-flex{
  align-items: center !important;
}


.header-three-area .vertical-menu{
  position: relative;
}

.header-three-area .vertical-menu-two{
  margin-left: 10px;
  min-width: 160px;
}

.header-three-area .vertical-menu-two .vmenu-btn{
  background: transparent;
  border: none;
  width: 100%;
  height: 60px;
  padding: 0 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--hc-text);
  font-size: 15px;
  font-weight: 900;
  transition: .2s ease;
}

.header-three-area .vertical-menu-two .vmenu-btn:hover{
  background: rgba(21,101,192,.06);
}

.header-three-area .vmenu-wrapper{
  position: relative;
}

/* dropdown list */
.header-three-area .vmenu-content{
  background: var(--hc-card);
  border: 1px solid var(--hc-line);
  border-top: none;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  z-index: 99;
  display: none;
  overflow: hidden;
}

.header-three-area .vertical-menu:hover .vmenu-content{
  display: block;
}

.header-three-area .vmenu-item{
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.header-three-area .vmenu-item:last-child{
  border-bottom: none;
}

.header-three-area .vmenu-item > a{
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 800;
  color: #374151;
  transition: .15s ease;
}

.header-three-area .vmenu-item > a:hover{
  background: rgba(21,101,192,.10);
  color: var(--hc-primary-dark);
}

.header-three-area .vmenu-item.is-active > a{
  background: rgba(21,101,192,.12);
  color: var(--hc-primary-dark);
}

/* Mega panel */
.header-three-area .verticale-mega-menu{
  position: absolute;
  top: 0;
  right: 100%;
  background: var(--hc-card);
  padding: 16px 16px 10px;
  border: 1px solid var(--hc-line);
  border-radius: 18px;
  box-shadow: var(--hc-shadow);
  z-index: 120;
  display: none;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 1000px;
  max-height: 420px;
  min-height: 420px;
  overflow-y: auto;
}

/* nicer scrollbar (optional) */
.header-three-area .verticale-mega-menu::-webkit-scrollbar{ width: 8px; }
.header-three-area .verticale-mega-menu::-webkit-scrollbar-thumb{
  background: rgba(17,24,39,.18);
  border-radius: 10px;
}

.header-three-area .vmenu-submenu-column{
  width: 25%;
  padding: 8px 10px 12px;
  box-sizing: border-box;
}

.header-three-area .vmenu-submenu-column .menu-item-title{
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: var(--hc-text);
  margin-bottom: 6px;
  position: relative;
  padding-right: 12px;
  line-height: 1.8;
}

.header-three-area .vmenu-submenu-column .menu-item-title.has-submenu-indicator::before{
  content:"";
  position:absolute;
  right:0;
  top:6px;
  bottom:6px;
  width:3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--hc-primary) 0%, var(--hc-accent) 100%);
}

.header-three-area .submenu-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-three-area .submenu-list li a{
  display: block;
  padding: 5px 0;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  transition: .12s ease;
}

.header-three-area .submenu-list li a:hover{
  color: var(--hc-accent);
  transform: translateX(-2px);
}

/* Responsive mega widths */
@media (max-width: 1549px){
  .header-three-area .verticale-mega-menu{ width: 900px; }
}
@media (max-width: 1399px){
  .header-three-area .verticale-mega-menu{ width: 780px; }
  .header-three-area .vmenu-submenu-column{ width: 33.333%; }
}

/* ===========================================
   MOBILE: Offcanvas categories menu
   =========================================== */
   /* آف‌کنوس خودش اسکرول بخوره، نه صفحه */
.aside-side-menu-wrapper.offcanvas {
  overscroll-behavior: contain;
}

.aside-side-menu-wrapper .offcanvas-body{
  padding: 0 16px 18px;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.offcanvas-menu{
  position: relative;
  background: #fff;
  padding: 8px 6px;
}

/* reset lists */
.offcanvas-menu ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.offcanvas-menu li{
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 10px 0;
}

.offcanvas-menu li:last-child{
  border-bottom: none;
}

.offcanvas-menu a{
  color: var(--hc-text);
  font-size: 14px;
  font-weight: 800;
}

.menu-toggle-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.submenu-toggle{
  border: none;
  background: rgba(21,101,192,.08);
  color: var(--hc-primary-dark);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submenu-toggle i{
  transition: transform .2s ease;
}

.submenu-toggle i.rotate{
  transform: rotate(180deg);
}

.offcanvas-menu .submenu{
  margin-top: 8px;
  padding-right: 14px;
  border-right: 2px solid rgba(21,101,192,.14);
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}

.offcanvas-menu .submenu.open{
  /* max-height set by JS */
}

.offcanvas-menu .submenu a{
  display: block;
  padding: 6px 0;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.offcanvas-menu .submenu a:hover{
  color: var(--hc-primary-dark);
}
/* ===== Mobile Offcanvas Glass (Categories) ===== */
#offcanvasWithBothOptions.offcanvas{
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
  overflow: hidden; /* تا rounded قشنگ بشه */
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 25px 80px rgba(0,0,0,.20);
  /*background: rgba(255,255,255,.72);*/
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* بدنه هم کمی شیشه‌ای‌تر */
#offcanvasWithBothOptions .offcanvas-body{
  background: transparent;
}

/* Header آفکنوس */
#offcanvasWithBothOptions .offcanvas-header{
  display: flex;
  justify-content: space-between;
  text-align: right;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/*  ---- Btn Menu ----*/
/* ===== Mobile Menu Button (Hamburger -> X) ===== */
.btn-menu-pro{
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn-menu-pro:hover{
  background: rgba(255,255,255,.88);
  border-color: rgba(21,101,192,.25);
}

.btn-menu-pro:active{
  transform: scale(.96);
}

.btn-menu-pro:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(21,101,192,.18), 0 10px 30px rgba(0,0,0,.10);
}

/* hamburger lines */
.btn-menu-pro .hamburger{
  width: 22px;
  height: 18px;
  position: relative;
  display: inline-block;
}

.btn-menu-pro .hamburger .line{
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #111827;
  transition: transform .18s ease, top .18s ease, opacity .18s ease, background .18s ease;
}

.btn-menu-pro .hamburger .line:nth-child(1){ top: 2px; }
.btn-menu-pro .hamburger .line:nth-child(2){ top: 8px; }
.btn-menu-pro .hamburger .line:nth-child(3){ top: 14px; }

/* opened -> X */
.btn-menu-pro.is-open{
  background: rgba(21,101,192,.10);
  border-color: rgba(21,101,192,.25);
}

.btn-menu-pro.is-open .hamburger .line{
  background: #0D47A1;
}

.btn-menu-pro.is-open .hamburger .line:nth-child(1){
  top: 8px;
  transform: rotate(45deg);
}

.btn-menu-pro.is-open .hamburger .line:nth-child(2){
  opacity: 0;
}

.btn-menu-pro.is-open .hamburger .line:nth-child(3){
  top: 8px;
  transform: rotate(-45deg);
}

