/*
Theme Name: Furniture Wholesale
Theme URI: https://ledaitu.com
Author: LEDAITU
Author URI: https://ledaitu.com
Description: A modern WordPress theme converted from a React layout for Furniture Wholesale.
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: furniturews
*/

/* ==========================================================================
   Base Typography & Global Design Variables
   ========================================================================== */
:root {
    --primary: 16 185 129;
    --primary-rgb: 16 185 129;
    --primary-hex: #10b981;
    --primary-hover-hex: #059669;
    --primary-light-hex: #ecfdf5;
    --accent-hex: #34d399;
    --charcoal: #064e3b;
    --brand-beige: #f8fafc;

    /* --- English Font Stack --- */
    --wt-font-sans-en: Jost, Arial, sans-serif;
    --wt-font-display-en: "Cormorant Garamond", Georgia, "Times New Roman", serif;

    /* --- Vietnamese Font Stack (Chuẩn thẩm mỹ tiếng Việt, không lỗi dấu) --- */
    --wt-font-sans-vi: "Be Vietnam Pro", "Plus Jakarta Sans", Arial, sans-serif;
    --wt-font-display-vi: "Playfair Display", "Lora", Georgia, serif;

    /* --- Active Font Variables (Mặc định Tiếng Việt nếu chưa chọn) --- */
    --wt-font-sans: var(--wt-font-sans-vi);
    --wt-font-display: var(--wt-font-display-vi);
    --font-sans: var(--wt-font-sans);
    --font-serif: var(--wt-font-display);
    --font-display: var(--wt-font-display);
}

/* Áp dụng font Tiếng Anh khi hiển thị English */
:lang(en),
html[lang^="en"],
html[lang^="en"] body,
body.lang-en,
.lang-en {
    --wt-font-sans: var(--wt-font-sans-en);
    --wt-font-display: var(--wt-font-display-en);
    --font-sans: var(--wt-font-sans-en);
    --font-serif: var(--wt-font-display-en);
    --font-display: var(--wt-font-display-en);
}

/* Áp dụng font Tiếng Việt khi hiển thị Vietnamese */
:lang(vi),
html[lang^="vi"],
html[lang^="vi"] body,
body.lang-vi,
.lang-vi {
    --wt-font-sans: var(--wt-font-sans-vi);
    --wt-font-display: var(--wt-font-display-vi);
    --font-sans: var(--wt-font-sans-vi);
    --font-serif: var(--wt-font-display-vi);
    --font-display: var(--wt-font-display-vi);
}

html, body {
    font-family: var(--wt-font-sans);
    color: #1e293b;
    background-color: #f8fafc;
    font-variant-numeric: lining-nums tabular-nums;
    -moz-font-feature-settings: "lnum" 1, "tnum" 1;
    -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
    font-feature-settings: "lnum" 1, "tnum" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Balanced Heading (h1-h6) & Bold Typography Scale
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--wt-font-display);
    font-weight: 700;
    color: inherit;
    font-variant-numeric: lining-nums tabular-nums;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, .h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h2, .h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 700;
}

h3, .h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.85rem);
    line-height: 1.35;
    letter-spacing: -0.01em;
    font-weight: 700;
}

h4, .h4 {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    line-height: 1.4;
    letter-spacing: -0.005em;
    font-weight: 600;
}

h5, .h5 {
    font-family: var(--wt-font-sans);
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    line-height: 1.45;
    letter-spacing: 0;
    font-weight: 600;
}

h6, .h6 {
    font-family: var(--wt-font-sans);
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    line-height: 1.5;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}

/* Balanced Bold & Strong Emphasis */
strong, b, .font-bold {
    font-weight: 700 !important;
}

.font-extrabold {
    font-weight: 800 !important;
}

.font-black {
    font-weight: 900 !important;
}

.font-semibold {
    font-weight: 600 !important;
}

.font-medium {
    font-weight: 500 !important;
}

.font-sans {
    font-family: var(--wt-font-sans) !important;
    font-variant-numeric: lining-nums tabular-nums;
}

.font-serif, .font-display, .serif-heading {
    font-family: var(--wt-font-display) !important;
    font-weight: 700;
}

/* ==========================================================================
   SVG Icons Global Color Inheritance (Eliminates Fixed Black)
   ========================================================================== */
svg {
    fill: currentColor;
}
svg path, svg circle, svg rect, svg polygon {
    fill: inherit;
}

/* ==========================================================================
   Header Navigation Enhancements & Multi-Level Dropdown
   ========================================================================== */
