/* ═══════════════════════════════════════════════════════════════
   Activity Store — Premium Marketplace UI
   A full-screen store for browsing, searching, and cloning
   teacher-created lessons & activities.
   ═══════════════════════════════════════════════════════════════ */

/* ── Store Overlay ── */
.store-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-auth);
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: 'Outfit', 'Inter', sans-serif;
    overflow: hidden;
}

.store-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ── Store Header ── */
.store-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.store-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6BA3BE 0%, #5B93AE 50%, #7BB4C9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 15px rgba(107, 163, 190, 0.35);
}

.store-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.store-logo-text span {
    background: linear-gradient(135deg, #5B93AE, #7BC8A4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Search Bar ── */
.store-search-wrapper {
    flex: 1;
    max-width: 560px;
    position: relative;
}

.store-search-input {
    width: 100%;
    padding: 12px 20px 12px 46px;
    border-radius: 14px;
    border: 1px solid var(--border-glass);
    background: var(--bg-item);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--tr-fast);
    outline: none;
}

.store-search-input::placeholder {
    color: var(--text-muted);
}

.store-search-input:focus {
    border-color: #6BA3BE;
    background: var(--bg-item-hover);
    box-shadow: 0 0 0 4px rgba(107, 163, 190, 0.15);
}

.store-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* ── Header Actions ── */
.store-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.store-header-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-item);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--tr-fast);
}

.store-header-btn:hover {
    background: var(--bg-item-hover);
    color: var(--text-main);
    border-color: var(--border-strong);
}

.store-publish-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #F4A583 0%, #E8967A 100%);
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--tr-fast);
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(244, 165, 131, 0.3);
    white-space: nowrap;
}

.store-publish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 165, 131, 0.4);
    filter: brightness(1.05);
}

.store-profile-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--tr-fast);
    font-family: inherit;
    white-space: nowrap;
}

.store-profile-btn:hover {
    transform: translateY(-2px);
    background: var(--bg-highlight);
    border-color: var(--border-highlight);
}

.store-close-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-item);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--tr-fast);
}

.store-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── Store Body ── */
.store-body {
    display: flex;
    flex: 1;
    min-height: 0; /* iOS flex scroll fix */
    overflow: hidden;
}

/* ── Category Tabs (Left Sidebar) ── */
.store-sidebar {
    width: 220px;
    padding: 20px 12px;
    border-right: 1px solid var(--border-glass);
    background: var(--bg-surface);
    flex-shrink: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.store-sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 8px 14px 6px;
}

.store-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--tr-fast);
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.store-tab:hover {
    background: var(--bg-item);
    color: var(--text-main);
}

.store-tab.active {
    background: rgba(107, 163, 190, 0.12);
    color: #5B93AE;
    font-weight: 700;
}

.store-tab i {
    width: 22px;
    text-align: center;
    font-size: 0.95rem;
}

.store-tab .tab-count {
    margin-left: auto;
    font-size: 0.72rem;
    background: var(--bg-item);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-muted);
}

.store-tab.active .tab-count {
    background: rgba(107, 163, 190, 0.2);
    color: #5B93AE;
}

/* ── Main Content Area ── */
.store-content {
    flex: 1;
    min-height: 0; /* iOS flex scroll fix */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Subject Filter Bar ── */
.store-subject-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px 0;
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.store-subject-bar::-webkit-scrollbar {
    height: 0;
    display: none;
}

.store-subject-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tr-fast);
    font-family: inherit;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-subject-chip:hover {
    background: var(--bg-item);
    color: var(--text-main);
}

.store-subject-chip.active {
    background: var(--bg-item);
    border-color: var(--subject-color, #6BA3BE);
    color: var(--subject-color, #5B93AE);
}

/* ── Filter Bar ── */
.store-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.store-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tr-fast);
    font-family: inherit;
    white-space: nowrap;
}

.store-filter-btn:hover {
    background: var(--bg-item);
    color: var(--text-main);
}

.store-filter-btn.active {
    background: rgba(107, 163, 190, 0.12);
    border-color: #6BA3BE;
    color: #5B93AE;
}

.store-filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border-glass);
    flex-shrink: 0;
}

