/* =========================================
   1. COLOR PALETTE & VARIABLES (CHUẨN CATALOGUE)
========================================= */
:root {
    --primary-green: #3a6b35; 
    --light-green: #5c874b;
    --catalogue-bg: #F4F0E6; /* Màu nền Beige nịnh mắt giống PDF */
    --text-dark: #2c3e2d;
    --white: #ffffff;
    --border-color: #e0dcd0;
    --accent-gold: #cfa856;
    --shadow-soft: 0 8px 24px rgba(58, 107, 53, 0.08);
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: var(--catalogue-bg);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* =========================================
   2. HEADER V2 (2 TẦNG HIỆN ĐẠI & TÌM KIẾM)
========================================= */
.site-header-v2 { 
    background: var(--white); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.04); 
    position: sticky; top: 0; z-index: 1000; 
}

/* Tầng 1: Logo & Thanh tìm kiếm */
.header-top { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 0; 
}
.logo-link { display: flex; align-items: center; text-decoration: none; }
.main-logo { height: 55px; margin-right: 15px; border-radius: 6px; }
.logo-text h1 { margin: 0; color: var(--primary-green); font-size: 24px; font-weight: 800; letter-spacing: 1px;}
.logo-text span { font-size: 11px; color: var(--light-green); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 500;}

/* Ô tìm kiếm chuẩn form */
.search-container { flex: 1; max-width: 500px; margin: 0 40px; }
.search-form { 
    display: flex; 
    border: 1px solid #c9d6c4; 
    border-radius: 50px; 
    overflow: hidden; 
    background: #fbfaf6; 
    transition: all 0.3s ease;
}
.search-form:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(58, 107, 53, 0.1);
}
.search-form input { 
    flex: 1; border: none; padding: 12px 20px; outline: none; 
    font-family: 'Montserrat', sans-serif; font-size: 14px; background: transparent;
}
.search-form button { 
    background: var(--primary-green); border: none; color: var(--white); 
    padding: 0 25px; cursor: pointer; transition: 0.3s; font-size: 16px;
}
.search-form button:hover { background: var(--accent-gold); }

/* Liên hệ Zalo */
.header-actions { display: flex; align-items: center; gap: 25px; }
.contact-zalo { text-align: right; border-left: 1px solid var(--border-color); padding-left: 25px;}
.zalo-label { display: block; font-size: 11px; font-weight: 700; color: #888; margin-bottom: 2px; }
.zalo-number { display: block; font-size: 20px; font-weight: 800; color: var(--primary-green); letter-spacing: 0.5px; }

/* Tầng 2: Thanh Menu Xanh */
.main-nav-bar { background: var(--primary-green); }
.main-nav-bar ul { list-style: none; display: flex; margin: 0 auto; padding: 0; justify-content: flex-start; gap: 40px; }
.main-nav-bar a { 
    display: inline-block; color: var(--white); text-decoration: none; 
    font-weight: 600; font-size: 13px; padding: 16px 0; position: relative; transition: 0.3s; letter-spacing: 0.5px;
}
.main-nav-bar a::after { 
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; 
    background: var(--accent-gold); transition: width 0.3s ease; 
}
.main-nav-bar a:hover::after { width: 100%; }

/* =========================================
   3. ANIMATION NGÔN NGỮ (LÁ DỪA)
========================================= */
.lang-switcher { display: flex; gap: 6px; align-items: center; }
.lang-switcher a {
    padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: 13px;
    color: var(--text-dark); position: relative; overflow: hidden; z-index: 1; transition: 0.3s ease;
}
.lang-switcher a::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #6c9a58, #3a6b35); z-index: -1;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-radius: 20px;
}
.lang-switcher a:hover::before, .lang-switcher a.active::before { transform: scaleX(1); }
.lang-switcher a:hover, .lang-switcher a.active { color: var(--white); box-shadow: 0 4px 10px rgba(58, 107, 53, 0.2); }

