: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: 1rem;
    padding: .5rem 1rem 1rem;
}

.shop-mobile-header__search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: .5rem 2rem .5rem 1rem;
    border: 0;
    border-radius: .5rem;
    background: #f5f5f7;
    color: #53565a;
    text-align: right;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.shop-mobile-header__search:active {
    background: #eee;
}

.shop-mobile-header__search-icon {
    position: absolute;
    top: 50%;
    right: .25rem;
    display: flex;
    width: 1.5rem;
    height: 1.5rem;
    transform: translateY(-50%);
    pointer-events: none;
}

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

.shop-mobile-header__search-placeholder {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .75rem;
    line-height: 1.4;
    color: #53565a;
    font-weight: 400;
}

.shop-mobile-header__search-query {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .75rem;
    line-height: 1.4;
    color: #101010;
    font-weight: 500;
}

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

.shop-mobile-header__back svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
}

@media (max-width: 991.98px) {
    /* contents تا نوار sticky داخلی، containing block کل صفحه را داشته باشد و بچسبد */
    .shop-mobile-header {
        display: contents;
    }

    .shop-mobile-title {
        display: block;
        background: #fff;
        padding: 1rem 1rem 0;
        margin: 0;
        text-align: center;
        font-size: .875rem;
        font-weight: 600;
        line-height: 1.5;
        color: #101010;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .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;
    }
}
