/* ==========================================================
   SELL SHOPEE SHOP PAGE
========================================================== */
.sp-page {
    padding: 20px 0 36px;
    background: linear-gradient(180deg, #fbfaff 0, #f7f6fb 100%);
    font-family: "Manrope", sans-serif;
    color: var(--text);
    overflow: visible
}

.sp-page button,
.sp-page input {
    font: inherit
}

.sp-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px
}

.sp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em
}

.sp-head h1 {
    margin: 4px 0 2px;
    color: var(--text);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.04em
}

.sp-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45
}

.sp-mobile-filter-btn {
    display: none
}

/* LAYOUT */
.sp-layout {
    position: relative;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 17px;
    align-items: start;
    overflow: visible
}

/* SIDEBAR */
.sp-sidebar {
    position: sticky !important;
    top: 90px;
    align-self: start;
    width: 100%;
    max-height: calc(100vh - 220px);
    padding: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 20;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: #d9d2ee transparent
}

.sp-sidebar::-webkit-scrollbar {
    width: 4px
}

.sp-sidebar::-webkit-scrollbar-track {
    background: transparent
}

.sp-sidebar::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #d9d2ee
}

.sp-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 13px
}

.sp-sidebar-head span {
    display: block;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .08em
}

.sp-sidebar-head h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25
}

.sp-close-filters {
    display: none
}

/* TYPE TABS */
.sp-type-tabs-wrap {
    min-width: 0
}

.sp-type-tabs-label {
    display: block;
    margin-bottom: 7px;
    color: #8a8491;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em
}

.sp-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
    border: 1px solid #e8e3ef;
    border-radius: 12px;
    background: #f8f7fb
}

.sp-type-tab {
    min-width: 0;
    min-height: 54px;
    padding: 6px 3px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #716b79;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
    transition: .18s ease
}

.sp-type-tab i {
    font-size: 14px
}

.sp-type-tab:hover {
    color: var(--primary);
    background: #fff
}

.sp-type-tab.is-active {
    border-color: #d6cafa;
    color: var(--primary);
    background: #fff;
    box-shadow: 0 5px 14px rgba(109, 66, 245, .10)
}

.sp-type-tab.is-active i {
    color: var(--primary)
}

/* FILTER */
.sp-filter-block {
    min-width: 0
}

.sp-filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px
}

.sp-filter-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 15px
}

.sp-filter-title small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.2
}

.sp-filter-title strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2
}

.sp-filter-divider {
    height: 1px;
    margin: 13px 0;
    background: var(--line)
}

/* CATEGORY */
.sp-category-list {
    display: grid;
    gap: 3px
}

.sp-check-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 36px;
    padding: 5px 7px;
    border-radius: 9px;
    cursor: pointer;
    transition: .18s ease
}

.sp-check-row:hover {
    background: var(--primary-faint)
}

.sp-check-row.is-hidden-type {
    display: none !important
}

.sp-check-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px
}

.sp-check-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.sp-custom-check {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #d8d3e2;
    border-radius: 5px;
    color: transparent;
    background: #fff;
    font-size: 11px;
    transition: .18s ease
}

.sp-check-row input:checked+.sp-custom-check {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 4px 10px rgba(109, 66, 245, .20)
}

.sp-check-label {
    min-width: 0;
    overflow: hidden;
    color: #514c59;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap
}

.sp-check-row input:checked~.sp-check-label {
    color: var(--primary);
    font-weight: 800
}

.sp-category-extra {
    display: none !important
}

.sp-category-list.is-expanded .sp-category-extra {
    display: flex !important
}

.sp-category-empty {
    display: none;
    padding: 10px 8px;
    border-radius: 9px;
    color: var(--muted);
    background: #faf9fc;
    font-size: 10px;
    line-height: 1.4;
    text-align: center
}

.sp-category-empty.is-visible {
    display: block
}

.sp-show-more {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    padding: 0 8px;
    border: 1px solid #ded6f8;
    border-radius: 9px;
    color: var(--primary);
    background: var(--primary-faint);
    font-size: 10px;
    font-weight: 800;
    transition: .18s ease
}

.sp-show-more:hover {
    border-color: #cfc2f8;
    background: #f2edff
}

.sp-show-more i {
    font-size: 10px;
    transition: .18s ease
}

.sp-show-more.is-open i {
    transform: rotate(180deg)
}

.sp-show-more.is-hidden {
    display: none
}

/* PRICE */
.sp-price-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 0;
    color: var(--text);
    font-size: 11px;
    font-weight: 800
}

