.mafaq-shop-sidebar{
  --mafaq-navy:#183b56;
  --mafaq-dark:#0d293e;
  --mafaq-gold:#f7931e;
  --mafaq-gold-dark:#d47b12;
  --mafaq-white:#fff;
  --mafaq-light:#f7f9fb;
  --mafaq-border:#e3e8ed;
  --mafaq-text:#263746;
  width:100%;
  font-family:"Montserrat",Arial,sans-serif;
}

.mafaq-shop-sidebar *,
.mafaq-shop-sidebar *::before,
.mafaq-shop-sidebar *::after{box-sizing:border-box}

.mafaq-sidebar-card{
  position:relative;
  margin:0 0 22px;
  padding:23px;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--mafaq-border);
  border-radius:14px;
  box-shadow:0 8px 26px rgba(24,59,86,.09);
  transition:transform .3s ease,border-color .3s ease,box-shadow .3s ease;
}

.mafaq-sidebar-card::before{
  content:"";
  position:absolute;
  top:0;
  right:0;
  left:0;
  height:4px;
  background:linear-gradient(90deg,var(--mafaq-navy),var(--mafaq-gold));
}

.mafaq-sidebar-card:hover{
  transform:translateY(-3px);
  border-color:rgba(247,147,30,.65);
  box-shadow:0 15px 36px rgba(24,59,86,.14);
}

.mafaq-sidebar-card:last-child{margin-bottom:0}

.mafaq-widget-title{
  position:relative;
  margin:0 0 18px!important;
  padding:0 0 12px!important;
  color:var(--mafaq-navy)!important;
  font-size:18px!important;
  font-weight:700!important;
  line-height:1.4!important;
  border-bottom:1px solid var(--mafaq-border);
}

.mafaq-widget-title::after{
  content:"";
  position:absolute;
  bottom:-1px;
  left:0;
  width:52px;
  height:3px;
  background:var(--mafaq-gold);
  border-radius:20px;
}

.mafaq-shop-sidebar .woocommerce-product-search{
  display:flex;
  width:100%;
  gap:8px;
  padding:0;
  border:0;
}

.mafaq-shop-sidebar .search-field{
  width:100%;
  min-width:0;
  height:48px;
  margin:0;
  padding:0 14px;
  color:var(--mafaq-text);
  font:inherit;
  font-size:14px;
  background:var(--mafaq-light);
  border:1px solid var(--mafaq-border);
  border-radius:8px;
  outline:0;
  box-shadow:none;
  transition:border-color .25s ease,box-shadow .25s ease;
}

.mafaq-shop-sidebar .search-field:focus{
  background:#fff;
  border-color:var(--mafaq-gold);
  box-shadow:0 0 0 3px rgba(247,147,30,.14);
}

.mafaq-shop-sidebar .woocommerce-product-search button{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  min-width:48px;
  height:48px;
  margin:0;
  padding:0 14px;
  color:#fff!important;
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  background:var(--mafaq-gold)!important;
  border:0!important;
  border-radius:8px;
  transition:transform .25s ease,background .25s ease;
}

.mafaq-shop-sidebar .woocommerce-product-search button:hover,
.mafaq-shop-sidebar .woocommerce-product-search button:focus{
  background:var(--mafaq-navy)!important;
  transform:translateY(-2px);
}

.mafaq-product-categories,
.mafaq-product-categories ul{
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}

.mafaq-product-categories{
  max-height:var(--mafaq-list-height,520px);
  padding-right:5px!important;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-color:var(--mafaq-gold) #eef1f4;
  scrollbar-width:thin;
}

