/* ==========================================================================
   Store Themes (5 styles) + Live Preview Bar + Store UX + Admin Theme Picker
   Dedicated stylesheet — zero conflicts with app.css / mode-dark.css
   ========================================================================== */

/* ---------- 1. Sticky Live Preview Bar ---------- */
.st-preview-bar {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #0f172a;
    color: #f8fafc;
    border-bottom: 2px solid var(--csite-accent, #e85d04);
    box-shadow: 0 6px 22px rgba(15, 23, 42, .24);
}
.st-preview-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: .65rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem .9rem;
}
.st-preview-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .6rem;
    min-width: 0;
    font-size: .88rem;
}
.st-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: var(--csite-accent, #e85d04);
    color: var(--csite-on-accent, #fff);
    font-weight: 700;
    font-size: .76rem;
}
.st-preview-name {
    font-weight: 700;
    color: #fff;
}
.st-preview-note {
    color: #cbd5e1;
    font-size: .8rem;
}
.st-preview-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}
.st-preview-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #e2e8f0;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.st-preview-chip:hover {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}
.st-preview-chip.is-active {
    background: #fff;
    color: #0f172a;
    border-color: #fff;
}
.st-preview-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #e85d04;
    flex: 0 0 auto;
}
.st-preview-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
}
.st-preview-apply-form {
    margin: 0;
}
.st-preview-apply {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .9rem;
    border: 0;
    border-radius: 999px;
    background: #10b981;
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}
.st-preview-apply:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.st-preview-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #f8fafc;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
}
.st-preview-back:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* ---------- 2. Store Toolbar: Live Search, Sort, Category Chips ---------- */
.st-page {
    --st-bg: transparent;
    --st-surface: #ffffff;
    --st-surface-2: #f8fafc;
    --st-ink: #0f172a;
    --st-muted: #64748b;
    --st-border: rgba(15, 23, 42, .10);
    --st-card-radius: 16px;
    --st-btn-radius: 12px;
    --st-shadow: 0 4px 16px rgba(15, 23, 42, .05);
    --st-cover-ratio: 4 / 3;
}
.st-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    margin: .75rem 0 1rem;
}
.st-search-box {
    position: relative;
    flex: 1 1 240px;
    min-width: 0;
    display: flex;
    align-items: center;
}
.st-search-ico {
    position: absolute;
    inset-inline-start: .9rem;
    color: var(--st-muted);
    font-size: .95rem;
    pointer-events: none;
}
.st-search-input {
    width: 100%;
    padding: .62rem 2.35rem .62rem 2.35rem;
    border-radius: var(--st-btn-radius);
    border: 1px solid var(--st-border);
    background: var(--st-surface);
    color: var(--st-ink);
    font-size: .92rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.st-search-input::placeholder {
    color: var(--st-muted);
    opacity: .85;
}
.st-search-input:focus {
    border-color: var(--csite-accent, #e85d04);
    box-shadow: 0 0 0 3px var(--csite-tint, rgba(232, 93, 4, .14));
}
.st-search-clear {
    position: absolute;
    inset-inline-end: .45rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--st-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.st-search-clear:hover {
    background: var(--st-surface-2);
    color: var(--st-ink);
}
.st-sort-box {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-btn-radius);
    padding: 0 .65rem;
    flex: 0 0 auto;
}
.st-sort-lab {
    color: var(--st-muted);
    font-size: .88rem;
    margin: 0;
}
.st-sort-select {
    border: 0;
    background: transparent;
    color: var(--st-ink);
    font-size: .88rem;
    font-weight: 600;
    padding: .62rem .2rem;
    outline: none;
    cursor: pointer;
}
.st-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: -.25rem 0 1.1rem;
}
.st-cat-chip {
    border: 1px solid var(--st-border);
    background: var(--st-surface);
    color: var(--st-ink);
    padding: .38rem .85rem;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.st-cat-chip:hover {
    border-color: var(--csite-accent, #e85d04);
}
.st-cat-chip.is-active {
    background: var(--csite-accent, #e85d04);
    color: var(--csite-on-accent, #fff);
    border-color: var(--csite-accent, #e85d04);
}
.st-no-match {
    margin-top: 1rem;
}

/* ---------- 3. Upgraded Product Cards (Swatches, Sizes, OOS, Aspect) ---------- */
.st-page .st-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: var(--st-card-radius);
    box-shadow: var(--st-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.st-page .st-card:hover {
    transform: translateY(-2px);
}
.st-page .st-card.is-oos {
    opacity: .76;
}
.st-page .st-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: var(--st-cover-ratio);
    height: auto !important;
    overflow: hidden;
    background: var(--st-surface-2);
}
.st-page .st-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.st-page .st-card:hover .st-cover img {
    transform: scale(1.04);
}
.st-page .st-badge.is-oos {
    background: #dc2626 !important;
    color: #fff !important;
}
.st-page .st-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: .4rem;
}
.st-page .st-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: var(--st-muted);
    font-size: .84rem;
    line-height: 1.45;
}
.st-card-vars {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin: .15rem 0;
}
.st-card-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .32rem;
}
.st-cdot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--st-muted);
    border: 1.5px solid var(--st-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    display: inline-block;
}
.st-cdot-more {
    font-size: .72rem;
    font-weight: 700;
    color: var(--st-muted);
}
.st-card-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: .26rem;
}
.st-sz-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: .08rem .38rem;
    border-radius: 6px;
    border: 1px solid var(--st-border);
    background: var(--st-surface-2);
    color: var(--st-ink);
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.3;
}
.st-sz-pill.is-more {
    color: var(--st-muted);
}
.st-page .st-body .st-meta {
    margin-top: auto;
    padding-top: .25rem;
}
.st-page .st-add {
    border-radius: var(--st-btn-radius);
}

