/*
 * SON TV Popular Grid — horizontal compact cards (Phase 3A.6)
 * Markup: .popular-card-grid > .popular-card > (__thumb + __body)
 * Loads AFTER slider-block.css.
 */

.popular-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Nudge section-head title down without shifting grid below */
.sontv-section-head--small > span {
    display: inline-block;
    transform: translateY(8px);
}

/* Scoped reclaim: tighten section-head bottom margin inside popular grid only */
.sontv-slider-popular .sontv-section-head {
    margin-bottom: 8px;
}

.popular-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    align-items: stretch;
    min-height: 0;
    padding: 0;
}

/* 2×2 inner hairlines + symmetric padding so lines sit centered between cards */
.popular-card:nth-child(odd) {
    border-right: 1px solid rgba(0, 0, 0, 0.12);
    padding-right: 12px;
}
.popular-card:nth-child(-n+2) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding-bottom: 12px;
}
.popular-card:nth-child(even) {
    padding-left: 12px;
}
.popular-card:nth-child(n+3) {
    padding-top: 12px;
}

/* Full-width thumb on top, 16:9 aspect (taller, fills card with 2-line title) */
.popular-card__thumb {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #e8e8e8;
}
.popular-card__img,
.popular-card__thumb-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.popular-card__thumb-fallback {
    width: 100%;
    height: 100%;
    background-color: #e8e8e8;
}

.popular-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popular-card__kicker {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-accent);
}

.popular-card__title {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile — keep 2-column vertical grid, tighter spacing and slightly smaller title */
@media all and (max-width: 768px) {
    .popular-card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .popular-card {
        flex-direction: column;
        gap: 6px;
    }
    .popular-card__thumb {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
    .popular-card__title {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}
