/* =========================================================
   AL ASIF TRADERS
   Premium Bottom Category Navigation
   Desktop + Responsive
   ========================================================= */


/* =========================================================
   BOTTOM BAR
   ========================================================= */

.bottom-bar {
    width: 100%;

    height: var(--bottombar-height, 50px);
    min-height: var(--bottombar-height, 50px);

    background: #ffffff;

    border-top: 1px solid #eef1f4;
    border-bottom: 1px solid #e5e7eb;

    position: relative;

    z-index: 900;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

    font-family: "Poppins", sans-serif;
}


/* =========================================================
   WRAPPER
   ========================================================= */

.bottombar-wrapper {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;

    position: relative;

    padding: 0 4px;
}


/* =========================================================
   CATEGORY MENU WRAPPER
   ========================================================= */

.category-menu-wrapper {
    flex: 1;

    min-width: 0;

    height: 100%;

    overflow-x: auto;
    overflow-y: visible;

    scroll-behavior: smooth;

    scrollbar-width: none;

    -ms-overflow-style: none;

    position: relative;
}

.category-menu-wrapper::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   CATEGORY MENU
   ========================================================= */

.category-menu {
    display: flex;
    align-items: center;

    width: max-content;
    min-width: 100%;

    height: 100%;

    margin: 0;
    padding: 0 8px;

    list-style: none;

    gap: 3px;
}


/* =========================================================
   CATEGORY ITEM
   ========================================================= */

.category-menu-item {
    position: relative;

    flex: 0 0 auto;

    height: 100%;

    display: flex;
    align-items: center;
}


/* =========================================================
   CATEGORY LINK
   ========================================================= */

.category-menu-link {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 16px;

    color: #111827;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    white-space: nowrap;

    border-bottom: 3px solid transparent;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}


/* =========================================================
   CATEGORY TITLE
   ========================================================= */

.category-menu-title {
    display: inline-flex;

    align-items: center;

    gap: 8px;
}


/* =========================================================
   CATEGORY ICON
   ========================================================= */

