html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar {
    display: none;
}
body {
    overflow-x: hidden;
    margin: 0;
}
#page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#page-wrapper > main {
    flex: 1 0 auto;
    width: 100%;
}
#page-wrapper > .main-footer {
    flex: 0 0 auto;
    width: 100%;
}
.top-bar-layout {
    display: flex;
    align-items: center;
    width: 100%;
}
.top-bar-logo {
    flex: 0 0 auto;
}
.top-bar-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
}
.top-bar-nav .nav-list {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    background: none;
    align-items: center;
}
.top-bar-right {
    flex: 0 0 auto;
}
.top-bar-nav .nav-list li {
    position: relative;
}
.top-bar-nav .nav-list li.search-item {
    margin-left: 0;
}
.top-bar-nav .nav-list li a {
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 5px 10px;
    background: none;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-radius: 4px;
    white-space: nowrap;
}
.top-bar-nav .nav-list li a:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}
.top-bar-nav .nav-list li .nav-dropdown-item,
.top-bar-nav .nav-list li a.nav-dropdown-item {
    color: #334155 !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 10px 14px;
    background: none;
    white-space: nowrap;
}
.top-bar-nav .nav-list li .nav-dropdown-item:hover,
.top-bar-nav .nav-list li a.nav-dropdown-item:hover {
    color: #003f7d !important;
    background: #f0f6ff;
    transform: translateX(3px);
}
.top-bar-search {
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.top-bar-search:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.top-bar-search:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}
.top-bar-search input[type="text"] {
    height: 28px;
    font-size: 0.82rem;
    border-radius: 0;
    border: none;
    padding: 0 6px 0 0;
    width: 110px;
    background: transparent !important;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: none !important;
}
.top-bar-search input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
}
.top-bar-search input[type="text"]:focus {
    background: transparent !important;
    color: #fff;
    outline: none;
    width: 160px;
}
.top-bar-search input[type="text"]:focus::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.top-bar-search button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    padding: 3px;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-bar-search button:hover {
    color: #fff;
}
.mobile-header {
    display: none;
    background: #003f7d;
    padding: 8px 0;
    position: relative;
}
@media (max-width: 991.98px) {
    .top-bar { display: none !important; }
    .mobile-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100%;
        min-height: 50px;
    }
    body {
        padding-top: 50px;
    }
}
.mobile-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-header .logo-container {
    flex-grow: 1;
    text-align: center;
    display: flex;
    justify-content: center;
}
.mobile-header .logo img {
    height: 32px;
}
.mobile-header .mobile-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}
.mobile-header .mobile-btn {
    color: #fff;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 8px;
    min-width: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.mobile-header .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-height: calc(100vh - 50px);
    max-height: calc(100dvh - 50px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
}
.mobile-header .mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0s;
}
.mobile-header .mobile-menu ul {
    list-style: none;
    padding: 12px 16px;
    margin: 0;
}
.mobile-header .mobile-menu ul li {
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0;
}
.mobile-header .mobile-menu ul li:last-child {
    border-bottom: none;
}
.mobile-header .mobile-menu ul li a {
    color: #003f7d;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.mobile-header .mobile-menu ul li a i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
    color: var(--accent-color);
}
.mobile-header .mobile-menu ul li a:active {
    background: #f0f5fb;
}
.mobile-menu-products {
    padding-bottom: 0 !important;
}
.mobile-menu-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-products-header a {
    flex: 1;
}
.mobile-categories-toggle {
    background: #f0f5fb;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #003f7d;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}
.mobile-categories-toggle[aria-expanded="true"] {
    background: #003f7d;
    color: #fff;
}
.mobile-categories-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}
.mobile-categories-toggle i {
    transition: transform 0.3s ease;
}
.mobile-categories-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.mobile-categories-dropdown.show {
    max-height: 1000px;
}
.mobile-categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 0;
}
.mobile-category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.mobile-category-item:active {
    background: #e0ecf9;
    border-color: #003f7d;
}
.mobile-category-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mobile-category-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.mobile-category-icon i {
    font-size: 1.1rem;
    color: #003f7d;
}
.mobile-category-name {
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mobile-categories-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #003f7d, #0052b3);
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border-radius: 10px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.mobile-categories-all:hover, .mobile-categories-all:active {
    background: linear-gradient(135deg, #002d5a, #003f7d);
    color: #fff !important;
}
.megamenu-parent {
    position: relative;
}
@media (max-width: 991.98px) {
    .megamenu,
    .modern-megamenu,
    .megamenu-parent .megamenu,
    .megamenu-parent .modern-megamenu,
    .megamenu-parent:hover .megamenu,
    .megamenu-parent:hover .modern-megamenu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}
.flash-messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 350px;
    max-width: calc(100vw - 40px);
}
.alert-flash {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: none;
    border-left: 4px solid transparent;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease forwards;
}
.alert-flash.alert-success { border-left-color: #28a745; background-color: #f8fff9; color: #155724; }
.alert-flash.alert-danger { border-left-color: #dc3545; background-color: #fff8f8; color: #721c24; }
.alert-flash.alert-info { border-left-color: #17a2b8; background-color: #f8fcff; color: #0c5460; }
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOutDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(10px); opacity: 0; }
}
