/* ================================================= */
/* GLOBAL - CẤU HÌNH CHUNG TOÀN WEBSITE */
/* ================================================= */

:root {
    --green-primary: #80C342;
    --green-dark: #5E9B2F;
    --green-light: #A6D96A;
    --bg-light: #F7F9F5;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --white: #ffffff;
    --border: #E5E7EB;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Thiết lập Flexbox dọc */
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Ép vùng nội dung tự động phình to ra để chiếm trọn không gian thừa */
.page-main {
    flex: 1 0 auto;
}

/* Đảm bảo footer cố định vị trí co giãn */
.footer {
    flex-shrink: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

section {
    padding: 100px 0;
}

/* ================================================= */
/* SECTION TITLE */
/* ================================================= */

.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-heading h2 {
    font-size: 48px;
    margin: 20px 0;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p {
    color: var(--text-gray);
    font-size: 17px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(128, 195, 66, 0.12);
    color: var(--green-dark);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.section-label::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-primary);
}

/* ================================================= */
/* HEADER */
/* ================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
    overflow: visible;
}

.header-inner {
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Chỉnh độ cao logo cho vừa mắt */
.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
}

.menu a {
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.menu a:hover {
    color: var(--green-primary);
}

.menu {
    display: flex;
    gap: 24px;
}

.header-btn {
    background: var(--green-primary);
    color: white;
    padding: 14px 24px;
    border-radius: 999px;
}

/* Nút tra cứu trong menu — chỉ hiện trên mobile */
.menu .menu-warranty-btn {
    display: none !important;
}

/* ================================================= */
/* FOOTER - THIẾT KẾ ĐẲNG CẤP CHUYÊN NGHIỆP MỚI */
/* ================================================= */

.footer {
    background: #0B130E; /* Hạ tông màu tối sâu hơn để làm nổi bật chữ */
    color: #E5E7EB;
    padding: 80px 0 0;
    font-size: 14px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr; /* Tỷ lệ chia 4 cột cân xứng hoàn hảo */
    gap: 48px;
    align-items: start;
}

.footer-col h3.footer-logo {
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.footer-credo {
    color: var(--green-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-desc {
    color: #9CA3AF;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
}

/* Đường gạch nhỏ tinh tế dưới tiêu đề từng cột */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background: var(--green-primary);
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 12px;
}

.footer-links a {
    color: #9CA3AF;
    transition: all 0.25s ease;
    display: inline-block;
}

/* Hiệu ứng rê chuột đổi màu và đẩy chữ sang phải mượt mà */
.footer-links a:hover {
    color: var(--green-primary);
    transform: translateX(4px);
}

.footer-contact {
    list-style: none;
    display: grid;
    gap: 20px;
}

.footer-contact li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* Khung tròn nhỏ chứa icon liên hệ */
.footer-contact .contact-icon {
    font-size: 16px;
    background: rgba(128, 195, 66, 0.1);
    color: var(--green-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.04em;
}

.footer-contact strong {
    font-size: 18px;
    color: var(--white);
    font-weight: 700;
}

.contact-text {
    color: #9CA3AF;
    line-height: 1.5;
}

.footer-bottom {
    margin-top: 60px;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Đường ngăn cách thanh mảnh đáy trang */
    color: #6B7280;
    font-size: 13px;
}



/* =================TÍnh NĂNG MỚI================================ */



/* ================================================= */
/* DROPDOWN MENU THEO ĐÚNG DANH MỤC SẢN PHẨM CỦA CODE */
/* ================================================= */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.arrow-down {
    font-size: 9px;
    color: #888;
    transition: transform 0.3s;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 12px;
    transform: translateX(-50%) translateY(6px);
    background-color: var(--white);
    min-width: 210px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1100;
}

/* Mũi tên tam giác trên đỉnh dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: transparent transparent var(--white) transparent;
}

.dropdown-menu a {
    display: block !important;
    padding: 11px 22px;
    color: #4B5563;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    text-align: left;
    border-bottom: none;
    position: static !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a::after {
    display: none !important;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: rgba(128, 195, 66, 0.1);
    color: var(--green-dark) !important;
    padding-left: 22px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown:hover .arrow-down {
    transform: rotate(180deg);
    color: var(--green-primary);
}

/* Dropdown trong menu */
.menu .dropdown {
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
}

/* Vùng đệm giữ hover khi di chuột xuống dropdown */
.menu .dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
}

.dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.arrow-down {
    font-size: 9px !important;
    line-height: 1 !important;
    transition: transform 0.25s ease, color 0.25s ease !important;
}


/* ================================================= */
/* CHUẨN HÓA TRỤC DỌC HEADER DESKTOP CÂN XỨNG 100%   */
/* ================================================= */

/* 1. Ép khung bọc chính phải đưa tất cả Logo, Menu, Nút về tâm giữa theo chiều dọc */
.header-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 88px !important;
    overflow: visible;
}

/* 2. Đảm bảo thẻ chứa Logo không sinh ra khoảng cách dòng thừa */
.logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0;
}

.logo img {
    max-height: 52px !important;
    width: auto !important;
    display: block !important;
}

/* 3. Khóa cụm chữ menu cũng phải chạy theo trục giữa */
.menu {
    display: flex !important;
    align-items: center !important;
    gap: 26px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
}

.menu > a,
.menu .dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* 4. Định dạng lại nút bảo hành */
.header-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--green-primary) !important;
    color: var(--white) !important;
    padding: 13px 26px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    transition: all 0.25s ease !important;
}