/* =========================================
   4. GRID SẢN PHẨM & CARD ĐẸP MẮT
========================================= */
.section-heading { margin-bottom: 20px; }
.page-title { font-size: 32px; color: var(--primary-green); font-family: 'Playfair Display', serif; margin-bottom: 5px;}
.leaf-divider { font-size: 20px; color: var(--primary-green); letter-spacing: 10px; opacity: 0.6; }

.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); 
    gap: 20px; margin-top: 20px; margin-bottom: 40px;
}
.product-card {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); transition: all 0.4s ease;
    border: 1px solid var(--border-color); display: flex; flex-direction: column;
}
.product-card:hover { 
    transform: translateY(-8px); 
    box-shadow: var(--shadow-soft); 
    border-color: var(--light-green);
}
.product-img-wrap { 
    position: relative; overflow: hidden; height: 180px; 
    background: #f4f1e9; display: flex; align-items: center; justify-content: center;
}
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.product-card:hover .product-img { transform: scale(1.08); }
.product-info { padding: 15px; text-align: center; }
.product-info h4 { margin: 0 0 5px; color: var(--primary-green); font-size: 16px; font-weight: 700;}
.product-size { font-size: 13px; color: #666; margin: 3px 0; }
.material { font-size: 12px; color: var(--light-green); font-weight: 600; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-color); }

/* =========================================
   5. TRANG THÔNG SỐ & XEM CATALOGUE (CHUẨN PDF)
========================================= */
.specs-catalog-layout {
    display: flex; flex-wrap: wrap; gap: 40px; background: var(--white);
    padding: 40px; border-radius: 16px; border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft); margin-top: 30px;
}
.specs-left { flex: 1; min-width: 320px; }
.specs-big-title {
    font-family: 'Playfair Display', serif; font-size: 34px; color: var(--primary-green);
    line-height: 1.2; margin-bottom: 25px;
}
.specs-intro-box { 
    background: #fbfaf6; padding: 25px; border-radius: 10px; 
    border-left: 4px solid var(--primary-green); margin-bottom: 30px;
}
.specs-intro-header { display: flex; align-items: center; margin-bottom: 15px; }
.specs-intro-header h3 { font-size: 20px; color: var(--text-dark); margin: 0; font-family: 'Playfair Display', serif;}
.specs-icon-list { list-style: none; padding: 0; margin-top: 20px; }
.specs-icon-list li { margin-bottom: 15px; font-size: 14px; border-bottom: 1px dashed var(--border-color); padding-bottom: 10px;}
.specs-icon-list i { color: var(--accent-gold); width: 25px; font-size: 16px; }

