    /* --- Style nền tảng cho mỗi Widget --- */
    .widget {
        margin-bottom: 3rem;
        padding: 0;
        background-color: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    /* --- Tiêu đề Widget --- */
    .widget-title {
        font-size: 1.2rem;
        font-weight: 700;
        margin-top: 0;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #d40511;
        display: inline-block;
    }

    /* --- Style chung cho danh sách bài viết --- */
    .widget.ali_recent_posts_widget ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    /* Style cho từng item bài viết */
    .widget.ali_recent_posts_widget ul li {
        padding: 15px 0;
        border-bottom: 1px solid #f0f2f5;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    /* Bỏ đường kẻ của item cuối cùng */
    .widget.ali_recent_posts_widget ul li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    /* Bỏ padding trên của item đầu tiên */
    .widget.ali_recent_posts_widget ul li:first-child {
        padding-top: 0;
    }

    /* --- Liên kết bao bọc --- */
    .widget.ali_recent_posts_widget ul li a.post-link {
        display: contents;
        text-decoration: none;
        color: inherit;
    }

    /* --- Ảnh đại diện --- */
    .widget.ali_recent_posts_widget .post-thumbnail {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        border-radius: 3px;
        background-color: #f8f9fa;
    }

    .widget.ali_recent_posts_widget .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }
    .widget.ali_recent_posts_widget .post-thumbnail .widget-placeholder-svg {
        padding: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
    .widget.ali_recent_posts_widget .post-thumbnail .widget-placeholder-svg svg {
        width: 30px;
        height: 30px;
    }

    .widget.ali_recent_posts_widget ul li a.post-link:hover .post-thumbnail img {
        transform: scale(1.05);
    }

    /* --- Nội dung (Tiêu đề) --- */
    .widget.ali_recent_posts_widget .post-content {
        flex-grow: 1;
        min-width: 0;
    }

    .widget.ali_recent_posts_widget .entry-title {
        margin: 0;
        font-size: 1rem;
        line-height: 1.4;
        font-weight: 600;
        color: #343a40;
        text-align: left;
        transition: color 0.2s ease;
    }

    .widget.ali_recent_posts_widget ul li a.post-link:hover .entry-title {
        color: #d40511;
    }

    /* === WIDGET: DANH SÁCH PHÂN LOẠI === */
    /* --- Style cho Dạng Danh sách (ul) --- */
    .widget.ali_taxonomy_list_widget ul {
        list-style: none;
        padding: 0;
    }

    .widget.ali_taxonomy_list_widget ul li {
        padding: 8px 10px;
        display: flex;
        justify-content: space-between;
    }

    .widget.ali_taxonomy_list_widget ul li:not(:last-child) {
        border-bottom: 1px solid #f0f2f5;
    }

    .widget.ali_taxonomy_list_widget ul li a {
        text-decoration: none;
        color: #555;
        transition: color 0.2s ease, transform 0.2s ease;
        font-weight: 500;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .widget.ali_taxonomy_list_widget ul li a:hover {
        color: #d40511;
        transform: translateX(5px)
    }

    /* Hiển thị danh mục con thụt vào trong */
    .widget.ali_taxonomy_list_widget ul ul.children {
        padding-left: 20px;
        margin-top: 12px;
        border-left: 2px solid #f0f2f5;
    }

    /* Số lượng bài viết */
    .widget.ali_taxonomy_list_widget .count {
        background-color: #f0f2f5;
        color: #6c757d;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.8em;
        margin-left: 10px;
    }

    /* --- Style cho Dạng Thả xuống (select) --- */
    .widget.ali_taxonomy_list_widget select {
        width: 100%;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        background-color: #f8f9fa;
        cursor: pointer;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 24px;
    }

    /* Thêm container để dropdown không bị dính vào viền widget */
    .widget.ali_taxonomy_list_widget form {
        padding: 0 30px 25px;
    }

    
    /* CSS CHO WIDGET: SẢN PHẨM MỚI CÓ ẢNH (GIAO DIỆN NGANG - ĐỒNG BỘ FONT) */

    /* Bỏ style mặc định của list */
    .widget.alitheme_recent_products_image_widget ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    /* Style cho từng item sản phẩm */
    .widget.alitheme_recent_products_image_widget ul li {
        padding: 15px 0;
        border-bottom: 1px solid #f0f2f5;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    /* Bỏ đường kẻ của item cuối cùng */
    .widget.alitheme_recent_products_image_widget ul li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    /* Bỏ padding trên của item đầu tiên nếu cần */
    .widget.alitheme_recent_products_image_widget ul li:first-child {
        padding-top: 0;
    }

    /* Link bao bọc */
    .widget.alitheme_recent_products_image_widget ul li a {
        display: contents; 
        text-decoration: none;
        color: inherit;
    }

    /* Ảnh đại diện */
    .widget.alitheme_recent_products_image_widget .widget-product-thumbnail {
        flex-shrink: 0;
        width: 65px;    
        height: 65px;
        overflow: hidden;
        border-radius: 4px; 
        background-color: #f8f9fa;
    }

    .widget.alitheme_recent_products_image_widget .widget-product-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    .widget.alitheme_recent_products_image_widget ul li a:hover .widget-product-thumbnail img {
        transform: scale(1.05);
    }


    /* Phần nội dung bên phải (Tiêu đề + Giá) */
    .widget.alitheme_recent_products_image_widget .widget-product-details {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    /* Tên sản phẩm (Đã có giới hạn dòng) */
    .widget.alitheme_recent_products_image_widget .widget-product-title {
        margin: 0;
        font-size: 1rem;      
        line-height: 1.4;     
        font-weight: 600;     
        color: #343a40;
        text-align: left;
        transition: color 0.2s ease; 
        width: 100%;
        display: -webkit-box;         
        -webkit-line-clamp: 2;       
        -webkit-box-orient: vertical;
        overflow: hidden;             
        text-overflow: ellipsis;      
    }

    /* Giá sản phẩm */
    .widget.alitheme_recent_products_image_widget .widget-product-price {
        font-size: 1rem;      
        font-weight: 700;     
        color: #000;          
        text-align: left;
    }

    /* Giá "Liên hệ" */
    .widget.alitheme_recent_products_image_widget .widget-product-price.contact-price {
        font-weight: 600;    
        color: #d40511;      
        font-size: 0.9rem;   
    }


    /* Hiệu ứng Hover (Đồng bộ với CSS cũ) */
    .widget.alitheme_recent_products_image_widget ul li a:hover .widget-product-title {
        color: #d40511; 
    }

    /* CSS cho SVG placeholder trong widget sản phẩm */
    .widget.alitheme_recent_products_image_widget .widget-placeholder-svg {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    .widget.alitheme_recent_products_image_widget .widget-placeholder-svg svg {
        max-width: 100%;
        max-height: 100%;
        width: 40px;
        height: 40px;
    }


    /* CSS CHO CÁC WIDGET BÊN TRONG FILTER DROPDOWN */

    /* --- Style chung cho widget trong dropdown --- */
    .filter-sidebar-content .widget {
        flex: 1 1 auto; 
        min-width: 200px; 
        max-width: 300px;
        margin-bottom: 0;
    }

    .filter-sidebar-content .widget-title {
        font-size: 1rem; 
        font-weight: 700;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #d40511;
        display: inline-block;
    }

    /* --- Style riêng cho widget "Bài viết mới" trong dropdown --- */
    .filter-sidebar-content .widget.ali_recent_posts_widget ul {
        /* Không cần flex-direction: column vì widget đã được xếp dọc */
    }

    .filter-sidebar-content .widget.ali_recent_posts_widget ul li {
        padding: 10px 0; 
        gap: 10px;      
        border-bottom: 1px solid #f0f2f5;
        display: flex;
        align-items: center;
    }
    .filter-sidebar-content .widget.ali_recent_posts_widget ul li:last-child { border-bottom: none; padding-bottom: 0;}
    .filter-sidebar-content .widget.ali_recent_posts_widget ul li:first-child{ padding-top: 0;}

    .filter-sidebar-content .widget.ali_recent_posts_widget .post-thumbnail {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        border-radius: 3px;
        margin-bottom: 0;
    }

    .filter-sidebar-content .widget.ali_recent_posts_widget .post-content {
        min-width: 0;
        flex-grow: 1;
    }

    .filter-sidebar-content .widget.ali_recent_posts_widget .entry-title {
        font-size: 0.9rem;
        line-height: 1.3;
        font-weight: 600;
        color: #343a40;
        transition: color 0.2s ease;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .filter-sidebar-content .widget.ali_recent_posts_widget ul li a:hover .entry-title {
        color: #d40511;
    }


    /* --- Style riêng cho widget "Sản phẩm mới" trong dropdown --- */
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget ul {
        /* Không cần flex-direction: column */
    }

    .filter-sidebar-content .widget.alitheme_recent_products_image_widget ul li {
        padding: 10px 0;
        gap: 10px;
        border-bottom: 1px solid #f0f2f5;
        display: flex;
        align-items: center;
    }
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget ul li:last-child { border-bottom: none; padding-bottom: 0;}
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget ul li:first-child{ padding-top: 0;}


    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-thumbnail {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        border-radius: 3px;
        background-color: #f8f9fa;
    }
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-thumbnail img {
        /* Giữ nguyên object-fit */
    }
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-placeholder-svg {
        padding: 5px;
    }
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-placeholder-svg svg {
        width: 30px;
        height: 30px;
    }


    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-details {
        min-width: 0;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-title {
        font-size: 0.9rem;
        line-height: 1.3;
        font-weight: 600;
        color: #343a40;
        transition: color 0.2s ease;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-price {
        font-size: 0.9rem;
        font-weight: 700;
        color: #000;
    }
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-price.contact-price {
        font-weight: 600;
        color: #d40511;
        font-size: 0.85rem;
    }
    .filter-sidebar-content .widget.alitheme_recent_products_image_widget ul li a:hover .widget-product-title {
        color: #d40511;
    }

    /* --- Style riêng cho widget "Danh mục" (Categories) trong dropdown --- */
    .filter-sidebar-content .widget.ali_taxonomy_list_widget ul li a {
        font-weight: 400;
        font-size: 0.9rem;
    }
    .filter-sidebar-content .widget.ali_taxonomy_list_widget .count {
        font-size: 0.75em;
        padding: 1px 6px;
    }
    .filter-sidebar-content .widget.ali_taxonomy_list_widget ul ul.children {
        padding-left: 15px; 
        margin-top: 8px;
    }

    /* Nhắm mục tiêu chính xác vào ô input bên trong widget tìm kiếm tùy chỉnh của bạn */
    .filter-sidebar-content .ht-search-input {
        width: 100% !important;
    }

    /* === CSS CHO DESKTOP (Từ 992px trở lên) === */
    @media (min-width: 992px) {
        .filter-sidebar-content .filter-sidebar-inner {
            display: grid !important;
            grid-template-columns: repeat(4, 1fr) !important; /* 4 cột */
            gap: 10px !important;
        }
        .filter-sidebar-content .widget {
            min-width: 180px !important; 
        }
    }

    /* === CSS CHO DESKTOP LỚN (Từ 1200px trở lên) === */
    @media (min-width: 1200px) {
        .filter-sidebar-content .filter-sidebar-inner {
            grid-template-columns: repeat(5, 1fr) !important; /* 5 cột */
        }
        .filter-sidebar-content .widget {
            min-width: 180px !important; 
        }
    }


    @media (max-width: 991.98px) {
        /* Yêu cầu 1: Ẩn left sidebar và right sidebar (Giữ nguyên) */
        .left-sidebar,
        .right-sidebar {
            display: none !important;
        }
        /* Yêu cầu 2: Chuyển filter thành bố cục 2 cột */
        .filter-sidebar-content .filter-sidebar-inner {
            display: grid !important;
            grid-template-columns: repeat(3, 1fr) !important;
        }
        /* --- Tiêu đề Widget --- */
        .widget-title {
            font-size: 1rem !important;
        }
        /* --- Ảnh đại diện --- */
        .widget.ali_recent_posts_widget .post-thumbnail {
            width: 60px !important; 
            height: 60px !important;
        }
        .widget.ali_recent_posts_widget .entry-title {
            font-size: 0.9rem !important;
            line-height: 1 !important;
        }
        .filter-sidebar-content .widget {
            min-width: 180px !important; 
        }

        .filter-sidebar-content .widget.ali_taxonomy_list_widget ul li a {
            font-size: 0.9rem;
        }
        .filter-sidebar-content .widget.ali_taxonomy_list_widget ul li {
            font-size: 0.9rem;
        }

        .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-title {
            font-size: 0.9rem !important;
            line-height: 1 !important;
        }
        .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-price.contact-price {
            font-size: 0.8rem !important;
        }
        .filter-sidebar-content .widget.alitheme_recent_products_image_widget .widget-product-price {
            font-size: 0.8rem !important;
        }

    }

    @media (max-width: 767.98px) {
        /* Yêu cầu 2: Chuyển filter thành bố cục 2 cột */
        .filter-sidebar-content .filter-sidebar-inner {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 5px !important;
        }
        /* --- Ảnh đại diện --- */
        .widget.ali_recent_posts_widget .post-thumbnail {
            width: 50px !important; 
            height: 50px !important;
        }
        
    }


    /*--- CSS ĐIỀU KHIỂN SỐ CỘT SẢN PHẨM ---*/

    /* Chỉ áp dụng cho chế độ GRID (không áp dụng cho LIST) */
    .products-list-wrapper.is-style-grid .product-grid-item {
        
        /* --- Cấu hình cho Mobile (Mặc định) --- */
        /* Đọc giá trị từ Customizer, nếu không có thì dùng số 2 */
        --cols: var(--products-per-row-mobile, 2); 
        
        /* Tự động tính toán độ rộng */
        width: calc(100% / var(--cols));
        flex-basis: calc(100% / var(--cols));
        max-width: calc(100% / var(--cols));
    }

    /* --- Cấu hình cho Tablet (từ 768px trở lên) --- */
    @media (min-width: 768px) {
        .products-list-wrapper.is-style-grid .product-grid-item {
            --cols: var(--products-per-row-tablet, 3);
        }
    }

    /* --- Cấu hình cho Desktop (từ 992px trở lên) --- */
    @media (min-width: 992px) {
        .products-list-wrapper.is-style-grid .product-grid-item {
            --cols: var(--products-per-row-desktop, 4);
        }
    }