/**
 * صفحة المتجر — محتوى داخلي فقط (مع هيدر/فوتر الموقع)
 * ألوان المرجع: خلفية داكنة، بنفسجي نيون، Glassmorphism
 */

.store-main--products {
    background: transparent;
}

.sp-page {
    position: relative;
    isolation: isolate;
    color: var(--text);
    padding-block: 1rem 0.5rem;
}

@media (min-width: 1024px) {
    .sp-page {
        padding-block: 1.25rem 1.5rem;
    }
}

.sp-page__bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
        radial-gradient(circle at 15% 40%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 42%),
        radial-gradient(circle at 85% 60%, color-mix(in srgb, var(--accent-glow) 12%, transparent), transparent 40%),
        var(--bg-page);
}

.sp-container {
    width: min(1280px, 100% - 2rem);
    margin-inline: auto;
}

/* ——— شريط الجوال (فلترة) ——— */
.sp-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .sp-mobile-top {
        display: none;
    }
}

.sp-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(22, 23, 45, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #e9d5ff;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.15);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sp-filter-trigger:hover {
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: 0 0 28px rgba(124, 58, 237, 0.28);
}

.sp-filter-trigger:active {
    transform: scale(0.98);
}

.sp-mobile-top__hint {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.sp-mobile-top__hint strong {
    color: #e2e8f0;
}

/* ——— تخطيط: سايدبار يسار + محتوى يمين (LTR على الحاوية لضبط الأعمدة) ——— */
.sp-layout {
    direction: ltr;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 1024px) {
    .sp-layout {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 1.5rem;
    }
}

/* ——— السايدبار ——— */
.sp-sidebar {
    direction: rtl;
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(90vw, 320px);
    z-index: 85;
    transform: translate3d(-105%, 0, 0);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}

.sp-sidebar.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

@media (min-width: 1024px) {
    .sp-sidebar {
        position: sticky;
        top: 5.5rem;
        width: auto;
        max-height: calc(100vh - 6rem);
        transform: none !important;
        visibility: visible;
        overflow-y: auto;
    }
}

.sp-sidebar__inner {
    height: 100%;
    overflow-y: auto;
    padding: 1.1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    background: rgba(22, 23, 45, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-inline-end: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 1024px) {
    .sp-sidebar__inner {
        border-radius: 18px;
        border: 1px solid rgba(139, 92, 246, 0.22);
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.04) inset,
            0 16px 48px rgba(0, 0, 0, 0.35);
    }
}

.sp-sidebar__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sp-sidebar__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.sp-sidebar__title-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(112, 0, 255, 0.45), rgba(192, 38, 211, 0.35));
    color: #fff;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.35);
}

.sp-drawer-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.65);
    color: #f8fafc;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sp-drawer-close:hover {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(30, 27, 75, 0.75);
}

@media (min-width: 1024px) {
    .sp-drawer-close {
        display: none;
    }
}

.sp-filter-block {
    padding: 0.85rem 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(10, 11, 30, 0.55);
}

.sp-filter-block__label {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #cbd5e1;
}

.sp-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sp-cat-list__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.55rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sp-cat-list__btn:hover {
    background: rgba(124, 58, 237, 0.12);
}

.sp-cat-list__btn.is-active {
    background: linear-gradient(90deg, rgba(112, 0, 255, 0.35), rgba(192, 38, 211, 0.22));
    border-color: rgba(167, 139, 250, 0.45);
    color: #fff;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.sp-cat-list__count {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.28);
    color: #e9d5ff;
}

.sp-range {
    position: relative;
    height: 32px;
    margin-block: 0.35rem 0.75rem;
}

.sp-range__track {
    position: absolute;
    inset-inline: 0;
    top: 50%;
    height: 6px;
    margin-top: -3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.sp-range__track::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent var(--range-a, 0%),
        rgba(124, 58, 237, 0.92) var(--range-a, 0%),
        rgba(192, 38, 211, 0.88) var(--range-b, 100%),
        transparent var(--range-b, 100%),
        transparent 100%
    );
    opacity: 0.95;
}

.sp-range__input {
    position: absolute;
    inset-inline: 0;
    top: 0;
    width: 100%;
    height: 32px;
    margin: 0;
    appearance: none;
    background: none;
    pointer-events: none;
}