.mafaq-product-categories::-webkit-scrollbar{width:5px}
.mafaq-product-categories::-webkit-scrollbar-track{background:#eef1f4;border-radius:10px}
.mafaq-product-categories::-webkit-scrollbar-thumb{background:var(--mafaq-gold);border-radius:10px}

.mafaq-product-categories li{
  position:relative;
  margin:0!important;
  padding:0!important;
  border-bottom:1px solid #edf0f3;
}

.mafaq-product-categories li:last-child{border-bottom:0}

.mafaq-product-categories li>a{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
  min-height:45px;
  padding:10px 43px 10px 25px!important;
  color:var(--mafaq-text)!important;
  font-size:14px;
  font-weight:500;
  line-height:1.45;
  text-decoration:none!important;
  background:transparent;
  border-radius:7px;
  transition:color .25s ease,background .25s ease,padding .25s ease;
}

.mafaq-product-categories li>a::before{
  content:"›";
  position:absolute;
  top:50%;
  left:7px;
  color:var(--mafaq-gold);
  font-size:23px;
  font-weight:700;
  line-height:1;
  transform:translateY(-53%);
  transition:transform .25s ease;
}

.mafaq-product-categories li>a:hover,
.mafaq-product-categories li>a:focus,
.mafaq-product-categories li.current-cat>a,
.mafaq-product-categories li.current-cat-parent>a{
  padding-left:30px!important;
  color:#fff!important;
  background:linear-gradient(135deg,var(--mafaq-navy),var(--mafaq-dark));
}

.mafaq-product-categories li>a:hover::before,
.mafaq-product-categories li>a:focus::before,
.mafaq-product-categories li.current-cat>a::before,
.mafaq-product-categories li.current-cat-parent>a::before{
  transform:translate(4px,-53%);
}

.mafaq-product-categories li>.count{
  position:absolute;
  z-index:2;
  top:22px;
  right:8px;
  min-width:26px;
  padding:3px 6px;
  color:var(--mafaq-navy);
  font-size:11px;
  font-weight:700;
  line-height:1.3;
  text-align:center;
  pointer-events:none;
  background:#edf3f7;
  border-radius:20px;
  transform:translateY(-50%);
  transition:color .25s ease,background .25s ease;
}

.mafaq-product-categories li:hover>.count,
.mafaq-product-categories li.current-cat>.count,
.mafaq-product-categories li.current-cat-parent>.count{
  color:#fff;
  background:var(--mafaq-gold);
}

.mafaq-product-categories .children{
  margin:4px 0 8px 17px!important;
  padding-left:10px!important;
  border-left:2px solid rgba(247,147,30,.42);
}

.mafaq-product-categories .children li>a{
  min-height:38px;
  padding-top:7px!important;
  padding-bottom:7px!important;
  font-size:13px;
}

.mafaq-shop-sidebar a:focus-visible,
.mafaq-shop-sidebar button:focus-visible,
.mafaq-shop-sidebar input:focus-visible{
  outline:3px solid rgba(247,147,30,.36);
  outline-offset:3px;
}

@media(max-width:991px){
  .mafaq-sidebar-card{padding:20px}
  .mafaq-sidebar-card:hover{transform:none}
}

@media(max-width:575px){
  .mafaq-sidebar-card{
    margin-bottom:18px;
    padding:18px 15px;
  }
  .mafaq-widget-title{font-size:16px!important}
  .mafaq-product-categories{max-height:min(var(--mafaq-list-height,390px),390px)}
  .mafaq-product-categories li>a{font-size:13px}
  .mafaq-shop-sidebar .woocommerce-product-search{gap:6px}
}

@media(prefers-reduced-motion:reduce){
  .mafaq-shop-sidebar *,
  .mafaq-shop-sidebar *::before,
  .mafaq-shop-sidebar *::after{
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
  }
}

/* ==========================================================
   V1.1.2 – FORCED DEPTH INDENTATION
   Uses the PHP depth classes directly, so theme list styles cannot flatten
   the category hierarchy.
========================================================== */

.mafaq-shop-sidebar .mafaq-children{
  width:100%!important;
  margin:4px 0 7px!important;
  padding:0!important;
  overflow:visible!important;
  border-left:0!important;
}

.mafaq-shop-sidebar .mafaq-category-item>.mafaq-category-row{
  box-sizing:border-box;
  max-width:100%;
}

.mafaq-shop-sidebar .mafaq-depth-0>.mafaq-category-row{
  width:100%!important;
  margin-left:0!important;
}

.mafaq-shop-sidebar .mafaq-depth-1>.mafaq-category-row{
  width:calc(100% - 24px)!important;
  margin-left:24px!important;
}

.mafaq-shop-sidebar .mafaq-depth-2>.mafaq-category-row{
  width:calc(100% - 48px)!important;
  margin-left:48px!important;
}

.mafaq-shop-sidebar .mafaq-depth-3>.mafaq-category-row{
  width:calc(100% - 72px)!important;
  margin-left:72px!important;
}

.mafaq-shop-sidebar .mafaq-depth-4>.mafaq-category-row,
.mafaq-shop-sidebar .mafaq-depth-5>.mafaq-category-row{
  width:calc(100% - 84px)!important;
  margin-left:84px!important;
}

/* Restore a consistent readable font size at every level. */
.mafaq-shop-sidebar .mafaq-depth-0>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-1>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-2>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-3>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-4>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-5>.mafaq-category-row>a{
  color:var(--mafaq-text)!important;
  font-size:14px!important;
  line-height:1.45!important;
}

.mafaq-shop-sidebar .mafaq-depth-0>.mafaq-category-row>a{font-weight:700!important}
.mafaq-shop-sidebar .mafaq-depth-1>.mafaq-category-row>a{font-weight:600!important}
.mafaq-shop-sidebar .mafaq-depth-2>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-3>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-4>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-depth-5>.mafaq-category-row>a{font-weight:500!important}

.mafaq-shop-sidebar .mafaq-category-item>.mafaq-category-row:hover>a,
.mafaq-shop-sidebar .mafaq-category-item.current-cat>.mafaq-category-row>a,
.mafaq-shop-sidebar .mafaq-category-item.current-cat-parent>.mafaq-category-row>a{
  color:#fff!important;
}

/* Fixed guide and branch positions for each visible level. */
.mafaq-shop-sidebar .mafaq-depth-1,
.mafaq-shop-sidebar .mafaq-depth-2,
.mafaq-shop-sidebar .mafaq-depth-3,
.mafaq-shop-sidebar .mafaq-depth-4,
.mafaq-shop-sidebar .mafaq-depth-5{
  position:relative;
}

.mafaq-shop-sidebar .mafaq-depth-1::after,
.mafaq-shop-sidebar .mafaq-depth-2::after,
.mafaq-shop-sidebar .mafaq-depth-3::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width:2px;
  pointer-events:none;
  background:rgba(247,147,30,.28);
}

