/* =====Основні стилі====== */
.menu-class {margin: 0; padding: 0; list-style: none;}
.menu-class ul {list-style: none;}
.menu-class a {text-decoration: none; cursor: pointer;}
.menu-class a:visited {color: #663399;}
.menu-dropdown ul {display:none; background-color: #ccc;}
.menu-dropdown li {position:relative;}
.menu-dropdown ul {margin:0; padding:0;}
.menu-dropdown li ul {margin:0; padding:0;position:absolute;left:100%;top:0;}
.menu-dropdown li:hover > ul {display: block;}

.menu-dropdown-top > li > ul {left:0;top:100%;}

.menu-dropdown-sidebar > li > ul {left:100%;top:0;}

.menu-horizontal {display: flex; gap: 2rem;}
.menu-horizontal > li > a {white-space: nowrap;}
@media screen and (max-width: 900px) {
    .menu-horizontal {
        display: none;
    }
}
/* =====Основні стилі END====== */


/* ====Header-menu========= */
#header-menu {
    padding: 0;
}
#header-menu li {
    padding: 2rem 0;
}
#header-menu li ul {
    width: 200px;
    background-color: greey;
}
#header-menu li ul li {
    background-color: #fdffbb;
    margin: 1px;
    padding: 5px 10px;
}
#header-menu li.current-menu-item > a,
#header-menu li.current-menu-parent > a,
#header-menu li.current-menu-ancestor > a {
  color: red;
}


/* ====Sidebar-menu========= */
/* WebKit стилі для скролбару */
#sidebar-menu::-webkit-scrollbar {
  width: 6px;
}
#sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
#sidebar-menu::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}
#sidebar-menu::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

#sidebar-menu li {
      position: relative;
      background: linear-gradient(#4177a6, #1d6e99);
      border-bottom: #5792bc 1px outset;
      border-left: #5792bc 1px outset;
      padding: 8px 15px;
      cursor: pointer;
      list-style: none;
      z-index: 1;
      margin: 2px;
      border-radius: 7px;
    }

#sidebar-menu li:hover {
      background: linear-gradient(#4177a6, #003966);
    }

#sidebar-menu li.current-menu-item > a,
#sidebar-menu li.current-menu-parent > a,
#sidebar-menu li.current-menu-ancestor > a {
  color: yellow;
}
    
#sidebar-menu .sub-menu {
      position: absolute;
      left: 100%;
      top: 0;
      margin-left: 0;
      padding-left: 0;
      display: none;
      z-index: 1000;
      width: 265px;
      background-color: #dddddd;
      border-radius: 7px;
    }
#sidebar-menu li:hover > .sub-menu {
      display: block;
    }
#sidebar-menu a {
      text-decoration: none;
      color: white;
      font-weight: 600;
      display: block;
      margin-right: 1rem;
      font-size: 1.4rem;
    }
#sidebar-menu li:hover > a {
      color: yellow;
    }
    
    /* Стрілка для дочірніх елементів */
#sidebar-menu .menu-item-has-children > a::after {
    content: "❯❯";
    position: absolute;
    font-size: 1.4rem;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    cursor: pointer;
    margin-left: 10px;
}
/* ====Sidebar-menu END========= */



/* ----Бокове виїзджаюче меню зліва----------------------------------- */
.burger-block {
    display: flex;
    padding: 2rem 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}
.burger-block svg {
  flex-shrink: 0;      /* щоб іконка не стискалася */
}
.burger-block svg line {
    stroke: #663399;
}
.burger-block span {
  font-size: 16px;
  color: #663399;
  font-weight: 600;
}

@media screen and (min-width: 901px) {
    .mobil-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #ffffff;
        border-radius: 0.6rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* тільки вниз */
        /* opacity: 0; */
        z-index: 100;
        /* max-height: 0; */
        /* transition: max-height 0.4s ease, opacity 0.3s ease; */
        flex-direction: column; /* щоб елементи йшли зверху вниз */
    }
    .mobil-menu-header {
        display: none;
    }
    
    .burger-block:hover .mobil-menu {
        display: block;
        /* max-height: 500px; */
        /* opacity: 1; */
    }
    
    .prod-cat-mobil-ul {
        padding: 0;
        margin: 0;
        list-style: none;
        background-color: #ffffff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        border-radius: 8px;
    }
    .prod-cat-mobil-ul li {
        padding: 5px 10px;
        margin: 1px;
        list-style: none;
        position: relative;
        width: 200px;
        z-index: 101;
    }
    .prod-cat-mobil-ul li ul {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        z-index: 102;
        background-color: #ffffff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }
    .prod-cat-mobil-ul li:hover > ul {
        display: block;
    }
    .prod-cat-mobil-ul a {
        text-decoration: none;
    }
}





@media screen and (max-width: 900px) {
.mobil-menu {
     position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      max-width: 350px;
      height: 100vh; /* повна висота екрану */
      background-color: #2b5880;
      color: #fff;
      transform: translateX(-110%);
      transition: transform 0.3s ease-in-out;
      padding: 0;
      z-index: 2000;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
}

.mobil-menu.active {
    transform: translateX(0);
}

#mobil-menu {
    /* flex: 1 1 auto; */
    overflow-y: auto; /* прокрутка лише для меню */
    /*-webkit-overflow-scrolling: touch;*/
    background-color: #ffffff;
}

/* Chrome, Safari, Opera */
#mobil-menu::-webkit-scrollbar {
  display: none;
}

/* Firefox */
#mobil-menu {
  scrollbar-width: none; /* прибирає полосу */
}

/* IE/Edge */
#mobil-menu {
  -ms-overflow-style: none; /* old Edge, IE */
}

.mobil-menu-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding-bottom: 0.6rem;
}

#mobil-menu ul {
    position: relative;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}
#mobil-menu ul a {
    color: #ffffff;
}
#mobil-menu ul a:hover {
  color: yellow;
}

.mobil-menu li {
    position: relative;
    padding: 5px 5px 5px 10px;
    margin-bottom: 1px;
    background-color: #2b5880;
}

.mobil-menu a {
    color: #ffffff;
    transition: background-color 0.3s ease;
}

.mobil-menu a:visited {
    color: #ffffff;
}

.mobil-menu a:hover {
    color: yellow;
}

/* Дочірні пункти меню */
.mobil-menu li ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 1rem;
}

.mobil-menu li ul > li {
    background-color: #456078;
    padding: 6px 2px 6px 10px;
}

.mobil-menu .sub-menu.open > ul {
    display: block;
}

.menu-item-has-children {
    position: relative;
    display: block;
}

.menu-item-has-children ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    /*width: 100%;*/
    /*background: greey;*/
    z-index: 1000;
}

.menu-item-has-children.open ul {
    display: block;
}

.toggle-icon {
    cursor: pointer;
    font-size: 2rem;
    padding: 0;
    user-select: none;
}

.close-menu {
    cursor: pointer;
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    padding-bottom: 5px;
}

.close-menu .dashicons {
    font-size: 3rem;
    line-height: 1;
    width: auto;
    height: auto;
}
}
/*Бокове виїзджаюче меню (мобільне меню) зліва END*/