.sp-range__input[data-range-max] {
    z-index: 2;
}

.sp-range__input[data-range-min] {
    z-index: 1;
}

.sp-range__input::-webkit-slider-thumb {
    appearance: none;
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ede9fe;
    background: linear-gradient(145deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.65);
    cursor: pointer;
}

.sp-range__input::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ede9fe;
    background: linear-gradient(145deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.65);
    cursor: pointer;
}

.sp-price-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.sp-price-fields__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: #94a3b8;
}

.sp-price-fields__input {
    width: 4.5rem;
    padding: 0.35rem 0.4rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.75);
    color: #f8fafc;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
}

.sp-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.28rem 0;
    font-size: 0.8rem;
    color: #cbd5e1;
    cursor: pointer;
}

.sp-check input {
    width: 1rem;
    height: 1rem;
    accent-color: #8b5cf6;
    border-radius: 4px;
}

.sp-reset-btn {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.sp-reset-btn:hover {
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(30, 27, 75, 0.65);
}

.sp-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 4, 12, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.sp-drawer-backdrop[hidden] {
    display: none !important;
}

@media (min-width: 1024px) {
    .sp-drawer-backdrop {
        display: none !important;
    }
}

/* ——— المحتوى الرئيسي (RTL) ——— */
.sp-main {
    direction: rtl;
    min-width: 0;
}

/* ——— سلايدر البانر (WebP) ——— */
.sp-hero-carousel {
    position: relative;
    margin-bottom: 1.25rem;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.28);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(124, 58, 237, 0.12);
}

.sp-hero-carousel__viewport {
    position: relative;
    min-height: clamp(168px, 28vw, 260px);
    isolation: isolate;
}

.sp-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.sp-hero-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.sp-hero-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.02);
}

.sp-hero-slide__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(5, 6, 15, 0.72) 0%, rgba(5, 6, 15, 0.35) 45%, rgba(5, 6, 15, 0.55) 100%),
        radial-gradient(circle at 18% 30%, rgba(59, 130, 246, 0.2), transparent 50%);
    pointer-events: none;
}