.specs-right { flex: 2; min-width: 500px; }
.specs-right-title {
    font-size: 18px; color: var(--text-dark); border-bottom: 2px solid var(--primary-green);
    padding-bottom: 10px; margin-bottom: 25px; display: inline-block; font-weight: 700;
}
.specs-tables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.full-width { grid-column: 1 / -1; }
.spec-table-box h4 { color: var(--primary-green); font-size: 15px; font-weight: 700; margin-bottom: 10px; background: #f4f1e9; padding: 5px 10px; border-radius: 4px; display: inline-block;}
.specs-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 8px; overflow: hidden; border: 1px solid #eee;}
.specs-table th { background: var(--primary-green); color: var(--white); padding: 10px 15px; text-align: left; font-size: 13px; font-weight: 600;}
.specs-table td { padding: 10px 15px; border-bottom: 1px solid #f0f0f0; font-size: 13px;}
.specs-table tr:nth-child(even) { background: #faf9f5; }
.specs-table tr:hover { background: #f4f1e9; }

/* Buttons */
.btn-primary { 
    display: inline-block; background: var(--primary-green); color: var(--white); 
    padding: 10px 22px; border-radius: 6px; text-decoration: none; font-weight: 600; transition: 0.3s;
}
.btn-primary:hover { background: var(--accent-gold); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(207, 168, 86, 0.3); }
.btn-download-large {
    display: inline-block; background: var(--primary-green); color: var(--white) !important;
    padding: 15px 35px; border-radius: 50px; font-size: 16px; font-weight: 700; text-decoration: none;
    box-shadow: 0 6px 15px rgba(58, 107, 53, 0.3); transition: all 0.3s;
}
.btn-download-large:hover { background: var(--accent-gold); transform: translateY(-4px); box-shadow: 0 10px 20px rgba(207, 168, 86, 0.4); }

/* =========================================
   6. FIX FOOTER GỌN GÀNG, KHÔNG VỠ
========================================= */
.site-footer {
    background: linear-gradient(135deg, #2a4c22 0%, #3a6b35 100%);
    color: var(--white); padding: 60px 0 20px; margin-top: 70px; font-size: 14px; position: relative;
}
.site-footer::before {
    content: ''; position: absolute; top: -10px; left: 0; width: 100%; height: 10px;
    background: var(--accent-gold);
}
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px;}
.footer-logo-wrap { display: flex; align-items: center; margin-bottom: 20px; }
/* KHỐNG CHẾ KÍCH THƯỚC LOGO Ở FOOTER */
.footer-logo { width: 60px; height: auto; border-radius: 8px; margin-right: 15px; background: white; padding: 2px;} 
.footer-company-name { font-size: 24px; color: var(--white); margin: 0; font-family: 'Playfair Display', serif; letter-spacing: 1px; }

.footer-col h4 { color: var(--accent-gold); border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 12px; margin-bottom: 20px; text-transform: uppercase; font-size: 15px;}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #d0decb; text-decoration: none; transition: 0.3s; display: inline-block;}
.footer-links a:hover { color: var(--accent-gold); transform: translateX(5px); }
.contact-info p { margin-bottom: 15px; color: #d0decb; display: flex; align-items: center;}
.contact-info i { color: var(--accent-gold); width: 25px; font-size: 16px;}
.footer-bottom { text-align: center; padding-top: 25px; margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: #9bb396;}

/* =========================================
   7. ANIMATIONS UTILITIES
========================================= */
.fade-in { animation: fadeIn 0.8s ease-in-out; }
.slide-up { animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
/* ==============================================================
/* ==============================================================
   8. FIX LỖI TRÀN MÀN HÌNH & MOBILE RESPONSIVE TỐI ƯU
============================================================== */
/* Khóa chết thanh cuộn ngang trên toàn bộ trang */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

@media screen and (max-width: 991px) {
    /* --- XÓA SỔ KHÔNG GIAN ẢO GÂY TRÀN --- */
    .products-mega-bubble {
        display: none !important; 
    }

    /* --- ÉP HEADER XẾP DỌC --- */
    .site-header-v2 .header-top {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 15px 20px !important;
    }

    .site-header-v2 .search-container {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .site-header-v2 .header-actions {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }

    /* --- THANH MENU XANH LÁ: VUỐT NGANG ĐƯỢC --- */
    .main-nav-bar ul {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding: 0 15px 5px 15px !important;
        -webkit-overflow-scrolling: touch; /* Giúp vuốt mượt trên iOS */
    }
    .main-nav-bar ul::-webkit-scrollbar {
        display: none !important; /* Ẩn thanh cuộn xấu xí */
    }
    .main-nav-bar a {
        white-space: nowrap !important; /* Không cho rớt dòng */
    }

    /* --- TINH CHỈNH GIAO DIỆN SẢN PHẨM TRÊN MOBILE --- */
    .container { padding: 0 15px !important; }
    
    .catalog-store-hero { 
        flex-direction: column !important; 
        text-align: center !important; 
    }
    .hero-title-group { flex-direction: column !important; gap: 10px !important; }
    .catalog-badges-row { justify-content: center !important; }
    
    .store-toolbar-wrapper { 
        flex-direction: column !important; 
        align-items: stretch !important; 
    }
    .filter-tabs { justify-content: center !important; margin-bottom: 10px !important; }
    
    /* Ép lưới sản phẩm chia 2 cột đều nhau */
    .product-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important; 
    }
    .product-info { padding: 12px 8px !important; }
    .product-info h4 { font-size: 14px !important; }
    .btn-card-order { width: 100% !important; box-sizing: border-box !important; }
}

@media screen and (max-width: 450px) {
    /* Nếu màn hình quá nhỏ, ép về 1 cột */
    .product-grid { 
        grid-template-columns: 1fr !important; 
    }
}