/* صفحه /categories */
.category-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (max-width: 991.98px) {
    body:has(.sticky-bottom-nav) .category-page {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));
        height: auto;
    }

    body.categories-page > footer.bg-white {
        display: none;
    }

    body.categories-page .desktop-header {
        display: none !important;
    }

    body.categories-page {
        overflow: hidden;
    }

    body.categories-page .sticky-bottom-nav {
        z-index: 2100;
    }
}

.category-page-content {
    background: #fff;
    width: 100%;
    max-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-page-header {
    flex-shrink: 0;
    background: #fff;
    padding-top: .5rem;
}

.category-page-header .shop-mobile-header__back {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

@media (min-width: 992px) {
    .category-page {
        display: none;
    }
}

.category-page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.categories-split {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}

.categories-nav {
    flex: 0 0 92px;
    width: 92px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 45px;
    background: #f5f5f7;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.categories-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 12px 8px;
    border: 0;
    border-bottom: 1px solid #e0e0e2;
    background: #f5f5f7;
    color: #3f4064;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.categories-nav-item:last-child {
    border-bottom: 0;
}

.categories-nav-icon {
    display: flex;
    margin-bottom: 4px;
}

.categories-nav-item i {
    font-size: 16px;
    line-height: 1;
    color: #424750;
}

.categories-nav-item span {
    font-size: 0.625rem;
    line-height: 2;
    color: inherit;
}

.categories-nav-item.is-active {
    background: #fff;
    color: #ef4056;
}

.categories-nav-item.is-active i {
    color: #ef4056;
}

.categories-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    margin-right: 8px;
    padding-bottom: 45px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-content::-webkit-scrollbar {
    display: none;
}

.categories-panel {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    align-items: stretch;
    padding: 0 8px;
}

.categories-panel[hidden] {
    display: none;
}

.categories-all-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 12px 0;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 18px;
    color: #008eb2;
    text-decoration: none;
    word-break: break-word;
    -webkit-tap-highlight-color: transparent;
}

.categories-all-link span {
    flex: 0 1 auto;
    min-width: 0;
    line-height: 18px;
}

.categories-all-link svg {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    fill: #008eb2;
}

.categories-section,
.categories-section-link {
    border-bottom: 1px solid #f0f0f1;
}

.categories-panel > .categories-section:last-child,
.categories-panel > .categories-section-link:last-child {
    border-bottom: 0;
}

.categories-section-toggle,
.categories-section-link {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 12px 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 2.15;
    color: #0c0c0c;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-tap-highlight-color: transparent;
}

.categories-section-toggle span,
.categories-section-link span {
    flex: 1 1 auto;
    min-width: 0;
}

.categories-section-chevron {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    fill: #424750;
    color: #424750;
    transition: transform .15s ease;
}

.categories-section.is-open .categories-section-chevron {
    transform: rotate(180deg);
}

.categories-leaves {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: center;
    gap: .5rem;
    padding-bottom: 8px;
}

.categories-leaves[hidden] {
    display: none;
}

.categories-leaf {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 73px;
    max-width: 100%;
    gap: 4px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    font: inherit;
    color: inherit;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.categories-leaf-image {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    max-width: 64px;
    padding: 4px;
    border-radius: 4px;
    background: #f5f5f7;
    overflow: clip;
}

.categories-leaf-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.categories-leaf-image--grid {
    color: #424750;
}

.categories-leaf-name {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 0;
    font-size: .625rem;
    font-weight: 400;
    line-height: 20px;
    color: #0c0c0c;
    text-align: center;
    word-break: break-word;
}
