/* =========================================================
   Home page styles
   ========================================================= */

/* Features + content: 2 hàng riêng (feature luôn trên, content luôn dưới) */
.home-grid-section {
    margin-top: 1.75rem;
    position: relative;
    z-index: 3;
    padding-bottom: 1rem;
}

.home-grid-features {
    margin-bottom: 0.25rem;
}

.home-grid-features > [class*="col-"] {
    display: flex;
}

.home-grid-features .feature-card {
    width: 100%;
}

.home-grid-content > [class*="col-"] {
    display: flex;
}

.home-grid-content .section-block {
    width: 100%;
}

/* Tabbed blocks (songs / videos) */
.section-block__head--tabs {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
}

.section-block--home-tabs .section-block__more {
    flex-shrink: 0;
    margin-top: 0;
    align-self: center;
}

.home-grid-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
}

.home-grid-tabs::-webkit-scrollbar {
    display: none;
}

.home-grid-tabs__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    border: none;
    background: rgba(139, 29, 29, 0.06);
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.home-grid-tabs__icon {
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.85;
    flex-shrink: 0;
}

.home-grid-tabs__btn.is-active .home-grid-tabs__icon {
    opacity: 1;
}

.home-grid-tabs__btn:hover {
    background: rgba(139, 29, 29, 0.1);
    color: var(--color-primary);
}

.home-grid-tabs__btn.is-active {
    background: var(--color-primary);
    color: #fff;
}

.home-grid-tab-panel {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
}

.home-grid-tab-panel.is-active {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.section-block--home-tabs > .home-grid-tab-panel.is-active {
    flex: 1 1 auto;
}

.product-list--scroll {
    flex: 1 1 auto;
    max-height: 21rem;
    min-height: 21rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Videos slider */
.videos-section {
    padding: 1.75rem 0 3rem;
    background-color: transparent;
}

.videos-slider-wrap {
    position: relative;
    padding: 0;
}

.videos-swiper {
    overflow: hidden;
    padding-bottom: 0.25rem;
}

.videos-swiper .swiper-slide {
    height: auto;
}

/* Video cards — tỷ lệ ~6 item trên desktop */
.videos-section .video-thumb {
    border-radius: 10px;
}

.videos-section .video-play-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.videos-section .video-play-overlay i {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    padding-left: 2px;
}

.videos-section .video-duration {
    right: 8px;
    bottom: 8px;
    font-size: 0.7rem;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
}

.videos-section .video-meta {
    padding-top: 0.55rem;
}

.videos-section .video-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.videos-section .video-artist {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

@media (min-width: 992px) {
    .videos-section .video-play-overlay i {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .videos-section .video-duration {
        right: 6px;
        bottom: 6px;
        font-size: 0.65rem;
    }

    .videos-section .video-title {
        font-size: 0.88rem;
    }

    .videos-section .video-artist {
        font-size: 0.75rem;
    }
}

.videos-nav {
    position: absolute;
    top: 0;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    color: var(--color-primary);
    font-size: 0.85rem;
    backdrop-filter: blur(6px);
    opacity: 0.85;
    transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.videos-slider-wrap:hover .videos-nav {
    opacity: 1;
}

.videos-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    transform: translateY(-50%) scale(1.06);
}

.videos-nav--prev {
    left: 0.5rem;
}

.videos-nav--next {
    right: 0.5rem;
}

@media (max-width: 767.98px) {
    .videos-section .video-play-overlay i {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .videos-section .video-title {
        font-size: 0.78rem;
    }

    .videos-section .video-artist {
        font-size: 0.7rem;
    }

    .videos-section .video-meta {
        padding-top: 0.35rem;
    }

    .home-grid-section {
        margin-top: 1.25rem;
    }
}
