.apps-store {
    --store-accent: 33, 117, 164;
    --store-surface: #fff;
    --store-soft: #f3f7fb;
    --store-text: #28374b;
    --store-muted: #627287;
    --store-border: #e3eaf1;
    padding-block: 1.75rem 2.5rem;
    color: var(--store-text);
}
[data-bs-theme="dark"] .apps-store {
    --store-accent: 117, 193, 231;
    --store-surface: #1a1f28;
    --store-soft: #202935;
    --store-text: #d1dbe7;
    --store-muted: #a6b4c5;
    --store-border: #2e3744;
}
.apps-store [hidden] { display: none !important; }
.store-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--store-border);
    border-radius: 16px;
    background: var(--store-surface);
}
.store-search { position: relative; flex: 1 1 20rem; }
.store-search > i {
    position: absolute;
    top: 50%;
    left: .9rem;
    transform: translateY(-50%);
    color: var(--store-muted);
    pointer-events: none;
    font-size: 1.1rem;
}
.store-search .form-control {
    min-height: 44px;
    padding-left: 2.6rem;
    border-radius: 10px;
    border-color: var(--store-border);
    background: var(--store-soft);
    color: var(--store-text);
}
.store-search .form-control::placeholder { color: var(--store-muted); opacity: 1; }
.store-search .form-control:focus {
    border-color: rgb(var(--store-accent));
    box-shadow: 0 0 0 3px rgba(var(--store-accent), .12);
}
.store-filters {
    display: flex;
    gap: .25rem;
    padding: .25rem;
    border-radius: 10px;
    background: var(--store-soft);
}
.store-filters button {
    border: 0;
    border-radius: 8px;
    min-height: 38px;
    padding: .5rem .85rem;
    color: var(--store-muted);
    background: transparent;
    font-weight: 600;
    font-size: .85rem;
}
.store-filters button:hover { color: var(--store-text); }
.store-filters button[aria-pressed="true"] {
    color: rgb(var(--store-accent));
    background: var(--store-surface);
    box-shadow: 0 2px 5px rgba(20, 40, 65, .05);
}
.store-results { margin: 0; font-size: .8rem; color: var(--store-muted); min-width: 7.2rem; }
.store-section + .store-section { margin-top: 2.5rem; }
.store-section-heading { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.2rem; }
.store-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    background: rgba(var(--store-accent), .1);
    color: rgb(var(--store-accent));
    font-size: 1.4rem;
}
.store-section-heading h2 {
    margin: 0 0 .3rem;
    font-size: 1.08rem;
    font-weight: 650;
    color: var(--store-text);
    line-height: 1.5;
    letter-spacing: -.015em;
}
.store-section-heading p { margin: 0; font-size: .84rem; line-height: 1.6; color: var(--store-muted); }
.store-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    padding: .1rem .4rem;
    border-radius: 7px;
    margin-left: .35rem;
    background: var(--store-soft);
    color: var(--store-muted);
    font-size: .72rem;
    vertical-align: middle;
}
.store-app-grid, .store-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 1rem;
}
.store-app-card, .store-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--store-border);
    border-radius: 16px;
    background: var(--store-surface);
    box-shadow: 0 3px 16px rgba(24, 43, 68, .035);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.store-app-card:hover, .store-app-card:focus-within,
.store-product-card:hover, .store-product-card:focus-within {
    border-color: rgba(var(--store-accent), .6);
    box-shadow: 0 6px 20px rgba(24, 43, 68, .08);
}
.store-app-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    gap: 1rem;
    padding: 1.3rem;
    border-radius: 16px;
    color: var(--store-text);
}
.store-app-link:hover, .store-product-link:hover { color: var(--store-text); }
.store-app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(var(--store-accent), .16), rgba(var(--store-accent), .04));
    color: rgb(var(--store-accent));
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.04em;
}
.store-app-icon img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; }
.store-item-kind { display: block; margin-bottom: .25rem; font-size: .72rem; font-weight: 500; color: var(--store-muted); }
.store-app-info { min-width: 0; }
.apps-store h3 { margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; color: var(--store-text); }
.store-open { display: flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .2rem; font-size: .8rem; font-weight: 600; color: rgb(var(--store-accent)); }
.store-product-link { display: block; flex: 1; border-radius: 16px 16px 0 0; color: var(--store-text); }
.store-product-media {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    aspect-ratio: 16 / 9;
    margin: .65rem .65rem 0;
    border-radius: 11px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--store-accent), .09), var(--store-soft));
}
.store-product-media > img { width: 100%; height: 100%; object-fit: contain; background: var(--store-surface); }
.store-product-placeholder { font-size: 2rem; color: rgba(var(--store-accent), .75); }
.store-detail-hint {
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    padding: .2rem .45rem;
    border-radius: 5px;
    font-size: .66rem;
    color: var(--store-text);
    background: var(--store-surface);
}
.store-product-info { padding: 1rem 1.1rem .4rem; }
.store-price { margin: .7rem 0 .35rem; color: var(--store-text); font-weight: 700; font-size: .97rem; }
.store-product-action { padding: .7rem 1.1rem 1.1rem; }
.store-product-action .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    min-height: 42px;
    border-radius: 9px;
    font-size: .78rem;
    font-weight: 600;
    white-space: normal;
    color: rgb(var(--store-accent));
    border-color: rgba(var(--store-accent), .35);
}
.store-product-action .btn:hover { color: var(--store-text); background: rgba(var(--store-accent), .12); }
.store-login-note {
    display: flex;
    gap: .6rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: var(--store-soft);
    font-size: .85rem;
}
.store-login-note p { margin: 0; }
.store-login-note a { color: rgb(var(--store-accent)); text-decoration: underline; }
.apps-store a:focus-visible, .apps-store button:focus-visible {
    outline: 2px solid rgb(var(--store-accent));
    outline-offset: 3px;
}
.store-empty {
    padding: 3.5rem 1.5rem;
    border: 1px solid var(--store-border);
    border-radius: 18px;
    background: var(--store-surface);
    text-align: center;
}
.store-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.2rem;
    background: var(--store-soft);
    border-radius: 20px;
    color: rgb(var(--store-accent));
    font-size: 1.8rem;
}
.store-empty h2 { font-size: 1.15rem; color: var(--store-text); }
.store-empty p { color: var(--store-muted); line-height: 1.6; }
@media (max-width: 575.98px) {
    .apps-store { padding-top: 1.25rem; }
    .store-controls { padding: .85rem; gap: .75rem; margin-bottom: 1.5rem; }
    .store-search { flex-basis: 100%; }
    .store-filters { flex: 1 1 100%; }
    .store-filters button { flex: 1; min-height: 40px; }
    .store-results { padding-left: .15rem; }
    .store-section-heading { align-items: flex-start; gap: .7rem; }
    .store-section-heading h2 { font-size: 1rem; }
    .store-section-heading p { font-size: .8rem; }
    .store-app-grid, .store-product-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
    .store-app-link { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: .2rem 1rem; padding: 1rem; }
    .store-app-icon { grid-row: span 2; width: 50px; height: 50px; border-radius: 14px; }
    .store-app-icon img { width: 50px; height: 50px; }
    .store-open { grid-column: 2; padding-top: .35rem; }
    .store-product-media { aspect-ratio: 2.3 / 1; }
    .store-product-action .btn { min-height: 44px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
    .store-app-card, .store-product-card { transition: none; }
}

.content-page:has(.apps-store) .breadcrumb-item.active { color: var(--bs-body-color); }

.store-section[hidden] + .store-section { margin-top: 0; }
