/* ===================================================================== */
/* 1. CSS BANNER SLIDER (SWIPER)                                         */
/* ===================================================================== */
.banner-slider {
    width: 100%;
    aspect-ratio: 1920 / 600;
    background-color: #f0f0f0;
    overflow: hidden; 
    position: relative; 
}
.mySwiper { width: 100%; height: 100%; }
.swiper-slide { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swiper-button-next, .swiper-button-prev { color: #2e8b57 !important; }
.swiper-pagination-bullet-active { background: #2e8b57 !important; }

/* ===================================================================== */
/* TIÊU ĐỀ DÙNG CHUNG (Ép ra giữa, có vạch xanh)                        */
/* ===================================================================== */
.home-title-wrapper {
    display: block !important;
    text-align: center !important;
    position: relative;
    margin-bottom: 40px;
    width: 100%;
    clear: both;
}
.home-title-wrapper .title-line {
    width: 50px; height: 3px; background: #1a633a; margin: 0 auto 15px auto; display: block;
}
.home-title-wrapper h2 {
    margin: 0; font-size: 28px; color: #1e293b; text-transform: uppercase; font-weight: bold; display: block;
}
.home-title-wrapper .btn-view-all {
    position: absolute; right: 0; bottom: 0; color: #1a633a; text-decoration: none; font-weight: 600; padding: 8px 15px; border: 1px solid #1a633a; border-radius: 6px; transition: 0.3s;
}
.home-title-wrapper .btn-view-all:hover {
    background: #1a633a; color: white;
}

/* ===================================================================== */
/* 2. KHU VỰC SẢN PHẨM NỔI BẬT (Mặc định PC - 4 cột)                     */
/* ===================================================================== */
.products { padding: 60px 0; }

.product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 25px !important; 
    margin-top: 20px;
}

.product-card {
    border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; background: #ffffff; text-align: center; display: flex; flex-direction: column;
}
.product-img-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1; /* Tỉ lệ vuông, tự động chiếm chỗ */
    background-color: #f8fafc; /* Màu nền chờ load ảnh */
    overflow: hidden;
}
.product-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-title-link {
    color: #1e293b; text-decoration: none; font-size: 16px; font-weight: bold; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card h3 { margin: 0 0 10px 0; flex-grow: 1; }
.price { color: #b91c1c; font-size: 18px; font-weight: bold; margin: 0 0 15px 0; }
.btn-detail {
    display: block; padding: 10px; background: #f1f5f9; color: #1e293b; text-decoration: none; border-radius: 6px; font-weight: 500; border: 1px solid #cbd5e1; transition: 0.2s;
}
.btn-detail:hover { background: #e2e8f0; }

/* Tablet (iPad): Thu về 2 sản phẩm / hàng */
@media (max-width: 992px) and (min-width: 769px) {
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===================================================================== */
/* 3. KHU VỰC TẠI SAO CHỌN CHÚNG TÔI                                    */
/* ===================================================================== */
.why-choose-us { background: #ffffff; padding: 60px 0; }
.why-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: flex-start; }
.why-item { display: flex; align-items: flex-start; gap: 15px; }
.why-icon { width: 65px; height: 65px; flex: 0 0 65px; }
.why-icon img { width: 100%; height: 100%; object-fit: contain; }
.why-content h4 { color: #1a633a !important; font-family: 'Roboto', sans-serif !important; font-size: 16px !important; font-weight: 800 !important; line-height: 1.4 !important; text-transform: uppercase; margin-bottom: 8px !important; }
.why-content p { color: #555555 !important; font-family: 'Roboto', sans-serif !important; font-size: 14px !important; line-height: 1.5 !important; }

/* ===================================================================== */
/* 4. KHU VỰC VỀ CHÚNG TÔI (ABOUT US - Mặc định PC)                      */
/* ===================================================================== */
.about-section { padding: 60px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image { width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.about-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.about-image:hover img { transform: scale(1.05); }

.about-content .section-title { color: #1a633a !important; font-family: 'Roboto', sans-serif !important; font-weight: 900 !important; margin-bottom: 8px; letter-spacing: 0.5px; text-align: left; }
.about-content h3.about-subtitle { color: #222222 !important; font-family: 'Roboto', sans-serif !important; font-size: 22px !important; font-weight: 700 !important; margin-top: 0; margin-bottom: 15px; line-height: 1.4 !important; }
.about-content p { color: #555555 !important; font-family: 'Roboto', sans-serif !important; line-height: 1.65 !important; margin-bottom: 20px; font-size: 15px !important; }
.about-features { list-style: none; margin-bottom: 25px; padding: 0; }
.about-features li { color: #444444 !important; font-family: 'Roboto', sans-serif !important; font-size: 15px !important; display: flex; align-items: center; gap: 15px; margin-bottom: 16px; }
.about-features li i { color: #1a633a; background-color: rgba(46, 139, 87, 0.15); width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 14px; }
.about-content .read-more-link { color: #1a633a !important; font-family: 'Roboto', sans-serif !important; font-size: 16px !important; font-weight: 600 !important; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; transition: all 0.3s ease; }
.about-content .read-more-link:hover { color: #0d3820 !important; gap: 15px; }

/* ===================================================================== */
/* KHỐI ĐỐI TÁC TIÊU BIỂU (ĐÃ SỬA: TĂNG TO VÀ CÓ MÀU 100%)               */
/* ===================================================================== */
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 50px; }
.partner-logos img { height: 80px; transition: transform 0.3s ease; } /* Tăng chiều cao, trả lại màu gốc */
.partner-logos img:hover { transform: scale(1.1); } /* Chỉ phóng to nhẹ khi di chuột */

/* ===================================================================== */
/* KHỐI TIN TỨC & SỰ KIỆN (CHUẨN TẠP CHÍ)                                */
/* ===================================================================== */
.news-grid-mag { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.news-card-mag { display: flex; flex-direction: column; gap: 15px; background: transparent; border: none !important; box-shadow: none !important; }
.news-thumb-mag {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10; /* Tỉ lệ chuẩn của khối Tin tức */
    background-color: #f8fafc; /* Màu nền chờ load ảnh */
    overflow: hidden;
}
.swiper-wrapper {
    min-height: 100%;
}
.news-thumb-mag img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-card-mag:hover .news-thumb-mag img { transform: scale(1.05); }
.news-badge-mag { position: absolute; bottom: 0; left: 0; background: #1a633a; color: white; padding: 5px 12px; font-size: 12px; font-weight: bold; border-top-right-radius: 6px; }
.news-date-mag { font-size: 13px; color: #94a3b8; margin-top: 5px; }
.news-title-mag { font-size: 18px; font-weight: 700; color: #1e293b; text-decoration: none; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-transform: uppercase; }
.news-excerpt-mag { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-readmore-mag { color: #1a633a; font-weight: 700; font-size: 13px; text-decoration: none; text-transform: uppercase; transition: color 0.3s; }
.news-readmore-mag:hover { color: #f59e0b; }

/* ===================================================================== */
/* 5. KHỐI MEDIA QUERIES - TỐI ƯU HIỂN THỊ TRÊN ĐIỆN THOẠI               */
/* ===================================================================== */
@media (max-width: 768px) {
    .banner-slider { aspect-ratio: 16 / 9; }

    /* Nút xem thêm trên Mobile rơi xuống dưới */
    .home-title-wrapper .btn-view-all { position: relative; display: inline-block; margin-top: 15px; }

    /* Khối Sản phẩm nổi bật (GIỮ NGUYÊN HIỆU ỨNG VUỐT NGANG) */
    .products { padding: 40px 15px !important; }
    .product-grid {
        display: flex !important; overflow-x: auto !important; gap: 15px !important; padding-bottom: 20px !important; scroll-snap-type: x mandatory !important; -webkit-overflow-scrolling: touch !important;
    }
    .product-grid::-webkit-scrollbar { display: none !important; }
    .product-card { scroll-snap-align: start !important; flex: 0 0 70% !important; }

    .why-choose-us { padding: 40px 0; }
    .why-title { font-size: 24px !important; margin-bottom: 30px !important; text-align: center !important; }
    .why-grid { grid-template-columns: 1fr !important; gap: 25px !important; }
    .why-item { gap: 15px; align-items: center; }
    .why-icon { width: 50px !important; height: 50px !important; flex: 0 0 50px !important; }

    .about-section { padding: 30px 15px !important; }
    .about-grid { grid-template-columns: 1fr !important; gap: 25px; }
    .about-image { order: 1; width: 100%; }
    .about-content { order: 2; text-align: center !important; } 
    .about-content .section-title { text-align: center !important; margin-bottom: 8px !important; }
    .about-content h3.about-subtitle { font-size: 18px; margin-bottom: 12px !important; line-height: 1.3; text-align: center !important; }
    .about-content p { line-height: 1.5; margin-bottom: 15px !important; font-size: 15px; text-align: center !important; }
    .about-features { display: inline-block; text-align: left; margin: 0 auto 15px auto !important; }
    .about-features li { font-size: 15px; margin-bottom: 10px !important; gap: 10px !important; }
    .about-features li i { width: 26px; height: 26px; font-size: 12px; }
    .about-content .read-more-link { margin-top: 5px !important; font-size: 15px; justify-content: center; }

    .partner-logos { gap: 25px; }
    .partner-logos img { height: 55px; } /* Đã tăng chiều cao logo đối tác trên mobile */
}