.category-menu-link > i,
.category-menu-title > i {
    color: var(--primary, #16a34a);

    font-size: 16px;

    flex-shrink: 0;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   CATEGORY ARROW
   ========================================================= */

.category-menu-arrow {
    font-size: 11px !important;

    color: #6b7280 !important;

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}


/* =========================================================
   CATEGORY HOVER
   ========================================================= */

.category-menu-item:hover > .category-menu-link,
.category-menu-item.active > .category-menu-link {
    color: var(--primary, #16a34a);

    background: #f7fff8;

    border-bottom-color: var(--primary, #16a34a);
}


.category-menu-item:hover
.category-menu-link > i,
.category-menu-item.active
.category-menu-link > i {

    color: var(--primary-dark, #15803d);

}


.category-menu-item:hover
.category-menu-arrow,
.category-menu-item.active
.category-menu-arrow {

    color: var(--primary, #16a34a) !important;

}


.category-menu-item:hover
.category-menu-arrow {

    transform: rotate(180deg);

}


/* =========================================================
   SCROLL BUTTONS
   ========================================================= */

.category-scroll-btn {
    width: 34px;
    height: 34px;

    min-width: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5e7eb;

    border-radius: 50%;

    background: #ffffff;

    color: #374151;

    cursor: pointer;

    z-index: 20;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


.category-scroll-btn i {
    font-size: 14px;

    line-height: 1;
}


.category-scroll-btn:hover {
    background: var(--primary, #16a34a);

    color: #ffffff;

    border-color: var(--primary, #16a34a);

    transform: scale(1.05);
}


.category-scroll-btn:active {
    transform: scale(0.95);
}


.category-scroll-btn:disabled,
.category-scroll-btn.disabled {
    opacity: 0.35;

    cursor: not-allowed;

    pointer-events: none;

    box-shadow: none;
}


/* =========================================================
   LEFT / RIGHT BUTTON SPACING
   ========================================================= */

.scroll-left {
    margin-right: 5px;
}


.scroll-right {
    margin-left: 5px;
}


/* =========================================================
   DESKTOP DROPDOWN WRAPPER
   ========================================================= */

.category-dropdown-wrapper {
    position: absolute;

    top: calc(100% + 1px);

    left: 0;

    min-width: 245px;

    padding-top: 5px;

    visibility: hidden;

    opacity: 0;

    transform: translateY(8px);

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;

    z-index: 2000;
}


/* =========================================================
   SHOW DROPDOWN
   ========================================================= */

.category-menu-item:hover > .category-dropdown-wrapper,
.category-menu-item.active > .category-dropdown-wrapper {

    visibility: visible;

    opacity: 1;

    transform: translateY(0);

    pointer-events: auto;
}


/* =========================================================
   DROPDOWN MENU
   ========================================================= */

.category-dropdown {
    position: relative;

    min-width: 245px;

    margin: 0;

    padding: 7px 0;

    list-style: none;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 8px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.10),
        0 2px 8px rgba(0, 0, 0, 0.04);
}


/* =========================================================
   DROPDOWN ITEM
   ========================================================= */

.category-dropdown-item {
    position: relative;

    width: 100%;
}


/* =========================================================
   DROPDOWN LINK
   ========================================================= */

.category-dropdown-link {
    width: 100%;

    min-height: 42px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 9px 14px;

    color: #374151;

    background: #ffffff;

    text-decoration: none;

    font-size: 13px;

    font-weight: 500;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}


.category-dropdown-link:hover {

    color: var(--primary, #16a34a);

    background: #f7fff8;

}


/* =========================================================
   DROPDOWN TITLE
   ========================================================= */

.category-dropdown-title {
    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;
}


.category-dropdown-title i {
    width: 20px;

    text-align: center;

    color: var(--primary, #16a34a);

    flex-shrink: 0;
}


/* =========================================================
   DROPDOWN ARROW
   ========================================================= */

.category-arrow {
    font-size: 11px;

    color: #9ca3af;

    flex-shrink: 0;
}


/* =========================================================
   THIRD LEVEL DROPDOWN
   ========================================================= */

.category-sub-dropdown {

    position: absolute;

    top: -7px;

    left: calc(100% + 1px);

    min-width: 245px;

    visibility: hidden;

    opacity: 0;

    transform: translateX(8px);

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;

    z-index: 3000;
}


/* =========================================================
   SHOW THIRD LEVEL
   ========================================================= */

.category-dropdown-item:hover > .category-sub-dropdown {

    visibility: visible;

    opacity: 1;

    transform: translateX(0);

    pointer-events: auto;
}


/* =========================================================
   DISABLED LINK
   ========================================================= */

.category-menu-link.disabled {

    cursor: default;

    color: #9ca3af;

}


.category-menu-link.disabled:hover {

    background: transparent;

    color: #9ca3af;

    border-bottom-color: transparent;

}


/* =========================================================
   MOBILE CATEGORY SUPPORT
   ========================================================= */

.mobile-sidebar .category-level {

    width: 100%;

    margin: 0;

    padding: 0;

    list-style: none;

}


.mobile-sidebar .category-item {

    border-bottom: 1px solid #f0f0f0;

}


.mobile-sidebar .category-item:last-child {

    border-bottom: none;

}


.mobile-sidebar .category-level {

    display: none;

}


.mobile-sidebar .category-item.opened > .category-level {

    display: block;

}


/* =========================================================
   GENERAL CATEGORY LEVEL
   ========================================================= */

.category-level {

    margin: 0;

    padding: 0;

    list-style: none;
}


/* =========================================================
   GENERAL CATEGORY ITEM
   ========================================================= */

.category-item {

    position: relative;

}


/* =========================================================
   GENERAL CATEGORY LINK
   ========================================================= */

.category-link {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    padding: 12px 16px;

    color: #374151;

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

}


.category-link:hover {

    color: var(--primary, #16a34a);

    background: #f7fff8;

}


/* =========================================================
   CATEGORY TITLE
   ========================================================= */

.category-title {

    display: flex;

    align-items: center;

    gap: 9px;

}


.category-title i {

    width: 20px;

    text-align: center;

    color: var(--primary, #16a34a);

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.category-menu-link:focus-visible,
.category-scroll-btn:focus-visible,
.category-dropdown-link:focus-visible {

    outline: 3px solid rgba(22, 163, 74, 0.25);

    outline-offset: 2px;

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

    .bottom-bar {

        display: none;

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .bottom-bar {

        display: none;

    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .bottom-bar {

        display: none;

    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .category-menu-wrapper {

        scroll-behavior: auto;

    }

    .category-menu-link,
    .category-menu-link i,
    .category-scroll-btn,
    .category-dropdown-wrapper,
    .category-sub-dropdown {

        transition: none;

    }

}