.filter-bar {
    display: grid;
    gap: 6px;
    margin-bottom: 24px;
}

.filter-bar label {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--color-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.filter-bar input {
    width: min(100%, 560px);
    border: 1.5px solid var(--color-line);
    border-radius: var(--radius);
    padding: 13px 16px 13px 42px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 14px center / 17px no-repeat;
    font-size: 0.95rem;
    color: var(--color-ink);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.filter-bar input::placeholder {
    color: var(--color-muted);
}

.filter-bar input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgb(0 91 187 / 12%), var(--shadow-xs);
}

.show-card.is-hidden {
    display: none;
}

/* Shows page grid: 5 posters per row on desktop (the shared .show-grid default is 4,
   still used on show details). Scoped to [data-show-grid], so the site.css breakpoints
   are restated here. A 5-column cell (~218px) is too narrow for the 250-300px in-grid
   ad, so the ad spans two cells; its positions (after cards 10 and 20) start a row. */
.show-grid[data-show-grid] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.show-grid[data-show-grid] .show-grid__ad {
    grid-column: span 2;
}

@media (max-width: 1180px) {
    .show-grid[data-show-grid] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .show-grid[data-show-grid] .show-grid__ad {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    .show-grid[data-show-grid] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .show-grid[data-show-grid] {
        grid-template-columns: 1fr;
    }
}

/* ── Dark Mode ── */

html.dark .filter-bar input {
    background-color: var(--color-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239099ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}

/* In-grid ad unit: sized and styled like a show card so it sits in the grid as one more
   cell; the slot collapses (wrapper hidden) if Ad Manager has nothing to serve. */
.show-grid__ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 300px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: rgb(255 255 255 / 98%);
    box-shadow: var(--shadow-sm);
}

.show-grid__ad[hidden],
.show-grid__ad.is-filtered {
    display: none;
}

.show-grid__ad-label {
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.show-grid__ad .ad-slot__box {
    width: 100%;
    max-width: 300px;
    min-height: 250px;
}