header nav a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.nav-item-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 8px;
    min-width: 210px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
    z-index: 1000;
}

/* Hiển thị menu con ngay khi rê chuột (Hover) hoặc focus hoặc có class is-open */
.nav-item-dropdown:hover > .nav-dropdown-menu,
.nav-item-dropdown:focus-within > .nav-dropdown-menu,
.nav-item-dropdown.is-open > .nav-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

.nav-dropdown-arrow {
    display: inline-block;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    vertical-align: middle;
    margin-left: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    transform-origin: center;
    color: currentColor;
    opacity: 0.85;
}

.nav-item-dropdown:hover .nav-dropdown-arrow,
.nav-item-dropdown:focus-within .nav-dropdown-arrow,
.nav-item-dropdown.is-open .nav-dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown-card {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0.875rem;
    padding: 0.5rem;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.18), 0 10px 15px -5px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dark .nav-dropdown-card,
.is-overlay-header:not(.is-scrolled) .nav-dropdown-card {
    background-color: rgba(20, 18, 16, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 40px -5px rgba(0, 0, 0, 0.6) !important;
}

.nav-dropdown-link {
    display: flex !important;
    align-items: center;
    padding: 0.6rem 0.875rem !important;
    border-radius: 0.625rem;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.025em;
    color: #374151 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.15s ease;
}

.dark .nav-dropdown-link,
.is-overlay-header:not(.is-scrolled) .nav-dropdown-link {
    color: #e5e7eb !important;
}

.nav-dropdown-link:hover {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--primary-hex, #10b981) !important;
    transform: translateX(3px);
}

.dark .nav-dropdown-link:hover,
.is-overlay-header:not(.is-scrolled) .nav-dropdown-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #34d399 !important;
    transform: translateX(3px);
}

.nav-dropdown-link.is-active {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: var(--primary-hex, #10b981) !important;
}

/* ==========================================================================
   Tailwind Fallback Utilities (Guarantees Layout Stability)
   ========================================================================== */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

.text-primary {
    color: var(--primary-hex, #0b63e5) !important;
}

.bg-primary {
    background-color: var(--primary-hex, #0b63e5) !important;
}

.border-primary {
    border-color: var(--primary-hex, #0b63e5) !important;
}

.bg-brand-beige {
    background-color: #f8fafc !important;
}

.invisible {
    visibility: hidden !important;
}

.visible {
    visibility: visible !important;
}

.pointer-events-none {
    pointer-events: none !important;
}

.translate-x-full {
    transform: translateX(100%);
}

.translate-x-0 {
    transform: translateX(0);
}

.opacity-0 {
    opacity: 0 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

.z-\[100\] {
    z-index: 100 !important;
}

.z-\[150\] {
    z-index: 150 !important;
}

.z-\[9999\] {
    z-index: 9999 !important;
}

.z-\[99999\] {
    z-index: 99999 !important;
}

.z-\[100000\] {
    z-index: 100000 !important;
}

.z-\[999999\] {
    z-index: 999999 !important;
}

.z-\[9999999\] {
    z-index: 9999999 !important;
}

/* ==========================================================================
   TOP-LEVEL MODALS & POPUPS Z-INDEX HIERARCHY
   ========================================================================== */
#contact-modal {
    z-index: 9999999 !important;
}

#contact-modal input,
#contact-modal textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#company-profile-modal,
#shareholder-viewer-modal,
#job-apply-modal,
#video-modal,
#product-lightbox {
    z-index: 999999 !important;
}

@media (min-width: 1024px) {
    .lg\:flex {
        display: flex !important;
    }
    .lg\:hidden {
        display: none !important;
    }
}

@media (min-width: 1280px) {
    .xl\:hidden {
        display: none !important;
    }
    .xl\:flex {
        display: flex !important;
    }
}

/* ==========================================================================
   Scrollbar Utilities
   ========================================================================== */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #57534e;
    background-color: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.pagination .page-numbers:hover {
    background-color: #6d6259;
    color: #fff;
    border-color: #6d6259;
    transform: translateY(-1px);
}

.pagination .page-numbers.current {
    background-color: #6d6259;
    color: #fff;
    border-color: #6d6259;
    font-weight: 700;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    pointer-events: none;
}

/* ==========================================================================
   Header Overlay & Sticky Transitions
   ========================================================================== */
.is-overlay-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff;
}

.is-overlay-header:not(.is-scrolled) .header-brand-title {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.is-overlay-header:not(.is-scrolled) .header-nav-link.default-nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.is-overlay-header:not(.is-scrolled) .header-nav-link.default-nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.16) !important;
}

.is-overlay-header:not(.is-scrolled) .header-nav-link.active-nav-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.is-overlay-header:not(.is-scrolled) .header-mobile-toggle {
    color: #ffffff !important;
}

.is-overlay-header:not(.is-scrolled) .header-search-wrap {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
}

.is-overlay-header:not(.is-scrolled) .header-search-wrap input {
    color: #ffffff !important;
}

.is-overlay-header:not(.is-scrolled) .header-search-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.75) !important;
}