.sp-hero-slide__content {
    position: relative;
    z-index: 2;
    padding: clamp(1.15rem, 3vw, 1.85rem);
    min-height: clamp(168px, 28vw, 260px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: start;
    max-width: min(100%, 460px);
    margin-inline-start: auto;
}

.sp-hero-slide__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.25;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.sp-hero-slide__sub {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.55;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.sp-hero-slide__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 1.35rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(90deg, #6d28d9, #a855f7, #c026d3);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sp-hero-slide__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.55);
}

.sp-hero-carousel__dots {
    position: absolute;
    inset-inline: 0;
    bottom: 0.65rem;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.sp-hero-carousel__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sp-hero-carousel__dot.is-active {
    background: linear-gradient(90deg, #a855f7, #c026d3);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.85);
    transform: scale(1.15);
}

.sp-hero-carousel__dot:focus-visible {
    outline: 2px solid #e9d5ff;
    outline-offset: 3px;
}

/* ——— ترقيم الصفحات ——— */
.sp-pagination-wrap {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.sp-pagination__list {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(22, 23, 45, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sp-pagination__item {
    min-width: 2.25rem;
}

.sp-pagination__link {
    display: grid;
    place-items: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.45rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #e2e8f0;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.sp-pagination__link:hover {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(124, 58, 237, 0.18);
    color: #fff;
}

.sp-pagination__item.is-active .sp-pagination__link {
    color: #fff;
    border-color: rgba(167, 139, 250, 0.55);
    background: linear-gradient(135deg, rgba(112, 0, 255, 0.45), rgba(192, 38, 211, 0.35));
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.3);
}

.sp-pagination__item.is-disabled .sp-pagination__link {
    opacity: 0.35;
    cursor: not-allowed;
}

.sp-pagination__ellipsis {
    display: inline-block;
    padding: 0 0.25rem;
    color: #94a3b8;
    font-weight: 800;
}

.sp-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
    font-weight: 700;
}

a.sp-cat-list__btn {
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

a.sp-cat-pill {
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

/* ——— بحث وتصنيف فرعي (متجر) ——— */
.sp-store-query {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.85rem;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.18);
    background: rgba(15, 23, 42, 0.45);
}

.sp-store-query__search {
    flex: 1 1 200px;
    min-width: 0;
}

.sp-store-query__input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(10, 11, 30, 0.92);
    color: #f8fafc;
    font: inherit;
}

.sp-store-query__sub {
    flex: 0 1 160px;
}

.sp-store-query__select {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(10, 11, 30, 0.92);
    color: #e2e8f0;
    font: inherit;
    font-size: 0.85rem;
}

.sp-store-query__btn {
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(167, 139, 250, 0.45);
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
}

a.sp-reset-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* ——— بطاقات الأقسام (متجر) ——— */
.sp-cat-showcase {
    margin-bottom: 1.25rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.22);
    background:
        linear-gradient(145deg, rgba(22, 23, 45, 0.92), rgba(15, 23, 42, 0.55));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.sp-cat-showcase__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sp-cat-showcase__eyebrow {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4b5fd;
    margin-bottom: 0.25rem;
}

.sp-cat-showcase__title {
    margin: 0;
    font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
}

.sp-cat-showcase__all {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: #ddd6fe;
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background: rgba(91, 33, 182, 0.25);
}

.sp-cat-showcase__all:hover {
    border-color: rgba(196, 181, 254, 0.55);
    color: #fff;
}

.sp-cat-showcase__grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 520px) {
    .sp-cat-showcase__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (min-width: 900px) {
    .sp-cat-showcase__grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
        gap: 0.85rem;
    }
}

.sp-cat-showcase__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(10, 11, 30, 0.55);
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .sp-cat-showcase__card:hover {
        border-color: rgba(167, 139, 250, 0.45);
        box-shadow: 0 0 28px rgba(124, 58, 237, 0.22);
        transform: translateY(-3px);
    }
}

.sp-cat-showcase__card.is-active {
    border-color: rgba(196, 181, 254, 0.55);
    box-shadow: 0 0 26px rgba(124, 58, 237, 0.35);
}

.sp-cat-showcase__media {
    position: relative;
    aspect-ratio: 1.25;
    background:
        radial-gradient(circle at 50% 20%, rgba(124, 58, 237, 0.22), transparent 45%),
        rgba(15, 23, 42, 0.9);
    display: grid;
    place-items: center;
}

.sp-cat-showcase__media--all {
    aspect-ratio: 1.25;
    color: #e9d5ff;
    background:
        radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.35), transparent 55%),
        linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.9));
}

.sp-cat-showcase__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-cat-showcase__body {
    padding: 0.55rem 0.65rem 0.7rem;
    text-align: right;
}

.sp-cat-showcase__name {
    margin: 0 0 0.25rem;
    font-size: clamp(0.78rem, 0.72rem + 0.35vw, 0.9rem);
    font-weight: 900;
    color: #f8fafc;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-cat-showcase__desc {
    margin: 0;
    font-size: clamp(0.65rem, 0.6rem + 0.25vw, 0.74rem);
    font-weight: 650;
    color: #94a3b8;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-cat-showcase__desc--muted {
    opacity: 0.85;
}

/* ——— أقسام سريعة مضغوطة (5 بطاقات + شريط أفقي) ——— */
.sp-cat-showcase--compact {
    padding: 0.85rem 0.95rem 0.95rem;
    margin-bottom: 1rem;
}

.sp-cat-showcase--compact .sp-cat-showcase__head {
    align-items: center;
    margin-bottom: 0.72rem;
}

.sp-cat-showcase--compact .sp-cat-showcase__title {
    font-size: clamp(1rem, 0.92rem + 0.45vw, 1.22rem);
}

.sp-cat-showcase--compact .sp-cat-showcase__all {
    font-size: 0.76rem;
    padding: 0.36rem 0.7rem;
}

.sp-cat-showcase--compact .sp-cat-showcase__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.55rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 0.25rem;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding-bottom: 0.2rem;
    mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}

.sp-cat-showcase--compact .sp-cat-showcase__card {
    flex: 0 0 clamp(104px, 28vw, 132px);
    scroll-snap-align: start;
    min-width: 0;
}

.sp-cat-showcase--compact .sp-cat-showcase__media {
    aspect-ratio: 1;
}

