/**
 * =====================================================
 * XPZone Store Styles v2.0 Clean
 * =====================================================
 *
 * - تنسيقات صفحة المتجر فقط.
 * - الهيدر والإشعارات المشتركة موجودة في css/header.css.
 * - إزالة معاينة Hero القديمة وبطاقة هوية الهيدر القديمة.
 */

/**
 * =====================================================
 * XPZone Store Page v1.0
 * =====================================================
 */

:root {

    --background:
        #070d20;

    --background-soft:
        #0b1430;

    --surface:
        #101b3d;

    --surface-soft:
        #142149;

    --surface-hover:
        #192858;

    --border:
        rgba(120, 149, 255, 0.18);

    --border-strong:
        rgba(87, 223, 255, 0.42);

    --text:
        #f8fbff;

    --text-soft:
        #b5c1e2;

    --text-muted:
        #7f8bad;

    --cyan:
        #19ddff;

    --cyan-dark:
        #0aaac8;

    --purple:
        #8b5cf6;

    --purple-light:
        #a78bfa;

    --yellow:
        #ffd900;

    --green:
        #22c55e;

    --orange:
        #f59e0b;

    --red:
        #ef4444;

    --blue:
        #3b82f6;

    --shadow:
        0 24px 55px rgba(0, 0, 0, 0.28);

    --shadow-soft:
        0 14px 32px rgba(0, 0, 0, 0.2);

    --radius-large:
        24px;

    --radius-medium:
        16px;

    --radius-small:
        11px;

    --header-height:
        72px;

    --container-width:
        1320px;

}


/**
 * =====================================================
 * Reset
 * =====================================================
 */

*,
*::before,
*::after {

    box-sizing:
        border-box;

}


html {

    scroll-behavior:
        smooth;

    color-scheme:
        dark;

}


body {

    min-height:
        100vh;

    margin:
        0;

    color:
        var(--text);

    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(77, 74, 255, 0.17),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 18%,
            rgba(0, 220, 255, 0.13),
            transparent 28%
        ),
        var(--background);

    font-family:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;

    line-height:
        1.6;

}


body.dialog-open {

    overflow:
        hidden;

}


button,
input,
select {

    font:
        inherit;

}


button,
a,
select {

    -webkit-tap-highlight-color:
        transparent;

}


button {

    color:
        inherit;

}


a {

    color:
        inherit;

    text-decoration:
        none;

}


img {

    display:
        block;

    max-width:
        100%;

}


[hidden] {

    display:
        none !important;

}


/**
 * =====================================================
 * Accessibility
 * =====================================================
 */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.store-item-card:focus-visible {

    outline:
        3px solid rgba(25, 221, 255, 0.55);

    outline-offset:
        3px;

}

/**
 * =====================================================
 * Store Page
 * =====================================================
 */

.store-page {

    width:
        min(
            calc(100% - 36px),
            var(--container-width)
        );

    margin:
        0 auto;

    padding:
        38px 0 80px;

}

/**
 * =====================================================
 * Summary
 * =====================================================
 */

.store-summary {

    margin-top:
        24px;

    display:
        grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap:
        16px;

}


.summary-card {

    min-height:
        104px;

    padding:
        20px;

    display:
        flex;

    align-items:
        center;

    gap:
        15px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-medium);

    background:
        linear-gradient(
            145deg,
            rgba(20, 33, 73, 0.86),
            rgba(11, 20, 48, 0.86)
        );

    transition:
        0.2s ease;

}


.summary-card:hover {

    border-color:
        var(--border-strong);

    transform:
        translateY(-2px);

}


.summary-icon {

    width:
        52px;

    height:
        52px;

    flex-shrink:
        0;

    display:
        grid;

    place-items:
        center;

    border-radius:
        14px;

    background:
        rgba(25, 221, 255, 0.08);

    font-size:
        1.5rem;

}


.summary-card div {

    display:
        flex;

    flex-direction:
        column;

}


.summary-card strong {

    color:
        var(--text);

    font-size:
        1.55rem;

    line-height:
        1.1;

}


.summary-card span:not(.summary-icon) {

    margin-top:
        5px;

    color:
        var(--text-muted);

    font-size:
        0.85rem;

}


/**
 * =====================================================
 * Catalog
 * =====================================================
 */

.store-catalog {

    margin-top:
        58px;

}


.catalog-header {

    margin-bottom:
        20px;

    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        20px;

}


.catalog-header h2 {

    margin:
        0;

    font-size:
        clamp(1.7rem, 3vw, 2.45rem);

}


.results-count {

    margin:
        0;

    color:
        var(--text-muted);

    font-size:
        0.92rem;

}


/**
 * =====================================================
 * Filters
 * =====================================================
 */

.store-filters {

    padding:
        20px;

    display:
        grid;

    grid-template-columns:
        minmax(220px, 1.8fr)
        repeat(4, minmax(145px, 1fr))
        auto
        auto;

    align-items:
        end;

    gap:
        13px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-medium);

    background:
        rgba(15, 27, 62, 0.82);

    box-shadow:
        var(--shadow-soft);

}


.store-filters label {

    min-width:
        0;

    display:
        flex;

    flex-direction:
        column;

    gap:
        7px;

}


.store-filters label > span {

    color:
        var(--text-soft);

    font-size:
        0.78rem;

    font-weight:
        800;

}


.store-filters input,
.store-filters select {

    width:
        100%;

    height:
        45px;

    padding:
        0 13px;

    border:
        1px solid rgba(127, 139, 173, 0.24);

    border-radius:
        11px;

    color:
        var(--text);

    background:
        rgba(7, 13, 32, 0.76);

    transition:
        border-color 0.2s ease,
        background 0.2s ease;

}


.store-filters input:hover,
.store-filters select:hover {

    border-color:
        rgba(25, 221, 255, 0.32);

}


.store-filters input:focus,
.store-filters select:focus {

    border-color:
        var(--cyan);

    background:
        rgba(7, 13, 32, 0.96);

}


.store-filters input::placeholder {

    color:
        #667292;

}


.store-filters select option {

    color:
        var(--text);

    background:
        var(--background-soft);

}


.input-wrapper {

    position:
        relative;

}


.input-wrapper > span {

    position:
        absolute;

    z-index:
        2;

    top:
        50%;

    right:
        13px;

    transform:
        translateY(-50%);

    pointer-events:
        none;

    opacity:
        0.7;

}


.input-wrapper input {

    padding-right:
        42px;

}


.checkbox-filter {

    min-height:
        45px;

    padding:
        0 12px;

    flex-direction:
        row !important;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid rgba(127, 139, 173, 0.24);

    border-radius:
        11px;

    background:
        rgba(7, 13, 32, 0.76);

    cursor:
        pointer;

}


.checkbox-filter input {

    width:
        17px;

    height:
        17px;

    accent-color:
        var(--cyan);

}


.checkbox-filter span {

    white-space:
        nowrap;

}


.reset-filters-button {

    min-height:
        45px;

    padding:
        9px 15px;

    border:
        1px solid rgba(139, 92, 246, 0.35);

    border-radius:
        11px;

    color:
        #dfd3ff;

    background:
        rgba(139, 92, 246, 0.09);

    font-weight:
        800;

    cursor:
        pointer;

    transition:
        0.2s ease;

}


.reset-filters-button:hover {

    border-color:
        rgba(139, 92, 246, 0.7);

    background:
        rgba(139, 92, 246, 0.17);

}


/**
 * =====================================================
 * States
 * =====================================================
 */

.store-loading,
.store-empty-state,
.store-error-state {

    min-height:
        280px;

    margin-top:
        20px;

    padding:
        40px 20px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px dashed var(--border);

    border-radius:
        var(--radius-medium);

    color:
        var(--text-soft);

    text-align:
        center;

    background:
        rgba(15, 27, 62, 0.45);

}


.loading-spinner {

    width:
        44px;

    height:
        44px;

    border:
        4px solid rgba(25, 221, 255, 0.15);

    border-top-color:
        var(--cyan);

    border-radius:
        50%;

    animation:
        store-spin 0.8s linear infinite;

}


.store-loading p {

    margin:
        16px 0 0;

}


.empty-state-icon,
.error-state-icon {

    font-size:
        3rem;

}


.store-empty-state h3,
.store-error-state h3 {

    margin:
        12px 0 5px;

    color:
        var(--text);

    font-size:
        1.4rem;

}


.store-empty-state p,
.store-error-state p {

    margin:
        0;

}


.store-empty-state button,
.store-error-state button {

    min-height:
        43px;

    margin-top:
        20px;

    padding:
        8px 18px;

    border:
        1px solid rgba(25, 221, 255, 0.4);

    border-radius:
        11px;

    color:
        var(--cyan);

    background:
        rgba(25, 221, 255, 0.08);

    font-weight:
        800;

    cursor:
        pointer;

}


@keyframes store-spin {

    to {

        transform:
            rotate(360deg);

    }

}


/**
 * =====================================================
 * Store Grid
 * =====================================================
 */

.store-items-grid {

    margin-top:
        22px;

    display:
        grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap:
        20px;

}


/**
 * =====================================================
 * Item Card
 * =====================================================
 */

.store-item-card {

    position:
        relative;

    min-width:
        0;

    overflow:
        hidden;

    border:
        1px solid var(--border);

    border-radius:
        19px;

    background:
        linear-gradient(
            155deg,
            rgba(20, 33, 73, 0.95),
            rgba(10, 18, 43, 0.98)
        );

    box-shadow:
        var(--shadow-soft);

    transition:
        border-color 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;

}


.store-item-card:hover {

    border-color:
        var(--border-strong);

    transform:
        translateY(-5px);

    box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.28);

}


.store-item-card[data-rarity="epic"] {

    border-color:
        rgba(139, 92, 246, 0.38);

}


.store-item-card[data-rarity="legendary"] {

    border-color:
        rgba(245, 158, 11, 0.42);

}


.store-item-card[data-rarity="mythic"] {

    border-color:
        rgba(236, 72, 153, 0.45);

}


.item-card-media {

    position:
        relative;

    min-height:
        225px;

    overflow:
        hidden;

    display:
        grid;

    place-items:
        center;

    background:
        radial-gradient(
            circle at center,
            rgba(25, 221, 255, 0.12),
            transparent 65%
        ),
        rgba(7, 13, 32, 0.64);

}


.item-card-media::after {

    content:
        "";

    position:
        absolute;

    right:
        0;

    bottom:
        0;

    left:
        0;

    height:
        72px;

    pointer-events:
        none;

    background:
        linear-gradient(
            to top,
            rgba(10, 18, 43, 0.96),
            transparent
        );

}


.item-preview {

    position:
        relative;

    z-index:
        2;

    width:
        150px;

    height:
        150px;

    display:
        grid;

    place-items:
        center;

}


.item-preview img {

    position:
        relative;

    z-index:
        3;

    width:
        100%;

    height:
        100%;

    object-fit:
        contain;

    filter:
        drop-shadow(
            0 15px 22px rgba(0, 0, 0, 0.3)
        );

}


.preview-base-avatar {

    position:
        absolute;

    z-index:
        1;

    width:
        110px;

    height:
        110px;

    display:
        none;

    place-items:
        center;

    border:
        2px solid rgba(25, 221, 255, 0.38);

    border-radius:
        50%;

    color:
        var(--cyan);

    background:
        linear-gradient(
            145deg,
            #1d326d,
            #0b1534
        );

    font-size:
        1.55rem;

    font-weight:
        900;

}


.item-preview.is-frame .preview-base-avatar {

    display:
        grid;

}


.item-preview.is-frame img {

    position:
        absolute;

    inset:
        0;

    z-index:
        3;

}


