@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    /* Ẩn Tìm kiếm và Hotline trên Mobile để Header không bị quá cao */
    .search-box, .hotline {
        display: none;
    }
    .floating-contact{
        padding-bottom: 40px;
    }
    .back-to-top-btn {
        bottom: 75px;
    }
    /* Biến Menu thành Menu trượt (Mobile Menu) */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Ẩn menu sang phải */
        width: 250px;
        height: 100vh;
        background-color: #050A30;
        flex-direction: column;
        align-items: center;
        padding-top: 100px;
        gap: 30px;
        transition: 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    .nav-menu.active {
        right: 0; /* Hiện menu khi bấm nút */
    }

    /* Hiện nút Hamburger */
    .menu-toggle {
        display: flex;
    }

    /* Hiệu ứng nút Hamburger khi mở */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Responsive cho các Section khác */
    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên Tablet */
    }
    /* Ẩn bớt thanh tìm kiếm hoặc Hotline nếu quá chật */
    .search-container {
        display: none; /* Thông thường trên Mobile tìm kiếm sẽ thu gọn vào 1 icon */
    }
    
    .hotline {
        display: none; /* Hoặc ẩn để ưu tiên không gian */
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên máy tính bảng */
    }
    .category-grid {
        grid-template-columns: 1fr; /* 1 cột trên điện thoại */
    }
    .about-content p {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .about-us {
        margin: 50px auto;
    }
    .news-homepage {
        grid-template-columns: 1fr; /* Chuyển thành 1 cột trên mobile */
    }
     .footer-top {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .newsletter-form {
        width: 100%;
    }
    .shop-header {
        display: flex;
        align-items: flex-start; /* Căn lề trái */
        gap: 15px;
        justify-content: space-between;
        padding-top: 0;
    }
    .shop-header p {
        display: none;
    }
   .filter-mobile-wrapper {
        display: flex; /* Hiện nút lọc trên mobile */
    }


    .sort-select {
        min-width: 140px; /* Độ rộng vừa phải cho mobile */
        border: 1px solid #000;
        padding: 8px 30px 8px 12px;
        font-size: 14px;
        background-position: right 10px center; /* Căn lại mũi tên xuống */
    }

    /* Đưa Sidebar thành Menu trượt */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%; /* Giấu sang trái */
        width: 80%; /* Chiếm 80% chiều rộng màn hình */
        max-width: 300px;
        height: 100%;
        background: #fff;
        z-index: 10000;
        transition: 0.4s ease;
        padding: 20px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    .sidebar.active {
        left: 0; /* Hiện ra khi có class active */
    }

    .sidebar-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
    }

    
    .sidebar-header-mobile span { font-weight: bold; color: #050a30; }
    .close-filter { font-size: 30px; cursor: pointer; line-height: 1; }

    /* 4. Lớp nền mờ */
    .filter-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        display: none;
    }
    .filter-overlay.active { display: block; }
    .product-grid {
    display: grid;
    /* Tự động chia cột, mỗi cột tối thiểu 200px, tối đa là 1 phần đều nhau */
    grid-template-columns: repeat(auto-fill, minmax(160px,2fr)); 
    gap: 20px;
    }
    .pagination-product {
        flex-wrap: wrap; /* Cho phép rớt dòng nếu quá dài */
        gap: 5px;
    }

    .pagination-product .page-item {
        width: 30px; /* Thu nhỏ ô số */
        height: 30px;
        font-size: 12px;
    }
    .pagination-product .dots {
        width: 30px; /* Thu nhỏ ô số */
        height: 30px;
        font-size: 12px;
    }
    /*news*/
     .featured-section {
        flex-direction: column;
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 1. Mở rộng container ra sát mép màn hình một chút để lấy không gian */
    .news-container, 
    .news-section {
        max-width: 100%;
        padding: 0 15px;
        margin: 15px auto;
    }

    /* 2. Chuyển Grid từ 2 cột thành 1 cột */
    .row {
        grid-template-columns: 1fr; /* Ép về 1 cột */
        gap: 30px; /* Thu hẹp khoảng cách giữa các phần */
    }

    /* 3. Tiêu đề nhỏ lại cho vừa màn hình điện thoại */
    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    /* 4. Điều chỉnh Bài viết nổi bật */
    .featured-post h3 {
        font-size: 18px;
        line-height: 1.4;
    }
    
    .featured-post p {
        font-size: 14px;
        /* Giới hạn dòng để không quá dài trên mobile */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 5. Quan trọng: Chỉnh lại phần Xem nhiều nhất */
    .side-post-item {
        gap: 10px;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px dashed #eee; /* Thêm đường kẻ mờ phân cách giữa các bài */
    }

    .side-post-item img {
        width: 100px;  /* Trên mobile ảnh sidebar nhỏ lại */
        height: 70px;
        border-radius: 4px;
    }

    .side-post-info h4 {
        font-size: 14px;
        line-height: 1.3;
    }
    .wholesale-section {
    height: 180px; /* Thu nhỏ chiều cao nền trên mobile */
  }
  .wholesale-btn {
    font-size: 8px; /* Thu nhỏ cỡ chữ để không bị tràn dòng */
    padding: 12px 25px;
  }
  .product-detail-container {
        flex-direction: column;
        gap: 20px;
    }
    .btn-two-columns {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 549px) {
    .bn-1 {
        background-image: url('image/ra-mat-dong-phuc-may-san-fastuni-doc') !important;
    }
    .bn-2{
         background-image: url('image/bo-suu-tap-elegant-era-so-mi-600x800.jpg') !important;
    }
    .bn-3{
         background-image: url('image/banner-bst-dong-phuc-teambuilding-mobile-1.jpg') !important;
    }
}