.menu-container{
    height: auto;
    background-color: #FFF8E1;
    padding: 0px 0px 50px;
}

.menu-header{
    height: auto;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    
    display: flex;
    flex-direction: column;
    align-items: center;

    box-shadow: 0 10px 30px rgba(0,0,0,.2);

    gap: 20px;

}

.menu-header h1{
  color: var(--text-color-2);
  font-family: var(--font-heading);
  letter-spacing: 1px;
  font-weight: 100;
  font-size: var(--font-xll);
  position: static;
  z-index: 3;
}



.menu-body{
    height: auto;
    width: 100%;

    max-width: 1200px;
    margin: 0px auto;

    display: flex;
    flex-direction: row;

    position: relative;
}

/* Hide the filter button on desktop */
.filter-btn { 
    display: none;
    font-family: var(--font-body);
    color: black;
    font-size: var(--font-xsm);
}

.sidebar{
    height: auto;
    min-height: 720px;
    width: 25%;
    min-width: 200px;
    box-shadow: 0px 10px 10px  rgba(0,0,0,.2);
    border-radius: 10px;

    padding: 30px;
    margin-top: 30px;
}

.content{
    height: 100%;
    width: 100%;
}

.cat-name{
    display: flex;
    flex-direction: column;
}

.cat-parent-div{
    position: relative;
    height: auto;
}

.cat-parent-div button{
    border: none;
    background-color: transparent;
    cursor: pointer;
    width: 100%;
    height: 100%;
    text-align: start;
}


.cat-parent-div svg{
    position: absolute;
    height: auto;
    right: 0;
    top: 3px;
    cursor: pointer;
}



.sidebar-ul{
    font-family: var(--font-body);
    font-size: var(--font-sm);
    font-weight: 400;
    color: rgb(0, 0, 0);
    line-height: 2;
    list-style-type: none;

    display: flex;
    flex-direction: column;
    gap: 20px;
}


.sub-ul{
    list-style-type: none;
    padding: 5px 10px;

    grid-template-rows: 0fr;
    display: grid;
    transition: 300ms ease-in-out;
    
    > div{
        overflow: hidden;
    }
}

.sub-ul.show{
    grid-template-rows: 1fr;
}


.sub-li span{
    font-size: var(--font-xxsm);
}

.subcat-btns-style{
    font-family: var(--font-body);
    font-size: var(--font-sm);
    font-weight: 100;
    color: rgb(0, 0, 0);
    line-height: 2;
    list-style-type: none;
}

/* default: not rotated */
.dropdown-arrow {
     transition: transform 200ms ease; 
     transform: rotate(0deg); }

/* when JS adds .rotate, spin it */
.dropdown-arrow.rotate {
     transform: rotate(180deg); 
}








.pdf-btn{
    width: 150px;
    letter-spacing: 1px;
    padding: 10px 15px;     /* same size for all */
    background-color: var(--background-color-2);

    font-family: var(--font-body);
    color: var(--text-color-3);
    font-size: var(--font-xsm);
    font-weight: 100;
    text-align: center;

    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;           /* ✅ keeps width consistent even if text differs */

    gap: 5px;
    justify-content: center;
    border: solid 0.5px;
    border-color: var(--button-color-3);

}

.pdf-btn:hover{
  color: var(--text-color-2);
  text-decoration: underline;
  background-color: var(--background-color-3);
  border: none;
}





/** for mobile **/

/* Backdrop (hidden by default) */

@media (max-width: 768px) {

    .backdrop{
        position: fixed; inset: 0;
        background: rgba(0,0,0,.45);
        opacity: 0; pointer-events: none;
        transition: opacity .2s ease;
        z-index: 999;
    }

    .menu-container{
        padding: 70px 0px;
        display: flex;
        flex-direction: column;
        align-items: center;

    }

    .menu-header{
        height: auto;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px 0px 20px;
        
        display: flex;
        flex-direction: column;
        align-items: start;
        gap: 20px;
    }

    .menu-header h1{
        font-family: var(--font-heading);
        letter-spacing: 1px;
        font-weight: 100;
        font-size: var(--font-xl);
        position: static;
        z-index: 3;
    }


    .menu-body{
        height: auto;
        width: 100%;

        max-width: 300px;
        margin: 20px auto;

        display: flex;
        flex-direction: row;
        align-items: center;
    }

    
    .filter-btn { 
        display: inline-flex;
        gap: .5rem;
        align-self: flex-end;
        padding: 8px 12px;
        border: none;
        background: transparent;
        font: inherit;
        cursor: pointer;
        font-family: var(--font-body);

    } 


    .menu-body{
        flex-direction: column;
        margin: 0px;
    }


    .sidebar{
        position: fixed;
        top: 0; left: 0;
        height: 100dvh;           /* full height */
        width: 85vw;              /* drawer width */
        max-width: 360px;
        background: #fff8e1;      /* your theme bg */
        border-right: 1px solid rgba(0,0,0,.12);
        box-shadow: 0 10px 30px rgba(0,0,0,.2);
        transform: translateX(-100%);/* hidden off-screen */
        transition: transform .25s ease;
        z-index: 10000;
        padding: 24px;            /* keep your spacing */
        overflow-y: auto;
        margin-top: 0px;
        border-radius: 0px;
    }

      /* when open, slide the drawer in */
    body.filter-open .sidebar {
        transform: translateX(0);
    }

    body.filter-open .backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* prevent page scroll when drawer is open */
    body.filter-open {
        overflow: hidden;
    }

}




.content-loader{
  position: absolute;
  width: 100%;
  height: 100%; /* full viewport height */
   

  z-index: 9000;
  margin-top: 30px;
  inset: 0;
  background-color: #FFF8E1;

  display: none;
}


.content-loader div{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-top: 1px solid var(--border-4);
    border: 1px solid;
    padding: 20px;

    border: 3px solid #ffffff;
    border-top: 3px solid #DBB741; /* or any color you want */
    border-radius: 50%;
    animation: spin 0.6s linear infinite;


}

@keyframes spin{
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}


.content-loader.show{
    display: block;
}


@media (max-width: 768px) {
    .content-loader div{
        position: absolute;
        top: 50%;
        left: 45%;
        transform: translate(-50%, -60%);
        border-top: 1px solid var(--border-4);
        border: 1px solid;
        padding: 20px;

        border: 3px solid #ffffff;
        border-top: 3px solid #DBB741; /* or any color you want */
        border-radius: 50%;
        animation: spin 0.6s linear infinite;


    }
}