.sp-cat-showcase--compact .sp-cat-showcase__body {
    padding: 0.42rem 0.48rem 0.52rem;
}

.sp-cat-showcase--compact .sp-cat-showcase__name {
    margin: 0;
    font-size: clamp(0.72rem, 0.66rem + 0.22vw, 0.82rem);
    -webkit-line-clamp: 2;
    white-space: normal;
}

@media (min-width: 900px) {
    .sp-cat-showcase--compact .sp-cat-showcase__grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        overflow: visible;
        mask-image: none;
        gap: 0.65rem;
        padding-bottom: 0;
    }

    .sp-cat-showcase--compact .sp-cat-showcase__card {
        flex: initial;
    }
}

/* ——— شريط الأدوات ——— */
.sp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.18);
    background: rgba(22, 23, 45, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sp-toolbar--desktop {
    display: none;
}

.sp-toolbar--mobile {
    margin-bottom: 0.85rem;
}

.sp-toolbar--inline {
    margin-top: 0.25rem;
}

@media (min-width: 1024px) {
    .sp-toolbar--desktop {
        display: flex;
    }

    .sp-toolbar--mobile {
        display: none !important;
    }
}

.sp-toolbar__count {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.sp-toolbar__count span,
.sp-toolbar__count strong {
    color: #e2e8f0;
    font-weight: 800;
}

.sp-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sp-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.sp-sort__prefix {
    white-space: nowrap;
}

.sp-sort__select {
    appearance: none;
    min-width: 9.5rem;
    padding: 0.45rem 0.65rem 0.45rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8'%3E%3Cpath d='M6 9l6 6 6-6' stroke-width='2'/%3E%3C/svg%3E") no-repeat calc(100% - 0.55rem) center;
    color: #f1f5f9;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
}

.sp-view-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(10, 11, 30, 0.6);
}

.sp-view-toggle__btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.sp-view-toggle__btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(112, 0, 255, 0.45), rgba(192, 38, 211, 0.35));
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.35);
}

.sp-view-toggle__btn:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 2px;
}

/* ——— شريط الفئات الدائرية ——— */
.sp-cat-strip-wrap {
    margin-bottom: 1.15rem;
    display: none;
}

@media (max-width: 1023px) {
    .sp-cat-strip-wrap {
        display: block;
    }
}

.sp-cat-strip {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

.sp-cat-strip::-webkit-scrollbar {
    height: 4px;
}

.sp-cat-strip::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.45);
    border-radius: 99px;
}

.sp-cat-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 4.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    color: #cbd5e1;
    cursor: default;
}

.sp-cat-pill__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.75);
}

