/* ==========================================
   Thin top navigation
========================================== */

.mini-top-navigation {
    position: relative;
    width: 100%;
    min-height: 32px;
    background: var(--web-primary, #34458f);
    border-bottom: 1px solid #ebe1e1;
    z-index: 1050;
}

.mini-top-navigation .container {
    max-width: 1320px;
}

.mini-top-navigation-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    width: 100%;
}

.mini-top-menu {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mini-top-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.mini-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 13px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.mini-top-link i {
    font-size: 8px;
    transition: transform 0.2s ease;
}

.mini-top-link:hover,
.mini-top-link.active {
    color: var(--web-primary, #34458f);
    background: rgba(255, 255, 255, 0.993);
    text-decoration: none;
}

.mini-top-dropdown:hover>.mini-top-link i {
    transform: rotate(180deg);
}

/* Common dropdown */
.mini-top-dropdown-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
    z-index: 9999;
}

.mini-top-dropdown:hover>.mini-top-dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Categories dropdown */
.category-mini-dropdown {
    width: 320px;
    max-height: 480px;
    overflow-y: auto;
    padding: 8px;
}

.mini-category-item {
    position: relative;
    padding: 6px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.mini-category-item:hover {
    background: #f7f7f7;
}

.mini-category-main-link {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #303030;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.mini-category-main-link:hover {
    color: var(--web-primary, #34458f);
    text-decoration: none;
}

.mini-category-main-link img {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ededed;
}

.mini-subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 5px 0 0 39px;
}

.mini-subcategory-list a {
    color: #777;
    font-size: 11px;
    line-height: 1.4;
    text-decoration: none;
}

.mini-subcategory-list a:hover {
    color: var(--web-primary, #34458f);
}

/* Brand mega menu */
.brand-mini-dropdown {
    width: 720px;
    padding: 18px;
}

.brand-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.brand-mini-column {
    min-width: 0;
}

.brand-mini-title {
    display: block;
    padding-bottom: 7px;
    margin-bottom: 6px;
    color: #252525;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #ededed;
    text-decoration: none;
}

.brand-mini-title:hover {
    color: var(--web-primary, #34458f);
    text-decoration: none;
}

.brand-mini-products {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.brand-mini-products a {
    display: block;
    overflow: hidden;
    color: #6a6a6a;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.brand-mini-products a:hover {
    color: var(--web-primary, #34458f);
}

/* Right-side dropdown position */
.mini-top-menu-right .mini-top-dropdown-menu {
    right: 0;
    left: auto;
}

/* Help dropdown */
.help-mini-dropdown {
    width: 190px;
    padding: 7px;
}

.help-mini-dropdown>a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    color: #444;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
}

.help-mini-dropdown>a:hover {
    color: var(--web-primary, #34458f);
    background: #f5f5f5;
    text-decoration: none;
}

.help-mini-dropdown img {
    width: 18px;
    height: 18px;
}

.help-mini-dropdown i {
    width: 18px;
    font-size: 16px;
    text-align: center;
}

/* RTL support */
html[dir="rtl"] .mini-top-dropdown-menu {
    right: 0;
    left: auto;
}

html[dir="rtl"] .mini-top-menu-right .mini-top-dropdown-menu {
    right: auto;
    left: 0;
}

html[dir="rtl"] .mini-subcategory-list {
    padding-right: 39px;
    padding-left: 0;
}

/* Smaller desktop */
@media (max-width: 1199px) {
    .mini-top-link {
        padding: 0 9px;
        font-size: 11px;
    }

    .brand-mini-dropdown {
        width: 620px;
    }

    .brand-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================
   Language dropdown
========================================== */

.mini-language-item {
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mini-language-dropdown {
    right: 0 !important;
    left: auto !important;
    width: 155px;
    min-width: 155px;
    padding: 6px;
}

.mini-language-dropdown .change-language {
    display: block;
    width: 100%;
    padding: 8px 10px;
    color: #333;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.mini-language-dropdown .change-language:hover,
.mini-language-dropdown .change-language.active {
    color: var(--web-primary, #34458f);
    background: #f5f5f5;
    text-decoration: none;
}

.mini-top-menu-right {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto !important;
}

.mini-top-menu-right>.mini-top-item {
    display: block !important;
    flex: 0 0 auto;
}

.mini-language-item .selected-language-label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit;
}

html[dir="rtl"] .mini-language-dropdown {
    right: auto !important;
    left: 0 !important;
}