/* Ẩn các thành phần Mobile Bottom Sheet trên PC */
.ds-sidebar-mobile-header, .ds-sidebar-mobile-footer, .ds-mobile-filter-btn { display: none; }

/* ẨN TẤT CẢ CÁC NÚT LỌC RÁC CỦA PLUGIN YITH */
.yith-wcan-mobile-button, 
.yith-wcan-mobile-filters-menu-btn, 
.yith-wcan-filters-mobile-button,
#yith-wcan-mobile-button,
.yith-wcan-mobile-button-container {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    z-index: -9999 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* =========================================
   GIAO DIỆN MOBILE & TABLET
   ========================================= */
@media (max-width: 1200px) { 
    .ds-shop-content ul.products { grid-template-columns: repeat(4, 1fr) !important; } 
}

@media (max-width: 991px) {
    .ds-shop-page-wrapper { margin: 15px auto; padding-top: 15px; }
    .ds-shop-content { width: 100%; }
    .ds-shop-content ul.products { grid-template-columns: repeat(3, 1fr) !important; }
    
    .ds-mobile-filter-btn {
        display: flex; align-items: center; gap: 5px; background: #f7f7f7; border: 1px solid #ddd;
        padding: 6px 12px; border-radius: 4px; font-size: 13px; font-weight: bold; cursor: pointer; color: #333;
    }
    .ds-title-row { border-bottom: none; margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; }
    .ds-title-row .ds-title { font-size: 13px; padding-left: 0; }
    
    /* Thiết kế Sidebar dạng trượt Bottom Sheet */
    .ds-shop-sidebar {
        position: fixed; bottom: 0; left: 0; top: auto; width: 100%; height: 85vh;
        background: #fff; z-index: 99999; padding: 0; display: flex; flex-direction: column;
        transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
        border-radius: 20px 20px 0 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    }
    .ds-shop-sidebar.is-open { transform: translateY(0); }
    .yith-wcan-filters-opener {display:none;}
    
    /* Màn hình đen mờ */
    .ds-sidebar-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6); z-index: 99998; opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
    }
    .ds-sidebar-overlay.is-open { opacity: 1; visibility: visible; }
    
    /* Header Sidebar Mobile */
    .ds-sidebar-mobile-header {
        display: flex; align-items: center; justify-content: center;
        padding: 15px 20px; border-bottom: 1px solid #f1f1f1; position: relative;
    }
    .ds-sidebar-mobile-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #111; }
    .ds-close-sidebar {
        display: flex; position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
        color: #333; background: none; border: none; font-size: 28px; cursor: pointer; padding: 5px; line-height: 1;
    }

    /* Nội dung Sidebar Mobile */
    .ds-sidebar-content {
        flex: 1; overflow-y: auto; padding: 20px 20px 80px 20px;
    }
    .ds-sidebar-content .widget { margin-bottom: 20px; border-bottom: 1px solid #f1f1f1; padding-bottom: 15px; }
    .ds-sidebar-content .widget:last-child { border-bottom: none; }
    
    /* Chia các tuỳ chọn lọc YITH thành 2 cột */
    .ds-sidebar-content ul, .ds-sidebar-content .yith-wcan-list {
        display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 12px 15px !important;
        padding: 0 !important; margin: 0 !important; list-style: none !important;
    }
    .ds-sidebar-content ul li {
        display: flex !important; align-items: center; font-size: 13.5px !important; color: #333 !important; width: 100% !important; margin: 0 !important;
    }
    .ds-sidebar-content ul li input[type="checkbox"], .ds-sidebar-content ul li input[type="radio"] {
        accent-color: #cc0000; width: 18px; height: 18px; margin-right: 8px !important;
    }

    /* Footer Sidebar Mobile */
    .ds-sidebar-mobile-footer {
        display: flex; gap: 15px; padding: 15px 20px; border-top: 1px solid #f1f1f1; background: #fff;
        position: absolute; bottom: 0; left: 0; width: 100%; box-sizing: border-box; z-index: 10;
    }
    .ds-filter-reset {
        flex: 1; display: flex; align-items: center; justify-content: center; background: #fff;
        border: 1px solid #cc0000; color: #cc0000; border-radius: 8px; font-weight: 600; font-size: 15px; padding: 12px; cursor: pointer;
    }
    .ds-filter-apply {
        flex: 2; display: flex; align-items: center; justify-content: center; background: #cc0000;
        border: 1px solid #cc0000; color: #fff; border-radius: 8px; font-weight: 600; font-size: 15px; padding: 12px; cursor: pointer;
    }
}

@media (max-width: 576px) { 
    .ds-shop-content ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; } 
    .ds-shop-sidebar {
        display: none; position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 85vh;
        background: #fff; z-index: 99999; border-radius: 20px 20px 0 0;
    }
    .ds-shop-sidebar.is-open { display: flex; flex-direction: column; }
}