.header-btn:hover {
    background: var(--green-dark) !important;
    transform: translateY(-1px) !important;
}

/* ================================================= */
/* HEADER DESKTOP — BỐ CỤC SANG, CHUYÊN NGHIỆP CĂN GIỮA Màn HÌNH */
/* ================================================= */
@media screen and (min-width: 992px) {
    .header {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(229, 231, 235, 0.6);
        box-shadow: 0 4px 24px rgba(17, 24, 39, 0.04);
    }

    .header-inner {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        height: 88px !important;
        gap: 20px !important;
        overflow: visible;
    }

    .logo {
        justify-self: start !important;
    }

    .logo img {
        max-height: 52px !important;
    }

    .menu {
        justify-self: center !important;
        gap: 26px !important;
        overflow: visible;
    }

    /* Style link menu chính rõ ràng, kích thước chuẩn 16px */
    .menu > a:not(.menu-warranty-btn),
    .menu .dropdown-toggle {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #374151 !important;
        letter-spacing: 0.01em;
        position: relative;
        padding: 8px 0 !important;
        transition: color 0.25s ease !important;
        white-space: nowrap;
    }

    .menu > a:not(.menu-warranty-btn)::after,
    .menu .dropdown-toggle::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -2px;
        width: 0;
        height: 2px;
        background: var(--green-primary);
        border-radius: 2px;
        transform: translateX(-50%);
        transition: width 0.25s ease;
    }

    .menu > a:not(.menu-warranty-btn):hover,
    .menu .dropdown-toggle:hover {
        color: var(--green-dark) !important;
    }

    .menu > a:not(.menu-warranty-btn):hover::after,
    .menu .dropdown:hover .dropdown-toggle::after {
        width: 100%;
    }

    .menu .menu-warranty-btn {
        display: none !important;
    }

    .menu .dropdown-menu {
        left: 50% !important;
        top: 100% !important;
        margin-top: 12px !important;
        transform: translateX(-50%) translateY(6px) !important;
    }

    .menu .dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0) !important;
    }

    .menu .dropdown-menu::before {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .header-btn {
        justify-self: end !important;
        padding: 13px 26px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        letter-spacing: 0.02em;
        white-space: nowrap;
        background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 100%) !important;
        box-shadow: 0 4px 14px rgba(94, 155, 47, 0.25) !important;
        border-radius: 999px !important;
        transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    }

    .header-btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 20px rgba(94, 155, 47, 0.35) !important;
    }
}

/* Đảm bảo vừa vặn trên các màn hình laptop vừa (992px - 1140px) mà không giảm kích thước quá nhiều */
@media screen and (min-width: 992px) and (max-width: 1140px) {
    .menu {
        gap: 18px !important;
    }
    .menu > a:not(.menu-warranty-btn),
    .menu .dropdown-toggle {
        font-size: 15px !important;
    }
}

/* NHAN LAB - GLOBAL FOOTER SYNC */
.footer {
  background: #08140e;
}

.footer .footer-col h4::before,
.footer .footer-col h4::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.footer .footer-col h4 {
  margin-bottom: 18px !important;
}

.footer .footer-links a {
  text-decoration: none;
}

.footer .footer-inner {
  align-items: start;
}