.item-preview.is-background {

    width:
        100%;

    height:
        225px;

}


.item-preview.is-background img {

    object-fit:
        cover;

}


.item-image-fallback {

    width:
        118px;

    height:
        118px;

    display:
        grid;

    place-items:
        center;

    border:
        1px solid rgba(25, 221, 255, 0.25);

    border-radius:
        28px;

    color:
        var(--cyan);

    background:
        linear-gradient(
            145deg,
            rgba(29, 50, 109, 0.86),
            rgba(11, 21, 52, 0.94)
        );

    font-size:
        1.7rem;

    font-weight:
        900;

    box-shadow:
        inset 0 0 25px rgba(25, 221, 255, 0.08);

}


.item-rarity,
.item-status-badge {

    position:
        absolute;

    z-index:
        6;

    top:
        14px;

    min-height:
        28px;

    padding:
        4px 10px;

    display:
        inline-flex;

    align-items:
        center;

    border:
        1px solid rgba(255, 255, 255, 0.1);

    border-radius:
        999px;

    background:
        rgba(5, 10, 27, 0.76);

    backdrop-filter:
        blur(10px);

    font-size:
        0.72rem;

    font-weight:
        900;

}


.item-rarity {

    right:
        14px;

}


.item-status-badge {

    left:
        14px;

    color:
        var(--text-soft);

}


.item-rarity[data-rarity="common"] {

    color:
        #cbd5e1;

}


.item-rarity[data-rarity="uncommon"] {

    color:
        #4ade80;

}


.item-rarity[data-rarity="rare"] {

    color:
        #60a5fa;

}


.item-rarity[data-rarity="epic"] {

    color:
        #c084fc;

}


.item-rarity[data-rarity="legendary"] {

    color:
        #fbbf24;

}


.item-rarity[data-rarity="mythic"] {

    color:
        #f472b6;

}


.item-rarity[data-rarity="exclusive"] {

    color:
        #fb7185;

}


.item-status-badge[data-status="owned"] {

    color:
        #86efac;

}


.item-status-badge[data-status="equipped"] {

    color:
        var(--cyan);

}


.item-status-badge[data-status="premium"] {

    color:
        #f9a8d4;

}


.item-card-body {

    padding:
        18px;

}


.item-heading {

    display:
        flex;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap:
        12px;

}


.item-heading h3 {

    margin:
        0;

    overflow:
        hidden;

    color:
        var(--text);

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        1.12rem;

}


.item-type {

    display:
        inline-block;

    margin-top:
        3px;

    color:
        var(--text-muted);

    font-size:
        0.78rem;

}


.item-details-button {

    width:
        34px;

    height:
        34px;

    flex-shrink:
        0;

    border:
        1px solid rgba(255, 255, 255, 0.1);

    border-radius:
        10px;

    background:
        rgba(255, 255, 255, 0.045);

    cursor:
        pointer;

    transition:
        0.2s ease;

}


.item-details-button:hover {

    border-color:
        rgba(25, 221, 255, 0.34);

    color:
        var(--cyan);

}


.item-description {

    min-height:
        48px;

    margin:
        14px 0 17px;

    display:
        -webkit-box;

    overflow:
        hidden;

    color:
        var(--text-soft);

    font-size:
        0.87rem;

    -webkit-box-orient:
        vertical;

    -webkit-line-clamp:
        2;

}


.item-card-footer {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

}


.item-price {

    color:
        var(--yellow);

    font-weight:
        900;

    white-space:
        nowrap;

}


.item-action-button {

    min-height:
        40px;

    min-width:
        105px;

    padding:
        8px 16px;

    border:
        1px solid rgba(25, 221, 255, 0.42);

    border-radius:
        11px;

    color:
        var(--cyan);

    background:
        rgba(25, 221, 255, 0.08);

    font-weight:
        900;

    cursor:
        pointer;

    transition:
        0.2s ease;

}


.item-action-button:hover:not(:disabled) {

    color:
        #00131a;

    background:
        var(--cyan);

    transform:
        translateY(-1px);

}


.item-action-button:disabled {

    border-color:
        rgba(127, 139, 173, 0.15);

    color:
        var(--text-muted);

    background:
        rgba(127, 139, 173, 0.07);

    cursor:
        not-allowed;

}


.item-action-button.is-equipped {

    border-color:
        rgba(34, 197, 94, 0.36);

    color:
        #86efac;

    background:
        rgba(34, 197, 94, 0.08);

}


.item-action-button.is-premium {

    border-color:
        rgba(236, 72, 153, 0.42);

    color:
        #f9a8d4;

    background:
        rgba(236, 72, 153, 0.08);

}


/**
 * =====================================================
 * Dialog
 * =====================================================
 */

.store-dialog {

    width:
        min(
            calc(100% - 30px),
            900px
        );

    max-height:
        calc(100vh - 40px);

    padding:
        0;

    overflow:
        auto;

    border:
        1px solid rgba(25, 221, 255, 0.25);

    border-radius:
        24px;

    color:
        var(--text);

    background:
        #0b1430;

    box-shadow:
        0 35px 90px rgba(0, 0, 0, 0.6);

}


.store-dialog::backdrop {

    background:
        rgba(1, 5, 17, 0.78);

    backdrop-filter:
        blur(8px);

}


.dialog-content {

    position:
        relative;

    min-height:
        510px;

    display:
        grid;

    grid-template-columns:
        minmax(280px, 0.9fr)
        minmax(320px, 1.1fr);

}


.dialog-close-button {

    position:
        absolute;

    z-index:
        8;

    top:
        16px;

    left:
        16px;

    width:
        40px;

    height:
        40px;

    border:
        1px solid rgba(255, 255, 255, 0.13);

    border-radius:
        50%;

    color:
        var(--text);

    background:
        rgba(5, 10, 27, 0.65);

    font-size:
        1.45rem;

    cursor:
        pointer;

}


.dialog-item-preview {

    position:
        relative;

    min-height:
        510px;

    overflow:
        hidden;

    display:
        grid;

    place-items:
        center;

    background:
        radial-gradient(
            circle,
            rgba(25, 221, 255, 0.15),
            transparent 62%
        ),
        #081027;

}


.dialog-item-preview img {

    position:
        relative;

    z-index:
        3;

    width:
        72%;

    max-height:
        390px;

    object-fit:
        contain;

    filter:
        drop-shadow(
            0 24px 35px rgba(0, 0, 0, 0.4)
        );

}


.dialog-preview-base {

    position:
        absolute;

    width:
        210px;

    height:
        210px;

    display:
        none;

    place-items:
        center;

    border:
        3px solid rgba(25, 221, 255, 0.4);

    border-radius:
        50%;

    color:
        var(--cyan);

    background:
        linear-gradient(
            145deg,
            #1d326d,
            #0b1534
        );

    font-size:
        2.7rem;

    font-weight:
        900;

}


.dialog-item-preview.is-frame .dialog-preview-base {

    display:
        grid;

}


.dialog-image-fallback {

    width:
        210px;

    height:
        210px;

    display:
        grid;

    place-items:
        center;

    border:
        1px solid rgba(25, 221, 255, 0.3);

    border-radius:
        42px;

    color:
        var(--cyan);

    background:
        linear-gradient(
            145deg,
            #1d326d,
            #0b1534
        );

    font-size:
        2.8rem;

    font-weight:
        900;

}


.dialog-item-information {

    padding:
        60px 42px 38px;

}


.dialog-labels {

    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;

}


.dialog-labels span {

    padding:
        5px 10px;

    border:
        1px solid var(--border);

    border-radius:
        999px;

    color:
        var(--text-soft);

    background:
        rgba(255, 255, 255, 0.035);

    font-size:
        0.76rem;

    font-weight:
        800;

}


.dialog-item-information h2 {

    margin:
        18px 0 8px;

    font-size:
        clamp(1.7rem, 4vw, 2.5rem);

}


.dialog-item-information > p {

    margin:
        0;

    color:
        var(--text-soft);

}


.dialog-item-details {

    margin:
        28px 0 0;

    display:
        grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        12px;

}


.dialog-item-details div {

    padding:
        14px;

    border:
        1px solid var(--border);

    border-radius:
        13px;

    background:
        rgba(255, 255, 255, 0.035);

}


.dialog-item-details dt {

    color:
        var(--text-muted);

    font-size:
        0.76rem;

}


.dialog-item-details dd {

    margin:
        4px 0 0;

    color:
        var(--text);

    font-weight:
        900;

}


.dialog-actions {

    margin-top:
        30px;

    display:
        grid;

    grid-template-columns:
        1fr 1.5fr;

    gap:
        12px;

}


.dialog-cancel-button,
.dialog-primary-button {

    min-height:
        48px;

    border-radius:
        12px;

    font-weight:
        900;

    cursor:
        pointer;

    transition:
        0.2s ease;

}


.dialog-cancel-button {

    border:
        1px solid rgba(255, 255, 255, 0.13);

    background:
        rgba(255, 255, 255, 0.045);

}


.dialog-primary-button {

    border:
        1px solid var(--cyan);

    color:
        #00131a;

    background:
        linear-gradient(
            135deg,
            var(--cyan),
            #72efff
        );

}


.dialog-primary-button:hover:not(:disabled) {

    transform:
        translateY(-2px);

}


.dialog-primary-button:disabled {

    border-color:
        rgba(127, 139, 173, 0.18);

    color:
        var(--text-muted);

    background:
        rgba(127, 139, 173, 0.09);

    cursor:
        not-allowed;

}


/**
 * =====================================================
 * Toasts
 * =====================================================
 */

.toast-container {

    position:
        fixed;

    z-index:
        300;

    right:
        22px;

    bottom:
        22px;

    width:
        min(360px, calc(100% - 44px));

    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;

    pointer-events:
        none;

}


.store-toast {

    padding:
        14px 16px;

    display:
        flex;

    align-items:
        flex-start;

    gap:
        10px;

    border:
        1px solid var(--border);

    border-radius:
        13px;

    background:
        rgba(11, 20, 48, 0.96);

    box-shadow:
        var(--shadow);

    animation:
        toast-in 0.25s ease;

    pointer-events:
        auto;

}


.store-toast.success {

    border-color:
        rgba(34, 197, 94, 0.45);

}


.store-toast.error {

    border-color:
        rgba(239, 68, 68, 0.45);

}


.store-toast.warning {

    border-color:
        rgba(245, 158, 11, 0.45);

}


.store-toast-message {

    flex:
        1;

    color:
        var(--text-soft);

    font-size:
        0.88rem;

}


.store-toast-close {

    border:
        0;

    color:
        var(--text-muted);

    background:
        transparent;

    cursor:
        pointer;

}


@keyframes toast-in {

    from {

        opacity:
            0;

        transform:
            translateY(12px);

    }

    to {

        opacity:
            1;

        transform:
            translateY(0);

    }

}


/**
 * =====================================================
 * Responsive
 * =====================================================
 */

@media (max-width: 1180px) {

    .store-filters {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }


    .search-field {

        grid-column:
            span 2;

    }


    .store-items-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

    }

}


