/* Header desktop Austrong. Menu mobile (off-canvas) nằm riêng ở mobile-menu.css */

/* ---------- Menu ngang (hiện từ 1200px, breakpoint đặt trong style.css): thu nhỏ khi màn hẹp ---------- */
@media (min-width: 1200px) and (max-width: 1439px) {
    #header #logo {
        width: 160px;
    }
    #header .header-nav-main.nav-left > li {
        margin: 0 7px;
    }
    #header .header-nav-main.nav-left > li > a {
        font-size: 14px !important;
    }
}
/* 1200-1314px: khung header hẹp (container 1230px) nên thu nhỏ thêm */
@media (min-width: 1200px) and (max-width: 1314px) {
    #header #logo {
        width: 140px;
    }
    #header .header-nav-main.nav-left > li {
        margin: 0 5px;
    }
    #header .header-nav-main.nav-left > li > a {
        font-size: 13px !important;
    }
    #header .aus-hd-actions {
        gap: 10px;
    }
    #header .nav-right .aus-hd-cta {
        padding: 0 12px;
        font-size: 13px;
    }
}

/* ---------- Khối bên phải: ngôn ngữ, hotline, nút báo giá ---------- */
#header .nav-right > li.html_top_right_text {
    margin: 0 0 0 6px !important;
}
.aus-hd-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.aus-hd-lang {
    display: inline-flex;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 16px;
}
.aus-hd-lang a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 26px;
    padding: 0 8px;
    border-radius: 13px;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    text-decoration: none;
}
.aus-hd-lang a:hover {
    color: #ed7106;
}
.aus-hd-lang a.is-current {
    background: #111;
    color: #fff;
    pointer-events: none;
}

.aus-hd-hotline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    text-decoration: none;
}
.aus-hd-hotline svg {
    box-sizing: content-box;
    flex: 0 0 auto;
    padding: 8px;
    border-radius: 50%;
    background: #fff4ea;
    color: #ed7106;
}
.aus-hd-hotline small {
    display: block;
    color: #777;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.aus-hd-hotline:hover {
    color: #ed7106;
}

.aus-hd-cta {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 4px;
    background: #ed7106;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .2s ease;
}
.aus-hd-cta:hover,
.aus-hd-cta:focus-visible {
    background: #d36404;
    color: #fff;
}

/* Hotline chỉ hiện khi đủ chỗ */
@media (max-width: 1599px) {
    .aus-hd-hotline {
        display: none;
    }
}

/* Nút báo giá cạnh nút ☰ khi menu ngang bị ẩn (tablet, laptop nhỏ). Điện thoại đã có nút nổi */
#header .mobile-nav > li.aus-hd-cta-item {
    margin-right: 4px;
}
#header .mobile-nav > li > a.aus-hd-cta--compact {
    height: 36px;
    padding: 0 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: none;
}
#header .mobile-nav > li > a.aus-hd-cta--compact:hover {
    color: #fff;
}
@media (max-width: 549px) {
    #header .mobile-nav > li.aus-hd-cta-item {
        display: none;
    }
}

/* ---------- Ô tìm kiếm thu thành icon, bấm mới mở ---------- */
#header .nav-right > li.header-search-form.aus-hd-search {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0;
}
#header .aus-hd-search .header-search-form-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 30;
    width: 40px;
    transition: width .2s ease;
}
#header .aus-hd-search .searchform .flex-row {
    align-items: center;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
}
#header .aus-hd-search .searchform .flex-col {
    padding-right: 0;
}
#header .aus-hd-search .search-field {
    visibility: hidden;
    height: 38px;
    padding: 0 4px 0 16px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px;
    opacity: 0;
    transition: opacity .15s ease;
}
#header .aus-hd-search .ux-search-submit {
    width: 38px;
    height: 38px;
    min-height: 0;
    margin: 0;
    padding: 0;
    line-height: 38px;
}
#header .aus-hd-search.is-open .header-search-form-wrapper {
    width: 340px;
}
#header .aus-hd-search.is-open .searchform .flex-row {
    border-color: #ed7106;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
#header .aus-hd-search.is-open .search-field {
    visibility: visible;
    opacity: 1;
}

/* ---------- Link PDF trên menu ngang: báo trước là file tải về ---------- */
.header-nav-main > li > a[href$=".pdf"]::after {
    content: "PDF";
    margin-left: 6px;
    padding: 1px 4px;
    border: 1px solid #ed7106;
    border-radius: 3px;
    color: #ed7106;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
}

/* ---------- Mega menu Sản phẩm: ảnh từng danh mục ---------- */
#header .header-nav-main > li.aus-mega > .nav-dropdown {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 16px;
    width: max-content;
    max-width: 880px;
    padding: 20px !important;
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li {
    flex: 0 0 150px;
    height: auto !important;
    margin: 0;
    border: 0;
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li > a {
    display: block;
    height: auto !important;
    padding: 0 !important;
    color: #111 !important;
    font-size: 15px !important;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}
#header .aus-mega .aus-mega__thumb {
    display: block;
    margin-bottom: 10px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: #f2f2f2;
}
#header .aus-mega .aus-mega__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li > a:hover {
    color: #ed7106 !important;
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li > a:hover .aus-mega__img {
    transform: scale(1.05);
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li.aus-mega__all {
    flex-basis: 100%;
    padding-top: 14px;
    border-top: 1px solid #eee;
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li.aus-mega__all > a {
    color: #ed7106 !important;
    font-size: 14px !important;
}
#header .header-nav-main > li.aus-mega > .nav-dropdown > li.aus-mega__all > a::after {
    content: " →";
}

/* ---------- Header thu nhỏ khi cuộn ---------- */
@media (min-width: 850px) {
    #header .header-main {
        transition: height .2s ease;
    }
    #header .header-wrapper.stuck .header-main {
        height: 60px !important;
    }
    #header .header-wrapper.stuck #logo img {
        max-height: 46px !important;
    }
    #header .header-wrapper.stuck .header-nav-main.nav-left > li > a {
        height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #header .header-main,
    #header .aus-hd-search .header-search-form-wrapper,
    #header .aus-mega .aus-mega__img,
    .aus-hd-cta {
        transition: none;
    }
}
