/**
 * Mobile Footer Navigation Bar Styles
 * Copied and adapted from Dinakala theme
 */

html,
body,
#novoshopNav,
#novoshopNav *,
.mobile-footer,
.mobile-footer * {
    box-sizing: border-box;
}

/* Hide mobile footer on desktop by default */
.mobile-footer {
    display: none;
}

/* Mobile Navigation Sidebar (Drawer) - Hidden by default */
#novoshopNav {
    display: none;
    height: 100vh;
    width: 340px;
    position: fixed;
    z-index: 99999;
    top: 0;
    right: -340px;
    background-color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    transition: right 0.2s linear;
    padding: 0;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
}

#novoshopNav.active {
    right: 0;
}

/* Side Panel Head */
.side-head {
    padding: 10px;
    text-align: center;
    padding-top: 20px;
    font-size: 20px;
    font-family: inherit;
    position: relative;
}

/* Close Button */
.mclosebtn {
    opacity: 0.8;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 25px;
    padding: 0;
    text-decoration: none;
    background-color: #f5f5f5;
    line-height: 1;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 7px;
    color: #333;
    cursor: pointer;
    border: none;
}

.mclosebtn:hover {
    opacity: 1;
    background-color: #e0e0e0;
}

/* Side Title */
.side-title {
    margin: 0 auto;
    display: table;
    border-bottom: 3px solid var(--primary-color, #e74c3c);
    padding: 0 15px 10px;
    color: #333;
}

/* Mobile Search in Drawer */
.mobile-nav-search {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.mobile-search-form {
    width: 100%;
}

.mobile-search-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.mobile-search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    outline: none;
}

.mobile-search-field::placeholder {
    color: #999;
}

.mobile-search-submit {
    background: transparent;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s ease;
}

.mobile-search-submit:hover {
    color: var(--primary-color, #e74c3c);
}

.mobile-search-submit svg {
    width: 20px;
    height: 20px;
}

/* Overlay for mobile nav - Hidden by default */
.overlay3 {
    display: none;
    height: 0;
    width: 0;
    position: fixed;
    z-index: 99998;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-x: hidden;
    transition: 0.3s;
    opacity: 0;
}

/* Mobile Styles - Only active below 1024px */
@media screen and (max-width: 1024px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    /* Show mobile footer */
    .mobile-footer {
        display: block !important;
        position: fixed;
        padding: 5px 0 5px;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        width: 100%;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        -webkit-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        -ms-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        -o-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        border-top: 1px solid #f0f0f0;
    }

    .mobile-footer.mobile-footer-style-two {
        width: 97%;
        bottom: 10px;
        border-radius: 10px;
        left: 50%;
        transform: translate(-50%, 0);
    }

    .mobile-footer.mobile-footer-no-title {
        padding: 10px 0;
    }

    .mobile-footer ul {
        list-style: none;
        margin: 0;
        display: flex;
        width: 100%;
        padding: 0;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-footer li {
        font-size: 11px;
        -ms-flex-preferred-size: 0;
        flex-basis: 0;
        -ms-flex-positive: 1;
        flex-grow: 1;
        max-width: 100%;
        position: relative;
        width: 100%;
        min-height: 1px;
        margin: 0;
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 0 2px;
    }

    .mobile-footer a {
        position: relative;
        color: #666;
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        align-content: center;
        align-items: center;
        text-decoration: none;
        padding: 5px 8px;
        border-radius: 8px;
        transition: all 0.2s ease;
        width: 100%;
    }

    .mobile-footer li:hover a,
    .mobile-footer li.active a {
        color: var(--primary-color, #00a8a8);
        background-color: rgba(0, 168, 168, 0.05);
    }

    .mobile-footer .f-icon {
        outline: 0;
        cursor: pointer;
        position: relative;
        font-size: 20px;
        line-height: 1;
        display: inline-block;
        margin-bottom: 4px;
        color: inherit;
    }

    .mobile-footer .mf-title {
        font-size: 11px;
        line-height: 1.2;
        padding: 0;
        display: block;
        outline: 0;
        cursor: pointer;
        position: relative;
        text-align: center;
        font-weight: 500;
        color: inherit;
    }

    .mobile-footer .compare-amount,
    .mobile-footer .novoshop-cart-amount,
    .mobile-footer .wish-amount {
        position: absolute;
        top: -2px;
        right: 8px;
        line-height: 16px;
        background-color: #ff4444;
        color: #fff;
        border-radius: 12px;
        padding: 2px 6px;
        font-size: 10px;
        min-width: 18px;
        text-align: center;
        font-weight: 600;
        border: 2px solid #fff;
    }

    .mobile-footer a:hover,
    .mobile-footer li:active,
    .mobile-footer li.active {
        color: var(--primary-color, #00a8a8);
    }

    /* Add padding to body when mobile footer is visible */
    body:not(.no-bbar) {
        padding-bottom: 70px !important;
    }

    /* Hover effects */
    .mobile-footer li:hover .f-icon {
        color: var(--primary-color, #e74c3c);
    }

    /* Return to top button */
    .mobile-footer .return-top {
        cursor: pointer;
    }

    /* Side panel buttons */
    .mobile-footer .open-side {
        cursor: pointer;
    }

    /* Di toggle (Dark mode) */
    .mobile-footer .btn-di-toggle {
        cursor: pointer;
    }

    .mobile-footer .di-toggle-icon {
        display: none;
    }

    .mobile-footer .btn-di-toggle .di-toggle-icon:first-child {
        display: block;
    }

    /* Show overlay and mobile nav */
    .overlay3 {
        display: block;
    }

    .overlay3.active {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    #novoshopNav {
        display: block;
    }

    #novoshopNav.active {
        right: 0;
    }
}

/* Mobile menu styles - CSS Menu Maker Styles */
#cssmenu, 
#cssmenu ul, 
#cssmenu ul li, 
#cssmenu ul li span {
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
    line-height: 1;
    display: block;
    position: relative;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#cssmenu ul li a {
    display: flex;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 1;
    display: block;
    position: relative;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    color: #666;
    text-decoration: none;
}

#cssmenu {
    width: 100%;
    font-size: 14px;
    color: #666;
    background-color: #fff;
}

#cssmenu ul ul {
    display: none;
    padding: 0;
}

#cssmenu > ul > li {
    margin: 4px;
}

#cssmenu > ul > li > span,
#cssmenu > ul > li > a {
    padding: 10px 15px;
    cursor: pointer;
    z-index: 2;
    text-decoration: none;
    color: #666;
    background: #f5f5f5;
    border-radius: 7px;
    display: flex;
    align-items: center;
}

