/***********************************************************
            CUSTOM WORDPRESS MENU STYLE (ACTIVE & HOVER)
***********************************************************/
/* Reset danh sách menu về hàng ngang */
ul.main-menu-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.75rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

ul.main-menu-nav li {
    position: relative;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

ul.main-menu-nav li a {
    display: inline-block;
    padding: 0.5rem 0;
    color: #1f2937; /* Màu chữ mặc định */
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    position: relative;
}

/* Đường gạch ngang hiệu ứng gạch bên dưới (Underline Bar) */
ul.main-menu-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #003366; /* Màu xanh dương Primary */
    border-radius: 2px;
    transition: width 0.25s ease-in-out;
}

/* 1. HIỆU ỨNG HOVER (RÊ CHUỘT) */
ul.main-menu-nav li a:hover {
    color: #003366; /* Màu chữ xanh dương khi hover */
}

ul.main-menu-nav li a:hover::after {
    width: 100%; /* Kéo dài vạch xanh dưới khi hover */
}

/* 2. TRẠNG THÁI ACTIVE (TRANG HIỆN TẠI DÙNG CLASS CỦA WORDPRESS) */
ul.main-menu-nav li.current-menu-item > a,
ul.main-menu-nav li.current-page-ancestor > a,
ul.main-menu-nav li.current-product-ancestor > a,
ul.main-menu-nav li.current-menu-ancestor > a {
    color: #003366 !important; /* Chữ xanh dương */
}

ul.main-menu-nav li.current-menu-item > a::after,
ul.main-menu-nav li.current-page-ancestor > a::after,
ul.main-menu-nav li.current-product-ancestor > a::after,
ul.main-menu-nav li.current-menu-ancestor > a::after {
    width: 100% !important; /* Hiện gạch ngang xanh dương dưới chân */
}

/* Style cho Dropdown Cấp 2 (Nút con) */
ul.main-menu-nav li ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 50;
}

ul.main-menu-nav li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

ul.main-menu-nav li ul.sub-menu li a {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    width: 100%;
}

ul.main-menu-nav li ul.sub-menu li a::after {
    display: none; /* Không gạch chân đối với sub-menu */
}

ul.main-menu-nav li ul.sub-menu li a:hover {
    background-color: #f3f4f6;
}

#main-header {
  padding: 1% 0 !important;
}
/***********************************************************************
                        HOME 
***********************************************************************/        
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        /* Smooth Scroll & Scrollbar Hiding */
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
        .scroll-snap-x { scroll-snap-type: x mandatory; }
        .scroll-snap-align-start { scroll-snap-align: start; }

        /* Multi-Level Dropdown Animation (Desktop) */
        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }

        /* Entry Animation */
        @keyframes slideInUp {
            from { transform: translateY(16px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .animate-up { animation: slideInUp 0.5s ease-out forwards; }

/***********************************************************************
                        ABOUT US 
***********************************************************************/   
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Multi-Level Dropdown Navigation */
        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }

        .plywood-stack-shadow {
            box-shadow: 4px 4px 0px 0px rgba(0, 51, 136, 0.08);
        }

        .wood-texture {
            background-color: #f9f9fc;
            background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10c20 0 40 20 60 20s40-20 60-20v100c-20 0-40 20-60 20s-40-20-60-20V10z' fill='none' stroke='%23e2e2e5' stroke-width='1' opacity='0.4'/%3E%3C/svg%3E");
        }

/***********************************************************************
                        CONTACT
***********************************************************************/   
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Multi-Level Dropdown Navigation */
        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }

        .wood-texture-overlay {
            background-image: url("https://www.transparenttextures.com/patterns/wood-pattern-with-lines.png");
            opacity: 0.03;
        }

/***********************************************************************
                        Product
***********************************************************************/   
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }

        .product-card-shadow {
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .product-card-shadow:hover {
            box-shadow: 0 10px 25px -5px rgba(0, 51, 136, 0.12), 0 8px 10px -6px rgba(0, 51, 136, 0.08);
            transform: translateY(-4px);
        }

        .glass-sidebar {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(12px);
        }

        .filter-thick-btn.active {
            background-color: #dae2ff;
            color: #003388;
            font-weight: bold;
            border-color: #003388;
        }

/***********************************************************************
                        Blog
***********************************************************************/   
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Multi-Level Dropdown Navigation */
        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }

        .tonal-card {
            transition: all 0.3s ease;
        }
        .tonal-card:hover {
            box-shadow: 0 8px 24px rgba(0, 51, 136, 0.08);
            transform: translateY(-2px);
        }

