/**
 * Catalogo filmes/series/canais — toolbar, categorias e bento horizontal
 */

.lista-catalogo {
    --lista-accent: #3b82f6;
    --lista-accent-soft: rgba(59, 130, 246, 0.16);
    --lista-accent-border: rgba(59, 130, 246, 0.42);
}

.lista-catalogo--series {
    --lista-accent: #9333ea;
    --lista-accent-soft: rgba(147, 51, 234, 0.16);
    --lista-accent-border: rgba(147, 51, 234, 0.42);
}

.lista-catalogo--canais {
    --lista-accent: #22c55e;
    --lista-accent-soft: rgba(34, 197, 94, 0.16);
    --lista-accent-border: rgba(34, 197, 94, 0.42);
}

.lista-panel {
    border: 1px solid rgba(71, 85, 105, 0.55);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.72) 0%, rgba(15, 23, 42, 0.88) 100%);
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.65);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .lista-panel {
        padding: 1.25rem 1.35rem;
        margin-bottom: 2rem;
    }
}

.lista-panel-bento {
    display: grid;
    gap: 0.875rem;
}

@media (min-width: 768px) {
    .lista-panel-bento {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        align-items: center;
        gap: 1rem;
    }
}

.lista-panel-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.lista-panel-back {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 0.65rem;
    color: #94a3b8;
    border: 1px solid rgba(71, 85, 105, 0.55);
    background: rgba(15, 23, 42, 0.55);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lista-panel-back:hover {
    color: #fff;
    border-color: var(--lista-accent-border);
    background: var(--lista-accent-soft);
}

.lista-panel-title {
    margin: 0;
    font-size: clamp(1.15rem, 2.8vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    color: #f8fafc;
}

.lista-panel-title i {
    color: var(--lista-accent);
    margin-right: 0.45rem;
}

.lista-panel-search {
    width: 100%;
    min-width: 0;
}

.lista-panel-search .lista-busca-smart {
    width: 100%;
}

.lista-panel-search form {
    width: 100%;
}

.lista-cats-bar {
    position: relative;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(71, 85, 105, 0.45);
}

.lista-cats-bar.is-sticky-ready {
    position: sticky;
    top: 0.65rem;
    z-index: 40;
}

.lista-cats-scroll-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.lista-cats-scroll-wrap::before,
.lista-cats-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1.5rem;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lista-cats-scroll-wrap.can-scroll-left::before {
    left: 0;
    opacity: 1;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.95), transparent);
}

.lista-cats-scroll-wrap.can-scroll-right::after {
    right: 0;
    opacity: 1;
    background: linear-gradient(to left, rgba(15, 23, 42, 0.95), transparent);
}

.lista-categorias-scroll,
.lista-cats-track {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x;
}

.lista-cats-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.lista-categorias-scroll::-webkit-scrollbar,
.lista-cats-track::-webkit-scrollbar {
    display: none;
}

.lista-cat-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(71, 85, 105, 0.65);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.lista-cat-chip:hover {
    color: #fff;
    border-color: rgba(148, 163, 184, 0.55);
    background: rgba(51, 65, 85, 0.85);
}

.lista-cat-chip.is-active {
    color: #fff;
    background: var(--lista-accent-soft);
    border-color: var(--lista-accent-border);
    box-shadow: 0 0 0 1px var(--lista-accent-soft);
}

.lista-cat-chip i {
    font-size: 0.72rem;
    opacity: 0.85;
}

.lista-cat-chip.is-active i {
    color: var(--lista-accent);
}

.lista-cats-track.is-dragging .lista-cat-chip {
    cursor: grabbing;
}

.lista-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(71, 85, 105, 0.4);
}

.lista-info-bar p {
    margin: 0;
    font-size: 0.88rem;
    color: #94a3b8;
}

/* Bento horizontal — destaques (todos grandes, fileira) */
.lista-bento-featured-wrap {
    margin-bottom: 1rem;
}

.lista-bento-featured-scroll {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.lista-bento-featured-scroll::-webkit-scrollbar {
    display: none;
}

.lista-bento-featured {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    width: max-content;
    padding-bottom: 0.15rem;
}

.lista-bento-main {
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: 9rem;
    height: 13.5rem;
    scroll-snap-align: start;
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(71, 85, 105, 0.55);
    background: #0f172a;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lista-bento-main:hover {
    transform: translateY(-2px);
    border-color: var(--lista-accent-border);
    box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.75);
}

@media (min-width: 640px) {
    .lista-bento-main {
        width: 11rem;
        height: 16.5rem;
    }

    .lista-bento-featured {
        gap: 0.65rem;
    }
}

@media (min-width: 1024px) {
    .lista-bento-main {
        width: 12.5rem;
        height: 18.75rem;
    }
}

.lista-bento-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.35s ease;
}

.lista-bento-main:hover img {
    transform: scale(1.03);
}

.lista-bento-main .lista-bento-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.4rem 0.45rem;
    background: linear-gradient(to top, rgba(8, 12, 24, 0.93) 0%, rgba(8, 12, 24, 0.12) 55%, transparent 100%);
    pointer-events: none;
}

.lista-bento-badge {
    align-self: flex-start;
    margin-bottom: 0.25rem;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--lista-accent);
}

.lista-bento-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lista-bento-main .lista-bento-title {
    font-size: 0.85rem;
}

.lista-bento-section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #f8fafc;
}

.lista-bento-section-title i {
    color: var(--lista-accent);
}

.lista-netflix-row {
    margin-bottom: 1.75rem;
    padding: 0.85rem 0.85rem 0.65rem;
    border-radius: 1rem;
    border: 1px solid rgba(71, 85, 105, 0.4);
    background: rgba(15, 23, 42, 0.45);
}

@media (min-width: 640px) {
    .lista-netflix-row {
        padding: 1rem 1rem 0.75rem;
    }
}

.lista-netflix-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.lista-netflix-row-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.lista-netflix-row-link {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.lista-netflix-row-link:hover {
    color: #fff;
}

.lista-grid-card {
    position: relative;
}

.lista-grid-card.is-detalhe {
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .lista-bento-main,
    .lista-bento-cell,
    .lista-cat-chip,
    .lista-panel-back {
        transition: none;
    }

    .lista-bento-main:hover,
    .lista-bento-cell:hover {
        transform: none;
    }
}