@media (max-width: 900px) {

    


    


    


    


    


    


    


    .store-summary {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .store-filters {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .search-field {

        grid-column:
            1 / -1;

    }


    .store-items-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .dialog-content {

        grid-template-columns:
            1fr;

    }


    .dialog-item-preview {

        min-height:
            340px;

    }


    .dialog-item-information {

        padding:
            34px 28px;

    }

}


@media (max-width: 620px) {

    


    .store-page {

        padding-top:
            20px;

    }


    


    


    


    


    


    


    


    


    .store-summary {

        grid-template-columns:
            1fr;

    }


    .summary-card {

        min-height:
            88px;

    }


    .catalog-header {

        align-items:
            flex-start;

        flex-direction:
            column;

    }


    .store-filters {

        grid-template-columns:
            1fr;

        padding:
            15px;

    }


    .search-field {

        grid-column:
            auto;

    }


    .store-items-grid {

        grid-template-columns:
            1fr;

    }


    .item-card-media {

        min-height:
            245px;

    }


    .dialog-item-details {

        grid-template-columns:
            1fr;

    }


    .dialog-actions {

        grid-template-columns:
            1fr;

    }


    .dialog-item-preview {

        min-height:
            280px;

    }


    .dialog-item-information {

        padding:
            30px 20px;

    }


    .toast-container {

        right:
            11px;

        bottom:
            11px;

        width:
            calc(100% - 22px);

    }

}

/* =====================================================
 * قسم عناصر المتجر
 * ===================================================== */

.store-catalog {
    margin-top:
        22px;
}


/* إخفاء العنوان القديم في حال بقي في HTML */

.catalog-header {
    display:
        none;
}


/* =====================================================
 * عنوان عناصر المتجر داخل شريط التصفية
 * ===================================================== */

.filters-heading {
    min-width:
        120px;

    align-self:
        center;
}


.filters-heading h2 {
    margin:
        0;

    color:
        var(--text);

    font-size:
        1.05rem;

    line-height:
        1.25;
}


.filters-heading .results-count {
    margin-top:
        3px;

    font-size:
        0.7rem;
}


/* =====================================================
 * شريط التصفية المصغّر
 * ===================================================== */

.store-filters {
    padding:
        13px;

    grid-template-columns:
        minmax(115px, auto)
        minmax(200px, 1.6fr)
        repeat(4, minmax(120px, 1fr))
        auto
        auto;

    gap:
        9px;

    border-radius:
        14px;
}


.store-filters label {
    gap:
        4px;
}


.store-filters label > span {
    font-size:
        0.69rem;
}


.store-filters input,
.store-filters select {
    height:
        40px;

    padding:
        0 10px;

    border-radius:
        9px;

    font-size:
        0.78rem;
}


.input-wrapper input {
    padding-right:
        37px;
}


.input-wrapper > span {
    right:
        11px;
}


.checkbox-filter {
    min-height:
        40px;

    padding:
        0 9px;

    border-radius:
        9px;
}


.checkbox-filter input {
    width:
        15px;

    height:
        15px;
}


.reset-filters-button {
    min-height:
        40px;

    padding:
        7px 12px;

    border-radius:
        9px;

    font-size:
        0.76rem;
}


/* =====================================================
 * شبكة العناصر المصغرة
 * ===================================================== */

.store-items-grid {
    margin-top:
        15px;

    gap:
        16px;
}


.item-card-media {
    min-height:
        175px;
}


.item-preview {
    width:
        122px;

    height:
        122px;
}


.preview-base-avatar {
    width:
        90px;

    height:
        90px;

    font-size:
        1.25rem;
}


.item-preview.is-background {
    height:
        175px;
}


.item-image-fallback {
    width:
        94px;

    height:
        94px;

    border-radius:
        22px;

    font-size:
        1.35rem;
}


.item-rarity,
.item-status-badge {
    top:
        10px;

    min-height:
        24px;

    padding:
        3px 8px;

    font-size:
        0.65rem;
}


.item-rarity {
    right:
        10px;
}


.item-status-badge {
    left:
        10px;
}


.item-card-body {
    padding:
        14px;
}


.item-heading h3 {
    font-size:
        1rem;
}


.item-description {
    min-height:
        40px;

    margin:
        10px 0 13px;

    font-size:
        0.8rem;
}


.item-action-button {
    min-height:
        37px;

    min-width:
        95px;

    padding:
        7px 12px;

    font-size:
        0.78rem;
}


/* =====================================================
 * الشاشات المتوسطة
 * ===================================================== */

@media (max-width: 1100px) {

    


    


    .store-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .store-filters {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .filters-heading {
        grid-column:
            1 / -1;
    }


    .search-field {
        grid-column:
            span 2;
    }

}


/* =====================================================
 * الجوال
 * ===================================================== */

@media (max-width: 700px) {

    


    


    .store-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .store-filters {
        grid-template-columns:
            1fr;
    }


    .filters-heading,
    .search-field {
        grid-column:
            auto;
    }

}


/* =====================================================
 * Store Sections v1
 * ===================================================== */

.store-section-description {
    max-width: 720px;
    margin: 5px 0 0;

    color: var(--text-muted);

    font-size: 0.84rem;
    line-height: 1.65;
}


.store-section-tabs {
    margin-bottom: 12px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 9px;
}


.store-section-button {
    min-width: 0;
    min-height: 76px;

    padding: 12px 13px;

    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;

    gap: 11px;

    border: 1px solid rgba(127, 139, 173, 0.18);
    border-radius: 14px;

    color: var(--text-soft);

    background:
        linear-gradient(
            145deg,
            rgba(19, 33, 71, 0.88),
            rgba(7, 15, 37, 0.94)
        );

    font-family: inherit;
    text-align: start;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}


.store-section-button:hover,
.store-section-button:focus-visible {
    color: #ffffff;
    border-color: rgba(25, 221, 255, 0.48);
    transform: translateY(-1px);
}


.store-section-button.active {
    color: #ffffff;
    border-color: rgba(25, 221, 255, 0.68);
    background:
        linear-gradient(
            145deg,
            rgba(9, 73, 100, 0.54),
            rgba(12, 29, 65, 0.98)
        );
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.2),
        inset 0 0 22px rgba(25, 221, 255, 0.08);
}


.store-section-button[data-store-section="games"].active {
    border-color: rgba(139, 92, 246, 0.72);
    background:
        linear-gradient(
            145deg,
            rgba(74, 38, 134, 0.48),
            rgba(13, 24, 59, 0.98)
        );
}


.store-section-button[data-store-section="themes"].active {
    border-color: rgba(250, 204, 21, 0.66);
    background:
        linear-gradient(
            145deg,
            rgba(98, 73, 15, 0.42),
            rgba(20, 26, 57, 0.98)
        );
}


.store-section-icon {
    width: 42px;
    aspect-ratio: 1;

    display: grid;
    place-items: center;

    border: 1px solid rgba(25, 221, 255, 0.3);
    border-radius: 12px;

    color: #67e8f9;
    background: rgba(25, 221, 255, 0.08);

    font-size: 1.15rem;
}


.store-section-button[data-store-section="games"] .store-section-icon {
    border-color: rgba(139, 92, 246, 0.38);
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.1);
}


.store-section-button[data-store-section="themes"] .store-section-icon {
    border-color: rgba(250, 204, 21, 0.34);
    color: #fde68a;
    background: rgba(250, 204, 21, 0.08);
}


.store-section-button strong,
.store-section-button small {
    display: block;
}


.store-section-button strong {
    font-size: 0.9rem;
    line-height: 1.45;
}


.store-section-button small {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.7rem;
    line-height: 1.45;
}


.store-category-tabs[hidden] {
    display: none !important;
}


@media (max-width: 700px) {

    .store-catalog-controls .filters-heading {
        align-items: start;
    }


    .store-section-tabs {
        margin-inline: -1px;

        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(210px, 76vw);

        overflow-x: auto;
        scroll-snap-type: inline mandatory;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }


    .store-section-tabs::-webkit-scrollbar {
        display: none;
    }


    .store-section-button {
        min-height: 70px;
        scroll-snap-align: start;
    }

}


@media (prefers-reduced-motion: reduce) {

    .store-section-button {
        transition: none;
    }

}


/* =====================================================
   Game Store Directory
===================================================== */

.store-game-browser {
    grid-column: 1 / -1;
    min-width: 0;
}


.store-game-directory,
.store-game-selection {
    min-width: 0;
}


.store-game-directory-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 14px;
}


.store-game-kicker {
    display: inline-block;
    margin-bottom: 4px;

    color: var(--cyan, #19ddff);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


.store-game-directory-heading h3,
.store-selected-game-summary h3 {
    margin: 0;
    color: var(--text, #f8fafc);
}


.store-game-directory-heading p,
.store-selected-game-summary p {
    margin: 5px 0 0;
    color: var(--muted, #94a3b8);
    font-size: 0.84rem;
}


.store-game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}


.store-game-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;

    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: #071226;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);

    color: var(--text, #f8fafc);
    text-align: start;
    cursor: pointer;

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}


.store-game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            transparent 22%,
            rgba(2, 6, 23, 0.92) 100%
        );
}


.store-game-card:hover,
.store-game-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(25, 221, 255, 0.72);
    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(25, 221, 255, 0.1);
}


.store-game-card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transition: transform 300ms ease;
}


.store-game-card:hover .store-game-card-image,
.store-game-card:focus-visible .store-game-card-image {
    transform: scale(1.045);
}


.store-game-card-overlay {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 2;

    display: grid;
    gap: 7px;
    padding: 34px 14px 13px;
}


.store-game-card-overlay > strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.store-game-card-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


.store-game-card-summary span {
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #dbeafe;
    font-size: 0.66rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}


.store-game-selection {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px 18px;

    padding: 14px;
    border: 1px solid rgba(25, 221, 255, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(25, 221, 255, 0.055), transparent 54%),
        rgba(7, 18, 38, 0.7);
}


.store-game-back-button {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 48px;
    padding: 0 13px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.74);
    color: #dbeafe;
    font-weight: 800;
    cursor: pointer;
}


[dir="ltr"] .store-game-back-button > span:first-child {
    transform: rotate(180deg);
}


.store-game-back-button:hover,
.store-game-back-button:focus-visible {
    border-color: rgba(25, 221, 255, 0.62);
    color: var(--cyan, #19ddff);
}


.store-selected-game-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
}


.store-selected-game-image {
    width: 112px;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: #020617;
}


.store-game-content-tabs {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding: 3px 1px 2px;
    scrollbar-width: thin;
    scroll-snap-type: inline proximity;
}


