/*
Theme Name:           Cánh Cam Company
Theme URI:            https://www.canhcam.vn/
Author:               Cánh Cam Company
Author URI:           https://www.canhcam.vn/
Description:          Theme Cánh Cam Woocommerce
Version:              1.0.4
Text Domain:          canhcamtheme
*/
/***************
CUSTOM CSS CANH CAM COMPANY
***************/

/* ==========================================================================
   MOBILE MENU DRAWER FOR PRODUCT CATEGORIES
   ========================================================================== */

/* Overlay Background with Premium Blur */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 21, 19, 0.5); /* Warm dark tint */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
                visibility 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Drawer Container overrides */
@media (max-width: 1023.98px) {
    .box-navigation {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: 85% !important;
        max-width: 320px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background-color: #fdfcfb !important;
        z-index: 9999 !important;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15) !important;
        border-left: 1px solid rgba(175, 148, 129, 0.15) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        visibility: hidden !important;

        /* Override Tailwind's complex transform chain completely */
        transform: translate3d(100%, 0, 0) !important;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .box-navigation.active {
        visibility: visible !important;
        transform: translate3d(0, 0, 0) !important;
    }

    /* Drawer Header */
    .box-navigation .title-product {
        flex-shrink: 0;
        background: linear-gradient(135deg, #af9481, #cbb6a7) !important; /* Elegant gold gradient */
        box-shadow: 0 2px 10px rgba(175, 148, 129, 0.15);
        height: 60px !important;
        padding: 0 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .box-navigation .title-product span {
        font-size: 1.1rem !important;
        letter-spacing: 0.5px;
        font-weight: 700 !important;
    }

    /* Close Button inside Drawer */
    .box-navigation .btn-close {
        width: 40px;
        height: 40px;
        display: flex-center;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }
    
    .box-navigation .btn-close:active {
        background-color: rgba(255, 255, 255, 0.3);
        transform: scale(0.9);
    }

    /* List Categories Navigation */
    .box-navigation .list-navigation {
        flex-grow: 1;
        overflow-y: auto; /* Scrollable categories */
        padding: 15px 0 40px 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Reset default ul/li list style */
    .box-navigation .list-navigation ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .box-navigation .list-navigation li {
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
    }

    /* Style for Category Link Items */
    .box-navigation .list-navigation li a {
        display: block !important;
        padding: 14px 24px !important;
        color: #4a423d !important; /* Dark warm gray */
        font-family: 'Lexend', sans-serif !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        border-bottom: 1px solid #f5f2f0 !important;
        transition: all 0.25s ease !important;
        text-decoration: none !important;
    }

    /* Active / Current Category Highlight */
    .box-navigation .list-navigation li.current-menu-item > a,
    .box-navigation .list-navigation li.current-cat > a,
    .box-navigation .list-navigation li a:active {
        color: #af9481 !important; /* Brand Primary Gold */
        background-color: rgba(175, 148, 129, 0.05) !important;
        font-weight: 600 !important;
        border-left: 3px solid #af9481 !important;
        padding-left: 21px !important; /* Keep alignment consistent with 3px border */
    }

    /* Nested Sub-menus styling if present */
    .box-navigation .list-navigation ul.sub-menu,
    .box-navigation .list-navigation ul.children {
        background-color: #f7f5f3 !important;
        border-left: 2px solid rgba(175, 148, 129, 0.1);
        margin-left: 20px !important;
    }

    .box-navigation .list-navigation ul.sub-menu li a,
    .box-navigation .list-navigation ul.children li a {
        padding: 10px 20px !important;
        font-size: 14px !important;
        font-weight: 400 !important;
    }
}

/* Inline Filter Bar Enhancements */
@media (max-width: 1023.98px) {
    .btn-filter-navigation {
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease !important;
    }

    .btn-filter-navigation:active {
        transform: scale(0.98) !important;
        background-color: #967d6c !important;
    }
}

/* Prevent scroll on body when drawer is open */
body.drawer-open {
    overflow: hidden !important;
    height: 100vh !important;
}