/***********************************************************************
                        Detail Product
***********************************************************************/ 
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Multi-Level Dropdown Navigation */
        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }
        /* Chống chọn ảnh và khóa bắt con trỏ ảnh gốc */
        #thumb-slider-window img {
            pointer-events: none !important;
            -webkit-user-drag: none !important;
            user-select: none !important;
        }

        #product-thumbnails button {
            touch-action: manipulation;
        }
        /* ẩn bộ lọc mặc định của woocommerce */
        .woocommerce-ordering {
          display: none !important;
        }
/***********************************************************************
                        Detail Blog
***********************************************************************/ 
.material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
        }
        
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Multi-Level Dropdown Navigation */
        .dropdown-menu { display: none; }
        .dropdown-trigger:hover > .dropdown-menu { display: block; }
        .sub-dropdown-menu { display: none; }
        .sub-dropdown-trigger:hover > .sub-dropdown-menu { display: block; }

        .reading-progress-bar {
            height: 3px;
            background-color: #003388;
            width: 0%;
            position: fixed;
            top: 64px;
            left: 0;
            z-index: 51;
            transition: width 0.1s ease-out;
        }
        @media (min-width: 768px) {
            .reading-progress-bar { top: 72px; }
        }

/***********************************************************************
                       404
***********************************************************************/ 
        body {
            font-family: 'Open Sans', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
        .material-symbols-outlined {
            font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
            display: inline-block;
            vertical-align: middle;
        }
        .wood-texture-overlay {
            background-image: url("https://www.transparenttextures.com/patterns/wood-pattern.png");
            opacity: 0.05;
            pointer-events: none;
        }
        .grain-bg {
            background-color: #f9f9fc;
            background-image: radial-gradient(#d1d5db 0.5px, transparent 0.5px);
            background-size: 24px 24px;
        }

/********************************************************
                Form Hổ Trợ
********************************************************/
/* Khung bọc ngoài toàn bộ Form */
.kg-request-form-wrapper {
    background-color: #f2f3f8; /* Màu nền xám nhạt khớp với ảnh */
    border-radius: 12px;
    font-family: inherit;
    max-width: 650px;
    margin: 0 auto;
}

/* Tiêu đề & Mô tả */
.kg-form-title {
    font-size: 24px;
    font-weight: 800;
    color: #111111;
    margin: 0 0 4px 0 !important;
    line-height: 1.2;
}

.kg-form-subtitle {
    font-size: 13px;
    color: #555555;
    margin: 0 0 20px 0 !important;
}

/* Nhãn trường nhập liệu */
.kg-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #2b3040;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Chia cột Họ tên & SĐT */
.kg-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
}

.kg-form-col {
    flex: 1;
}

.kg-form-group {
    margin-bottom: 16px;
}

/* Kiểu dáng các Input, Select & Textarea */
.kg-request-form-wrapper .kg-input,
.kg-request-form-wrapper .kg-select,
.kg-request-form-wrapper .kg-textarea {
    width: 100% !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #333333 !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.2s;
}

.kg-request-form-wrapper .kg-input::placeholder,
.kg-request-form-wrapper .kg-textarea::placeholder {
    color: #888888 !important;
}

.kg-request-form-wrapper .kg-input:focus,
.kg-request-form-wrapper .kg-select:focus,
.kg-request-form-wrapper .kg-textarea:focus {
    border-color: #00338d !important;
}

/* Tùy chỉnh thẻ Select Dropdown */
.kg-request-form-wrapper .kg-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%20555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px !important;
}

/* Nút bấm Gửi */
.kg-request-form-wrapper .kg-submit-btn {
    width: 100% !important;
    background-color: #00338d !important; /* Màu xanh navy chuẩn mẫu */
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    transition: background-color 0.2s !important;
}