.store-game-content-tab {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: var(--muted, #94a3b8);
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
}


.store-game-content-tab strong {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #dbeafe;
    font-size: 0.68rem;
    text-align: center;
}


.store-game-content-tab:hover,
.store-game-content-tab:focus-visible,
.store-game-content-tab.active {
    border-color: rgba(25, 221, 255, 0.58);
    background: rgba(8, 145, 178, 0.16);
    color: var(--cyan, #19ddff);
}


.item-game-badge {
    display: inline-flex;
    max-width: 100%;
    margin-top: 5px;
    padding: 3px 7px;
    overflow: hidden;

    border: 1px solid rgba(25, 221, 255, 0.18);
    border-radius: 999px;
    background: rgba(25, 221, 255, 0.07);
    color: #8beeff;

    font-size: 0.63rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.item-game-badge[hidden] {
    display: none;
}


@media (max-width: 1050px) {

    .store-game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    .store-game-grid {
        grid-auto-flow: column;
        grid-auto-columns: minmax(235px, 78vw);
        grid-template-columns: none;
        overflow-x: auto;
        padding: 2px 2px 10px;
        scroll-snap-type: inline mandatory;
    }

    .store-game-card {
        scroll-snap-align: center;
    }

    .store-game-selection {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .store-game-back-button {
        justify-self: start;
        min-height: 42px;
    }

    .store-selected-game-summary {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .store-selected-game-image {
        width: 92px;
    }

    .store-game-content-tabs {
        grid-column: 1;
    }

}


@media (max-width: 470px) {

    .store-game-directory-heading p {
        font-size: 0.78rem;
    }

    .store-game-grid {
        grid-auto-columns: minmax(220px, 86vw);
    }

}


@media (prefers-reduced-motion: reduce) {

    .store-game-card,
    .store-game-card-image {
        transition: none !important;
    }

}

.confirmation-dialog {
    position: fixed;

    inset: 0;

    width: min(92vw, 430px);
    max-width: 430px;

    height: fit-content;
    max-height: calc(100dvh - 24px);

    margin: auto;

    padding: 0;
    border: none;
    border-radius: 22px;

    background: transparent;
    color: #f8fafc;

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior: contain;
}.confirmation-dialog::backdrop {
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}.confirmation-dialog[open] {
    animation:
        confirmation-dialog-show
        0.22s ease-out;
}.confirmation-dialog-card {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    padding: 34px 28px 26px;

    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at top,
            rgba(30, 64, 175, 0.22),
            transparent 48%
        ),
        linear-gradient(
            145deg,
            #111c3d,
            #081329
        );

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55),
        0 0 35px rgba(34, 211, 238, 0.08);

    text-align: center;
    direction: rtl;
}.confirmation-dialog-close {
    position: absolute;
    top: 14px;
    left: 14px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;

    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}.confirmation-dialog-close:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(248, 113, 113, 0.45);
    color: #fecaca;
    transform: scale(1.06);
}.confirmation-dialog-icon {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(220, 38, 38, 0.24),
            rgba(127, 29, 29, 0.12)
        );

    box-shadow:
        0 12px 30px rgba(127, 29, 29, 0.22),
        inset 0 0 18px rgba(248, 113, 113, 0.08);

    font-size: 34px;
}.confirmation-dialog-content {
    width: 100%;
}.confirmation-dialog-content h2 {
    margin: 0 0 10px;

    color: #f8fafc;

    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
}.confirmation-dialog-content p {
    margin: 0;

    color: #94a3b8;

    font-size: 15px;
    line-height: 1.8;
}.confirmation-notification-title {
    display: block;

    max-width: 100%;
    margin-top: 14px;
    padding: 10px 14px;

    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 12px;

    background: rgba(15, 23, 42, 0.56);
    color: #67e8f9;

    font-size: 14px;
    font-weight: 700;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}.confirmation-dialog-actions {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    margin-top: 26px;
}.confirmation-button {
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;
    border-radius: 12px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}.confirmation-button.secondary {
    border: 1px solid rgba(148, 163, 184, 0.25);

    background: rgba(30, 41, 59, 0.72);
    color: #e2e8f0;
}.confirmation-button.secondary:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(148, 163, 184, 0.45);
    transform: translateY(-1px);
}.confirmation-button.danger {
    border: 1px solid rgba(248, 113, 113, 0.42);

    background:
        linear-gradient(
            135deg,
            #dc2626,
            #991b1b
        );

    color: #ffffff;

    box-shadow:
        0 10px 24px rgba(220, 38, 38, 0.22);
}.confirmation-button.danger:hover {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #b91c1c
        );

    border-color: rgba(254, 202, 202, 0.62);

    transform: translateY(-1px);

    box-shadow:
        0 14px 28px rgba(220, 38, 38, 0.3);
}.confirmation-button:focus-visible,
.confirmation-dialog-close:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 3px;
}.confirmation-button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}@keyframes confirmation-dialog-show {

    from {
        opacity: 0;
        transform:
            translateY(18px)
            scale(0.96);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }

}@media (max-width: 480px) {.confirmation-dialog-card {
        padding:
            32px
            20px
            22px;
    }.confirmation-dialog-actions {
        grid-template-columns: 1fr;
    }.confirmation-dialog-content h2 {
        font-size: 21px;
    }}

/**
 * =====================================================
 * XPZone Store Player Card v1.0
 * =====================================================
 *
 * - مقدمة المتجر بجانب بطاقة اللاعب.
 * - عرض الخلفية والأفاتار والإطار.
 * - عرض اللقب والشارة والرتبة والمستوى.
 * - عرض XP والرصيد.
 * - متوافق مع playerProfileCardUI.js.
 */


/* =====================================================
 * Store Hero Layout
 * ===================================================== */

.store-hero {
    position:
        relative;

    min-height:
        390px;

    padding:
        28px;

    display:
        grid;

    grid-template-columns:
        minmax(260px, 0.76fr)
        minmax(0, 1.24fr);

    align-items:
        stretch;

    gap:
        24px;

    overflow:
        hidden;

    border:
        1px solid rgba(25, 221, 255, 0.14);

    border-radius:
        24px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(25, 221, 255, 0.09),
            transparent 32%
        ),
        radial-gradient(
            circle at 8% 90%,
            rgba(139, 92, 246, 0.12),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(15, 27, 62, 0.96),
            rgba(7, 13, 32, 0.98)
        );

    box-shadow:
        0 24px 58px rgba(0, 0, 0, 0.35);
}


/* =====================================================
 * Store Introduction
 * ===================================================== */

.store-hero-content {
    min-width:
        0;

    padding:
        16px 8px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        flex-start;

    justify-content:
        center;
}


.store-hero-content .section-label {
    margin:
        0 0 8px;

    color:
        var(--cyan);

    font-size:
        0.7rem;

    font-weight:
        900;

    letter-spacing:
        1.5px;

    text-transform:
        uppercase;
}


.store-hero-content h1 {
    max-width:
        470px;

    margin:
        0;

    color:
        var(--text);

    font-size:
        clamp(
            1.8rem,
            3.6vw,
            3rem
        );

    font-weight:
        950;

    line-height:
        1.18;

    background:
        linear-gradient(
            45deg,
            #ffffff,
            var(--cyan)
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    -webkit-text-fill-color:
        transparent;
}


.store-hero-content > p:not(.section-label) {
    max-width:
        520px;

    margin:
        15px 0 0;

    color:
        var(--text-soft);

    font-size:
        0.94rem;

    line-height:
        1.9;
}


.hero-actions {
    margin-top:
        22px;

    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        10px;
}


.primary-link,
.secondary-button {
    min-height:
        43px;

    padding:
        9px 17px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        11px;

    font-size:
        0.78rem;

    font-weight:
        850;

    text-decoration:
        none;

    cursor:
        pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.primary-link {
    border:
        1px solid var(--cyan);

    color:
        #071126;

    background:
        var(--cyan);
}


.primary-link:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 0 22px rgba(25, 221, 255, 0.26);
}


.secondary-button {
    border:
        1px solid rgba(139, 92, 246, 0.4);

    color:
        #ddd6fe;

    background:
        rgba(139, 92, 246, 0.11);
}


.secondary-button:hover {
    border-color:
        rgba(139, 92, 246, 0.75);

    background:
        rgba(139, 92, 246, 0.2);

    transform:
        translateY(-2px);
}


.store-hero-message {
    max-width:
        500px;

    margin-top:
        22px;

    padding:
        12px 14px;

    display:
        flex;

    align-items:
        flex-start;

    gap:
        10px;

    border:
        1px solid rgba(25, 221, 255, 0.13);

    border-radius:
        12px;

    background:
        rgba(25, 221, 255, 0.045);
}


.store-hero-message > span {
    flex-shrink:
        0;

    font-size:
        1rem;
}


.store-hero-message p {
    margin:
        0;

    color:
        var(--text-soft);

    font-size:
        0.71rem;

    line-height:
        1.7;
}


/* =====================================================
 * Player Card
 * ===================================================== */

.store-player-card {
    position:
        relative;

    min-width:
        0;

    min-height:
        330px;

    overflow:
        hidden;

    isolation:
        isolate;

    border:
        1px solid rgba(25, 221, 255, 0.2);

    border-radius:
        21px;

    background:
        radial-gradient(
            circle at 85% 12%,
            rgba(25, 221, 255, 0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 12% 92%,
            rgba(139, 92, 246, 0.2),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #142149,
            #071126
        );

    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.4);

    transition:
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.store-player-card::before {
    content:
        "";

    position:
        absolute;

    z-index:
        5;

    top:
        0;

    right:
        0;

    left:
        0;

    height:
        4px;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan),
            #fbbf24
        );
}


.store-player-card:hover {
    border-color:
        rgba(25, 221, 255, 0.42);

    transform:
        translateY(-3px);

    box-shadow:
        0 25px 58px rgba(0, 0, 0, 0.48),
        0 0 28px rgba(25, 221, 255, 0.07);
}


/* =====================================================
 * Background
 * ===================================================== */

.store-player-background {
    position:
        absolute;

    z-index:
        -3;

    inset:
        0;

    background-position:
        center;

    background-repeat:
        no-repeat;

    background-size:
        cover;

    transform:
        scale(1.02);

    transition:
        opacity 0.3s ease,
        transform 0.55s ease;
}


.store-player-background[data-has-image="false"] {
    opacity:
        0;
}


.store-player-card:hover
.store-player-background {
    transform:
        scale(1.055);
}


.store-player-overlay {
    position:
        absolute;

    z-index:
        -2;

    inset:
        0;

    background:
        linear-gradient(
            90deg,
            rgba(5, 12, 30, 0.96) 0%,
            rgba(5, 12, 30, 0.78) 48%,
            rgba(5, 12, 30, 0.4) 100%
        ),
        linear-gradient(
            180deg,
            rgba(7, 17, 38, 0.1),
            rgba(7, 17, 38, 0.88)
        );
}


/* =====================================================
 * Card Content
 * ===================================================== */

.store-player-card-content {
    min-height:
        330px;

    padding:
        21px 23px;

    display:
        grid;

    grid-template-rows:
        auto
        1fr
        auto;

    gap:
        19px;
}


/* =====================================================
 * Card Header
 * ===================================================== */

.store-player-card-header {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        14px;
}


.store-player-card-header > div {
    min-width:
        0;
}


.store-player-card-kicker {
    display:
        block;

    color:
        rgba(248, 250, 252, 0.58);

    font-size:
        0.55rem;

    font-weight:
        900;

    letter-spacing:
        1.3px;
}


.store-player-card-header strong {
    display:
        block;

    margin-top:
        3px;

    color:
        var(--text);

    font-size:
        0.8rem;
}


.store-player-profile-link {
    min-height:
        34px;

    padding:
        6px 10px;

    display:
        inline-flex;

    align-items:
        center;

    gap:
        7px;

    flex-shrink:
        0;

    border:
        1px solid rgba(25, 221, 255, 0.2);

    border-radius:
        9px;

    color:
        var(--cyan);

    background:
        rgba(25, 221, 255, 0.07);

    font-size:
        0.65rem;

    font-weight:
        850;

    text-decoration:
        none;
}


.store-player-profile-link:hover {
    border-color:
        rgba(25, 221, 255, 0.5);

    background:
        rgba(25, 221, 255, 0.13);
}


/* =====================================================
 * Player Main
 * ===================================================== */

.store-player-card-main {
    display:
        flex;

    align-items:
        center;

    gap:
        clamp(
            18px,
            3vw,
            31px
        );
}


.store-player-avatar-shell {
    position:
        relative;

    width:
        clamp(
            112px,
            13vw,
            148px
        );

    height:
        clamp(
            112px,
            13vw,
            148px
        );

    flex-shrink:
        0;

    display:
        grid;

    place-items:
        center;
}


.store-player-avatar-base {
    position:
        relative;

    width:
        76%;

    height:
        76%;

    overflow:
        hidden;

    display:
        grid;

    place-items:
        center;

    border:
        3px solid rgba(25, 221, 255, 0.62);

    border-radius:
        27%;

    background:
        linear-gradient(
            145deg,
            #18295d,
            #0b1535
        );

    box-shadow:
        0 15px 34px rgba(0, 0, 0, 0.44),
        0 0 24px rgba(25, 221, 255, 0.12);
}