.sp-price-values span {
    padding: 4px 7px;
    border-radius: 7px;
    background: #f6f4fa
}

.sp-range-wrap {
    padding: 3px 2px 0
}

.sp-reset-price {
    height: 33px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #756f7e;
    background: #fff;
    font-size: 10px;
    font-weight: 800;
    transition: .18s ease
}

.sp-reset-price:hover {
    color: var(--primary);
    border-color: #d7cdfa;
    background: var(--primary-faint)
}

.sp-mobile-apply {
    display: none
}

/* RESULTS */
.sp-results {
    position: relative;
    min-width: 0;
    overflow: visible
}

.sp-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px
}

.sp-results-kicker {
    display: block;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .08em
}

.sp-results-head h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25
}

.sp-result-count {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 10px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    font-size: 10px;
    font-weight: 600
}

.sp-result-count strong {
    color: var(--text);
    font-size: 11px;
    font-weight: 800
}

.sp-products-wrap {
    position: relative;
    min-height: 420px;
    overflow: visible
}

.sp-product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    margin: 0 !important
}

.sp-product-grid>[class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important
}

.sp-product-grid .product-card {
    height: 100%;
    margin: 0 !important
}

/* LOADER */
.sp-loader-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    background: #f8f7fc
}

.sp-loader-layer.is-active {
    display: block
}

.sp-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px
}

.sp-skeleton-card {
    overflow: hidden;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff
}

.sp-skeleton-image {
    aspect-ratio: 1/.84;
    border-radius: 11px;
    background: #ece9f2;
    animation: spPulse 1.15s ease-in-out infinite
}

.sp-skeleton-line {
    height: 9px;
    margin-top: 9px;
    border-radius: 999px;
    background: #ece9f2;
    animation: spPulse 1.15s ease-in-out infinite
}

.sp-skeleton-short {
    width: 34%
}

.sp-skeleton-mid {
    width: 66%
}

.sp-skeleton-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px
}

.sp-skeleton-bottom span {
    width: 39%;
    height: 26px;
    border-radius: 8px;
    background: #ece9f2;
    animation: spPulse 1.15s ease-in-out infinite
}

@keyframes spPulse {

    0%,
    100% {
        opacity: .55
    }

    50% {
        opacity: 1
    }
}

/* EMPTY PRODUCTS */
.sp-empty-products {
    min-height: 390px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 50px 20px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0, #faf8ff 100%)
}

.sp-empty-products.is-visible {
    display: flex
}

.sp-empty-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 22px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 27px;
    box-shadow: 0 10px 30px rgba(109, 66, 245, .10)
}

.sp-empty-products h3 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 800
}

.sp-empty-products p {
    max-width: 380px;
    margin: 7px 0 17px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55
}

.sp-empty-reset {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(109, 66, 245, .20)
}

.sp-empty-reset:hover {
    transform: translateY(-1px)
}

/* LOAD MORE */
.sp-load-more-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff
}

.sp-load-status {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35
}

.sp-load-status strong {
    color: var(--text);
    font-size: 11px;
    font-weight: 800
}

.sp-load-more {
    height: 37px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    flex-shrink: 0;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 7px 16px rgba(109, 66, 245, .16);
    transition: .18s ease
}

.sp-load-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(109, 66, 245, .22)
}

.sp-filter-backdrop {
    display: none
}

/* RANGE */
.irs--flat {
    height: 44px
}

.irs--flat .irs-line {
    height: 5px;
    top: 28px;
    border-radius: 999px;
    background: #eeeaf5
}

.irs--flat .irs-bar {
    height: 5px;
    top: 28px;
    background: var(--primary) !important
}

.irs--flat .irs-handle {
    top: 22px;
    width: 17px;
    height: 17px;
    cursor: pointer
}

.irs--flat .irs-handle>i:first-child {
    left: 0 !important;
    width: 17px !important;
    height: 17px !important;
    margin-left: 0 !important;
    border: 3px solid #fff;
    border-radius: 50% !important;
    background: var(--primary) !important;
    box-shadow: 0 2px 7px rgba(109, 66, 245, .28)
}

.irs--flat .irs-from,
.irs--flat .irs-to,
.irs--flat .irs-single {
    top: 0;
    padding: 4px 6px;
    border-radius: 5px;
    background: var(--primary) !important;
    font-size: 9px;
    font-weight: 700
}

.irs--flat .irs-from:before,
.irs--flat .irs-to:before,
.irs--flat .irs-single:before {
    border-top-color: var(--primary) !important
}

.irs--flat .irs-min,
.irs--flat .irs-max {
    display: none
}