.mafaq-shop-sidebar .mafaq-depth-1::after{left:12px}
.mafaq-shop-sidebar .mafaq-depth-2::after{left:36px}
.mafaq-shop-sidebar .mafaq-depth-3::after{left:60px}

.mafaq-shop-sidebar .mafaq-children>.mafaq-category-item::before{
  display:none!important;
}

@media(max-width:575px){
  .mafaq-shop-sidebar .mafaq-depth-1>.mafaq-category-row{
    width:calc(100% - 20px)!important;
    margin-left:20px!important;
  }
  .mafaq-shop-sidebar .mafaq-depth-2>.mafaq-category-row{
    width:calc(100% - 40px)!important;
    margin-left:40px!important;
  }
  .mafaq-shop-sidebar .mafaq-depth-3>.mafaq-category-row{
    width:calc(100% - 60px)!important;
    margin-left:60px!important;
  }
  .mafaq-shop-sidebar .mafaq-depth-1::after{left:9px}
  .mafaq-shop-sidebar .mafaq-depth-2::after{left:29px}
  .mafaq-shop-sidebar .mafaq-depth-3::after{left:49px}
}

/* ==========================================================
   V1.1 CATEGORY FILTER + HIDE/SHOW CONTROLS
========================================================== */

.mafaq-section-heading{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:10px;
}

.mafaq-section-heading .mafaq-widget-title{
  flex:1;
  padding-right:38px!important;
}

.mafaq-section-toggle,
.mafaq-category-toggle{
  position:absolute;
  z-index:4;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0;
  color:var(--mafaq-navy);
  cursor:pointer;
  background:#edf3f7!important;
  border:0!important;
  border-radius:50%;
  box-shadow:none!important;
}

.mafaq-section-toggle{
  top:-2px;
  right:0;
  width:32px;
  height:32px;
}

.mafaq-section-toggle span,
.mafaq-category-toggle span{
  position:relative;
  width:12px;
  height:12px;
}

.mafaq-section-toggle span::before,
.mafaq-section-toggle span::after,
.mafaq-category-toggle span::before,
.mafaq-category-toggle span::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:11px;
  height:2px;
  background:currentColor;
  border-radius:2px;
  transform:translate(-50%,-50%);
}

.mafaq-section-toggle span::after,
.mafaq-category-toggle span::after{
  transform:translate(-50%,-50%) rotate(90deg);
  transition:opacity .2s ease,transform .2s ease;
}

.mafaq-section-toggle[aria-expanded="true"] span::after,
.mafaq-category-toggle[aria-expanded="true"] span::after{
  opacity:0;
  transform:translate(-50%,-50%) rotate(0);
}

.mafaq-section-toggle:hover,
.mafaq-section-toggle:focus,
.mafaq-category-toggle:hover,
.mafaq-category-toggle:focus{
  color:#fff;
  background:var(--mafaq-gold)!important;
}

.mafaq-sidebar-card.is-collapsed .mafaq-section-content{display:none}

.mafaq-category-row{
  position:relative;
  display:flex;
  align-items:center;
  min-height:45px;
  border-radius:7px;
  transition:background .25s ease;
}

.mafaq-category-row>a{
  position:relative;
  display:flex;
  flex:1;
  align-items:center;
  min-width:0;
  min-height:45px;
  padding:10px 76px 10px 25px!important;
  color:var(--mafaq-text)!important;
  font-size:14px;
  font-weight:500;
  line-height:1.45;
  text-decoration:none!important;
  border-radius:7px;
  transition:color .25s ease,padding .25s ease;
}

.mafaq-category-row>a::before{
  content:"›";
  position:absolute;
  top:50%;
  left:7px;
  color:var(--mafaq-gold);
  font-size:23px;
  font-weight:700;
  line-height:1;
  transform:translateY(-53%);
  transition:transform .25s ease;
}