.store-player-avatar-image {
    width:
        100%;

    height:
        100%;

    display:
        block;

    object-fit:
        cover;
}


.store-player-avatar-fallback {
    color:
        var(--cyan);

    font-size:
        clamp(
            1.8rem,
            4vw,
            2.7rem
        );

    font-weight:
        950;
}


.store-player-avatar-frame {
    position:
        absolute;

    z-index:
        3;

    inset:
        0;

    width:
        100%;

    height:
        100%;

    object-fit:
        contain;

    pointer-events:
        none;

    filter:
        drop-shadow(
            0 9px 19px rgba(0, 0, 0, 0.42)
        );
}


.store-player-avatar-image[hidden],
.store-player-avatar-frame[hidden],
.store-player-badge[hidden],
.store-player-badge img[hidden] {
    display:
        none !important;
}


/* =====================================================
 * Identity
 * ===================================================== */

.store-player-identity {
    min-width:
        0;

    flex:
        1;
}


.store-player-name-row {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;
}


.store-player-name-row h2 {
    min-width:
        0;

    overflow:
        hidden;

    color:
        var(--text);

    font-size:
        clamp(
            1.65rem,
            4vw,
            2.65rem
        );

    font-weight:
        950;

    line-height:
        1.15;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    text-shadow:
        0 6px 22px rgba(0, 0, 0, 0.55);
}


.store-player-badge {
    width:
        37px;

    height:
        37px;

    flex-shrink:
        0;

    overflow:
        hidden;

    display:
        grid;

    place-items:
        center;

    border:
        1px solid rgba(245, 158, 11, 0.28);

    border-radius:
        10px;

    color:
        #fbbf24;

    background:
        rgba(245, 158, 11, 0.08);
}


.store-player-badge img {
    width:
        100%;

    height:
        100%;

    object-fit:
        contain;
}


.store-player-title {
    margin:
        7px 0 0;

    color:
        rgba(248, 250, 252, 0.72);

    font-size:
        0.8rem;

    font-weight:
        700;
}


.store-player-tags {
    margin-top:
        13px;

    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        8px;
}


.store-player-rank,
.store-player-level {
    min-height:
        27px;

    padding:
        4px 10px;

    display:
        inline-flex;

    align-items:
        center;

    border-radius:
        8px;

    font-size:
        0.6rem;

    font-weight:
        900;
}


.store-player-rank {
    border:
        1px solid rgba(139, 92, 246, 0.34);

    color:
        #c4b5fd;

    background:
        rgba(139, 92, 246, 0.14);
}


.store-player-level {
    border:
        1px solid rgba(25, 221, 255, 0.28);

    color:
        var(--cyan);

    background:
        rgba(25, 221, 255, 0.09);
}


/* =====================================================
 * Card Footer
 * ===================================================== */

.store-player-card-footer {
    display:
        grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items:
        end;

    gap:
        16px;
}


.store-player-progress {
    min-width:
        0;
}


.store-player-progress-header {
    margin-bottom:
        7px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

    color:
        rgba(248, 250, 252, 0.67);

    font-size:
        0.62rem;
}


.store-player-progress-header strong {
    direction:
        ltr;

    color:
        var(--text);

    font-size:
        0.61rem;

    unicode-bidi:
        isolate;
}


.store-player-progress-track {
    height:
        10px;

    overflow:
        hidden;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius:
        999px;

    background:
        rgba(5, 12, 30, 0.72);

    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.34);
}


.store-player-progress-fill {
    width:
        0%;

    height:
        100%;

    display:
        block;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan)
        );

    box-shadow:
        0 0 13px rgba(25, 221, 255, 0.36);

    transition:
        width 0.75s ease;
}


.store-player-balance {
    min-width:
        105px;

    padding:
        8px 12px;

    border:
        1px solid rgba(245, 158, 11, 0.2);

    border-radius:
        11px;

    text-align:
        center;

    background:
        rgba(7, 17, 38, 0.58);
}


.store-player-balance > span {
    display:
        block;

    color:
        var(--text-soft);

    font-size:
        0.52rem;
}


.store-player-balance > div {
    margin-top:
        2px;

    display:
        flex;

    align-items:
        baseline;

    justify-content:
        center;

    gap:
        4px;

    direction:
        ltr;
}


.store-player-balance strong {
    color:
        #fbbf24;

    font-size:
        1.15rem;

    font-weight:
        950;
}


.store-player-balance small {
    color:
        rgba(245, 158, 11, 0.72);

    font-size:
        0.56rem;

    font-weight:
        900;
}


/* =====================================================
 * Card Rarity
 * ===================================================== */

.store-player-card[data-theme-rarity="rare"] {
    border-color:
        rgba(96, 165, 250, 0.38);
}


.store-player-card[data-theme-rarity="epic"] {
    border-color:
        rgba(192, 132, 252, 0.42);
}


.store-player-card[data-theme-rarity="legendary"] {
    border-color:
        rgba(245, 158, 11, 0.48);

    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(245, 158, 11, 0.08);
}


/* =====================================================
 * Store Summary
 * ===================================================== */

.store-summary {
    margin-top:
        20px;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap:
        12px;
}


.summary-card {
    min-height:
        76px;

    padding:
        11px 13px;

    border-radius:
        13px;
}


/* =====================================================
 * Responsive
 * ===================================================== */

@media (max-width: 1050px) {

    .store-hero {
        grid-template-columns:
            minmax(235px, 0.7fr)
            minmax(0, 1.3fr);

        padding:
            23px;
    }


    .store-player-card-content {
        padding:
            20px;
    }

}


@media (max-width: 850px) {

    .store-hero {
        grid-template-columns:
            1fr;
    }


    .store-hero-content {
        padding:
            6px 3px;
    }


    .store-player-card {
        min-height:
            320px;
    }


    .store-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 620px) {

    .store-hero {
        padding:
            18px;

        border-radius:
            18px;
    }


    .store-player-card,
    .store-player-card-content {
        min-height:
            0;
    }


    .store-player-card-content {
        padding:
            18px;
    }


    .store-player-card-main {
        flex-direction:
            column;

        text-align:
            center;
    }


    .store-player-name-row,
    .store-player-tags {
        justify-content:
            center;
    }


    .store-player-card-footer {
        grid-template-columns:
            1fr;
    }


    .store-player-balance {
        width:
            100%;
    }

}


@media (max-width: 460px) {

    .hero-actions {
        display:
            grid;

        grid-template-columns:
            1fr;

        width:
            100%;
    }


    .primary-link,
    .secondary-button {
        width:
            100%;
    }


    .store-player-card-header {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .store-player-profile-link {
        width:
            100%;

        justify-content:
            center;
    }


    .store-player-name-row h2 {
        max-width:
            225px;

        font-size:
            1.65rem;
    }


    .store-player-progress-header {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap:
            4px;
    }


    .store-summary {
        grid-template-columns:
            1fr;
    }

}

/**
 * =====================================================
 * Reduced Motion
 * =====================================================
 */

html[dir="ltr"] .confirmation-dialog-card {
    direction: ltr;
}

html[dir="ltr"] .confirmation-dialog-close {
    right: 14px;
    left: auto;
}

html[dir="ltr"] .store-player-profile-link > span:last-child {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior:
            auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;

    }

}


/* =====================================================
 * معاينات الألقاب والشارات
 * ===================================================== */

.item-preview.is-title {
    width: min(260px, calc(100% - 24px));
    height: 126px;
}


.item-preview.is-title .item-image-fallback {
    position: relative;
    width: 100%;
    min-height: 78px;
    height: auto;
    padding: 28px 18px 15px;
    border: 1px solid rgba(25, 221, 255, 0.5);
    border-radius: 16px;
    color: #f8fbff;
    background:
        linear-gradient(135deg, rgba(25, 221, 255, 0.15), transparent 45%),
        linear-gradient(145deg, #17275a, #09122e);
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.35;
    text-align: center;
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.35),
        inset 0 0 24px rgba(25, 221, 255, 0.08);
}


.item-preview.is-title .item-image-fallback::before,
.dialog-item-preview.is-title .dialog-image-fallback::before {
    content: "XPZONE TITLE";
    position: absolute;
    top: 10px;
    right: 0;
    left: 0;
    color: var(--cyan);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    opacity: 0.9;
}


.item-preview.is-badge .item-image-fallback,
.item-preview.is-badge img {
    width: 106px;
    height: 106px;
    border-radius: 50%;
}


.item-preview.is-badge .item-image-fallback {
    position: relative;
    border: 3px solid rgba(25, 221, 255, 0.62);
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.2), transparent 23%),
        linear-gradient(145deg, #203979, #09122d);
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    box-shadow:
        0 0 0 7px rgba(25, 221, 255, 0.08),
        0 0 30px rgba(25, 221, 255, 0.24),
        inset 0 0 24px rgba(25, 221, 255, 0.18);
}


.item-preview.is-badge .item-image-fallback::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: inherit;
}


.item-preview.is-badge .item-image-fallback[data-rarity="epic"],
.item-preview.is-badge .item-image-fallback[data-rarity="mythic"] {
    border-color: rgba(192, 132, 252, 0.8);
    box-shadow:
        0 0 0 7px rgba(168, 85, 247, 0.1),
        0 0 34px rgba(168, 85, 247, 0.36),
        inset 0 0 25px rgba(168, 85, 247, 0.2);
}


.item-preview.is-badge .item-image-fallback[data-rarity="legendary"],
.item-preview.is-badge .item-image-fallback[data-rarity="exclusive"] {
    border-color: rgba(250, 204, 21, 0.82);
    color: #fff7b2;
    box-shadow:
        0 0 0 7px rgba(250, 204, 21, 0.09),
        0 0 36px rgba(250, 204, 21, 0.32),
        inset 0 0 25px rgba(250, 204, 21, 0.16);
}


.dialog-item-preview.is-title .dialog-image-fallback {
    position: relative;
    width: min(390px, calc(100% - 48px));
    height: auto;
    min-height: 126px;
    padding: 44px 28px 24px;
    border: 1px solid rgba(25, 221, 255, 0.55);
    border-radius: 22px;
    color: #f8fbff;
    background:
        linear-gradient(135deg, rgba(25, 221, 255, 0.18), transparent 44%),
        linear-gradient(145deg, #1b2d66, #09122e);
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.35;
    text-align: center;
    box-shadow:
        0 24px 52px rgba(0, 0, 0, 0.42),
        inset 0 0 32px rgba(25, 221, 255, 0.1);
}


.dialog-item-preview.is-title .dialog-image-fallback::before {
    top: 18px;
    font-size: 0.68rem;
}


.dialog-item-preview.is-badge .dialog-image-fallback,
.dialog-item-preview.is-badge img {
    width: min(260px, 58%);
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
}


.dialog-item-preview.is-badge .dialog-image-fallback {
    border: 4px solid rgba(25, 221, 255, 0.68);
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.22), transparent 24%),
        linear-gradient(145deg, #203979, #09122d);
    font-size: clamp(1.8rem, 5vw, 3rem);
    box-shadow:
        0 0 0 12px rgba(25, 221, 255, 0.08),
        0 0 56px rgba(25, 221, 255, 0.3),
        inset 0 0 36px rgba(25, 221, 255, 0.18);
}


/* =====================================================
 * Store Catalog v2 — Categories and compact filters
 * ===================================================== */

.store-catalog-controls {
    padding: 18px;

    display: block;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(18, 31, 68, 0.94),
            rgba(10, 19, 46, 0.96)
        );
}


.store-catalog-controls .filters-heading {
    margin-bottom: 13px;

    display: flex;
    align-items: end;
    justify-content: space-between;
}