.store-results-count {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Grid of Items ── */
.store-grid {
    flex: 1;
    min-height: 0; /* iOS flex scroll fix */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    align-content: start;
}

/* ── Store Card ── */
.store-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.store-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 163, 190, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(107, 163, 190, 0.15);
}

/* Card Preview */
.store-card-preview {
    height: 100px;
    background: linear-gradient(135deg, rgba(107, 163, 190, 0.06) 0%, rgba(107, 163, 190, 0.04) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.store-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-card-preview-icon {
    font-size: 2rem;
    opacity: 0.2;
}

.store-card-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
}

.store-card-type-badge.lesson { background: rgba(123, 200, 164, 0.2); color: #5BAF8E; border: 1px solid rgba(123, 200, 164, 0.3); }
.store-card-type-badge.quiz { background: rgba(245, 215, 110, 0.25); color: #D4A934; border: 1px solid rgba(245, 215, 110, 0.35); }
.store-card-type-badge.match-mind { background: rgba(107, 163, 190, 0.2); color: #5B93AE; border: 1px solid rgba(107, 163, 190, 0.3); }
.store-card-type-badge.insight-wall { background: rgba(245, 181, 181, 0.25); color: #D48A8A; border: 1px solid rgba(245, 181, 181, 0.35); }
.store-card-type-badge.jigsaw { background: rgba(201, 168, 212, 0.2); color: #A882B5; border: 1px solid rgba(201, 168, 212, 0.3); }
.store-card-type-badge.sketch-solve { background: rgba(244, 165, 131, 0.2); color: #D4885E; border: 1px solid rgba(244, 165, 131, 0.3); }

.store-card-subject-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    background: var(--bg-surface);
    color: var(--subject-color);
    border: 1px solid var(--subject-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Body */
.store-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.store-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-card-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Footer: Teacher info + stats */
.store-card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.store-card-teacher {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity var(--tr-fast);
    flex: 1;
    min-width: 0;
}

.store-card-teacher:hover {
    opacity: 0.8;
}

.store-teacher-avatar {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6BA3BE, #7BC8A4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
    overflow: hidden;
}

.store-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-teacher-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Stats */
.store-card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.store-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.store-stat i {
    font-size: 0.68rem;
}

/* ── Empty State ── */
.store-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    gap: 16px;
    grid-column: 1 / -1;
}

.store-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: rgba(107, 163, 190, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #5B93AE;
}

.store-empty h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.store-empty p {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}

/* ── Loading Skeleton ── */
.store-card-skeleton {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        var(--bg-item) 25%,
        var(--bg-item-hover) 50%,
        var(--bg-item) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-preview {
    height: 160px;
}

.skeleton-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-title {
    height: 20px;
    width: 75%;
    border-radius: 6px;
}

.skeleton-desc {
    height: 14px;
    width: 90%;
    border-radius: 4px;
}

.skeleton-footer {
    height: 48px;
    margin-top: 8px;
    border-radius: 0 0 20px 20px;
}

/* ═══════════════════════════════════════════════════════════════
   Teacher Profile Page (Inside Store)
   ═══════════════════════════════════════════════════════════════ */

.store-teacher-profile {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.store-teacher-profile.show {
    display: flex;
}

.store-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}

.store-profile-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: var(--bg-item);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--tr-fast);
    flex-shrink: 0;
}

.store-profile-back:hover {
    background: var(--bg-item-hover);
    color: var(--text-main);
}

.store-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6BA3BE, #7BC8A4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.store-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-profile-info {
    flex: 1;
}

.store-profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.store-profile-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.store-profile-stats {
    display: flex;
    gap: 16px;
    margin-left: auto;
    flex-shrink: 0;
}

.store-profile-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-profile-stat-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
}

.store-profile-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Publish Modal ── */
.store-publish-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: calc(var(--z-auth) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.store-publish-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.store-publish-card {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 92%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: storeModalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes storeModalPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.store-publish-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
}

.store-publish-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-publish-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--bg-item);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tr-fast);
}

.store-publish-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.store-publish-body {
    padding: 0 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.store-publish-body .input-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.store-publish-body .label-modern {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.store-publish-body .input-modern {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-item);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--tr-fast);
    outline: none;
    width: 100%;
}

.store-publish-body .input-modern:focus {
    border-color: #6BA3BE;
    box-shadow: 0 0 0 4px rgba(107, 163, 190, 0.12);
}

/* Source Picker */
.store-source-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.store-source-option {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--tr-fast);
}

.store-source-option:hover {
    background: var(--bg-item);
    color: var(--text-main);
}

.store-source-option.selected {
    background: rgba(107, 163, 190, 0.1);
    border-color: #6BA3BE;
    color: #5B93AE;
}

.store-source-option i {
    font-size: 1.3rem;
}

/* Submit */
.store-publish-submit {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #6BA3BE, #5B93AE);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: all var(--tr-fast);
    box-shadow: 0 6px 20px rgba(107, 163, 190, 0.3);
    margin-top: 4px;
}

.store-publish-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(107, 163, 190, 0.4);
}