@media(max-width:1250px) {
    .sp-layout {
        grid-template-columns: 235px minmax(0, 1fr)
    }

    .sp-product-grid,
    .sp-skeleton-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:991px) {
    .sp-page {
        padding-top: 12px
    }

    .sp-head {
        align-items: flex-start
    }

    .sp-head h1 {
        font-size: 24px
    }

    .sp-head p {
        display: none
    }

    .sp-mobile-filter-btn {
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0 11px;
        flex-shrink: 0;
        border: 1px solid #ded6f8;
        border-radius: 10px;
        color: var(--primary);
        background: #fff;
        font-size: 11px;
        font-weight: 800
    }

    .sp-filter-count {
        min-width: 18px;
        height: 18px;
        display: grid;
        place-items: center;
        padding: 0 4px;
        border-radius: 999px;
        color: #fff;
        background: var(--primary);
        font-size: 8px;
        font-weight: 800
    }

    .sp-layout {
        display: block;
        overflow: visible
    }

    .sp-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        bottom: 0;
        z-index: 10002;
        width: min(340px, 90vw);
        max-height: none;
        padding: 16px;
        border: 0;
        border-radius: 0 18px 18px 0;
        overflow-x: hidden;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: .24s ease;
        box-shadow: 0 20px 60px rgba(26, 16, 53, .25)
    }

    .sp-sidebar.is-open {
        transform: translateX(0)
    }

    .sp-close-filters {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 9px;
        color: var(--text);
        background: #fff;
        font-size: 13px
    }

    .sp-mobile-apply {
        position: sticky;
        bottom: 0;
        width: 100%;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 14px;
        border: 0;
        border-radius: 11px;
        color: #fff;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        font-size: 11px;
        font-weight: 800;
        box-shadow: 0 10px 22px rgba(109, 66, 245, .20)
    }

    .sp-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 10001;
        display: block;
        background: rgba(24, 15, 44, .45);
        opacity: 0;
        visibility: hidden;
        transition: .2s ease
    }

    .sp-filter-backdrop.is-open {
        opacity: 1;
        visibility: visible
    }

    body.sp-filter-open {
        overflow: hidden
    }

    .sp-product-grid,
    .sp-skeleton-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:760px) {
    .sp-results-head {
        margin-bottom: 8px
    }

    .sp-results-kicker {
        font-size: 8px
    }

    .sp-results-head h2 {
        font-size: 18px
    }

    .sp-result-count {
        padding: 6px 8px;
        font-size: 9px
    }

    .sp-result-count strong {
        font-size: 10px
    }

    .sp-product-grid,
    .sp-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px
    }

    .sp-load-more-wrap {
        margin-top: 10px;
        padding: 9px
    }

    .sp-load-status {
        font-size: 9px
    }

    .sp-load-status strong {
        font-size: 10px
    }

    .sp-load-more {
        height: 35px;
        padding: 0 10px;
        font-size: 9px
    }

    .sp-empty-products {
        min-height: 300px;
        padding: 35px 15px;
        border-radius: 14px
    }

    .sp-empty-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 13px;
        border-radius: 17px;
        font-size: 23px
    }

    .sp-empty-products h3 {
        font-size: 17px
    }

    .sp-empty-products p {
        font-size: 11px
    }

    .sp-empty-reset {
        min-height: 37px;
        font-size: 10px
    }
}

@media(max-width:480px) {
    .sp-page {
        padding-top: 9px
    }

    .sp-head {
        gap: 8px;
        margin-bottom: 9px
    }

    .sp-kicker {
        font-size: 9px
    }

    .sp-head h1 {
        font-size: 22px
    }

    .sp-mobile-filter-btn {
        height: 35px;
        padding: 0 9px;
        font-size: 10px
    }

    .sp-type-tab {
        min-height: 51px;
        font-size: 8.5px
    }

    .sp-type-tab i {
        font-size: 13px
    }

    .sp-filter-count {
        font-size: 8px
    }

    .sp-results-kicker {
        font-size: 8px
    }

    .sp-results-head h2 {
        font-size: 17px
    }

    .sp-result-count {
        padding: 6px 7px;
        font-size: 9px
    }

    .sp-result-count strong {
        font-size: 10px
    }

    .sp-product-grid,
    .sp-skeleton-grid {
        gap: 7px
    }

    .sp-skeleton-card {
        padding: 6px;
        border-radius: 12px
    }

    .sp-skeleton-image {
        border-radius: 9px
    }

    .sp-load-status {
        font-size: 9px
    }

    .sp-load-more {
        height: 35px;
        padding: 0 10px;
        font-size: 9px
    }
}