.store-category-tabs {
    padding: 5px;

    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 6px;

    overflow-x: auto;

    border:
        1px solid rgba(127, 139, 173, 0.14);

    border-radius: 14px;

    background:
        rgba(5, 12, 31, 0.58);

    scrollbar-width: thin;
    scrollbar-color:
        rgba(25, 221, 255, 0.28)
        transparent;
}


.store-category-button {
    min-width: 112px;
    min-height: 48px;

    padding: 8px 10px;

    display: grid;

    grid-template-columns:
        22px minmax(0, 1fr) auto;

    align-items: center;

    gap: 6px;

    border:
        1px solid transparent;

    border-radius: 10px;

    color:
        var(--text-soft);

    background: transparent;

    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 850;

    text-align: start;

    cursor: pointer;

    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}


.store-category-button:hover,
.store-category-button:focus-visible {
    color: #ffffff;

    border-color:
        rgba(25, 221, 255, 0.2);

    background:
        rgba(25, 221, 255, 0.07);
}


.store-category-button:focus-visible {
    outline:
        2px solid rgba(25, 221, 255, 0.58);

    outline-offset: 1px;
}


.store-category-button.active {
    color: #ffffff;

    border-color:
        rgba(25, 221, 255, 0.34);

    background:
        linear-gradient(
            135deg,
            rgba(25, 221, 255, 0.15),
            rgba(139, 92, 246, 0.13)
        );

    box-shadow:
        inset 0 0 20px rgba(25, 221, 255, 0.05);
}


.store-category-button > span:nth-child(2) {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.store-category-button strong {
    min-width: 23px;
    height: 23px;

    padding: 0 5px;

    display: inline-grid;
    place-items: center;

    border-radius: 999px;

    color: #cbd5e1;
    background:
        rgba(255, 255, 255, 0.075);

    font-size: 0.65rem;
}


.store-category-button.active strong {
    color: #00131a;
    background:
        var(--cyan);
}


.store-primary-filters {
    margin-top: 12px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;

    align-items: end;

    gap: 10px;
}


.store-primary-filters .search-field {
    width: 100%;
}


.store-filters-toggle {
    min-width: 125px;
    height: 40px;

    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border:
        1px solid rgba(139, 92, 246, 0.35);

    border-radius: 10px;

    color: #ddd6fe;
    background:
        rgba(139, 92, 246, 0.09);

    font-family: inherit;
    font-weight: 850;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}


.store-filters-toggle:hover,
.store-filters-toggle.active {
    border-color:
        rgba(167, 139, 250, 0.68);

    background:
        rgba(139, 92, 246, 0.18);
}


.store-filters-toggle strong {
    min-width: 21px;
    height: 21px;

    display: inline-grid;
    place-items: center;

    border-radius: 999px;

    color: #00131a;
    background:
        var(--cyan);

    font-size: 0.65rem;
}


.store-filters-toggle strong[hidden] {
    display: none !important;
}


.store-advanced-filters {
    margin-top: 11px;

    padding: 12px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(150px, 1fr))
        auto auto;

    align-items: end;

    gap: 9px;

    border:
        1px solid rgba(127, 139, 173, 0.14);

    border-radius: 13px;

    background:
        rgba(5, 12, 31, 0.5);

    animation:
        store-filters-reveal 0.18s ease;
}


.store-advanced-filters[hidden] {
    display: none !important;
}


@keyframes store-filters-reveal {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.store-items-grid {
    align-items: stretch;
}


.store-item-card {
    height: 100%;

    display: flex;
    flex-direction: column;
}


.store-item-card .item-card-body {
    flex: 1;

    display: flex;
    flex-direction: column;
}


.store-item-card .item-card-footer {
    margin-top: auto;
}


.item-action-button.is-unequip {
    border-color:
        rgba(251, 146, 60, 0.48);

    color: #fdba74;
    background:
        rgba(249, 115, 22, 0.09);
}


.item-action-button.is-unequip:hover:not(:disabled) {
    border-color: #fb923c;

    color: #1c0d04;
    background: #fb923c;
}


.dialog-primary-button.is-unequip {
    border-color:
        rgba(251, 146, 60, 0.72);

    color: #fff7ed;
    background:
        linear-gradient(
            135deg,
            #ea580c,
            #fb923c
        );
}


@media (max-width: 1100px) {

    .store-category-tabs {
        grid-template-columns:
            repeat(7, minmax(126px, 1fr));
    }


    .store-advanced-filters {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    .store-catalog-controls {
        padding: 13px;
    }


    .store-primary-filters {
        grid-template-columns: 1fr;
    }


    .store-filters-toggle {
        width: 100%;
    }


    .store-advanced-filters {
        grid-template-columns: 1fr;
    }


    .store-category-button {
        min-width: 120px;
    }

}


@media (prefers-reduced-motion: reduce) {

    .store-advanced-filters {
        animation: none;
    }


    .store-category-button,
    .store-filters-toggle {
        transition: none;
    }

}


/* =====================================================
 * Theme Item Previews
 * ===================================================== */

.item-preview.is-theme {
    width: min(255px, calc(100% - 20px));
    height: 138px;
}


.item-preview.is-theme .item-image-fallback {
    position: relative;
    width: 100%;
    height: 124px;
    padding: 82px 15px 13px;
    overflow: hidden;
    border-radius: 19px;
    color: #f8fbff;
    border: 2px solid rgba(25, 221, 255, 0.34);
    background:
        linear-gradient(90deg, rgba(5, 12, 30, 0.92), rgba(11, 24, 51, 0.72)),
        linear-gradient(145deg, #17213d, #0a1024);
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: start;
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.38);
}


.item-preview.is-theme .item-image-fallback::before,
.dialog-item-preview.is-theme .dialog-image-fallback::before {
    content: "XP";
    position: absolute;
    top: 20px;
    inset-inline-start: 18px;
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border: 2px solid currentColor;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 950;
    box-shadow: 0 0 18px currentColor;
}


.item-preview.is-theme .item-image-fallback::after,
.dialog-item-preview.is-theme .dialog-image-fallback::after {
    content: "";
    position: absolute;
    top: 30px;
    inset-inline-start: 76px;
    width: 42%;
    height: 25px;
    border-top: 5px solid currentColor;
    border-bottom: 4px solid currentColor;
    opacity: 0.42;
}


.item-preview.is-theme[data-theme-id="classic_theme"] .item-image-fallback {
    border-color: rgba(25, 221, 255, 0.34);
    background: linear-gradient(145deg, #162652, #081229);
}


.item-preview.is-theme[data-theme-id="neon_pulse_theme"] .item-image-fallback {
    border-color: rgba(34, 211, 238, 0.72);
    color: #67e8f9;
    box-shadow:
        0 20px 38px rgba(0, 0, 0, 0.36),
        inset 0 0 26px rgba(217, 70, 239, 0.12),
        0 0 25px rgba(34, 211, 238, 0.26);
}


.item-preview.is-theme[data-theme-id="golden_throne_theme"] .item-image-fallback {
    border-color: rgba(251, 191, 36, 0.76);
    color: #fde68a;
    box-shadow:
        0 0 28px rgba(251, 191, 36, 0.22),
        inset 0 0 28px rgba(126, 34, 206, 0.12);
}


.item-preview.is-theme[data-theme-id="aurora_flux_theme"] .item-image-fallback {
    border-color: rgba(52, 211, 153, 0.76);
    color: #a7f3d0;
    box-shadow:
        0 0 28px rgba(52, 211, 153, 0.22),
        inset 0 0 28px rgba(99, 102, 241, 0.14);
}


.dialog-item-preview.is-theme .dialog-image-fallback {
    position: relative;
    width: min(430px, calc(100% - 54px));
    height: 235px;
    padding: 160px 30px 24px;
    overflow: hidden;
    border-radius: 28px;
    color: #f8fbff;
    border: 2px solid rgba(25, 221, 255, 0.34);
    background:
        linear-gradient(90deg, rgba(5, 12, 30, 0.92), rgba(11, 24, 51, 0.72)),
        linear-gradient(145deg, #17213d, #0a1024);
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    line-height: 1.25;
    text-align: start;
    box-shadow: 0 30px 62px rgba(0, 0, 0, 0.46);
}


.dialog-item-preview.is-theme .dialog-image-fallback::before {
    top: 48px;
    inset-inline-start: 35px;
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 1.35rem;
}


.dialog-item-preview.is-theme .dialog-image-fallback::after {
    top: 68px;
    inset-inline-start: 135px;
    height: 38px;
    border-top-width: 8px;
    border-bottom-width: 6px;
}


.dialog-item-preview.is-theme[data-theme-id="neon_pulse_theme"] .dialog-image-fallback {
    border-color: rgba(34, 211, 238, 0.78);
    color: #67e8f9;
    box-shadow:
        0 30px 62px rgba(0, 0, 0, 0.45),
        inset 0 0 36px rgba(217, 70, 239, 0.14),
        0 0 42px rgba(34, 211, 238, 0.3);
}


.dialog-item-preview.is-theme[data-theme-id="golden_throne_theme"] .dialog-image-fallback {
    border-color: rgba(251, 191, 36, 0.8);
    color: #fde68a;
    box-shadow:
        0 0 46px rgba(251, 191, 36, 0.25),
        inset 0 0 38px rgba(126, 34, 206, 0.15);
}


.dialog-item-preview.is-theme[data-theme-id="aurora_flux_theme"] .dialog-image-fallback {
    border-color: rgba(52, 211, 153, 0.82);
    color: #a7f3d0;
    box-shadow:
        0 0 46px rgba(52, 211, 153, 0.25),
        inset 0 0 38px rgba(99, 102, 241, 0.16);
}


/* =====================================================
 * Store UI Polish — Phase 1: Hero & Loading Experience
 * ===================================================== */

.store-page {
    padding-top: 28px;
}


.store-hero {
    min-height: 0;
    padding: 22px;
    gap: 20px;
}


.store-hero-content {
    padding-block: 8px;
}


.store-hero-content h1 {
    max-width: 620px;
    margin-block: 10px 12px;
    font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.15;
}


.store-hero-content > p:not(.section-label) {
    max-width: 640px;
    margin-block: 0 18px;
}


.store-player-card {
    min-height: 315px;
}


.store-player-card-content {
    padding: 20px;
}


.store-player-avatar-shell {
    width: clamp(102px, 11vw, 132px);
    height: clamp(102px, 11vw, 132px);
}


.store-player-name-row h2 {
    font-size: clamp(1.5rem, 3.3vw, 2.3rem);
}


.store-player-card-skeleton {
    position: absolute;
    z-index: 20;
    inset: 0;

    padding: 20px;

    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;

    border-radius: inherit;

    background:
        radial-gradient(circle at 86% 16%, rgba(25, 221, 255, 0.12), transparent 31%),
        linear-gradient(145deg, rgba(17, 29, 63, 0.98), rgba(7, 17, 38, 0.98));

    pointer-events: none;

    transition: opacity 0.22s ease, visibility 0.22s ease;
}


.store-player-card[data-store-loading="false"] .store-player-card-skeleton {
    opacity: 0;
    visibility: hidden;
}


.store-player-skeleton-top,
.store-player-skeleton-avatar,
.store-player-skeleton-lines span,
.store-player-skeleton-footer span {
    position: relative;
    overflow: hidden;

    display: block;

    background: rgba(148, 163, 184, 0.12);
}


.store-player-skeleton-top {
    width: 42%;
    height: 18px;
    border-radius: 999px;
}


.store-player-skeleton-main {
    display: flex;
    align-items: center;
    gap: 22px;
}


.store-player-skeleton-avatar {
    width: 112px;
    height: 112px;
    flex: 0 0 auto;
    border-radius: 28%;
}


.store-player-skeleton-lines {
    width: min(330px, 62%);
    display: grid;
    gap: 12px;
}


.store-player-skeleton-lines span {
    height: 15px;
    border-radius: 999px;
}


.store-player-skeleton-lines span:first-child {
    width: 78%;
    height: 25px;
}


.store-player-skeleton-lines span:nth-child(2) {
    width: 52%;
}


.store-player-skeleton-lines span:last-child {
    width: 64%;
}


.store-player-skeleton-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 16px;
}


.store-player-skeleton-footer span {
    height: 40px;
    border-radius: 11px;
}


.store-player-skeleton-top::after,
.store-player-skeleton-avatar::after,
.store-player-skeleton-lines span::after,
.store-player-skeleton-footer span::after,
.store-item-skeleton::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            100deg,
            transparent 22%,
            rgba(255, 255, 255, 0.08) 46%,
            transparent 70%
        );

    transform: translateX(-115%);

    animation: store-skeleton-shimmer 1.6s ease-in-out infinite;
}


@keyframes store-skeleton-shimmer {
    to {
        transform: translateX(115%);
    }
}


.store-summary[data-store-summary-loaded="false"] .summary-card {
    position: relative;
    overflow: hidden;
}


.store-summary[data-store-summary-loaded="false"] .summary-card strong {
    color: rgba(248, 251, 255, 0.42);
}


.store-loading {
    min-height: 0;
    padding: 0;
    margin-top: 22px;

    display: block;

    border: 0;
    background: transparent;
}


.store-loading-heading {
    min-height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: var(--text-soft);
}


.store-loading-heading p {
    margin: 0;
}


.store-loading-heading .loading-spinner {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}


.store-loading-skeleton-grid {
    margin-top: 16px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}


.store-item-skeleton {
    position: relative;
    overflow: hidden;

    min-height: 370px;

    display: block;

    border: 1px solid rgba(120, 149, 255, 0.12);
    border-radius: 19px;

    background:
        linear-gradient(
            to bottom,
            rgba(25, 221, 255, 0.055) 0 58%,
            rgba(20, 33, 73, 0.82) 58% 100%
        );
}


.store-item-card[data-status="equipped"] {
    border-color: rgba(25, 221, 255, 0.44);
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.26),
        inset 0 0 0 1px rgba(25, 221, 255, 0.06);
}


