:root {
    --shop-mobile-sticky-bar-height: 4.5rem;
}

.shop-mobile-header {
    width: 100%;
    background: #fff;
}

.shop-mobile-title {
    display: none;
}

.shop-mobile-header__sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    padding-top: .5rem;
}

.shop-mobile-header__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 12px;
}

.shop-mobile-header__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #e0e0e2;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.02);
    color: #81858b;
    text-align: right;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.shop-mobile-header__search:active {
    background: rgba(0, 0, 0, 0.05);
}

.shop-mobile-header__search-icon {
    display: flex;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.shop-mobile-header__search-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.shop-mobile-header__search-placeholder,
.shop-mobile-header__search-query {
    min-width: 0;
    white-space: nowrap;
    font-size: .875rem;
    line-height: 30px;
}

.shop-mobile-header__search-placeholder {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #53565a;
}

.shop-mobile-header__search-brand {
    display: block;
    flex-shrink: 0;
    width: auto;
    height: 20px;
}

.shop-mobile-header__search-query {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: #0c0c0c;
}

.shop-mobile-header__back {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #0c0c0c;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.shop-mobile-header__back svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* ----- هدر موبایل صفحات فروشگاه، دسته، برند و برند + دسته ----- */
.shop-mobile-header__titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 16px;
    background: #fff;
}

.shop-mobile-header__heading {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.shop-mobile-header__title {
    margin: 0;
    overflow: hidden;
    color: #171717;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shop-mobile-header__count {
    flex-shrink: 0;
    color: #a3a3a3;
    font-size: .8125rem;
    font-weight: 400;
    white-space: nowrap;
}

.shop-mobile-header__search-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-inline-end: -4px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #171717;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.shop-mobile-header__search-btn svg {
    display: block;
    width: 24px;
    height: 24px;
}

@media (max-width: 991.98px) {
    .shop-mobile-header {
        display: contents;
    }

    body:has(.shop-mobile-header--plp) {
        --shop-mobile-sticky-bar-height: 56px;
    }

    .shop-mobile-header--plp .shop-mobile-header__sticky {
        padding-top: 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    }

    /* عنوان فقط برای موتورهای جستجو؛ نام دسته در انتهای مسیر صفحه دیده می‌شود */
    .shop-mobile-title {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .shop .shop-plp-title,
    .shop .page-title {
        display: none;
    }

    body:has(.shop-mobile-header) .shop {
        margin-top: 0;
        padding-top: 0 !important;
    }
}

@media (min-width: 992px) {
    .shop-mobile-header {
        display: none !important;
    }
}