.store-publish-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ── Item Detail Modal ── */
.store-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: calc(var(--z-auth) + 5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.store-detail-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.store-detail-card {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 92%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: storeModalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.store-detail-preview {
    height: 200px;
    background: linear-gradient(135deg, rgba(107, 163, 190, 0.08) 0%, rgba(107, 163, 190, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.store-detail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-detail-preview .store-card-preview-icon {
    font-size: 3rem;
}

.store-detail-body {
    padding: 28px;
}

.store-detail-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.store-detail-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.store-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.store-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.store-detail-meta-item i {
    color: #5B93AE;
}

/* Like & Report Buttons */
.store-detail-like-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.store-like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.store-like-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.store-like-btn.liked {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.store-like-btn.liked i {
    animation: likePop 0.3s ease;
}

@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.store-like-btn i {
    font-size: 1.1rem;
}

.store-report-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-left: auto;
}

.store-report-btn:hover {
    background: rgba(251, 146, 60, 0.08);
    border-color: rgba(251, 146, 60, 0.3);
    color: #fb923c;
}

/* Admin Action Buttons */
.store-admin-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(107, 163, 190, 0.06);
    border: 1px solid rgba(107, 163, 190, 0.15);
    border-radius: 12px;
}

.store-admin-actions .admin-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #5B93AE;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}

.store-admin-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.store-admin-btn.freeze {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}
.store-admin-btn.freeze:hover {
    background: rgba(251, 146, 60, 0.25);
}

.store-admin-btn.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.store-admin-btn.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Detail Actions */
.store-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.store-clone-btn {
    flex: 1.5;
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #7BC8A4 0%, #5BAF8E 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: all var(--tr-fast);
    box-shadow: 0 6px 20px rgba(123, 200, 164, 0.3);
}

.store-clone-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(123, 200, 164, 0.4);
}

.store-detail-close-btn {
    flex: 1;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--tr-fast);
}

.store-detail-close-btn:hover {
    background: var(--bg-item);
    color: var(--text-main);
}

/* Thumbnail Upload */
.store-thumbnail-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.store-thumbnail-preview {
    width: 100px;
    height: 70px;
    border-radius: 10px;
    border: 2px dashed var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-item);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.store-thumbnail-preview:hover {
    border-color: #6BA3BE;
    background: rgba(107, 163, 190, 0.05);
}

.store-thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-thumbnail-preview i {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.store-thumbnail-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.store-thumbnail-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.store-thumbnail-remove {
    font-size: 0.75rem;
    color: #ef4444;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.store-thumbnail-remove:hover {
    text-decoration: underline;
}

/* Frozen Card Overlay */
.store-card.frozen {
    opacity: 0.5;
    position: relative;
}

.store-card.frozen::after {
    content: '❄️ Frozen';
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(251, 146, 60, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Report Modal inside detail */
.store-report-form {
    background: var(--bg-item);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    display: none;
}

.store-report-form.show {
    display: block;
}

.store-report-form select,
.store-report-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    margin-top: 8px;
    outline: none;
}

.store-report-form select:focus,
.store-report-form textarea:focus {
    border-color: #6BA3BE;
}

.store-report-submit {
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: #fb923c;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.store-report-submit:hover {
    background: #f97316;
}

/* Premium badge on publish button */
.store-premium-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Detail Teacher Section */
.store-detail-teacher {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: var(--bg-item);
    margin-bottom: 24px;
    cursor: pointer;
    transition: all var(--tr-fast);
}

.store-detail-teacher:hover {
    background: var(--bg-item-hover);
}

.store-detail-teacher-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6BA3BE, #7BC8A4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.store-detail-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-detail-teacher-info {
    flex: 1;
}

.store-detail-teacher-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.store-detail-teacher-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.store-detail-teacher-arrow {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   Content Preview (Inside Detail Modal)
   ═══════════════════════════════════════════════════════════════ */

.store-content-preview {
    margin-bottom: 24px;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-item);
}

.store-content-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #5B93AE;
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.store-content-preview-body {
    padding: 14px;
    max-height: 380px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Loading */
.scp-loading {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.scp-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* ── Slides Preview ── */
.scp-slides-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.scp-slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.scp-slide {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    aspect-ratio: 16 / 10;
    background: rgba(0,0,0,0.05);
}

.scp-slide:hover {
    border-color: #5B93AE;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.scp-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scp-slide-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.scp-slide-num {
    position: absolute;
    bottom: 4px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

/* ── Lightbox ── */
.scp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: scpLbIn 0.25s ease;
}

@keyframes scpLbIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scp-lb-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.scp-lb-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.scp-lb-close:hover {
    background: rgba(239, 68, 68, 0.4);
}

.scp-lb-body {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 80vh;
}

.scp-lb-img {
    max-width: 80vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-lb-img img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
}

.scp-lb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.4);
    font-size: 1.2rem;
    padding: 60px;
}

.scp-lb-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.scp-lb-nav:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.scp-lb-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* ── Quiz Questions ── */
.scp-questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scp-question {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 14px;
}

.scp-q-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.scp-q-num {
    background: linear-gradient(135deg, #5B93AE, #6BA3BE);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.scp-q-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    flex: 1;
}

.scp-q-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.scp-q-image {
    margin: 8px 0;
    border-radius: 10px;
    overflow: hidden;
    max-height: 140px;
}

.scp-q-image img {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    display: block;
}

.scp-q-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scp-q-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.03);
    transition: background 0.15s;
}

.scp-q-opt.correct {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 600;
}

.scp-q-opt.correct i {
    color: #10b981;
}

/* ── Worksheet Questions ── */
.scp-ws-q {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Match Mind Pairs ── */
.scp-pairs-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scp-pair {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
}

.scp-pair-term, .scp-pair-def {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.scp-pair-term {
    font-weight: 600;
}

.scp-pair-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.scp-pair-arrow {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ── Insight Wall / Sketch Solve Prompts ── */
.scp-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scp-prompt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* ── Jigsaw / Sketch Solve Image ── */
.scp-jigsaw-img {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.scp-jigsaw-img img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.scp-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .store-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .store-logo-text {
        display: none;
    }

    .store-search-wrapper {
        order: 3;
        max-width: none;
        width: 100%;
    }

    .store-sidebar {
        display: none;
    }

    /* Mobile tabs strip */
    .store-mobile-tabs {
        display: flex !important;
        overflow-x: auto;
        padding: 8px 16px;
        gap: 6px;
        border-bottom: 1px solid var(--border-glass);
        flex-shrink: 0;
        scrollbar-width: none;
    }

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

    .store-mobile-tab {
        padding: 8px 16px;
        border-radius: 20px;
        border: 1px solid var(--border-glass);
        background: transparent;
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: all var(--tr-fast);
        font-family: inherit;
    }

    .store-mobile-tab.active {
        background: rgba(107, 163, 190, 0.12);
        border-color: #6BA3BE;
        color: #5B93AE;
    }

    .store-grid {
        padding: 16px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .store-filter-bar {
        padding: 10px 16px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .store-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .store-profile-header {
        flex-wrap: wrap;
        padding: 20px 16px;
        gap: 16px;
    }

    .store-publish-card,
    .store-detail-card {
        width: 96%;
        max-height: 90vh;
    }

    .scp-slides-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .store-content-preview-body {
        max-height: 260px;
    }

    .scp-lb-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Desktop: hide mobile tabs */
@media (min-width: 769px) {
    .store-mobile-tabs {
        display: none !important;
    }
}
