/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ===========================
   MSB – Dynamic Mega Menu
   =========================== */

.msb-mega-cats {
    direction: rtl;
    text-align: start;
    /* padding: 20px 10px; */
    max-width: 400px;
    margin-inline: auto;
    position: relative;
}
.msb-mega-cats ul{
  list-style: none;
}
.msb-mega-cats .mega-menu-title{
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.msb-mega-cats .mega-menu-title:after{
      margin-right: 4px;
    font-weight: normal;
    font-style: normal;
    font-size: clamp(6px, 50%, 18px);
    order: 3;
    content: "\f129";
    font-family: "woodmart-font";

}

.dynamic-cats-wrapper{
    overflow: initial;
    position: absolute;
    top: 0;
    visibility: hidden;
    opacity: 0;
    width: 250px;
    /* max-height: 400px; */
    transition: all 0.3s ease;
}
.msb-mega-cats:hover .dynamic-cats-wrapper{
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    top: 20px;
}
/* القائمة الرئيسية الناتجة من الشورت كود */
.msb-mega-cats .woodmart-dynamic-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    box-shadow: 0 6px 6px #00000036;
    padding: 20px;
        max-height: 500px;
    overflow-y: scroll;
    overflow-x: hidden;
    flex-wrap: nowrap;
}

/* أعمدة المستوى الأول (Top Categories) */
.msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0 {
    flex: 0 0 22%;
    min-width: 220px;
}

.msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0.has-sub:hover ::after{
  rotate: 0deg;
transform: all ease .5s;
}
.msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0.hidden{
  display: none;
}
/* عنوان الفئة الرئيسية */
.msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0 > a {
    display: flex;
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
    justify-content: space-between;
    align-items: center;
}

.msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0 > a:hover {
    color: var(--wd-primary-color, #d4a415);
    border-color: var(--wd-primary-color, #d4a415);
}

/* القوائم الفرعية (كل المستويات الأعمق) */
.msb-mega-cats .woodmart-dynamic-cats .has-sub {
    list-style: none;
    margin: 0;
    padding: 0;
    /* padding-inline-start: 15px; */
    /* margin-top: 10px; */
}

/* أول مستوى تحت الفئة الرئيسية */
.msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0 > .has-sub {
    margin-top: 6px;
}

/* عنصر فئة داخلي */
.msb-mega-cats .woodmart-dynamic-cats .has-sub > .menu-item-cat {
    position: relative;
    margin: 0;
}

/* روابط المستويات الداخلية */
.msb-mega-cats .woodmart-dynamic-cats .has-sub > .menu-item-cat > a {
    display: block;
    font-size: 13px;
    padding: 3px 0;
    color: var(--wd-text-color, #555);
    text-decoration: none;
    line-height: 1.6;
    white-space: normal;
    transition: color 0.2s ease, transform 0.15s ease;
    width: fit-content;
}

/* هوفر على الروابط الداخلية */
.msb-mega-cats .woodmart-dynamic-cats .has-sub > .menu-item-cat > a:hover {
    color: var(--wd-primary-color, #d4a415);
    transform: translateX(-3px);
}

/* إندنت للمستويات الأعمق (Level 2+) */
.msb-mega-cats .woodmart-dynamic-cats .has-sub .has-sub {
    padding-inline-start: 12px; /* RTL */
    
}

/* مسافات بسيطة بين العناصر */
.msb-mega-cats .woodmart-dynamic-cats .has-sub > .menu-item-cat:not(:last-child) {
    margin-bottom: 1px;
}

.msb-mega-cats .menu-item-cat.has-sub{
  position: relative;
}
/* سهم بسيط يوضح أن الفئة لها أبناء (يدعم المتصفحات الحديثة) */
.msb-mega-cats .menu-item-cat.has-sub::after {
    content: "\f129";
    display: inline-block;
    font-size: 14px;
    opacity: 0.6;
    position: absolute;
    top: 0;
    inset-inline-end: 5px;
    font-family: "woodmart-font";
      rotate: 90deg;
    transition: .5s all 
ease;
}
.msb-mega-cats .menu-item-cat.has-sub .sub-cat{
  max-height: 0;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  margin: 0;
}
/* .msb-mega-cats .menu-item-cat.has-sub> .sub-cat > .has-sub{
  max-height: 0;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  margin: 0;
} */
.msb-mega-cats .menu-item-cat.has-sub:has(.sub-cat):hover > .sub-cat{
  max-height: 500px;
  visibility: visible;
  opacity: 1;
  transition: all 0.3s ease;
  margin-top:8px;
}


.msb-mega-cats .menu-item-cat.has-sub:has( > .sub-cat):hover > .sub-cat{
  max-height: 500px;
  visibility: visible;
  opacity: 1;
  transition: all 0.3s ease;
  margin-top:8px;
}
/* موبايل – خليها عمود واحد */
@media (max-width: 991px) {
    .msb-mega-cats .woodmart-dynamic-cats {
        flex-direction: column;
        gap: 12px;
    }

    .msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0 {
        flex: 0 0 100%;
        min-width: auto;
    }

    .msb-mega-cats .woodmart-dynamic-cats > .menu-item-cat.level-0 > a {
        font-size: 16px;
    }
}

#menu-item-29837{
	display:none
}