/* ==========================================================================
   4. THE 5 STORE THEMES
   ========================================================================== */

/* --- Theme 1: Classic (كلاسيك مسار) --- */
.st-page.st-theme-classic {
    --st-surface: #ffffff;
    --st-surface-2: #f8fafc;
    --st-ink: #0f172a;
    --st-muted: #64748b;
    --st-border: rgba(15, 23, 42, .10);
    --st-card-radius: 16px;
    --st-btn-radius: 12px;
    --st-shadow: 0 4px 16px rgba(15, 23, 42, .05);
    --st-cover-ratio: 4 / 3;
}

/* --- Theme 2: Boutique (بوتيك أزياء) --- */
.st-page.st-theme-boutique {
    --st-bg: #faf8f5;
    --st-surface: #ffffff;
    --st-surface-2: #f4efe8;
    --st-ink: #1c1917;
    --st-muted: #78716c;
    --st-border: rgba(28, 25, 23, .08);
    --st-card-radius: 20px;
    --st-btn-radius: 999px;
    --st-shadow: 0 10px 28px rgba(28, 25, 23, .05);
    --st-cover-ratio: 3 / 4;
    background: var(--st-bg);
    color: var(--st-ink);
}
.st-page.st-theme-boutique .track-bar {
    background: rgba(250, 248, 245, .92);
    border-bottom: 1px solid var(--st-border);
    backdrop-filter: blur(10px);
}
.st-page.st-theme-boutique .st-hero-band {
    border-radius: 24px;
    border: 1px solid var(--st-border);
}
.st-page.st-theme-boutique .st-card {
    border-color: transparent;
    box-shadow: var(--st-shadow);
}
.st-page.st-theme-boutique .st-card:hover {
    box-shadow: 0 16px 36px rgba(28, 25, 23, .10);
}
.st-page.st-theme-boutique .st-body h2 a {
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--st-ink);
}
.st-page.st-theme-boutique .st-search-input,
.st-page.st-theme-boutique .st-sort-box {
    border-radius: 999px;
}
.st-page.st-theme-boutique .csite-card {
    background: var(--st-surface);
    border-color: var(--st-border);
    border-radius: 22px;
}