.is-overlay-header:not(.is-scrolled) .header-search-icon {
    color: rgba(255, 255, 255, 0.8) !important;
}

.is-overlay-header:not(.is-scrolled) .header-lang-wrap {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
}

.is-overlay-header:not(.is-scrolled) .header-lang-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Scrolled state for Overlay Header */
.is-overlay-header.is-scrolled {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e7e5e4 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    color: #2d2d2d !important;
}

.dark .is-overlay-header.is-scrolled {
    background-color: rgba(20, 18, 16, 0.96) !important;
    border-bottom-color: #2e2a25 !important;
    color: #f5f5f4 !important;
}

.is-overlay-header.is-scrolled .header-brand-title {
    color: #2d2d2d !important;
    text-shadow: none;
}

.dark .is-overlay-header.is-scrolled .header-brand-title {
    color: #ffffff !important;
}

.is-overlay-header.is-scrolled .header-nav-link.default-nav-link {
    color: #44403c !important;
    text-shadow: none;
}

.is-overlay-header.is-scrolled .header-nav-link.default-nav-link:hover {
    color: #6d6259 !important;
    background-color: #f5f5f4 !important;
}

.dark .is-overlay-header.is-scrolled .header-nav-link.default-nav-link {
    color: #d6d3d1 !important;
}

.dark .is-overlay-header.is-scrolled .header-nav-link.default-nav-link:hover {
    color: #ffffff !important;
    background-color: #292524 !important;
}

.is-overlay-header.is-scrolled .header-nav-link.active-nav-link {
    color: #6d6259 !important;
    background-color: rgba(109, 98, 89, 0.1) !important;
    border: none;
}

.is-overlay-header.is-scrolled .header-mobile-toggle {
    color: #2d2d2d !important;
}

.dark .is-overlay-header.is-scrolled .header-mobile-toggle {
    color: #ffffff !important;
}

.is-overlay-header.is-scrolled .header-search-wrap {
    background-color: #f5f5f4 !important;
    border-color: #e7e5e4 !important;
}

.dark .is-overlay-header.is-scrolled .header-search-wrap {
    background-color: rgba(38, 38, 38, 0.6) !important;
    border-color: #404040 !important;
}

.is-overlay-header.is-scrolled .header-search-wrap input {
    color: #2d2d2d !important;
}

.dark .is-overlay-header.is-scrolled .header-search-wrap input {
    color: #ffffff !important;
}

.is-overlay-header.is-scrolled .header-search-wrap input::placeholder {
    color: #a8a29e !important;
}

.is-overlay-header.is-scrolled .header-search-icon {
    color: #a8a29e !important;
}

.is-overlay-header.is-scrolled .header-lang-wrap {
    background-color: #f5f5f4 !important;
    border-color: #e7e5e4 !important;
}

.dark .is-overlay-header.is-scrolled .header-lang-wrap {
    background-color: #292524 !important;
    border-color: #44403c !important;
}

.is-overlay-header.is-scrolled .header-lang-link {
    color: #57534e !important;
}

/* Default navigation links for non-overlay header */
header:not(.is-overlay-header) .header-nav-link.default-nav-link {
    color: #44403c;
}

header:not(.is-overlay-header) .header-nav-link.default-nav-link:hover {
    color: #6d6259;
    background-color: #f5f5f4;
}

header:not(.is-overlay-header) .header-brand-title {
    color: #2d2d2d;
}

.dark header:not(.is-overlay-header) .header-brand-title {
    color: #ffffff;
}

/* ==========================================================================
   Certifications Carousel & Marquee
   ========================================================================== */
.cert-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cert-track::-webkit-scrollbar {
    display: none;
}

.cert-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 768px) {
    .cert-card {
        flex: 0 0 340px;
    }
}

.cert-card:hover {
    transform: translateY(-4px);
}