.sp-cat-pill__icon--all {
    background: conic-gradient(from 180deg, #f97316, #22c55e, #3b82f6, #a855f7, #f97316);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
}

.sp-cat-pill__icon--thumb {
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.sp-cat-pill__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-cat-pill__icon--dot {
    background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--pill, #a855f7) 80%, #fff), var(--pill, #a855f7));
    box-shadow: 0 0 16px color-mix(in srgb, var(--pill, #a855f7) 40%, transparent);
}

.sp-cat-pill.is-active .sp-cat-pill__icon {
    border-color: rgba(167, 139, 250, 0.65);
    box-shadow: 0 0 22px rgba(124, 58, 237, 0.45);
}

.sp-cat-pill.is-active {
    color: #fff;
}

/* ——— أقسام موبايل (تمرير أفقي) ——— */
.sp-mobile-section {
    display: none;
    margin-bottom: 1.25rem;
}

@media (max-width: 1023px) {
    .sp-mobile-section {
        display: block;
    }
}

.sp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sp-section-head__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.sp-section-head__link {
    font-size: 0.8rem;
    font-weight: 800;
    color: #c4b5fd;
    text-decoration: none;
}

.sp-section-head__link:hover {
    text-decoration: underline;
}

.sp-scroll-row {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

/* ——— بطاقات المنتج ——— */
.sp-card {
    position: relative;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, color-mix(in srgb, var(--bg-elevated) 86%, transparent), var(--bg-glass));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.65rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .sp-card:hover {
        transform: translateY(-6px) scale(1.01);
        border-color: color-mix(in srgb, var(--accent-glow) 48%, transparent);
        box-shadow: var(--shadow-md), var(--glow-accent);
    }
}

.sp-card--scroll {
    flex: 0 0 min(72vw, 240px);
    scroll-snap-align: start;
}

/* ملصقات المنتج: تُعرض عبر .store-badges داخل .sp-card__badges */

.sp-card__media {
    position: relative;
    aspect-ratio: 1.15;
    border-radius: 22px;
    margin-bottom: 0.55rem;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 42%),
        var(--product-media-bg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.sp-card__badges {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    max-width: calc(100% - 16px);
}

.sp-card__media-link {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.sp-card__media img {
    width: 68%;
    height: auto;
    object-fit: contain;
}

.sp-card__logo-text {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 0.04em;
}

.sp-card__title {
    margin: 0 0 0.2rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.sp-card__title-link {
    color: inherit;
    text-decoration: none;
}

.sp-card__title-link:hover {
    color: var(--accent-glow);
}

.sp-card__desc {
    margin: 0 0 0.55rem;
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sp-card__foot {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.sp-card__price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.3rem;
}

.sp-card__price-row {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.sp-card__price-pulse {
    font-size: 0.95rem;
    line-height: 1;
    animation: sp-card-price-pulse 2.2s ease-in-out infinite;
}

@keyframes sp-card-price-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-card__price-pulse {
        animation: none;
    }
}

.sp-card__price strong {
    font-size: 1.14rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 24px color-mix(in srgb, var(--gold) 25%, transparent);
}

.sp-card__old {
    font-size: 0.74rem;
    font-weight: 700;
    color: #22c55e;
    text-decoration: line-through;
    opacity: 0.95;
}

.sp-card__cta {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.38rem;
    align-items: stretch;
    width: 100%;
}

.sp-card__add-form {
    display: contents;
}

.sp-card__btn {
    flex: none;
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.45rem 0.65rem;
    border-radius: 14px;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sp-card__btn--primary {
    border-color: color-mix(in srgb, var(--accent-glow) 55%, transparent);
    background: var(--premium-gradient);
    color: #fff;
    box-shadow: var(--glow-accent);
}

.sp-card__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--glow-accent-strong);
}

.sp-card__btn--ghost {
    border-color: color-mix(in srgb, var(--gold) 45%, transparent);
    background: var(--bg-glass);
    color: var(--text);
}

.sp-card__btn--ghost:hover {
    border-color: color-mix(in srgb, var(--gold) 70%, transparent);
    color: var(--text);
    box-shadow: var(--glow-gold);
}

@media (max-width: 640px) {
    .sp-card__btn {
        min-height: 38px;
        padding: 0.42rem 0.6rem;
    }
}

/* ——— شبكة المنتجات ——— */
.sp-grid-section {
    margin-bottom: 1.25rem;
}

.sp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (min-width: 1024px) {
    .sp-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.1rem;
    }
}

.sp-grid--list {
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.sp-grid--list .sp-card--grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
}

.sp-grid--list .sp-card--grid .sp-card__media {
    flex: 0 0 96px;
    width: 96px;
    margin-bottom: 0;
    aspect-ratio: 1;
}

.sp-grid--list .sp-card--grid .sp-card__body {
    flex: 1;
    min-width: 0;
}

.sp-grid--list .sp-card--grid .sp-card__foot {
    flex-direction: row;
    align-items: center;
}

.sp-grid--list .sp-card__price {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.sp-grid--list .sp-card--grid .sp-card__title {
    font-size: 0.88rem;
}

.sp-grid--list .sp-card--grid .sp-card__desc {
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
}

.sp-grid--list .sp-card--grid .sp-card__cta {
    width: 100%;
    margin-top: 0.45rem;
}

/* ——— شريط الثقة ——— */
.sp-trust {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.14);
    background: rgba(22, 23, 45, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@media (min-width: 640px) {
    .sp-trust {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.sp-trust__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 0.35rem;
}

.sp-trust__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.22);
}

@media (prefers-reduced-motion: reduce) {
    .sp-card,
    .sp-hero-slide,
    .sp-hero-slide__cta,
    .sp-filter-trigger,
    .sp-sidebar {
        transition: none !important;
    }

    .sp-card:hover {
        transform: none;
    }
}