/* --- Theme 3: Modern (ماركت عصري) --- */
.st-page.st-theme-modern {
    --st-bg: #f1f5f9;
    --st-surface: #ffffff;
    --st-surface-2: #e2e8f0;
    --st-ink: #0f172a;
    --st-muted: #475569;
    --st-border: rgba(15, 23, 42, .12);
    --st-card-radius: 14px;
    --st-btn-radius: 10px;
    --st-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    --st-cover-ratio: 1 / 1;
    background: var(--st-bg);
    color: var(--st-ink);
}
.st-page.st-theme-modern .track-bar {
    background: #ffffff;
    border-bottom: 2px solid var(--csite-accent, #e85d04);
}
.st-page.st-theme-modern .st-hero-band {
    border-radius: 16px;
}
.st-page.st-theme-modern .st-toolbar {
    background: #ffffff;
    padding: .65rem;
    border-radius: 14px;
    border: 1px solid var(--st-border);
    box-shadow: var(--st-shadow);
}
.st-page.st-theme-modern .st-card:hover {
    border-color: var(--csite-accent, #e85d04);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .09);
}
.st-page.st-theme-modern .st-meta b {
    color: var(--csite-accent, #e85d04);
    font-size: 1.12rem;
}
.st-page.st-theme-modern .csite-card {
    background: var(--st-surface);
    border-radius: 14px;
}

/* --- Theme 4: Minimal (مينيمال هادي) --- */
.st-page.st-theme-minimal {
    --st-bg: #f6f6f4;
    --st-surface: #ffffff;
    --st-surface-2: #efefec;
    --st-ink: #18181b;
    --st-muted: #71717a;
    --st-border: #e4e4e0;
    --st-card-radius: 8px;
    --st-btn-radius: 6px;
    --st-shadow: none;
    --st-cover-ratio: 4 / 5;
    background: var(--st-bg);
    color: var(--st-ink);
}
.st-page.st-theme-minimal .track-bar {
    background: #f6f6f4;
    border-bottom: 1px solid var(--st-border);
    box-shadow: none;
}
.st-page.st-theme-minimal .st-hero-band {
    border-radius: 8px;
    border: 1px solid var(--st-border);
    box-shadow: none;
}
.st-page.st-theme-minimal .st-card {
    box-shadow: none;
    border: 1px solid var(--st-border);
}
.st-page.st-theme-minimal .st-card:hover {
    transform: none;
    border-color: var(--st-ink);
}
.st-page.st-theme-minimal .st-badge {
    border-radius: 4px;
    background: rgba(24, 24, 27, .78);
    color: #fff;
}
.st-page.st-theme-minimal .csite-card {
    background: #fff;
    border: 1px solid var(--st-border);
    border-radius: 8px;
    box-shadow: none;
}
.st-page.st-theme-minimal .csite-btn.is-primary {
    background: var(--st-ink);
    color: #fff;
    border-color: var(--st-ink);
}

/* --- Theme 5: Bold / Dark Luxury (فاخر غامق) --- */
.st-page.st-theme-bold {
    --st-bg: #0c0f14;
    --st-surface: #151a23;
    --st-surface-2: #1e2533;
    --st-ink: #f8fafc;
    --st-muted: #94a3b8;
    --st-border: rgba(255, 255, 255, .10);
    --st-card-radius: 18px;
    --st-btn-radius: 12px;
    --st-shadow: 0 12px 32px rgba(0, 0, 0, .38);
    --st-cover-ratio: 4 / 5;
    background: var(--st-bg);
    color: var(--st-ink);
}
.st-page.st-theme-bold .track-bar,
.st-page.st-theme-bold .car-pub-bar {
    background: rgba(12, 15, 20, .92);
    border-bottom: 1px solid var(--st-border);
    color: var(--st-ink);
    backdrop-filter: blur(12px);
}
.st-page.st-theme-bold .track-brand,
.st-page.st-theme-bold .track-brand strong,
.st-page.st-theme-bold .st-nav-link,
.st-page.st-theme-bold .st-nav-cart {
    color: var(--st-ink);
}
.st-page.st-theme-bold .track-kicker {
    color: var(--st-muted);
}
.st-page.st-theme-bold .st-nav-link,
.st-page.st-theme-bold .st-nav-cart {
    background: var(--st-surface);
    border-color: var(--st-border);
}
.st-page.st-theme-bold .st-nav-link.is-on,
.st-page.st-theme-bold .st-nav-cart.is-on {
    border-color: var(--csite-accent, #e85d04);
    color: #fff;
}
.st-page.st-theme-bold .csite-hero,
.st-page.st-theme-bold .st-hero-band {
    background: linear-gradient(135deg, #151a23 0%, #1d2432 100%);
    border: 1px solid var(--st-border);
    color: var(--st-ink);
}
.st-page.st-theme-bold .csite-title,
.st-page.st-theme-bold .csite-heading,
.st-page.st-theme-bold .st-title,
.st-page.st-theme-bold .csite-card-title,
.st-page.st-theme-bold .st-body h2 a,
.st-page.st-theme-bold .st-meta b,
.st-page.st-theme-bold .st-cart-info b,
.st-page.st-theme-bold .st-cart-sum,
.st-page.st-theme-bold .st-cart-total,
.st-page.st-theme-bold .st-cart-total b,
.st-page.st-theme-bold .st-pay-txt b,
.st-page.st-theme-bold .st-var-block legend {
    color: var(--st-ink);
}
.st-page.st-theme-bold .csite-tagline,
.st-page.st-theme-bold .st-lead,
.st-page.st-theme-bold .st-pdp-desc,
.st-page.st-theme-bold .st-count,
.st-page.st-theme-bold .st-hint,
.st-page.st-theme-bold .st-eyebrow,
.st-page.st-theme-bold .st-cart-info small,
.st-page.st-theme-bold .st-cart-sub,
.st-page.st-theme-bold .st-pay-txt small,
.st-page.st-theme-bold .st-empty p,
.st-page.st-theme-bold .st-pdp-attrs dt {
    color: var(--st-muted);
}
.st-page.st-theme-bold .csite-card,
.st-page.st-theme-bold .st-cart,
.st-page.st-theme-bold .st-summary,
.st-page.st-theme-bold .st-checkout,
.st-page.st-theme-bold .st-pdp-body,
.st-page.st-theme-bold .st-pdp-media {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    color: var(--st-ink);
}
.st-page.st-theme-bold .st-card:hover {
    border-color: var(--csite-accent, #e85d04);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .5);
}
.st-page.st-theme-bold .csite-btn.is-ghost {
    background: var(--st-surface-2);
    color: var(--st-ink);
    border-color: var(--st-border);
}
.st-page.st-theme-bold .csite-btn.is-ghost:hover {
    border-color: var(--csite-accent, #e85d04);
}
.st-page.st-theme-bold .form-control,
.st-page.st-theme-bold .st-search-input,
.st-page.st-theme-bold .st-sort-box,
.st-page.st-theme-bold .st-sort-select,
.st-page.st-theme-bold .st-qty {
    background: var(--st-surface-2);
    color: var(--st-ink);
    border-color: var(--st-border);
}
.st-page.st-theme-bold .st-sort-select option {
    background: #151a23;
    color: #f8fafc;
}
.st-page.st-theme-bold .form-label,
.st-page.st-theme-bold .st-qty-wrap span {
    color: #e2e8f0;
}
.st-page.st-theme-bold .form-control::placeholder {
    color: #64748b;
}
.st-page.st-theme-bold .st-size-chip,
.st-page.st-theme-bold .st-color-swatch,
.st-page.st-theme-bold .st-pay-opt {
    background: var(--st-surface-2);
    border-color: var(--st-border);
    color: var(--st-ink);
}
.st-page.st-theme-bold .st-cart-row {
    border-color: var(--st-border);
}
.st-page.st-theme-bold .st-cart-foot {
    border-color: var(--st-border);
}
.st-page.st-theme-bold .st-clear-btn {
    color: #f87171;
}
.st-page.st-theme-bold .track-foot,
.st-page.st-theme-bold .car-pub-foot {
    background: #090b10;
    border-top: 1px solid var(--st-border);
    color: var(--st-muted);
}
.st-page.st-theme-bold .track-foot strong,
.st-page.st-theme-bold .car-pub-foot strong,
.st-page.st-theme-bold .car-pub-foot-logo b {
    color: var(--st-ink);
}
.st-page.st-theme-bold .car-pub-foot a {
    color: #cbd5e1;
}
.st-page.st-theme-bold .st-flash.is-ok {
    background: rgba(16, 185, 129, .15);
    border-color: rgba(16, 185, 129, .35);
    color: #6ee7b7;
}
.st-page.st-theme-bold .st-flash.is-err {
    background: rgba(239, 68, 68, .15);
    border-color: rgba(239, 68, 68, .35);
    color: #fca5a5;
}

/* ---------- 5. Mobile 390px Responsive Grid (2-col on Boutique/Modern/Minimal/Bold) ---------- */
@media (max-width: 640px) {
    .st-preview-inner {
        padding: .55rem .75rem;
        gap: .5rem;
    }
    .st-preview-switch {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .15rem;
        -webkit-overflow-scrolling: touch;
    }
    .st-preview-chip {
        flex: 0 0 auto;
    }
    .st-preview-acts {
        width: 100%;
        justify-content: space-between;
    }
    .st-toolbar {
        gap: .5rem;
    }
    .st-search-box {
        flex: 1 1 100%;
    }
    .st-sort-box {
        width: 100%;
        justify-content: space-between;
    }
    .st-sort-select {
        flex: 1 1 auto;
    }
    .st-cat-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .25rem;
        -webkit-overflow-scrolling: touch;
    }
    .st-cat-chip {
        flex: 0 0 auto;
    }
    .st-page.st-theme-boutique .st-grid,
    .st-page.st-theme-modern .st-grid,
    .st-page.st-theme-minimal .st-grid,
    .st-page.st-theme-bold .st-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem;
    }
    .st-page.st-theme-boutique .st-body,
    .st-page.st-theme-modern .st-body,
    .st-page.st-theme-minimal .st-body,
    .st-page.st-theme-bold .st-body {
        padding: .65rem;
    }
    .st-page.st-theme-boutique .st-body h2,
    .st-page.st-theme-modern .st-body h2,
    .st-page.st-theme-minimal .st-body h2,
    .st-page.st-theme-bold .st-body h2 {
        font-size: .88rem;
        line-height: 1.3;
    }
    .st-page.st-theme-boutique .st-card-desc,
    .st-page.st-theme-modern .st-card-desc,
    .st-page.st-theme-minimal .st-card-desc,
    .st-page.st-theme-bold .st-card-desc {
        display: none;
    }
    .st-page.st-theme-boutique .st-add,
    .st-page.st-theme-modern .st-add,
    .st-page.st-theme-minimal .st-add,
    .st-page.st-theme-bold .st-add {
        padding: .46rem .55rem;
        font-size: .78rem;
    }
}

/* ==========================================================================
   6. Admin Theme Picker Cards (/site?sec=store&panel=settings)
   ========================================================================== */
.stm-themes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}
.stm-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .85rem;
    margin-bottom: .5rem;
}
.stm-theme-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid rgba(15, 23, 42, .10);
    border-radius: 14px;
    background: var(--bs-body-bg, #ffffff);
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.stm-theme-card:hover {
    border-color: rgba(232, 93, 4, .45);
    transform: translateY(-2px);
}
.stm-theme-card.is-on {
    border-color: var(--bs-primary, #e85d04);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, .14);
}
.stm-theme-pick {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    cursor: pointer;
    margin: 0;
}
.stm-theme-pick input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Mini CSS Wireframe Preview */
.stm-theme-wire {
    background: var(--w-bg, #f8fafc);
    padding: .55rem;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.stm-wire-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .22rem .35rem;
    border-radius: 6px;
    background: var(--w-card, #fff);
    border: 1px solid rgba(15, 23, 42, .06);
}
.stm-wire-logo {
    width: 36px;
    height: 6px;
    border-radius: 999px;
    background: var(--w-ink, #0f172a);
    opacity: .75;
}
.stm-wire-pill {
    width: 18px;
    height: 7px;
    border-radius: 999px;
    background: var(--w-acc, #e85d04);
}
.stm-wire-hero {
    padding: .35rem .4rem;
    border-radius: 7px;
    background: var(--w-card, #fff);
    display: flex;
    flex-direction: column;
    gap: .22rem;
}
.stm-wire-h1 {
    width: 56%;
    height: 6px;
    border-radius: 999px;
    background: var(--w-ink, #0f172a);
    opacity: .8;
}
.stm-wire-h2 {
    width: 82%;
    height: 4px;
    border-radius: 999px;
    background: var(--w-ink, #0f172a);
    opacity: .25;
}
.stm-wire-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .35rem;
}
.stm-wire-item {
    background: var(--w-card, #fff);
    border-radius: 7px;
    padding: .25rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    border: 1px solid rgba(15, 23, 42, .06);
}
.stm-wire-img {
    display: block;
    width: 100%;
    height: 30px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(148, 163, 184, .28), rgba(148, 163, 184, .12));
}
.stm-theme-wire.is-wire-boutique .stm-wire-img {
    height: 40px;
    border-radius: 6px;
}
.stm-theme-wire.is-wire-minimal .stm-wire-item,
.stm-theme-wire.is-wire-minimal .stm-wire-hero,
.stm-theme-wire.is-wire-minimal .stm-wire-bar {
    border-radius: 3px;
}
.stm-theme-wire.is-wire-bold .stm-wire-bar,
.stm-theme-wire.is-wire-bold .stm-wire-item {
    border-color: rgba(255, 255, 255, .10);
}
.stm-wire-ln {
    width: 75%;
    height: 4px;
    border-radius: 999px;
    background: var(--w-ink, #0f172a);
    opacity: .65;
}
.stm-wire-pr {
    width: 42%;
    height: 5px;
    border-radius: 999px;
    background: var(--w-acc, #e85d04);
}

.stm-theme-meta {
    padding: .7rem .75rem .55rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1 1 auto;
}
.stm-theme-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .35rem;
    flex-wrap: wrap;
}
.stm-theme-name {
    font-size: .92rem;
    font-weight: 700;
}
.stm-theme-active {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    font-size: .7rem;
    font-weight: 700;
    color: #059669;
    background: rgba(16, 185, 129, .12);
    padding: .12rem .45rem;
    border-radius: 999px;
}
.stm-theme-desc {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--bs-secondary-color, #64748b);
}
.stm-theme-fit {
    margin-top: auto;
    font-size: .72rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #64748b);
}
.stm-theme-foot {
    padding: 0 .75rem .7rem;
}
.stm-theme-prev {
    width: 100%;
    font-size: .78rem;
}

/* Admin dark mode compatibility */
html.theme-dark .stm-themes,
[data-theme="dark"] .stm-themes {
    border-top-color: rgba(255, 255, 255, .10);
}
html.theme-dark .stm-theme-card,
[data-theme="dark"] .stm-theme-card {
    border-color: rgba(255, 255, 255, .12);
}
html.theme-dark .stm-theme-card.is-on,
[data-theme="dark"] .stm-theme-card.is-on {
    border-color: var(--bs-primary, #f97316);
}
