/* ==========================================================================
   Home Inline Styles — Aniwatch Dark Theme
   ========================================================================== */

/* -- Page H1 ------------------------------------------------------------ */
.home-h1 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--color-text, #fff);
    margin: var(--space-lg, 1.5rem) 0;
    line-height: 1.3;
    text-align: center;
    opacity: 0.7;
}

/* -- Section headers ---------------------------------------------------- */
.block_area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg, 1.5rem);
}

.block_area-header .bah-heading { flex: 1; }

.cat-heading {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    position: relative;
    padding-left: 14px;
}

.cat-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: #f5c518;
    border-radius: 2px;
}

.block_area {
    overflow: hidden;
    margin-bottom: var(--space-xl, 2rem);
}

/* -- Trending Carousel -------------------------------------------------- */
.trending-section {
    margin-bottom: var(--space-xl, 2rem);
}

.trending-section .block_area-header {
    margin-bottom: var(--space-md, 1rem);
}

.trending-wrap {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.trending-wrap::-webkit-scrollbar { display: none; }

.trending-item {
    position: relative;
    flex: 0 0 auto;
    width: 140px;
    cursor: pointer;
}

.ti-rank {
    position: absolute;
    bottom: 42px;
    left: -8px;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px #f5c518;
    text-stroke: 2px #f5c518;
    z-index: 3;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.ti-poster {
    display: block;
    width: 140px;
    height: 200px;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    background: #1a1d24;
}

.ti-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.trending-item:hover .ti-poster img {
    transform: scale(1.06);
    filter: brightness(1.1);
}

.ti-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15,17,21,0.7) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trending-item:hover .ti-poster::after { opacity: 1; }

.ti-info {
    padding: 8px 4px 0;
}

.ti-title {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.ti-title a {
    color: var(--color-text-muted, #9ca3af);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.ti-title a:hover { color: #f5c518; }

@media (min-width: 576px)  { .trending-item { width: 150px; } .ti-poster { width: 150px; height: 215px; } }
@media (min-width: 992px)  { .trending-item { width: 160px; } .ti-poster { width: 160px; height: 230px; } }
@media (min-width: 1400px) { .trending-item { width: 175px; } .ti-poster { width: 175px; height: 250px; } }

/* -- TOP 10 Grid -------------------------------------------------------- */
.top10-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm, 0.5rem) var(--space-lg, 1.5rem);
}

.top10-card {
    display: flex;
    align-items: center;
    gap: var(--space-md, 1rem);
    padding: var(--space-sm, 0.5rem) 0;
    border-bottom: 1px solid #2a2f3a;
    text-decoration: none;
    color: var(--color-text, #fff);
    transition: color 0.2s ease;
}

.top10-card:hover { color: #f5c518; }
.top10-card:hover .top10-poster { transform: scale(1.05); }

.top10-rank {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px #f5c518;
    min-width: 2.5ch;
    text-align: center;
    flex-shrink: 0;
}

.top10-poster-link {
    flex-shrink: 0;
    width: 55px;
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
}

.top10-poster {
    display: block;
    width: 55px;
    height: 78px;
    object-fit: cover;
    border-radius: var(--radius-sm, 4px);
    transition: transform 0.3s ease;
}

.top10-info { flex: 1; min-width: 0; }

.top10-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.3;
}

.top10-title a {
    color: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top10-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.top10-badges .tick-item {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    color: #000;
}

.top10-badges .tick-sub { background: #22c55e; color: #000; }
.top10-badges .tick-dub { background: #3b82f6; color: #fff; }

@media (max-width: 767px) {
    .top10-grid { grid-template-columns: 1fr; }
}

/* -- Horizontal Slider ------------------------------------------------- */
.slider-wrap .film_list .film_list-wrap {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 !important;
    gap: var(--space-md, 1rem);
    padding-bottom: var(--space-sm, 0.5rem);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-wrap .film_list .film_list-wrap::-webkit-scrollbar { display: none; }

.slider-wrap .film_list .film_list-wrap.film_list-wrap .flw-item,
.slider-wrap .film_list .film_list-wrap.film_list-wrap > li {
    flex: 0 0 auto !important;
    width: 160px !important;
    margin: 0 !important;
    scroll-snap-align: start;
}

.slider-wrap .film_list .film_list-wrap.film_list-wrap > li .flw-item {
    width: 100% !important;
    margin: 0 !important;
}

.slider-wrap .flw-item .film-poster {
    padding-bottom: 140%;
    border-radius: var(--radius-md, 8px);
}

@media (min-width: 576px) {
    .slider-wrap .film_list .film_list-wrap.film_list-wrap .flw-item,
    .slider-wrap .film_list .film_list-wrap.film_list-wrap > li { width: 170px !important; }
}

@media (min-width: 992px) {
    .slider-wrap .film_list .film_list-wrap.film_list-wrap .flw-item,
    .slider-wrap .film_list .film_list-wrap.film_list-wrap > li { width: 185px !important; }
}

@media (min-width: 1400px) {
    .slider-wrap .film_list .film_list-wrap.film_list-wrap .flw-item,
    .slider-wrap .film_list .film_list-wrap.film_list-wrap > li { width: 200px !important; }
}

.slider-wrap {
    position: relative !important;
    display: block !important;
}

.slider-wrap .film_list { overflow: hidden !important; }

.slider-wrap .slider-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
    background: rgba(15, 17, 21, 0.92);
    border: 1px solid #2a2f3a;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: opacity 0.2s ease, background 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.slider-wrap .slider-prev { left: 4px !important; right: auto !important; }
.slider-wrap .slider-next { right: 4px !important; left: auto !important; }

.slider-wrap:hover .slider-btn { opacity: 1; pointer-events: auto; }
.slider-wrap .slider-btn:hover { background: #f5c518; color: #000; }

@media (hover: none) {
    .slider-wrap .slider-btn { opacity: 0.7; pointer-events: auto; }
}

/* -- Trending Swiper ------ (legacy class compat) ---------------------- */
.trending-slide {
    width: 38% !important;
    margin-right: 15px;
    flex-shrink: 0;
}

@media (min-width: 576px)  { .trending-slide { width: 28% !important; } }
@media (min-width: 768px)  { .trending-slide { width: 24% !important; } }
@media (min-width: 992px)  { .trending-slide { width: 20% !important; } }
@media (min-width: 1200px) { .trending-slide { width: calc(20% - 15px) !important; } }

.trending-list .swiper-wrapper::-webkit-scrollbar { display: none; }
.trending-list .swiper-wrapper { -ms-overflow-style: none; scrollbar-width: none; }

/* -- Featured Blocks (sidebar lists) ----------------------------------- */
.anif-block-ul li {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.anif-block-ul li:last-child { border-bottom: none; }

.anif-block-ul li .film-poster {
    width: 50px !important;
    padding-bottom: 70px !important;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.anif-block-ul li .film-detail {
    padding-left: 15px !important;
    flex-grow: 1;
    min-width: 0;
}

.anif-block-ul li .film-name {
    font-size: 14px !important;
    margin-bottom: 5px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    line-height: 1.4;
    font-weight: 500;
    color: #fff;
}

.anif-block-ul li .fd-infor { display: flex; align-items: center; gap: 0; }

.anif-block-ul li .tick-item {
    color: #000 !important;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 11px !important;
    height: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-right: 4px;
}

.anif-block-ul li .tick-item.tick-sub  { background: #22c55e !important; color: #000 !important; }
.anif-block-ul li .tick-item.tick-dub  { background: #3b82f6 !important; color: #fff !important; }
.anif-block-ul li .tick { gap: 0 !important; }
.anif-block-ul li .tick .tick-item { margin-left: 0 !important; }
.anif-block-ul li .tick .tick-item + .tick-item { margin-left: 0 !important; }
.anif-block-ul li .tick-item.tick-eps { background: transparent !important; color: #fff !important; padding-left: 0; }
.anif-block-ul li .tick-item i { font-size: 10px; margin-right: 3px; }
.anif-block-ul li .fdi-item { font-size: 12px; color: #9ca3af; }

.anif-block .anif-block-header {
    color: #f5c518;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
}

/* -- Spotlight navigation ---------------------------------------------- */
.deslide-wrap .swiper-navigation {
    bottom: 30px;
    top: auto;
    right: 30px;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.deslide-wrap .swiper-button {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    pointer-events: auto;
    font-size: 16px;
}

@media (min-width: 992px) {
    .deslide-wrap .swiper-navigation { display: flex; }
    .deslide-pagination { display: none; }
}

@media (max-width: 991px) {
    .deslide-wrap .swiper-navigation { display: none; }
    .deslide-pagination { display: flex; }
}

/* -- Trending mobile nav ------------------------------------------------ */
@media (max-width: 768px) {
    #trending-home .trending-navi { display: none !important; }
}

.trending-header-nav { display: none; gap: 8px; margin-left: auto; }

@media (max-width: 768px) {
    .trending-header-nav { display: flex !important; }
}

.trending-header-nav .thn-prev,
.trending-header-nav .thn-next {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #2a2f3a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 12px;
    transition: all 0.2s ease;
}

.trending-header-nav .thn-prev:hover,
.trending-header-nav .thn-next:hover {
    background: #f5c518;
    color: #000;
    border-color: #f5c518;
}

/* -- Four-Column Category Lists ---------------------------------------- */
.home-lists {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl, 2rem);
    margin-bottom: var(--space-2xl, 3rem);
}

.home-list-col .cat-heading {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 var(--space-lg, 1.5rem);
    padding-left: 14px;
}

.home-list-col .hl-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-list-col .hl-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md, 1rem);
    padding: 10px 0;
    border-bottom: 1px solid #2a2f3a;
}

.home-list-col .hl-item:last-child { border-bottom: none; }

.home-list-col .hl-poster {
    flex-shrink: 0;
    width: 50px;
    height: 70px;
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
    position: relative;
    background: #1a1d24;
}

.home-list-col .hl-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.home-list-col .hl-item:hover .hl-poster img { transform: scale(1.06); }

.home-list-col .hl-info { flex: 1; min-width: 0; }

.home-list-col .hl-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 5px;
    line-height: 1.4;
}

.home-list-col .hl-title a {
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.home-list-col .hl-title a:hover { color: #f5c518; }

.home-list-col .hl-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.home-list-col .hl-meta .tick-item {
    font-size: 11px;
    font-weight: 600;
    padding: 0 5px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
}

.home-list-col .hl-meta .tick-quality { background: #f5c518; color: #000; }
.home-list-col .hl-meta .tick-sub     { background: #22c55e; color: #000; }
.home-list-col .hl-meta .tick-dub     { background: #3b82f6; color: #fff; }
.home-list-col .hl-meta .tick-eps     {
    background: transparent;
    color: #9ca3af;
    padding-left: 4px;
    font-weight: 400;
}

.home-list-col .hl-meta .fdi-item { font-size: 12px; color: #9ca3af; }

.home-list-col .hl-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: inline-block;
}

.home-list-col .hl-viewmore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-top: 12px;
    font-size: 12px;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.home-list-col .hl-viewmore:hover { color: #f5c518; }

@media (max-width: 991px) {
    .home-lists { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg, 1.5rem); }
}

@media (max-width: 575px) {
    .home-lists { grid-template-columns: 1fr; }
}

/* -- Upcoming Grid ------------------------------------------------------- */
.upcoming-section {
    margin-bottom: var(--space-2xl, 3rem);
}

/* -- Home two-column layout ---------------------------------------------- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.home-sidebar {
    position: sticky;
    top: 80px;
}

@media (max-width: 1199px) {
    .home-layout { grid-template-columns: 1fr 270px; gap: 1.25rem; }
}

@media (max-width: 991px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-sidebar { position: static; }
}

/* -- Sidebar TOP 10 card ------------------------------------------------- */
.sidebar-top10 {
    background: #13151a;
    border: 1px solid #1e2128;
    border-radius: 10px;
    overflow: hidden;
}

.sidebar-top10-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #1e2128;
}

.sidebar-top10-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.top10-tab-bar {
    display: flex;
    gap: 4px;
}

.top10-tab-btn {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #2a2f3a;
    background: transparent;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.top10-tab-btn:hover { border-color: #f5c518; color: #f5c518; }
.top10-tab-btn.active { background: #f5c518; border-color: #f5c518; color: #000; }

/* panels */
.top10-panel { display: none; }
.top10-panel.active { display: block; }

/* each ranked item */
.t10-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #1a1d24;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.t10-item:last-child { border-bottom: none; }
.t10-item:hover { background: rgba(255,255,255,0.03); }
.t10-item:hover .t10-title { color: #f5c518; }

/* rank column */
.t10-rank-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 28px;
}

.t10-num {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    opacity: 0.9;
}

.t10-item.top3 .t10-num {
    color: #f5c518;
}

/* poster */
.t10-poster-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    background: #1a1d24;
}

.t10-poster-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.3s;
}

.t10-item:hover .t10-poster-wrap img { transform: scale(1.06); }

/* details */
.t10-details { flex: 1; min-width: 0; }

.t10-title {
    font-size: 12px;
    font-weight: 500;
    color: #e5e7eb;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

.t10-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.t10-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.t10-badge i { font-size: 9px; }

.t10-sub { background: rgba(34,197,94,0.15); color: #22c55e; }
.t10-dub { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* -- Section heading fix ------------------------------------------------- */
/* responsive-grid.css sets display:flex on .cat-heading — restore the
   left-accent-bar look used on the home page */
.block_area .block_area-header {
    padding-top: 1.5rem;
}

.block_area .cat-heading {
    display: block !important;
    position: relative !important;
    padding-left: 16px !important;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.block_area .cat-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #f5c518;
    border-radius: 2px;
}

/* -- 6-column poster grid (overrides responsive-grid.css 5-col at 1200-1599px) -- */
.home-grid-6.film_list .film_list-wrap .flw-item {
    width: calc(16.666% - 0.1rem) !important;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .home-grid-6.film_list .film_list-wrap .flw-item {
        width: calc(16.666% - 0.1rem) !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .home-grid-6.film_list .film_list-wrap .flw-item {
        width: calc(25% - 0.1rem) !important;
    }
}

@media (max-width: 767px) {
    .home-grid-6.film_list .film_list-wrap .flw-item {
        width: calc(33.333% - 0.1rem) !important;
    }
}

@media (max-width: 575px) {
    .home-grid-6.film_list .film_list-wrap .flw-item {
        width: calc(50% - 0.8rem) !important;
    }
}

/* -- Home Schedule Widget ------------------------------------------------ */
.home-schedule-section .block_area-header {
    align-items: center;
}

.home-schedule-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-card, #1a1d24);
    border: 1px solid var(--color-border, #2a2f3a);
    border-radius: var(--radius-pill, 999px);
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted, #9ca3af);
    font-variant-numeric: tabular-nums;
}

.home-schedule-clock i {
    color: var(--color-primary, #f5c518);
}

.home-schedule-section .schedule-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 2rem;
    color: var(--color-text-muted, #9ca3af);
    font-size: 14px;
}

.home-schedule-section .schedule-empty i {
    font-size: 1.5rem;
    color: var(--color-primary, #f5c518);
}

/* -- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .slider-wrap .film_list .film_list-wrap { scroll-behavior: auto; }
    .top10-card, .top10-poster, .slider-btn, .swiper-button,
    .trending-item, .ti-poster img { transition: none !important; }
}

/* ==========================================================================
   Most Popular Section — matches screenshot: tight grid, rank overlay, nav arrow
   ========================================================================== */

.most-popular-slider {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.most-popular-slider .block_area-header {
    padding-top: 0;
    margin-bottom: 10px;
}

/* ── 6 equal columns, 8px gap ──────────────────────────────────────────── */
.most-popular-slider .slider-wrap .film_list .film_list-wrap {
    gap: 8px !important;
}

.most-popular-slider .slider-wrap .film_list .film_list-wrap > li {
    width: calc(16.666% - 7px) !important;
    flex: 0 0 calc(16.666% - 7px) !important;
    scroll-snap-align: start;
}

/* ── Counter ────────────────────────────────────────────────────────────── */
.most-popular-slider .film_list-wrap { counter-reset: mp-rank; }

/*
 * li gets padding-left to carve out a 32px left column.
 * box-sizing: border-box keeps the total li width unchanged.
 * The flw-item (and thus film-poster) now fills only the right portion,
 * so padding-bottom: 140% computes correctly against the narrower width.
 */
.most-popular-slider .film_list-wrap > li {
    counter-increment: mp-rank;
    position: relative !important;
    padding-left: 32px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* Rank number — absolute, bottom of left column */
.most-popular-slider .film_list-wrap > li::before {
    content: counter(mp-rank, decimal-leading-zero);
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 32px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    z-index: 10;
    pointer-events: none;
}

.most-popular-slider .film_list-wrap > li::after { content: none !important; display: none !important; }

/* ── flw-item: plain block, fills li's content area (width - 24px) ──────── */
.most-popular-slider .flw-item {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* ── Poster: padding-bottom trick works correctly here ──────────────────── */
.most-popular-slider .film-poster {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 140% !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    margin: 0 !important;
    aspect-ratio: unset !important;
}

.most-popular-slider .film-poster::after { content: none !important; display: none !important; }

.most-popular-slider .film-poster-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.most-popular-slider .flw-item:hover .film-poster-img { transform: scale(1.06) !important; }

/* ── film-detail: left column, absolutely inside li ─────────────────────── */
/* Spans full poster height minus room for the rank number at the bottom.   */
/* justify-content: flex-end keeps text pushed down toward the rank number. */
.most-popular-slider .film-detail {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 32px !important;
    bottom: 28px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: none !important;
    z-index: 5 !important;
    order: unset !important;
}

.most-popular-slider .film-name {
    margin: 0 !important;
    overflow: hidden !important;
    flex-shrink: 1 !important;
    min-height: 0 !important;
}

.most-popular-slider .film-name a {
    display: block !important;
    color: #FFD166 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    writing-mode: vertical-rl !important;
    text-orientation: upright !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    line-height: 1.3 !important;
    letter-spacing: 2px !important;
    text-decoration: none !important;
}

.most-popular-slider .film-name a:hover { color: #fff !important; }
.most-popular-slider .fd-infor { display: none !important; }

/* ── Nav buttons ────────────────────────────────────────────────────────── */
.most-popular-slider .slider-btn {
    width: 26px !important;
    height: 60px !important;
    border-radius: 3px !important;
    background: rgba(10,10,10,0.65) !important;
    border: none !important;
    color: #fff !important;
    font-size: 13px !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease, background 0.2s ease !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 20 !important;
}

.most-popular-slider .slider-prev { left: 0 !important; right: auto !important; border-radius: 0 3px 3px 0 !important; }
.most-popular-slider .slider-next { right: 0 !important; left: auto !important; border-radius: 3px 0 0 3px !important; }

.most-popular-slider:hover .slider-btn,
.most-popular-slider .slider-wrap:hover .slider-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.most-popular-slider .slider-btn:hover { background: rgba(255,255,255,0.18) !important; }

@media (hover: none) {
    .most-popular-slider .slider-btn { opacity: 0.8 !important; pointer-events: auto !important; }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .most-popular-slider .slider-wrap .film_list .film_list-wrap > li {
        width: calc(20% - 7px) !important;
        flex: 0 0 calc(20% - 7px) !important;
    }
}

@media (max-width: 767px) {
    .most-popular-slider .slider-wrap .film_list .film_list-wrap > li {
        width: calc(33.333% - 6px) !important;
        flex: 0 0 calc(33.333% - 6px) !important;
    }
}

@media (max-width: 480px) {
    .most-popular-slider .slider-wrap .film_list .film_list-wrap > li {
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }
}

/* -- View All button ---------------------------------------------------- */
.block_area-header .viewmore .btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #9ca3af !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 4px 2px !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
    text-decoration: none;
}

.block_area-header .viewmore .btn:hover,
.block_area-header .viewmore .btn:focus {
    background: transparent !important;
    border-color: transparent !important;
    color: #f5c518 !important;
}


/* -- Home page poster grids: 5 columns on desktop, responsive below ------ */
.home-main .block_area-content.film_list .film_list-wrap .flw-item {
    width: calc(20% - 0.5rem) !important;
    margin: 0.25rem !important;
}

@media (max-width: 1199px) {
    .home-main .block_area-content.film_list .film_list-wrap .flw-item {
        width: calc(20% - 0.5rem) !important;
    }
}

@media (max-width: 991px) {
    .home-main .block_area-content.film_list .film_list-wrap .flw-item {
        width: calc(25% - 0.5rem) !important;
    }
}

@media (max-width: 767px) {
    .home-main .block_area-content.film_list .film_list-wrap .flw-item {
        width: calc(33.333% - 0.5rem) !important;
    }
}

@media (max-width: 575px) {
    .home-main .block_area-content.film_list .film_list-wrap .flw-item {
        width: calc(50% - 0.5rem) !important;
    }
}
