/* ==========================================================================
   App Store.app (Projects & Creations Showroom) Styling
   ========================================================================== */

.appstore-layout {
    display: flex;
    overflow: hidden;
    height: 100%;
}

.appstore-sidebar {
    width: 150px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--window-border);
    padding: 15px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.appstore-search-box {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.appstore-search-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 11.5px;
    outline: none;
    width: 100px;
    font-family: inherit;
}

.appstore-feed {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.appstore-hero-banner {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #00c6ff 100%);
    border-radius: 14px;
    padding: 24px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    margin-bottom: 24px;
    transition: transform 0.2s ease;
}

.appstore-hero-banner:hover {
    transform: scale(1.01);
}

.hero-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.appstore-hero-banner h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #fff;
}

.appstore-hero-banner p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.hero-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.appstore-get-btn {
    background: #fff;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s, transform 0.15s;
}

.appstore-get-btn:hover {
    transform: scale(1.05);
    background: #f0f0f0;
}

.hero-btn {
    background: #fff;
    color: var(--accent);
}

.app-rating {
    font-size: 12px;
    opacity: 0.85;
}

.appstore-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.appstore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.app-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.app-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.app-card-details {
    flex: 1;
    overflow: hidden;
}

.app-card-details h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-category {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}

.app-stars {
    font-size: 11px;
    color: #f6d365;
}

.rating-num { color: #888; margin-left: 2px; }

.app-desc {
    font-size: 11px;
    color: #aaa;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 3px;
    margin-bottom: 0 !important;
}

/* ── Data-driven cards & product pages ─────────────────────────────────── */
.app-card { align-items: flex-start; cursor: pointer; }
.app-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-card-icon-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 14px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}
.app-card .app-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
button.appstore-get-btn { border: none; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; align-self: center; }
.appstore-get-btn.live { background: #30d158; color: #fff; }

.hero-row { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; }
.hero-icon { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35)); }
.appstore-hero-banner h2 { margin: 0 0 4px; }
.appstore-hero-banner p { margin: 0; opacity: 0.9; font-size: 13px; line-height: 1.5; }
.appstore-hero-banner:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.appstore-product { color: rgba(255, 255, 255, 0.82); }
.appstore-back {
    border: none; background: none; color: var(--accent);
    font: inherit; font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 16px;
    display: inline-flex; align-items: center; gap: 6px;
}
.product-header { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.product-header img { width: 112px; height: 112px; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4)); }
.product-header h2 { font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin: 0; }
.product-sub { font-size: 13px; color: rgba(255, 255, 255, 0.55); margin: 4px 0 12px; }
.product-actions { display: flex; gap: 10px; align-items: center; }
.product-share {
    width: 30px; height: 30px; border-radius: 50%;
    border: 0.5px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08);
    color: #fff; cursor: pointer;
}
.product-facts {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 18px;
}
.product-facts div { padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.product-facts div + div { border-left: 0.5px solid rgba(255, 255, 255, 0.08); }
.product-facts span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.45); }
.product-facts strong { font-size: 13px; color: #fff; }
.product-section { margin-bottom: 18px; }
.product-section h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.product-section p { font-size: 13px; line-height: 1.65; white-space: pre-line; }
.story-history { margin: 0; padding: 0 0 0 16px; list-style: none; border-left: 2px solid rgba(255, 255, 255, 0.14); }
.story-history li { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 0 0 10px 6px; font-size: 13px; line-height: 1.5; }
.story-history li::before { content: ""; position: absolute; top: 6px; left: -22px; width: 8px; height: 8px; border-radius: 50%; background: #0a84ff; }
.story-history b { color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.story-history li:not(:has(b)) { grid-template-columns: 1fr; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.product-tags span {
    font-size: 12px; padding: 4px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.07); border: 0.5px solid rgba(255, 255, 255, 0.14);
}

/* Demo video on a product page (projectVideoHtml in js/core/utils.js) */
.product-video { position: relative; overflow: hidden; max-width: 720px; border-radius: 14px; background: #000; aspect-ratio: 16 / 9; }
.product-video iframe, .product-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.product-video-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent, #007aff); font-weight: 600; text-decoration: none; }
.product-actions .product-share + .product-share { margin-left: 4px; }
