/* =================================================================
   ÉP KHUNG FLATSOME NHẢ THANH CUỘN DỌC
   ================================================================= */
html, body {
    overflow-y: auto !important; 
}

/* Đây là các class mặc định của Flatsome hay gây lỗi cuộn */
#wrapper, #main, .page-wrapper, .site-content, .content-area {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
}

/* Đảm bảo thẻ bọc ngoài cùng của bạn không bị giới hạn chiều cao */
.hid-family-wrapper {
    height: auto !important;
    overflow-y: visible !important;
}
/* Ép các thẻ bao ngoài của Theme không được tràn */
.site-content, #content, #main, #wrapper, .page-wrapper, .entry-content { 
    padding: 0 !important; 
    margin: 0 !important; 
    max-width: 100vw !important; /* Dùng 100vw thay vì 100% để ép cứng */
    width: 100% !important; 
    overflow-x: hidden !important;
}

.hid-family-wrapper {
    font-family: 'Inter', sans-serif !important; 
    background: #fff;
    width: 100%;
}

.hid-family-wrapper h1, 
.hid-family-wrapper h2, 
.hid-family-wrapper h3, 
.hid-family-wrapper p, 
.hid-family-wrapper a, 
.hid-family-wrapper span, 
.hid-family-wrapper li {
    font-family: 'Inter', sans-serif !important;
}

.pf-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.pf-content-width { 
    max-width: 900px; 
}

/* =================================================================
   3. HERO SECTION
   ================================================================= */
.pf-hero {
    background-color: #003366; 
    padding: 100px 0 90px 0;
    color: #fff;
}

.pf-label {
    font-size: 18px;
    font-weight: 650;
    color: #ffc600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 10px;
}

.pf-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.5px; 
}

.pf-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.95;
    max-width: 800px;
    line-height: 1.6;
}

/* =================================================================
   4. INTRO SECTION
   ================================================================= */
.pf-intro {
    padding: 60px 0;
    background-color: #f9f9f9; 
}

.pf-intro p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;
}

.pf-intro ul {
    margin: 20px 0 30px 20px;
    padding: 0;
    list-style: none;
    font-size: 18px;
    font-weight: 400;
}

.pf-intro ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.5;
}

.pf-intro ul li::before {
    content: "•";
    color: #333;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* =================================================================
   5. PRODUCTS GRID (SỬ DỤNG CSS GRID CHUẨN)
   ================================================================= */
.pf-products-section {
    padding: 60px 0 80px 0;
    background: #fff; 
}

.pf-grid {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* Mặc định 4 cột bằng nhau */
    gap: 30px; /* Khoảng cách giữa các thẻ */
    align-items: stretch; /* Đảm bảo các thẻ cao bằng nhau */
}

/* =================================================================
   6. CARD STYLE 
   ================================================================= */
.pf-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border-radius: 12px;    
    background: #fff;
    width: 100%; /* Grid sẽ tự động tính toán width, không cần set px cứng */
    position: relative;
    z-index: 1;
}

.pf-card-inner {
    padding: 25px;          
    height: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
    text-align: left;       
    display: flex;
    flex-direction: column;
}

/* HIỆU ỨNG HOVER */
.pf-card:hover {
    transform: translateY(-12px); 
    z-index: 2;
}

.pf-card:hover .pf-card-inner {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); 
    background: #fff;
}

/* ẢNH SẢN PHẨM */
.pf-card-img {
    height: 180px;          
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center; 
    margin-bottom: 25px;      
}

.pf-card-img img {
    max-height: 145px;      
    width: auto;
    max-width: 100%;
    transition: transform 0.4s ease;
}

.pf-card:hover .pf-card-img img {
    transform: scale(1.08);
}

/* TIÊU ĐỀ & MÔ TẢ */
.pf-card-title {
    font-size: 17px;        
    font-weight: 700;       
    color: #004890;         
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: block;
}

.pf-card-desc {
    font-size: 14px;        
    color: #555;            
    line-height: 1.6;
}

/* =================================================================
   7. ANIMATION
   ================================================================= */
.fade-up { 
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity 0.6s, transform 0.6s; 
}
.fade-up.visible { 
    opacity: 1; 
    transform: translateY(0); 
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* =================================================================
   8. RESPONSIVE CHUẨN CHO TỪNG THIẾT BỊ
   ================================================================= */

/* Laptop nhỏ & Tablet ngang (Dưới 1200px) -> 3 Cột */
@media (max-width: 1200px) { 
    .pf-grid { 
        grid-template-columns: repeat(3, 1fr); 
    } 
}

/* Tablet dọc (Dưới 900px) -> 2 Cột */
@media (max-width: 900px) { 
    .pf-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px; /* Thu hẹp khoảng cách một chút cho màn hình nhỏ */
    } 
    .pf-title { 
        font-size: 36px; /* Chữ tiêu đề nhỏ lại xíu */
    }
}

/* Mobile (Dưới 600px) -> 1 Cột */
@media (max-width: 600px) { 
    .pf-grid { 
        grid-template-columns: 1fr; 
    } 
    .pf-card { 
        max-width: 400px; /* Giới hạn độ rộng tối đa trên mobile để thẻ không bị bè quá mức */
        margin: 0 auto; /* Căn giữa thẻ trên mobile */
    } 
    .pf-title { 
        font-size: 32px; 
    }
    .pf-hero {
        padding: 60px 0 50px 0; /* Giảm padding trên mobile cho gọn */
    }
}