.store-item-card[data-status="owned"] {
    border-color: rgba(34, 197, 94, 0.26);
}


.store-item-card[data-status="level-locked"],
.store-item-card[data-status="achievement-locked"],
.store-item-card[data-status="mission-locked"],
.store-item-card[data-status="event-locked"],
.store-item-card[data-status="inactive"] {
    border-color: rgba(148, 163, 184, 0.13);
}


.store-item-card[data-status="level-locked"] .item-card-media,
.store-item-card[data-status="achievement-locked"] .item-card-media,
.store-item-card[data-status="mission-locked"] .item-card-media,
.store-item-card[data-status="event-locked"] .item-card-media,
.store-item-card[data-status="inactive"] .item-card-media {
    filter: saturate(0.72);
}


@media (max-width: 1180px) {
    .store-loading-skeleton-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 900px) {
    .store-loading-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-hero {
        padding: 18px;
    }

    .store-player-card {
        min-height: 290px;
    }
}


@media (max-width: 620px) {
    .store-page {
        width: min(calc(100% - 24px), var(--container-width));
        padding-top: 18px;
    }

    .store-hero {
        padding: 14px;
        gap: 16px;
    }

    .store-player-card-skeleton {
        padding: 17px;
    }

    .store-player-skeleton-main {
        flex-direction: column;
        justify-content: center;
        gap: 14px;
    }

    .store-player-skeleton-avatar {
        width: 92px;
        height: 92px;
    }

    .store-player-skeleton-lines {
        width: 78%;
        justify-items: center;
    }

    .store-player-skeleton-lines span:first-child {
        width: 72%;
    }

    .store-player-skeleton-footer {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .store-loading-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .store-item-skeleton {
        min-height: 300px;
        border-radius: 15px;
    }
}


@media (max-width: 420px) {
    .store-loading-skeleton-grid {
        grid-template-columns: 1fr;
    }

    .store-item-skeleton:nth-child(n + 4) {
        display: none;
    }
}


@media (prefers-reduced-motion: reduce) {
    .store-player-card-skeleton,
    .store-player-skeleton-top::after,
    .store-player-skeleton-avatar::after,
    .store-player-skeleton-lines span::after,
    .store-player-skeleton-footer span::after,
    .store-item-skeleton::after {
        animation: none;
        transition: none;
    }
}


/* =====================================================
 * Store UI Polish — Phase 2: Catalog & Item Cards v3
 * ===================================================== */

.store-catalog-controls {
    border: 1px solid rgba(127, 139, 173, 0.14);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


.store-category-tabs {
    scroll-snap-type: inline proximity;
    overscroll-behavior-inline: contain;
}


.store-category-button {
    scroll-snap-align: start;
}


.store-primary-filters .input-wrapper,
.store-advanced-filters select {
    min-height: 42px;
}


.store-item-card {
    --store-card-accent: rgba(148, 163, 184, 0.44);

    isolation: isolate;

    border-color: rgba(127, 139, 173, 0.17);

    background:
        linear-gradient(
            155deg,
            rgba(20, 33, 73, 0.96),
            rgba(8, 16, 39, 0.99)
        );

    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


.store-item-card::before {
    content: "";

    position: absolute;
    z-index: 8;

    inset-inline: 0;
    top: 0;

    height: 3px;

    background: var(--store-card-accent);

    opacity: 0.72;

    pointer-events: none;
}


.store-item-card[data-rarity="uncommon"] {
    --store-card-accent: #4ade80;
}


.store-item-card[data-rarity="rare"] {
    --store-card-accent: #60a5fa;
}


.store-item-card[data-rarity="epic"] {
    --store-card-accent: #c084fc;
}


.store-item-card[data-rarity="legendary"] {
    --store-card-accent: #fbbf24;
}


.store-item-card[data-rarity="mythic"] {
    --store-card-accent: #f472b6;
}


.store-item-card[data-rarity="exclusive"] {
    --store-card-accent: #fb7185;
}


.store-item-card:hover,
.store-item-card:focus-within {
    border-color: color-mix(in srgb, var(--store-card-accent) 54%, rgba(127, 139, 173, 0.2));

    transform: translateY(-4px);

    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.3),
        0 0 28px color-mix(in srgb, var(--store-card-accent) 10%, transparent);
}


.item-card-media {
    min-height: 210px;

    background:
        radial-gradient(
            circle at 50% 44%,
            color-mix(in srgb, var(--store-card-accent) 15%, transparent),
            transparent 62%
        ),
        rgba(7, 13, 32, 0.72);
}


.item-preview {
    transition:
        transform 0.22s ease,
        filter 0.22s ease;
}


.store-item-card:hover .item-preview,
.store-item-card:focus-within .item-preview {
    transform: scale(1.035);
}


.item-rarity,
.item-status-badge {
    min-height: 27px;

    padding: 4px 9px;

    border-color: rgba(255, 255, 255, 0.09);

    background: rgba(4, 10, 25, 0.82);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2);
}


.item-rarity {
    border-color: color-mix(in srgb, var(--store-card-accent) 34%, transparent);

    color: var(--store-card-accent) !important;
}


.item-status-badge::before {
    content: "•";

    margin-inline-end: 5px;

    font-size: 0.9em;
}


.item-status-badge[data-status="available"] {
    border-color: rgba(25, 221, 255, 0.26);
    color: #7defff;
    background: rgba(25, 221, 255, 0.09);
}


.item-status-badge[data-status="owned"] {
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
    background: rgba(34, 197, 94, 0.09);
}


.item-status-badge[data-status="equipped"] {
    border-color: rgba(25, 221, 255, 0.38);
    color: #b7f8ff;
    background: rgba(25, 221, 255, 0.12);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(25, 221, 255, 0.11);
}


.item-status-badge[data-status="insufficient-funds"] {
    border-color: rgba(251, 191, 36, 0.28);
    color: #fde68a;
    background: rgba(251, 191, 36, 0.09);
}


.item-status-badge[data-status="level-locked"],
.item-status-badge[data-status="achievement-locked"],
.item-status-badge[data-status="mission-locked"],
.item-status-badge[data-status="event-locked"],
.item-status-badge[data-status="inactive"],
.item-status-badge[data-status="not-purchasable"] {
    border-color: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    background: rgba(100, 116, 139, 0.1);
}


.item-status-badge[data-status="premium"] {
    border-color: rgba(236, 72, 153, 0.3);
    color: #f9a8d4;
    background: rgba(236, 72, 153, 0.1);
}


.store-item-card[data-status="level-locked"] .item-preview,
.store-item-card[data-status="achievement-locked"] .item-preview,
.store-item-card[data-status="mission-locked"] .item-preview,
.store-item-card[data-status="event-locked"] .item-preview,
.store-item-card[data-status="inactive"] .item-preview,
.store-item-card[data-status="not-purchasable"] .item-preview {
    opacity: 0.76;
}


.store-item-card[data-status="equipped"] {
    border-color: rgba(25, 221, 255, 0.44);

    box-shadow:
        0 20px 42px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(25, 221, 255, 0.07),
        0 0 26px rgba(25, 221, 255, 0.08);
}


.item-card-body {
    padding: 16px 17px 17px;
}


.item-heading h3 {
    font-size: 1.08rem;
}


.item-description {
    min-height: 44px;

    margin: 11px 0 15px;

    line-height: 1.65;
}


.item-card-footer {
    align-items: end;
}


.item-price-block {
    min-width: 0;

    display: grid;
    gap: 2px;
}


.item-price-label {
    color: var(--text-muted);

    font-size: 0.66rem;
    font-weight: 750;
}


.item-price {
    overflow: hidden;

    color: #fde68a;

    text-overflow: ellipsis;

    font-size: 0.93rem;
    font-weight: 900;
}


.store-item-card[data-unlock-type="default"] .item-price {
    color: #86efac;
}


.store-item-card[data-unlock-type="level"] .item-price,
.store-item-card[data-unlock-type="achievement"] .item-price,
.store-item-card[data-unlock-type="mission"] .item-price,
.store-item-card[data-unlock-type="event"] .item-price {
    color: #cbd5e1;
}


.store-item-card[data-unlock-type="premium"] .item-price {
    color: #f9a8d4;
}


.item-action-button {
    min-width: 112px;
    min-height: 42px;

    border-radius: 12px;
}


.item-action-button.is-purchase {
    border-color: rgba(25, 221, 255, 0.58);
    color: #00131a;
    background:
        linear-gradient(135deg, #19ddff, #72efff);

    box-shadow:
        0 9px 22px rgba(25, 221, 255, 0.12);
}


.item-action-button.is-purchase:hover:not(:disabled) {
    border-color: #bdf8ff;
    color: #00131a;
    background:
        linear-gradient(135deg, #72efff, #bdf8ff);
}


.item-action-button.is-equip {
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
    background: rgba(34, 197, 94, 0.09);
}


.item-action-button.is-equip:hover:not(:disabled) {
    border-color: #4ade80;
    color: #03190b;
    background: #4ade80;
}


.item-action-button.is-locked {
    border-color: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    background: rgba(100, 116, 139, 0.07);
}


/* Dialog follows the same state language as the catalog. */

.store-dialog {
    overflow: auto;

    border-color: rgba(25, 221, 255, 0.2);
}


.store-dialog[data-rarity="epic"] {
    border-color: rgba(192, 132, 252, 0.34);
}


.store-dialog[data-rarity="legendary"] {
    border-color: rgba(251, 191, 36, 0.38);
}


.store-dialog[data-rarity="mythic"] {
    border-color: rgba(244, 114, 182, 0.4);
}


.dialog-labels span {
    border-color: rgba(127, 139, 173, 0.17);
}


#dialog-item-rarity[data-rarity="uncommon"] {
    color: #4ade80;
}


#dialog-item-rarity[data-rarity="rare"] {
    color: #60a5fa;
}


#dialog-item-rarity[data-rarity="epic"] {
    color: #c084fc;
}


