/*
Theme Name:   Xstore child
Theme URI:    https://xstore.8theme.com
Description:  XStore is a multi-purpose theme that offers the ultimate WordPress and WooCommerce synergy, providing a comprehensive, all-in-one solution.
Author:       8theme
Author URI:   https://www.8theme.com
Template:     xstore
Version:      1.0
Text Domain:  xstore-child
Tags: e-commerce, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, custom-logo, featured-images, full-width-template, threaded-comments, accessibility-ready, rtl-language-support, footer-widgets, sticky-post, theme-options, translation-ready, ecommerce, woocommerce, shop, elementor, business, corporate, blog, news, light, dark
*/

/* ==========================================================================
   Custom Shop Product Filters (Sidebar & Split Categories Layout)
   ========================================================================== */

/* Centered Category Buttons Container */
.custom-category-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0 40px 0;
    width: 100%;
}

.custom-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 36px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Homme (Blue) */
.custom-cat-btn.btn-homme {
    background-color: #f0f7ff;
    border: 1px solid #cce2ff;
    color: #2b6cb0 !important;
}

.custom-cat-btn.btn-homme:hover {
    background-color: #e1effe;
    border-color: #2b6cb0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(43, 108, 176, 0.1);
}

.custom-cat-btn.btn-homme.active {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(43, 108, 176, 0.35);
}

/* Femme (Pink) */
.custom-cat-btn.btn-femme {
    background-color: #fff5f7;
    border: 1px solid #fad9e2;
    color: #b83280 !important;
}

.custom-cat-btn.btn-femme:hover {
    background-color: #ffe8ec;
    border-color: #b83280;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(184, 50, 128, 0.1);
}

.custom-cat-btn.btn-femme.active {
    background: linear-gradient(135deg, #d53f8c, #b83280);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(184, 50, 128, 0.35);
}

/* Clear category x icon */
.custom-cat-btn .btn-clear-cat {
    margin-left: 10px;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
}

.custom-cat-btn:hover .btn-clear-cat {
    transform: scale(1.2);
}

/* Custom Brand Separator */
.custom-brand-separator {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 50px 0 30px 0 !important;
    clear: both !important;
}

.custom-brand-separator .separator-line {
    display: block !important;
    flex: 1 !important;
    height: 1px !important;
    min-height: 1px !important;
    background-color: #cccccc !important;
    background-image: none !important;
}

.custom-brand-separator .brand-separator-title {
    padding: 0 25px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    color: #111111 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* Layout Columns */
.custom-shop-layout-wrapper {
    display: flex;
    gap: 35px;
    width: 100%;
    margin-top: 25px;
}

.custom-products-grid-column {
    flex: 1;
    min-width: 0;
}

/* Custom Brands Sidebar (Desktop) */
.custom-brands-sidebar {
    flex: 0 0 250px;
    max-width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #eeeeee;
    padding-right: 25px;
}

.sidebar-brands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #111111;
    padding-bottom: 8px;
}

.sidebar-brands-header h3 {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 !important;
    color: #111111;
}

.sidebar-close-btn {
    display: none; /* Only visible on mobile */
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888888;
    cursor: pointer;
    padding: 0;
}

.sidebar-close-btn:hover {
    color: #111111;
}

/* Search input inside sidebar */
.sidebar-brands-search-wrapper {
    margin-bottom: 15px;
}

.sidebar-brands-search {
    width: 100% !important;
    height: 38px !important;
    padding: 8px 12px !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    background-color: #fcfcfc !important;
    color: #222222 !important;
    outline: none !important;
    transition: all 0.2s ease;
}

.sidebar-brands-search:focus {
    border-color: #111111 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
}

/* Scrollable Brands List */
.sidebar-brands-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: 450px;
    overflow-y: auto;
}

/* Custom Scrollbars */
.sidebar-brands-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar-brands-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.sidebar-brands-list::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}

.sidebar-brands-list::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

/* Sidebar Brand Items */
.sidebar-brand-item {
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar-brand-item a {
    display: block;
    padding: 8px 10px;
    color: #555555 !important;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none !important;
    border-bottom: 1px solid #f9f9f9;
    transition: all 0.2s ease;
    text-align: left;
}

.sidebar-brand-item:hover a {
    color: #111111 !important;
    background-color: #fafafa;
    padding-left: 14px;
}

.sidebar-brand-item.active a {
    font-weight: 600;
    color: #111111 !important;
    background-color: #f5f5f5;
    border-left: 3px solid #111111;
    padding-left: 12px;
}

/* Clear Brand Item */
.sidebar-brand-item.clear-brand-item {
    border-bottom: 1px dashed #dcdcdc;
    margin-bottom: 6px !important;
}

.sidebar-brand-item.clear-brand-item a {
    color: #ff3333 !important;
    font-weight: 500;
}

.sidebar-brand-item.clear-brand-item:hover a {
    background-color: #ffebee;
}

.sidebar-brand-no-results {
    padding: 15px;
    color: #999999;
    font-size: 13px;
    text-align: center;
    font-style: italic;
}

/* Mobile Trigger Button (hidden by default on desktop) */
.custom-mobile-brand-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background-color: #111111;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.custom-mobile-brand-trigger:hover {
    background-color: #222222;
}

/* Mobile backdrop drawer overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   Responsive Sidebar Drawer rules
   ========================================================================== */
@media (max-width: 768px) {
    /* Center and spacing adjustments for category buttons on mobile */
    .custom-category-buttons-container {
        margin: 15px 0 20px 0;
        gap: 10px;
    }
    
    .custom-cat-btn {
        padding: 10px 22px;
        font-size: 13px;
    }

    /* Stack grid column under layout */
    .custom-shop-layout-wrapper {
        display: block;
        margin-top: 15px;
    }

    /* Show mobile brand trigger */
    .custom-mobile-brand-trigger {
        display: flex;
    }

    /* Slide-out Brands Drawer */
    .custom-brands-sidebar {
        position: fixed;
        top: 0;
        left: -290px; /* hidden off-screen */
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        background-color: #ffffff;
        z-index: 99999;
        padding: 25px 20px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
        transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        border-right: none;
        overflow-y: auto;
    }

    .custom-brands-sidebar.open {
        left: 0; /* Slide in! */
    }

    .sidebar-close-btn {
        display: block; /* Show closing 'x' on mobile */
    }
    
    .sidebar-brands-list {
        max-height: calc(100vh - 140px); /* fill screen height */
    }
}