/* Modern Sidebar CSS — Shop 2026 */

/* Sidebar Container */
.modern-sidebar-container {
    position: relative;
    z-index: 1050;
}

/* ── Shop sidebar (filter panel on desktop) ── */
.shop_sidebar_area {
    overflow-x: hidden !important;
    max-width: 320px;
    min-width: 270px;
    flex-shrink: 0;
}

.shop_sidebar_area .widget-title {
    color: var(--shop-primary, #5A31F4);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-left: 3px solid var(--shop-primary, #5A31F4);
    padding-left: 0.5rem;
    margin-bottom: 0.75rem;
}

.shop_sidebar_area .form-check {
    overflow: hidden;
    max-width: 100%;
}

.shop_sidebar_area .form-check-input:checked {
    background-color: var(--shop-primary, #5A31F4);
    border-color: var(--shop-primary, #5A31F4);
}

.shop_sidebar_area .widget-desc {
    overflow-x: hidden;
    max-width: 100%;
}

/* Price slider handle color */
.ui-slider-handle {
    background: var(--shop-primary, #5A31F4) !important;
    border-color: var(--shop-primary, #5A31F4) !important;
}

.ui-slider-range {
    background: var(--shop-primary, #5A31F4) !important;
}

#price_show {
    color: var(--shop-primary, #5A31F4);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── Dark Mode Overrides for Sidebar ── */
html.dark .shop_sidebar_area.bg-white {
    background-color: var(--shop-surface, #1e1e2d) !important;
    border-color: var(--shop-border, #323248) !important;
}

html.dark .shop_sidebar_area .form-check-label {
    color: var(--shop-text-secondary, #9a9cae);
}

html.dark .shop_sidebar_area .widget-title {
    color: var(--shop-text-primary, #ffffff);
    border-left-color: var(--shop-primary, #5A31F4);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1060;
    display: none;
    transition: all 0.3s ease;
}

/* Main Sidebar */
.modern-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: #fff;
    z-index: 1070;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modern-sidebar.active {
    left: 0;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
}

.sidebar-logo {
    max-height: 40px;
    max-width: 150px;
}

.sidebar-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sidebar-close:hover {
    color: var(--shop-primary, #5A31F4);
}

/* Sidebar Body */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Smooth scrolling for sidebar body */
.sidebar-body {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--shop-primary, #5A31F4) #f5f5f5;
    overflow-x: hidden;
}

.sidebar-body::-webkit-scrollbar {
    width: 4px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background-color: var(--shop-primary, #5A31F4);
    border-radius: 10px;
}

/* Sidebar Search */
.sidebar-search .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
}

.sidebar-search .input-group-text {
    background-color: var(--shop-primary, #5A31F4);
    color: #fff;
    border: 1px solid var(--shop-primary, #5A31F4);
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

/* Sidebar Navigation */
.sidebar-nav {
    margin-top: 15px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background-color: rgba(90, 49, 244, 0.08);
    color: var(--shop-primary, #5A31F4);
    text-decoration: none;
}

.sidebar-item.active>.sidebar-link {
    background-color: var(--shop-primary, #5A31F4);
    color: #fff;
}

.submenu-arrow {
    transition: transform 0.3s ease;
}

.sidebar-item.active .submenu-arrow i {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-item.active .submenu {
    max-height: 500px;
}

.submenu-item {
    margin: 5px 0;
}

.submenu-link {
    display: block;
    padding: 8px 15px 8px 30px;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.submenu-link:hover,
.submenu-link:focus {
    background-color: rgba(90, 49, 244, 0.05);
    color: var(--shop-primary, #5A31F4);
    text-decoration: none;
}

.submenu-item.active>.submenu-link {
    color: var(--shop-primary, #5A31F4);
    font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
}

.sidebar-social {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 5px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: #fff;
    background-color: #3dbcd3;
}

.btn-login,
.btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: var(--shop-primary, #5A31F4);
    color: #fff;
    border: none;
}

.btn-login:hover {
    background-color: var(--shop-primary-hover, #4A24E8);
    color: #fff;
}

.btn-logout {
    background-color: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-logout:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: var(--shop-primary, #5A31F4);
    color: #fff;
    border: none;
    border-radius: 5px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1040;
    box-shadow: 0 2px 5px rgba(90, 49, 244, 0.3);
}

/* Responsive Styles */
@media (max-width: 991px) {

    /* Sidebar toggle button */
    .sidebar-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        background-color: var(--shop-primary, #5A31F4);
        color: #fff;
        border-radius: 50%;
        box-shadow: 0 3px 10px rgba(90, 49, 244, 0.3);
        transition: all 0.3s ease;
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        left: auto;
        z-index: 1080;
    }

    .sidebar-toggle:active {
        transform: scale(0.95);
    }

    /* Sidebar positioning and animation */
    .modern-sidebar {
        left: -100%;
        width: 85%;
        max-width: 320px;
        border-radius: 0 15px 15px 0;
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .modern-sidebar.active {
        left: 0;
    }

    /* Sidebar header */
    .sidebar-header {
        padding: 15px 20px;
        background-color: #f8f9fa;
    }

    .sidebar-logo {
        max-height: 35px;
    }

    .sidebar-close {
        font-size: 22px;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(61, 188, 211, 0.1);
        color: #3dbcd3;
    }

    /* Sidebar body */
    .sidebar-body {
        padding: 20px;
    }

    /* Sidebar search */
    .sidebar-search .form-control {
        height: 45px;
        font-size: 14px;
    }

    /* Sidebar navigation */
    .sidebar-link {
        padding: 12px 15px;
        margin-bottom: 5px;
        border-radius: 10px;
        font-size: 15px;
    }

    .submenu-link {
        padding: 10px 15px 10px 35px;
        font-size: 14px;
    }

    /* Sidebar footer */
    .sidebar-footer {
        padding: 20px;
        background-color: #f8f9fa;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 8px;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .social-link:hover {
        background-color: var(--shop-primary, #5A31F4);
    }

    .btn-login,
    .btn-logout {
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 22.5px;
        font-size: 15px;
        font-weight: 500;
        margin-top: 15px;
    }
}

/* Animation for Submenu */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.sidebar-item.active .submenu {
    animation: fadeIn 0.3s ease;
}

/* Device Icons in Sidebar */
.device-icons {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.device-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.device-icon img {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.device-icon:hover {
    color: #3dbcd3;
}

.device-icon:hover img {
    transform: scale(1.1);
}