#cssmenu li i {
    margin-left: 8px;
    font-size: 15px;
}

#cssmenu ul ul li span,
#cssmenu ul ul li a {
    cursor: pointer;
    padding: 10px 15px;
    padding-left: 40px !important;
    color: #666;
}

#cssmenu ul ul li:first-child span,
#cssmenu ul ul li:first-child a {
    border-top: none;
}

#cssmenu li.has-sub > span {
    position: relative;
    padding-right: 45px !important;
}

#cssmenu li.has-sub > span::after {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    content: "➕";
    background: #fff;
    font-size: 14px;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#cssmenu li.open > span::after {
    content: "➖";
    background: #f0f0f0;
}

#cssmenu ul ul li span,
#cssmenu ul ul li a {
    box-shadow: inset 0 1px 0 #f5f5f5;
    padding-right: 15px;
}

#cssmenu ul > li > ul > li > ul > li > span,
#cssmenu ul > li > ul > li > ul > li > a {
    box-shadow: inset 0 1px 0 #f5f5f5;
    padding-right: 30px;
}

#cssmenu ul > li > ul > li > ul > li > ul > li > span,
#cssmenu ul > li > ul > li > ul > li > ul > li > a {
    box-shadow: inset 0 1px 0 #f5f5f5;
    padding-right: 45px;
}

#cssmenu ul li span:active,
#cssmenu ul li a:active {
    background-color: #e0e0e0;
}

#cssmenu ul li a:hover {
    color: var(--primary-color, #e74c3c);
}