.kg-request-form-wrapper .kg-submit-btn:hover {
    background-color: #002266 !important;
}

/* Responsive cho mobile */
@media (max-width: 640px) {
    .kg-form-row {
        flex-direction: column;
        gap: 16px;
    }
}

/*************************************
            NHẬP LIỆU
*************************************/
/* TABLE & IMAGE GRID FIXES FOR THE_CONTENT */
        .kg-entry-content { color: #1a1c1e; line-height: 1.7; }
        .kg-entry-content table { width: 100% !important; border-collapse: collapse !important; margin-bottom: 1.5rem !important; }
        .kg-entry-content table, .kg-entry-content th, .kg-entry-content td { border: 1px solid #c4c6d4 !important; }
        .kg-entry-content th, .kg-entry-content td { padding: 8px 12px !important; vertical-align: middle !important; }
        .kg-entry-content th { background-color: #f3f3f6 !important; font-weight: 700 !important; }
        .kg-entry-content p { margin-bottom: 1rem !important; }
        .kg-entry-content img { max-width: 100% !important; height: auto !important; display: inline-block !important; border-radius: 8px !important; }

        /* Styling cho khối bố cục Ảnh + Chữ */
        .kg-entry-content .kg-media-block {
            display: flex;
            gap: 20px;
            align-items: flex-start;
            margin-bottom: 25px;
        }

        .kg-entry-content .kg-media-img {
            flex: 0 0 200px; /* Độ rộng cố định của ảnh trên Desktop */
            max-width: 200px;
        }

        .kg-entry-content .kg-media-img img {
            width: 100% !important;
            height: 140px !important;
            object-fit: cover !important;
            border-radius: 8px !important;
            margin: 0 !important;
        }

        .kg-entry-content .kg-media-content {
            flex: 1;
        }

        .kg-entry-content .kg-media-content p {
            margin-bottom: 8px !important;
        }

        /* Tự động xếp chồng 1 cột trên điện thoại Mobile */
        @media (max-width: 640px) {
            .kg-entry-content .kg-media-block {
                flex-direction: column;
                gap: 12px;
            }
            .kg-entry-content .kg-media-img {
                flex: 1 1 100%;
                max-width: 100%;
                width: 100%;
            }
            .kg-entry-content .kg-media-img img {
                height: auto !important;
                max-height: 220px !important;
            }
        }
        /* Khung chứa Grid 4 cột */
        .kg-entry-content .kg-grid-gallery {
            display: grid !important;
            grid-template-columns: repeat(4, 1fr) !important; /* 4 cột ngang trên Desktop */
            gap: 16px !important;
            margin-bottom: 24px !important;
        }

        /* Thẻ chứa từng ảnh */
        .kg-entry-content .kg-gallery-item {
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            text-align: center !important;
        }

        /* Định dạng ảnh */
        .kg-entry-content .kg-gallery-item img {
            width: 100% !important;
            height: 160px !important; /* Chiều cao cố định để 4 ảnh bằng nhau */
            object-fit: cover !important;
            border-radius: 8px !important;
            margin: 0 0 8px 0 !important;
        }

        /* Định dạng chữ chú thích */
        .kg-entry-content .kg-gallery-caption {
            font-size: 13px !important;
            line-height: 1.4 !important;
            color: #555555 !important;
            margin: 0 !important;
            font-weight: 600 !important;
        }

        /* Responsive trên Mobile & Tablet */
        @media (max-width: 768px) {
            .kg-entry-content .kg-grid-gallery {
                grid-template-columns: repeat(2, 1fr) !important; /* Thu về 2 cột trên Tablet/Mobile */
                gap: 12px !important;
            }
            .kg-entry-content .kg-gallery-item img {
                height: 130px !important;
            }
        }

        @media (max-width: 480px) {
            .kg-entry-content .kg-grid-gallery {
                grid-template-columns: 1fr !important; /* Thu về 1 cột trên điện thoại nhỏ */
            }
            .kg-entry-content .kg-gallery-item img {
                height: 180px !important;
            }
        }