.top-bar {
    background-color: #111111;
    color: #ffffff;
    font-size: 13px;
    padding: 8px 0;
    position: relative;
    z-index: 3;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

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

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

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-item i {
    color: #e31937;
    font-size: 12px;
}

.top-bar-item a,
.top-bar-item span {
    color: #ffffff;
}

.top-bar-item a:hover {
    color: #e31937;
}

/* Hotline highlight */
.top-bar-hotline {
    background-color: #e31937;
    padding: 4px 14px;
    border-radius: 50px;
    margin-left: 5px;
}

.top-bar-hotline i {
    color: #ffffff !important;
    animation: phone-ring 1.5s ease-in-out infinite;
}

.top-bar-hotline a {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.top-bar-hotline a:hover {
    color: #ffe0e6;
}

@keyframes phone-ring {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(-12deg);
    }

    20% {
        transform: rotate(12deg);
    }

    30% {
        transform: rotate(-8deg);
    }

    40% {
        transform: rotate(8deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

.top-bar-social {
    display: flex;
    gap: 10px;
}

.top-bar-social a {
    color: #ffffff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #222222;
    font-size: 12px;
    transition: all 0.3s ease;
}

.top-bar-social a:hover {
    background-color: #e31937;
    color: #ffffff;
}

/* === HEADER (sticky, wraps white row + dark bar) === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
    will-change: transform;
}

/* Offset for WP admin bar */
body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.site-header.header-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

.site-header.header-hidden {
    transform: translateY(var(--header-main-height, -81px));
}

.site-header.header-hidden .top-bar {
    transform: translateY(calc(var(--header-main-height, -81px) * -1));
}

/* White header row */
.header-main {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    display: block;
}

.site-branding img,
.site-logo-img {
    max-height: 55px;
    width: auto;
    display: block;
}

/* Search */
.header-search {
    flex: 1;
    max-width: 420px;
    min-width: 200px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    background: #ffffff;
    border-color: #e31937;
    box-shadow: 0 2px 12px rgba(227, 25, 55, 0.12);
}

.search-field {
    flex: 1;
    border: none;
    padding: 11px 20px;
    font-size: 14px;
    outline: none;
    font-family: 'Roboto', sans-serif;
    background: transparent;
    color: #333;
}

.search-field::placeholder {
    color: #888;
    font-weight: 400;
}

.search-submit {
    background: none;
    color: #666;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-form:focus-within .search-submit {
    color: #e31937;
}

.search-submit:hover {
    color: #e31937;
}

/* === HEADER NAV (icon menu, kosmos.vn style) === */
.header-nav {
    flex-shrink: 0;
    margin-left: auto;
}

.header-nav-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav-menu>li {
    position: relative;
    border-right: 1px solid #e0e0e0;
}

.header-nav-menu>li:last-child {
    border-right: none;
}

.header-nav-menu>li>a {
    display: flex;
    flex-direction: row;
    /* Changed to row to fit 60px height with larger text */
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 60px;
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.header-nav-menu>li>a>i:first-child {
    font-size: 20px;
    color: #888888;
    transition: color 0.3s ease;
    line-height: 1;
    display: block;
}

.header-nav-menu>li>a>span {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}

.header-nav-menu>li>a>.nav-arrow {
    display: none;
}

.header-nav-menu>li>a:hover,
.header-nav-menu>li.current-menu-item>a {
    color: #e31937;
    border-bottom-color: #e31937;
}

.header-nav-menu>li>a:hover>i:first-child,
.header-nav-menu>li.current-menu-item>a>i:first-child {
    color: #e31937;
}

/* Sale/thanh lý menu item */
.header-nav-menu>li.menu-item-sale>a {
    color: #e31937;
}

.header-nav-menu>li.menu-item-sale>a>i:first-child {
    color: #e31937;
    animation: pulse-sale 2s infinite;
}

@keyframes pulse-sale {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Header nav dropdown */
.header-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    border-radius: 0 0 8px 8px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
}

.header-nav-menu>li:hover>.sub-menu,
.header-nav-menu>li.nav-open>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.header-nav-menu .sub-menu li a {
    display: block;
    padding: 8px 20px;
    color: #333333;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.header-nav-menu .sub-menu li a:hover {
    background-color: #f7f8f9;
    color: #e31937;
    padding-left: 25px;
}

/* === PRODUCT NAV BAR (dark bar, kosmos.vn style) === */
.product-nav-bar {
    background-color: #000000;
    position: relative;
    z-index: 1;
}

.product-nav-inner {
    display: flex;
    align-items: stretch;
}

.product-nav-home {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #e31937;
    color: #ffffff;
    flex-shrink: 0;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-nav-home svg {
    width: 20px;
    height: 21px;
    transition: all 0.3s ease;
}

.product-nav-home:hover {
    background-color: #c41530;
}

.product-nav-menu {
    display: flex;
    align-items: stretch;
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.product-nav-menu>li {
    flex-shrink: 0;
}

.product-nav-menu>li>a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-nav-menu>li>a:hover,
.product-nav-menu>li.current-menu-item>a {
    background-color: #e31937;
    color: #ffffff;
}

/* Hide scrollbar for product nav */
.product-nav-menu::-webkit-scrollbar {
    display: none;
}

.product-nav-menu {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-shrink: 0;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 25px;
}

.hamburger span {
    display: block;
    height: 3px;
    background-color: #222222;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* === MOBILE MENU === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #e31937;
    color: #ffffff;
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 700;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-content {
    padding: 10px 0;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu li a {
    display: block;
    padding: 12px 20px;
    color: #333333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-nav-menu li a:hover {
    color: #e31937;
    background-color: #f7f8f9;
}

.mobile-nav-menu .sub-menu {
    background-color: #f7f8f9;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu .sub-menu li a {
    padding-left: 35px;
    font-size: 14px;
    font-weight: 400;
}

.mobile-nav-menu .sub-menu .sub-menu li a {
    padding-left: 50px;
    font-size: 13px;
}

/* === BREADCRUMB === */
.breadcrumb {
    background-color: #f7f8f9;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-list li::after {
    content: '/';
    margin-left: 8px;
    color: #999999;
}

.breadcrumb-list li:last-child::after {
    content: '';
}

.breadcrumb-list li a {
    color: #636363;
    text-decoration: none;
}

.breadcrumb-list li a:hover {
    color: #e31937;
}

.breadcrumb-list li.current {
    color: #e31937;
    font-weight: 600;
}

.breadcrumb-list li i {
    margin-right: 3px;
}