#dialog-item-rarity[data-rarity="legendary"] {
    color: #fbbf24;
}


#dialog-item-rarity[data-rarity="mythic"] {
    color: #f472b6;
}


#dialog-item-rarity[data-rarity="exclusive"] {
    color: #fb7185;
}


#dialog-item-status[data-status="available"] {
    color: #67e8f9;
}


#dialog-item-status[data-status="owned"],
#dialog-item-status[data-status="equipped"] {
    color: #86efac;
}


#dialog-item-status[data-status="insufficient-funds"] {
    color: #fde68a;
}


.dialog-primary-button.is-purchase {
    border-color: #19ddff;
    color: #00131a;
    background: linear-gradient(135deg, #19ddff, #72efff);
}


.dialog-primary-button.is-equip {
    border-color: #22c55e;
    color: #03190b;
    background: linear-gradient(135deg, #22c55e, #4ade80);
}


.dialog-primary-button.is-locked {
    border-color: rgba(148, 163, 184, 0.16);
    color: #94a3b8;
    background: rgba(100, 116, 139, 0.08);
}


@media (max-width: 700px) {

    .store-category-tabs {
        margin-inline: -2px;

        padding: 4px;

        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(106px, 42vw);

        overflow-x: auto;

        scrollbar-width: none;
    }


    .store-category-tabs::-webkit-scrollbar {
        display: none;
    }


    .store-category-button {
        min-width: 0;
        min-height: 44px;

        padding: 7px 8px;

        grid-template-columns: 19px minmax(0, 1fr) auto;

        font-size: 0.72rem;
    }


    .store-primary-filters {
        grid-template-columns: minmax(0, 1fr) 112px;
        align-items: end;
    }


    .store-filters-toggle {
        width: 112px;
        min-width: 0;
        height: 42px;

        padding-inline: 9px;
    }


    .store-advanced-filters {
        padding: 10px;

        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .store-advanced-filters .checkbox-filter,
    .store-advanced-filters .reset-filters-button {
        min-height: 42px;
    }


    .store-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }


    .item-card-media {
        min-height: 178px;
    }


    .item-preview {
        width: 118px;
        height: 118px;
    }


    .item-preview.is-background {
        height: 178px;
    }


    .item-card-body {
        padding: 13px;
    }


    .item-heading h3 {
        font-size: 0.98rem;
    }


    .item-description {
        min-height: 40px;
        margin-block: 9px 12px;

        font-size: 0.79rem;
        -webkit-line-clamp: 2;
    }


    .item-card-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
    }


    .item-action-button {
        width: 100%;
        min-width: 0;
        min-height: 39px;
        padding-inline: 10px;

        font-size: 0.78rem;
    }


    .item-rarity,
    .item-status-badge {
        top: 10px;

        min-height: 24px;

        padding: 3px 7px;

        font-size: 0.62rem;
    }


    .item-rarity {
        right: 10px;
    }


    .item-status-badge {
        left: 10px;
    }


    .store-dialog {
        width: min(calc(100% - 16px), 900px);
        max-height: calc(100dvh - 16px);

        border-radius: 20px;
    }


    .dialog-content {
        max-height: calc(100dvh - 18px);
        overflow-y: auto;
    }


    .dialog-item-preview {
        min-height: 235px;
    }


    .dialog-item-information {
        padding: 26px 18px 18px;
    }


    .dialog-item-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }


    .dialog-actions {
        position: sticky;
        bottom: 0;

        margin: 22px -18px -18px;
        padding: 12px 18px max(12px, env(safe-area-inset-bottom));

        grid-template-columns: 0.8fr 1.2fr;

        background:
            linear-gradient(to top, rgba(11, 20, 48, 1) 72%, rgba(11, 20, 48, 0.92));

        border-top: 1px solid rgba(127, 139, 173, 0.13);
    }

}


@media (max-width: 470px) {

    .store-primary-filters {
        grid-template-columns: 1fr;
    }


    .store-filters-toggle {
        width: 100%;
    }


    .store-advanced-filters {
        grid-template-columns: 1fr;
    }


    .store-items-grid {
        grid-template-columns: 1fr;
    }


    .item-card-media {
        min-height: 215px;
    }


    .item-preview {
        width: 145px;
        height: 145px;
    }


    .item-preview.is-background {
        height: 215px;
    }


    .item-card-footer {
        grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
        align-items: end;
    }


    .item-action-button {
        width: auto;
    }


    .dialog-item-details,
    .dialog-actions {
        grid-template-columns: 1fr;
    }

}


@media (prefers-reduced-motion: reduce) {

    .store-item-card,
    .item-preview,
    .item-action-button,
    .dialog-primary-button {
        transition: none;
    }


    .store-item-card:hover,
    .store-item-card:focus-within,
    .store-item-card:hover .item-preview,
    .store-item-card:focus-within .item-preview {
        transform: none;
    }

}


/* =====================================================
 * XPZone Store Final Polish v1
 * ===================================================== */

.store-error-state {
    padding: 24px;
}


.store-error-card {
    width: min(390px, 100%);

    padding: 24px 22px;

    display: grid;
    justify-items: center;
    gap: 10px;

    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 22px;

    background:
        linear-gradient(180deg, rgba(42, 12, 28, 0.72), rgba(17, 11, 28, 0.76));

    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.22);
}


.store-error-brand {
    color: var(--cyan, #19ddff);

    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}


.store-error-symbol {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(239, 68, 68, 0.36);
    border-radius: 14px;

    color: #fecaca;
    background: rgba(239, 68, 68, 0.1);

    font-size: 1.45rem;
    font-weight: 950;

    box-shadow:
        0 0 24px rgba(239, 68, 68, 0.08);
}


.store-error-card h3 {
    margin: 3px 0 0;
}


.store-error-card p {
    max-width: 310px;

    line-height: 1.7;
}


.store-dialog[data-busy="true"] .dialog-close-button,
.store-dialog[data-busy="true"] .dialog-cancel-button {
    opacity: 0.45;
    cursor: wait;
}


.dialog-balance-after-card {
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}


.dialog-balance-after-card[data-balance-state="ok"] {
    border-color: rgba(34, 197, 94, 0.26);
    background: rgba(34, 197, 94, 0.06);
}


.dialog-balance-after-card[data-balance-state="ok"] dd {
    color: #86efac;
}


.dialog-balance-after-card[data-balance-state="insufficient"] {
    border-color: rgba(245, 158, 11, 0.34);
    background: rgba(245, 158, 11, 0.08);

    box-shadow:
        inset 0 0 0 1px rgba(245, 158, 11, 0.04);
}


.dialog-balance-after-card[data-balance-state="insufficient"] dd {
    color: #fde68a;
}


.store-toast {
    position: relative;
    overflow: hidden;
}


.store-toast::before {
    content: "";

    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;

    width: 3px;

    background: rgba(148, 163, 184, 0.6);
}


.store-toast.success::before {
    background: #22c55e;
}


.store-toast.warning::before {
    background: #f59e0b;
}


.store-toast.error::before {
    background: #ef4444;
}


.store-toast.info::before {
    background: var(--cyan, #19ddff);
}


.store-toast-icon {
    flex: 0 0 auto;

    line-height: 1.35;
}


.store-toast-content {
    min-width: 0;
    flex: 1;
}


.store-toast-title {
    display: block;

    margin-bottom: 2px;

    color: var(--text, #f8fafc);

    font-size: 0.82rem;
}


.store-toast-close {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    border-radius: 8px;
}


.store-toast-close:hover,
.store-toast-close:focus-visible {
    color: var(--text, #f8fafc);
    background: rgba(255, 255, 255, 0.07);
}


@media (max-width: 700px) {

    .toast-container {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));

        width: auto;
    }


    .store-toast {
        padding: 12px 13px;

        border-radius: 12px;
    }

}


@media (max-width: 470px) {

    .store-error-state {
        padding: 14px;
    }


    .store-error-card {
        padding: 20px 16px;
    }

}


@media (prefers-reduced-motion: reduce) {

    .store-toast,
    .dialog-balance-after-card {
        animation: none !important;
        transition: none !important;
    }

}


/* =====================================================
   Game Item Gallery Polish
===================================================== */

.store-item-card[data-game-id] .item-card-media {
    min-height: 220px;

    background:
        radial-gradient(
            circle at 50% 42%,
            color-mix(in srgb, var(--store-card-accent) 18%, transparent),
            transparent 58%
        ),
        linear-gradient(
            155deg,
            rgba(10, 24, 52, 0.96),
            rgba(4, 10, 26, 0.98)
        );
}


.store-item-card[data-game-id="fish-farm"] .item-card-media {
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.14) 0 3px, transparent 4px),
        radial-gradient(circle at 78% 35%, rgba(255, 255, 255, 0.11) 0 5px, transparent 6px),
        radial-gradient(circle at 66% 17%, rgba(255, 255, 255, 0.09) 0 2px, transparent 3px),
        linear-gradient(
            180deg,
            rgba(14, 165, 233, 0.34),
            rgba(3, 72, 135, 0.24) 52%,
            rgba(4, 17, 43, 0.96)
        );
}


.item-preview.is-game-item {
    width: min(86%, 286px);
    height: 174px;
}


.item-preview.is-game-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;

    filter:
        drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34))
        drop-shadow(0 0 18px color-mix(in srgb, var(--store-card-accent) 14%, transparent));
}


.item-preview.is-game-item[data-content-type="creature"] {
    width: min(88%, 300px);
    height: 180px;
}


.item-preview.is-game-item[data-content-type="campaign"],
.item-preview.is-game-item[data-content-type="saveSlot"],
.item-preview.is-game-item[data-content-type="skinPack"],
.item-preview.is-game-item[data-content-type="tableTheme"] {
    width: min(90%, 310px);
}


.store-item-card[data-game-id] .item-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 6px;
    padding: 4px 8px;

    border: 1px solid color-mix(in srgb, var(--store-card-accent) 28%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--store-card-accent) 8%, transparent);
    color: color-mix(in srgb, var(--store-card-accent) 82%, #fff);

    font-size: 0.66rem;
    font-weight: 900;
}


.store-item-card[data-game-id] .item-game-badge {
    margin-inline-start: 4px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(148, 163, 184, 0.07);
    color: #cbd5e1;
}


.dialog-item-preview.is-game-item {
    width: min(100%, 360px);
    height: 230px;
}


.dialog-item-preview.is-game-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


@media (max-width: 700px) {

    .store-item-card[data-game-id] .item-card-media {
        min-height: 178px;
    }

    .item-preview.is-game-item,
    .item-preview.is-game-item[data-content-type="creature"] {
        width: min(90%, 230px);
        height: 140px;
    }

}


@media (max-width: 470px) {

    .store-item-card[data-game-id] .item-card-media {
        min-height: 210px;
    }

    .item-preview.is-game-item,
    .item-preview.is-game-item[data-content-type="creature"] {
        width: min(88%, 280px);
        height: 170px;
    }

}
