/* ============================================
   WRAPPER
============================================ */
.bacsi-slider-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    position: relative;
}

.bacsi-slider-container {
    width: 100%;
    overflow: hidden;
}

.bacsi-slider {
    display: flex;
    gap: 20px;
    will-change: transform;
    transition: transform .45s ease;
}

/* Khi có item active: thu nhỏ gap */
.bacsi-slider-wrapper.has-active .bacsi-slider {
    gap: 12px;
}

/* ============================================
   ITEM
============================================ */
.bacsi-item {
    flex: 0 0 200px;
    cursor: pointer;
    height: 300px;
    transition: all .45s ease;
    opacity: 1;
}

/* Khi có active item: các item khác mờ đi */
.bacsi-slider-wrapper.has-active .bacsi-item {
    opacity: 0.45;
}

.bacsi-item.active {
    flex: 0 0 640px !important;
    opacity: 1 !important;
}

/* ============================================
   CARD BOX
============================================ */
.bacsi-card {
    height: 100%;
    display: flex;
    flex-direction: row;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all .35s ease;
}

/* Khi chưa active → để background trong suốt
   → tránh nhìn item to quá khi auto scroll */
.bacsi-item:not(.active) .bacsi-card {
    background: transparent;
    box-shadow: none;
}

/* Hover */
.bacsi-item:hover .bacsi-card {
    border-color: #FF8E23;
}

/* Active */
.bacsi-item.active .bacsi-card {
    border-color: #FF8E23;
    background: #fff;
    padding: 10px;
}

/* Khi slider dừng (đang active) → tắt hover trên item khác */
.bacsi-slider-wrapper.has-active .bacsi-item:not(.active):hover .bacsi-card {
    border-color: transparent;
}

/* ============================================
   LEFT COLUMN – IMAGE
============================================ */
.bacsi-left {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    transition: .35s ease;
}

.bacsi-item.active .bacsi-left {
    flex: 0 0 220px;
}

.bacsi-image-wrapper {
    width: 100%;
    flex: 1;
    overflow: hidden;
    background: #fff;
}

.bacsi-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bacsi-name {
    display: none;
}

/* ============================================
   RIGHT COLUMN – INFO
============================================ */
.bacsi-right {
    flex: 0 0 0;
    opacity: 0;
    overflow: hidden;
    transition: .45s ease;
    padding: 0;
    background: #fff;
}

/* Active → bung ra */
.bacsi-item.active .bacsi-right {
    flex: 0 0 400px;
    padding: 20px;
    opacity: 1;
    overflow-y: auto;
    max-height: 290px;
}

.bacsi-right h4 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #FF8E23;
    border-bottom: 2px solid #FF8E23;
    padding-bottom: 6px;
}

.bacsi-hocvan {
    font-size: 13px;
    color: #555;
    line-height: 1.55;
}

.bacsi-hocvan ul {
    margin: 10px 0;
    padding-left: 18px;
}

.bacsi-hocvan li {
    margin-bottom: 8px;
}

/* ============================================
   SCROLLBAR
============================================ */
.bacsi-right::-webkit-scrollbar {
    width: 6px;
}
.bacsi-right::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.bacsi-right::-webkit-scrollbar-thumb {
    background: #FF8E23;
    border-radius: 10px;
}
.bacsi-right::-webkit-scrollbar-thumb:hover {
    background: #e07a15;
}

/* ============================================
   PAGINATION BULLETS - DASHES (SPACED)
============================================ */
.bacsi-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.bacsi-bullet {
    width: 30px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bacsi-bullet:hover {
    background: #FF8E23;
    transform: scaleX(1.2);
}

.bacsi-bullet.active {
    background: #FF8E23;
    transform: scaleX(1.3);
}

@media (max-width: 768px) {

    /* THUMBNAIL 2 ITEM */
    .bacsi-item {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 6px;
    }

    /* KHUNG ẢNH KHÔNG CẮT */
    .bacsi-image-wrapper {
        width: 100%;
        aspect-ratio: 3/4; /* ảnh đứng 3:4 */
        overflow: hidden;
        border-radius: 12px;
        background: #fff;
    }

    .bacsi-image {
        width: 100%;
        height: 100%;
        object-fit: cover !important; /* NGỪNG CROP */
        background: #fff;
    }

    /* ẨN INFO KHI CHƯA ACTIVE */
    .bacsi-right {
        display: none !important;
    }

    /* ACTIVE = layout ngang */
    .bacsi-item.active {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .bacsi-item.active .bacsi-card {
        display: flex !important;
        flex-direction: row !important;
        gap: 1px;
    }

    .bacsi-item.active .bacsi-left {
        flex: 0 0 160px !important;
    }

    .bacsi-item.active .bacsi-image-wrapper {
        aspect-ratio: auto;
        height: 160px !important;
    }

    .bacsi-item.active .bacsi-right {
        display: block !important;
        flex: 1 !important;
    }

    /* ẨN CÁC ITEM KHÁC KHI ACTIVE */
    .bacsi-slider-wrapper.has-active .bacsi-item:not(.active) {
        display: none !important;
    }
}
