.simigo-header {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    background-color: #0066cc;
    z-index: 1000;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    height: 75px;
    display: flex;
    align-items: center;
    padding: 0 !important;
    overflow: visible;
}

.logo-wrapper {
    display: block;
    background: transparent;
    transition: all 0.3s ease;
    z-index: 1050;
    position: relative;
    height: 75px; /* Giới hạn vùng click bằng độ cao header */
    overflow: visible; /* Cho logo to vượt ra ngoài khung click mà không bị cắt */
}

.logo-wrapper img {
    height: 150px;
    width: auto;
    object-fit: contain;
    margin: 0;
    transform: translateY(-40px);
    pointer-events: none; /* Quan trọng: Cho phép click xuyên qua hình ảnh xuống Menu bên dưới */
}

/* Tablet & Small Desktop (Xoay ngang máy tính bảng) */
@media (max-width: 1199.98px) {
    .logo-wrapper img {
        height: 120px;
    }
}

/* Mobile & Tablet Portrait */
@media (max-width: 991.98px) {
    .logo-wrapper {
        height: 75px;
    }
    .logo-wrapper img {
        height: 80px;
        transform: translateY(-2px);
    }
}

/* Phones Small (Ví dụ: iPhone SE) */
@media (max-width: 575.98px) {
    .logo-wrapper img {
        height: 65px;
    }
}

.category-nav-dropdown .btn {
    height: 40px;
    font-size: 13.5px;
    background-color: #0056b3;
}

.category-nav-dropdown .btn i {
    font-size: 1.2rem !important;
}

.simigo-search .form-control {
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
    padding-left: 20px;
    border: none;
    height: 38px;
}

.simigo-search .form-control:focus {
    box-shadow: none;
}

.simigo-search .btn {
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    background-color: #004d99;
    border: none;
    height: 38px;
    padding-right: 15px;
    transition: all 0.3s ease;
}

.simigo-search .btn:hover {
    background-color: #004494;
    border-color: #004494;
}

.simigo-nav {
    background-color: #0056b3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.simigo-nav .nav-link.hover-opacity {
    transition: color 0.3s ease;
}

.simigo-nav .nav-link.hover-opacity:hover {
    color: #ffc107 !important; /* Gold on hover */
}

/* Category Dropdown toggle in nav */
.category-nav-dropdown .dropdown-toggle::after {
    display: none;
}

.category-nav-dropdown .dropdown-menu {
    top: 100%;
    left: 0;
    margin-top: 0;
    transition: none;
    background-color: #232731 !important;
    border: none !important;
    width: 260px !important;
    max-height: 480px !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
}

/* Custom scrollbar - making it more visible */
.category-nav-dropdown .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.category-nav-dropdown .dropdown-menu::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.category-nav-dropdown .dropdown-menu::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

.category-nav-dropdown .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #ffc107; /* Gold scrollbar on hover */
}

/* Home page specific: make dropdown behave like a sidebar */
body.home-page .category-nav-dropdown .dropdown-menu.show {
    position: absolute;
    width: 260px !important;
    border-top: none;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.3) !important;
    z-index: 100;
}

.category-nav-dropdown .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.category-nav-dropdown .dropdown-item:hover {
    background-color: #2c313c !important;
    color: #ffc107 !important;
    padding-left: 1.5rem !important;
}

.category-nav-dropdown .dropdown-item i {
    width: 28px;
    text-align: center;
    opacity: 0.9;
}

.dropdown-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    display: none;
    min-width: 200px;
    background-color: #1e2330 !important;
    border: none !important;
    border-left: 2px solid #ffc107 !important;
    box-shadow: 6px 6px 20px rgba(0,0,0,0.5) !important;
    z-index: 9999;
    border-radius: 0 4px 4px 0 !important;
}

.dropdown-submenu-parent:hover > .dropdown-submenu {
    display: block;
}

.submenu-child-item {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    transition: all 0.2s ease;
}

.submenu-child-item:hover {
    background-color: #2c313c !important;
    color: #ffc107 !important;
    padding-left: 1.75rem !important;
}

.simigo-nav .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    height: 48px;
}

.simigo-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffc107 !important;
}

/* Header utility blocks hover effects */
.hotline-block, .auth-block, .cart-block {
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
}

.hotline-block:hover, .auth-block:hover, .cart-block:hover {
    background-color: rgba(0, 86, 179, 0.05);
    transform: translateY(-2px);
}

.cat-menu-badge {
    background-color: #ffc107;
    color: #212529;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Mobile Action Buttons Optimization */
.mobile-action-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-action-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
}

.mobile-action-btn i {
    font-size: 1.5rem;
}

.theme-toggle-mobile:hover .theme-toggle-icon {
    transform: rotate(360deg);
}

.dark-theme .mobile-action-btn {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

/* Specific theme toggle icon color in dark mode */
.dark-theme .theme-toggle-icon {
    color: #ffc107;
}

/* Mobile Category Collapse Icon Rotation */
[data-bs-toggle="collapse"][aria-expanded="true"] i.bi-chevron-down {
    transform: rotate(180deg);
}

#cat-toggle-icon {
    transition: transform 0.3s ease;
}
