/* ============================================
   HEADER - WoodMart Handmade Style
   ============================================ */

/* Site Header */
.kd-site-header {
    position: relative;
    z-index: 1000;
}

/* ============================================
   TOP BAR
   ============================================ */
.kd-top-bar {
    background: #242424;
    color: white;
    padding: 10px 0;
    font-size: 12px;
    overflow: visible;
}

.kd-top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
}

.kd-top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: visible;
}

.kd-top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: visible;
    position: relative;
    z-index: 10000;
}

.kd-top-bar-center {
    flex: 1;
}

.kd-top-bar-mobile {
    display: none;
}

/* Divider */
.kd-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

/* Top Text */
.kd-top-text {
    color: white;
    font-size: 12px;
}

.kd-top-text strong {
    font-weight: 600;
}

/* Top Social */
.kd-top-social {
    display: flex;
    gap: 10px;
}

.kd-top-social a {
    color: white;
    transition: opacity var(--kd-transition-fast);
}

.kd-top-social a:hover {
    opacity: 0.7;
}

/* Top Navigation */
.kd-top-nav {
    display: flex;
    align-items: center;
}

.kd-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.kd-nav-menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

.kd-nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity var(--kd-transition-fast);
}

.kd-nav-menu a:hover {
    opacity: 0.7;
}

.kd-nav-menu .nav-link-text {
    display: inline;
}

/* Dropdown Menu */
.kd-nav-menu .menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid white;
    margin-left: 5px;
}

.kd-sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--kd-transition-fast);
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.kd-nav-menu .menu-item-has-children:hover .kd-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kd-sub-menu li {
    margin: 0;
    padding: 0;
}

.kd-sub-menu a {
    color: #242424;
    padding: 8px 20px;
    display: block;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}

.kd-sub-menu a:hover {
    background: #f9f9f9;
    opacity: 1;
}

/* ============================================
   MAIN HEADER
   ============================================ */
.kd-main-header {
    background: white;
    padding: 25px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.kd-main-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kd-header-left,
.kd-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kd-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Info Box */
.kd-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.kd-info-icon {
    flex-shrink: 0;
    color: var(--kd-primary-color);
}

.kd-info-content {
    line-height: 1.4;
}

.kd-info-title {
    font-size: 13px;
    color: #333333;
    margin-bottom: 2px;
}

.kd-info-content p {
    margin: 0;
    font-size: 14px;
    color: #666666;
}

/* Header Space */
.kd-header-space {
    width: 25px;
}

/* Site Logo */
.kd-site-logo a {
    display: inline-block;
}

.kd-site-logo img {
    height: 70px !important;
    width: auto !important;
}

.kd-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #242424;
    text-decoration: none;
}

/* Header Tools */
.kd-header-tool {
    position: relative;
}

.kd-header-tool a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #242424;
    text-decoration: none;
    transition: color var(--kd-transition-fast);
}

.kd-header-tool a:hover {
    color: var(--kd-primary-color);
}

.kd-tool-text {
    font-size: 13px;
    font-weight: 500;
}

.kd-tool-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--kd-primary-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.kd-cart-subtotal {
    font-size: 13px;
    font-weight: 600;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.kd-lang-switcher {
    position: relative;
    display: inline-flex;
}

.kd-lang-switcher-wrapper {
    display: inline-flex;
    align-items: center;
}

.kd-lang-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.kd-lang-toggle:hover {
    background: #f5f5f5;
}

.kd-lang-toggle svg {
    transition: transform 0.2s;
}

.kd-lang-switcher:hover .kd-lang-toggle svg {
    transform: rotate(180deg);
}

.kd-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 140px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 5px 0 0 0;
    padding: 8px 0;
    z-index: 9999;
    overflow: visible !important;
}

.kd-lang-switcher .kd-lang-dropdown {
    display: none;
}

.kd-lang-switcher:hover .kd-lang-dropdown {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

.kd-lang-dropdown li {
    margin: 0;
    padding: 0;
}

.kd-lang-dropdown a {
    display: block;
    padding: 10px 18px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.kd-lang-dropdown a:hover {
    background: #f5f5f5;
}

.kd-lang-dropdown li.active a {
    color: #79b38a;
    font-weight: 600;
}

/* Top bar variant (dark background) */
.kd-top-bar-left .kd-lang-switcher .kd-lang-toggle,
.kd-top-bar-right .kd-lang-switcher .kd-lang-toggle {
    color: white;
    padding: 5px 10px;
}

.kd-top-bar-left .kd-lang-switcher .kd-lang-toggle:hover,
.kd-top-bar-right .kd-lang-switcher .kd-lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.kd-top-bar-left .kd-lang-dropdown,
.kd-top-bar-right .kd-lang-dropdown {
    background: white;
}

.kd-top-bar-left .kd-lang-dropdown a,
.kd-top-bar-right .kd-lang-dropdown a {
    color: #333;
}

/* Mobile Elements */
.kd-header-mobile-left,
.kd-header-mobile-center,
.kd-header-mobile-right {
    display: none;
}

.kd-mobile-menu-toggle a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #242424;
    text-decoration: none;
}

.kd-mobile-menu-toggle span {
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   HEADER BOTTOM - MAIN NAVIGATION
   ============================================ */
.kd-header-bottom {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.kd-header-bottom-inner {
    display: flex;
    justify-content: center;
}

.kd-main-nav {
    display: flex;
    align-items: center;
}

.kd-nav-main {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kd-nav-main li {
    margin: 0;
    padding: 0;
    position: relative;
}

.kd-nav-main a {
    display: block;
    padding: 15px 0;
    color: #242424;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    transition: color var(--kd-transition-fast);
}

.kd-nav-main a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--kd-primary-color);
    transition: width var(--kd-transition-normal);
}

.kd-nav-main a:hover {
    color: var(--kd-primary-color);
}

.kd-nav-main a:hover::after {
    width: 100%;
}

.kd-nav-main .current-menu-item > a {
    color: var(--kd-primary-color);
}

.kd-nav-main .current-menu-item > a::after {
    width: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .kd-header-left,
    .kd-header-right,
    .kd-header-center,
    .kd-header-bottom {
        display: none;
    }

    .kd-header-mobile-left,
    .kd-header-mobile-center,
    .kd-header-mobile-right {
        display: flex;
        align-items: center;
    }

    .kd-header-mobile-left {
        flex: 1;
        justify-content: flex-start;
    }

    .kd-header-mobile-center {
        flex: 1;
        justify-content: center;
    }

    .kd-header-mobile-right {
        flex: 1;
        justify-content: flex-end;
    }

    .kd-top-bar-left,
    .kd-top-bar-right {
        display: none;
    }

    .kd-top-bar-mobile {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .kd-top-bar-inner {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .kd-main-header {
        padding: 15px 0;
    }

    .kd-site-logo img {
        max-width: 150px;
    }

    .kd-top-bar {
        padding: 8px 0;
    }
}

@media (max-width: 576px) {
    .kd-site-logo img {
        max-width: 120px;
    }

    .kd-mobile-menu-toggle span {
        display: none;
    }
}
