/* ============================================================
   Jarvis 1.4.10 — homepage feed + rails (home-1410.css)
   Loaded ONLY by the home page (classic via @push('styles'),
   pastel via @push('head')). Never mixed with the shared
   stylesheets. All classes are home1410- prefixed except the
   two anchor-tab rules that mirror the themes' own tab styles
   (the feed tabs are now server-side <a> links, not buttons).

   Theme tokens resolve per theme via var() fallbacks:
   classic defines --text/--muted/--border-soft/--orange,
   pastel defines --pv-ink/--pv-muted/--pv-line/--pv-orange.
   Both themes flip those tokens in dark mode, so this file
   needs no theme-specific overrides except the pastel tab
   dark-mode rules copied from pastel-v25.css.
   ============================================================ */

/* ---------- Hero count line ---------- */
.home1410-count-line {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted, var(--pv-muted, #6E6E66));
}
.home1410-count-line strong {
    color: var(--text, var(--pv-ink, #111214));
    font-weight: 700;
}

/* ---------- 3-column body: sponsored / feed / news ---------- */
.home1410-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 300px;
    grid-template-areas: "sponsored feed news";
    gap: 24px;
    align-items: start;
}
.home1410-feed { grid-area: feed; min-width: 0; }
.home1410-rail-sponsored { grid-area: sponsored; min-width: 0; }
.home1410-rail-news { grid-area: news; min-width: 0; }

@media (min-width: 1024px) {
    .home1410-rail {
        position: sticky;
        top: 90px;
    }
}

/* Mobile: single column — feed first, then news, then sponsored. */
@media (max-width: 1023px) {
    .home1410-body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "feed" "news" "sponsored";
        gap: 20px;
    }
}

/* Pastel feed grid: the centre column is ~650px wide, so the theme's
   fixed 4-column .pv-grid would squeeze cards. Auto-fill keeps two
   comfortable columns on desktop and collapses to one on narrow
   screens (min(100%, 260px) handles the single-column case). */
.home1410-feed .pv-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

/* ---------- Feed tabs + category pills (server-side links) ---------- */
.home1410-feed-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.home1410-feed-tabs .filter-tab-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}
/* Pastel: anchor tabs mirror .pv-filter-tabs button exactly. */
.pv-filter-tabs a {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pv-ink-soft);
    background: #fff;
    border: 1px solid var(--pv-line);
    border-radius: 999px;
    padding: 8px 15px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all .2s var(--pv-ease);
}
.pv-filter-tabs a:hover { border-color: var(--pv-ink); }
.pv-filter-tabs a.on { background: var(--pv-ink); color: #fff; border-color: var(--pv-ink); }
:root[data-theme="dark"] .pv-filter-tabs a {
    background: var(--pv-card);
    color: var(--pv-ink-soft);
    border-color: var(--pv-line);
}
:root[data-theme="dark"] .pv-filter-tabs a.on {
    background: var(--pv-ink);
    border-color: var(--pv-ink);
    color: #121316;
}

.home1410-cat-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.home1410-feed-note {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted, var(--pv-muted, #6E6E66));
    margin: 0 0 16px;
}
.home1410-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.home1410-pagination nav { max-width: 100%; }
.home1410-browse-all {
    text-align: center;
    margin-top: 24px;
}

/* ---------- Rails (shared list styles; cards use the theme's own classes) ---------- */
.home1410-rail-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.home1410-rail-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--text, var(--pv-ink, #111214));
    margin: 0;
}
.home1410-rail-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--orange, var(--pv-orange, #FF6B35));
}
.home1410-rail-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.home1410-rail-list > li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid var(--border-soft, var(--pv-line-soft, #ECEAE2));
    min-width: 0;
}
.home1410-rail-list > li:first-child { border-top: 0; }
.home1410-rail-num {
    flex-shrink: 0;
    width: 22px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--orange, var(--pv-orange, #FF6B35));
    text-align: right;
}
.home1410-rail-logo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    padding: 3px;
    background: var(--input-bg, var(--pv-cream, #F1F0EB));
    border: 1px solid var(--border-soft, var(--pv-line-soft, #ECEAE2));
}
.home1410-rail-body { min-width: 0; flex: 1; }
.home1410-rail-name {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text, var(--pv-ink, #111214));
    text-decoration: none;
    overflow-wrap: anywhere;
}
.home1410-rail-name:hover { text-decoration: underline; }
.home1410-rail-desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted, var(--pv-muted, #6E6E66));
    margin: 3px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home1410-rail-meta {
    font-size: 11px;
    color: var(--muted, var(--pv-muted, #6E6E66));
    margin: 3px 0 0;
}
.home1410-rail-empty {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted, var(--pv-muted, #6E6E66));
    margin: 12px 0 0;
}
.home1410-rail-foot {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
}
.home1410-rail-foot a {
    color: var(--orange, var(--pv-orange, #FF6B35));
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.home1410-rail-foot a:hover { text-decoration: underline; }

/* ---------- Rail strips (Trending / New Arrivals / Rankings) ---------- */
.home1410-strip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}
.home1410-strip-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    min-width: 0;
}
.home1410-strip-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.home1410-strip-top img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: contain;
    padding: 3px;
    background: var(--input-bg, var(--pv-cream, #F1F0EB));
    border: 1px solid var(--border-soft, var(--pv-line-soft, #ECEAE2));
}
.home1410-strip-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text, var(--pv-ink, #111214));
    text-decoration: none;
    overflow-wrap: anywhere;
}
.home1410-strip-name:hover { text-decoration: underline; }
.home1410-strip-cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--orange, var(--pv-orange, #FF6B35));
}
.home1410-strip-metric {
    font-size: 12px;
    color: var(--muted, var(--pv-muted, #6E6E66));
    margin: 0;
}
.home1410-strip-foot {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}