.mafaq-category-item>.mafaq-category-row:hover,
.mafaq-category-item.current-cat>.mafaq-category-row,
.mafaq-category-item.current-cat-parent>.mafaq-category-row{
  background:linear-gradient(135deg,var(--mafaq-navy),var(--mafaq-dark));
}

.mafaq-category-item>.mafaq-category-row:hover>a,
.mafaq-category-item.current-cat>.mafaq-category-row>a,
.mafaq-category-item.current-cat-parent>.mafaq-category-row>a{
  padding-left:30px!important;
  color:#fff!important;
}

.mafaq-category-item>.mafaq-category-row:hover>a::before,
.mafaq-category-item.current-cat>.mafaq-category-row>a::before,
.mafaq-category-item.current-cat-parent>.mafaq-category-row>a::before{
  transform:translate(4px,-53%);
}

.mafaq-category-row>.count{
  position:absolute;
  z-index:2;
  top:50%;
  right:40px;
  min-width:26px;
  padding:3px 6px;
  color:var(--mafaq-navy);
  font-size:11px;
  font-weight:700;
  line-height:1.3;
  text-align:center;
  pointer-events:none;
  background:#edf3f7;
  border-radius:20px;
  transform:translateY(-50%);
}

.mafaq-category-item:not(.mafaq-has-children)>.mafaq-category-row>.count{right:8px}

.mafaq-category-row:hover>.count,
.current-cat>.mafaq-category-row>.count,
.current-cat-parent>.mafaq-category-row>.count{
  color:#fff;
  background:var(--mafaq-gold);
}

.mafaq-category-toggle{
  top:50%;
  right:6px;
  width:29px;
  height:29px;
  transform:translateY(-50%);
}

.mafaq-children{
  position:relative;
  margin:5px 0 9px 12px!important;
  padding:0 0 0 15px!important;
  list-style:none!important;
  border-left:2px solid rgba(247,147,30,.38);
}

/* Every nested level moves further to the right automatically because each
   child list receives its own margin and padding. */
.mafaq-depth-0>.mafaq-category-row>a{
  font-weight:700;
}

.mafaq-depth-1>.mafaq-category-row{
  background:rgba(24,59,86,.025);
}

.mafaq-depth-1>.mafaq-category-row>a{
  font-weight:600;
}

.mafaq-depth-2>.mafaq-category-row>a,
.mafaq-depth-3>.mafaq-category-row>a,
.mafaq-depth-4>.mafaq-category-row>a{
  color:#536675!important;
  font-size:12.5px;
  font-weight:500;
}

.mafaq-depth-2>.mafaq-category-row>a::before,
.mafaq-depth-3>.mafaq-category-row>a::before,
.mafaq-depth-4>.mafaq-category-row>a::before{
  width:6px;
  height:6px;
  content:"";
  background:var(--mafaq-gold);
  border-radius:50%;
  transform:translateY(-50%);
}

.mafaq-depth-2>.mafaq-category-row:hover>a::before,
.mafaq-depth-3>.mafaq-category-row:hover>a::before,
.mafaq-depth-4>.mafaq-category-row:hover>a::before,
.mafaq-depth-2.current-cat>.mafaq-category-row>a::before,
.mafaq-depth-3.current-cat>.mafaq-category-row>a::before,
.mafaq-depth-4.current-cat>.mafaq-category-row>a::before{
  transform:translate(3px,-50%);
}

/* Short horizontal branch mark makes parent/child relation easier to see. */
.mafaq-children>.mafaq-category-item::before{
  content:"";
  position:absolute;
  top:22px;
  left:-15px;
  width:10px;
  height:1px;
  background:rgba(247,147,30,.48);
}

.has-category-accordion .mafaq-category-item:not(.is-open)>.mafaq-children{display:none}

.mafaq-children .mafaq-category-row,
.mafaq-children .mafaq-category-row>a{min-height:38px}
.mafaq-children .mafaq-category-row>a{
  padding-top:7px!important;
  padding-bottom:7px!important;
  font-size:13px;
}

.mafaq-children .mafaq-children .mafaq-category-row>a{
  font-size:12.5px;
}

.mafaq-children .mafaq-children .mafaq-children .mafaq-category-row>a{
  font-size:12px;
}

/* Disable the older direct-link rules for the custom category markup. */
.mafaq-product-categories>.mafaq-category-item>a{display:none}

@media(max-width:575px){
  .mafaq-category-row>a{font-size:13px}
  .mafaq-section-toggle{width:30px;height:30px}
  .mafaq-children{
    margin-left:8px!important;
    padding-left:12px!important;
  }
  .mafaq-children>.mafaq-category-item::before{
    left:-12px;
    width:8px;
  }
}
