/*
========================================
  CLASS DETAIL PAGE STYLES (DESKTOP)
========================================
*/

/* Layout Utama */
.class-detail-page {
    /* padding: 30px 0;*/
    /* padding-bottom: 30px; */
    padding-top: 1px;
    border-bottom: 1px solid black;
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Kolom kiri sedikit lebih besar */
    /* border-bottom: 1px solid black; */
}

/* Kolom Kiri - Galeri */
.product-gallery {
    display: flex;
    gap: 20px;
    /*max-width: 698px;*/
    border-right: 1px solid black;
}

.thumbnail-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    /* Mencegah container thumbnail menyusut */
    gap: 16px;
    position: relative;
}

.thumb-nav {
    background: #fff;
    width: 80px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumb-nav:hover {
    background-color: #f7f7f7;
}

.thumbnail-slider {
    height: 440px;
    /* 80px * 5 thumbnails + 10px * 4 gaps */
    width: 80px;
    margin: 16px 0;
}

.thumbnail-slider .swiper-slide {
    width: 80px;
    height: 80px !important;
    /* Override Swiper default height */
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.thumbnail-slider .swiper-slide:hover {
    opacity: 1;
}

.thumbnail-slider .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #D81E1E;
    /* Border merah untuk thumbnail aktif */
}

.thumbnail-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image-slider {
    flex-grow: 1;
    background: #fff;
    overflow: hidden;
    position: relative;
    max-height: 615px;
    /* border: 1px solid black; */
    border-left: 1px solid black;
    border-bottom: 1px solid black;
    /* max-width: 587px;*/
}

.main-image-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-image-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    /* max-width: 667px;*/
    padding-left: 20px;
    padding-top: 20px;
    min-width: 0;
    /* <-- TAMBAHKAN BARIS INI */
}

/* Kolom Kanan - Detail */
.product-details .instructor-name {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.product-details .class-title {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 20px;
}

.schedule-info {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 20px;
}

.schedule-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.product-details .class-price {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 40px;
}

/* Bundle Offer */
/*
========================================
  BUNDLE OFFER STYLES (REVISED & FIXED)
========================================
*/

.bundle-offer {
    margin-bottom: 30px;
    /* 
     * INI ADALAH PERBAIKAN KUNCI:
     * Trik ini memaksa elemen untuk menghormati lebar parent-nya (kolom grid)
     * dan tidak meregang sesuai lebar konten di dalamnya.
     * Ini akan mengaktifkan overflow pada child-nya.
    */
    /* min-width: 0; */
}

.bundle-title {
    font-weight: 500;
    margin-bottom: 10px;
}

/* Container untuk horizontal scroll */
.bundle-scroll-container {
    display: flex;
    overflow-x: auto;
    /* MENGAKTIFKAN HORIZONTAL SCROLL */
    gap: 15px;
    padding-bottom: 15px;
    /* Memberi ruang untuk scrollbar */
    /* Sembunyikan scrollbar visual untuk tampilan yang lebih bersih */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
}

.bundle-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

/* Styling untuk setiap kartu bundle */
.bundle-card {
    flex: 0 0 290px;
    /* Lebar tetap untuk setiap card */
    border: 1px solid #000;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.price-box {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 40px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-weight: 400;
}

.new-price {
    color: black; /* merah diskon */
    font-weight: 500;
}


/* Label yang membungkus checkbox dan info teks */
.bundle-card-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

/* Penyesuaian checkbox */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

/* Info teks di dalam kartu */
.bundle-card-info .instructor {
    font-size: 0.8rem;
    font-weight: 500;
}

.bundle-card-info .title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 4px 0;
}

.bundle-card-info .date {
    font-size: 0.8rem;
    color: #555;
}

/* Bagian bawah kartu (Harga dan Tombol Detail) */
.bundle-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.bundle-card-bottom .price {
    font-size: 0.9rem;
    font-weight: 500;
}

.bundle-card-bottom .detail-btn {
    border: 1px solid #000;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: #000;
}

/* Quantity Selector */
.quantity-selector-detail {
    display: flex;
    /*align-items: center;*/
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.selector-controls {
    display: flex;
    /*border: 1px solid #000; */
    /*justify-content: space-between;*/
    gap: 10px;
    max-width: 202px;
}

.selector-controls input {
    width: 60px;
    text-align: center;
    border: 1px solid black;
    font-size: 1rem;
    font-weight: 500;
}

.selector-controls input:focus {
    outline: none;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: #f7f7f7;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-btn.minus {
    border: 1px solid #000;
}

.qty-btn.plus {
    border: 1px solid #000;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 30px;
}

.btn {
    padding: 16px;
    font-weight: 500;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline {
    background-color: #fff;
    border: 1px solid #000;
    color: #000;
}

.btn-outline:hover {
    background-color: #f7f7f7;
}

.btn-primary {
    background-color: #000;
    border: 1px solid #000;
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.8;
}

/* Location Info */
.location-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /*border-top: 1px solid #ccc;*/
    margin-top: 10px;
    margin-bottom: 10px;
}

.location-info-mobile {
    justify-content: space-between;
    align-items: flex-start;
    /*border-top: 1px solid #ccc;*/
    margin-top: 10px;
    margin-bottom: 10px;
    display: none;
}

.location-info p {
    padding-left: 20px;
    padding-right: 20px;
}

.location-info-mobile p {
    padding-left: 5px;
    padding-right: 5px;
}

.location-info a {
    /* margin-top: 20px;*/
}

.location-info-mobile a {
    /* margin-top: 20px;*/
}

.direction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #000;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
}

/* Description Accordion */
.description-accordion {
    border-right: 1px solid black;
}

.accordion-header {
    width: 97%;
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1rem;
    font-weight: 400;
    background: none;
    border: none;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    cursor: pointer;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content p {
    padding-top: 20px;
    padding-right: 10px;
    line-height: 1.7;
}

.accordion-item.is-open .accordion-content {
    max-height: 500px;
    /* Atur tinggi maksimum yang cukup */
}

.accordion-item.is-open .accordion-icon {
    transform: rotate(180deg);
}

/*
=========================================================
  CLASS DETAIL PAGE STYLES (MOBILE OVERRIDES)
=========================================================
*/

/* Secara default, sembunyikan elemen khusus mobile */
.mobile-image-slider,
.bundle-scroll-mobile,
.floating-action-bar,
.mobile-only {
    display: none;
}

/* Terapkan gaya ini hanya pada layar kecil (di bawah 769px) */
@media (max-width: 768px) {
    .swiper-wrapper {
        height: 500px;
    }

    .direction-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        border: 1px solid #000;
        color: #000;
        text-decoration: none;
        white-space: nowrap;
        margin-left: 5px;
        margin-right: 20px;
    }

    .location-info {
        display: none;
        justify-content: space-between;
        align-items: flex-start;
        /*border-top: 1px solid #ccc;*/
        margin-top: 10px;
        margin-bottom: 10px;
        display: none;
    }

    .location-info-mobile {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        /*border-top: 1px solid #ccc;*/
        margin-top: 10px;
        margin-bottom: 10px;
        flex-direction: column;
        gap: 15px;
    }

    /* 1. Sembunyikan elemen khusus desktop */
    .desktop-only,
    .product-gallery,
    .action-buttons {
        display: none;
    }

    /* 2. Tampilkan elemen khusus mobile */
    .mobile-only,
    .mobile-image-slider,
    .bundle-scroll-mobile,
    .floating-action-bar {
        display: block;
        /* atau flex, grid, sesuai kebutuhan */
    }

    /* 3. Ubah layout utama menjadi satu kolom */
    .detail-container {
        grid-template-columns: 1fr;
        gap: 0;
        /* Hapus gap antar kolom */
        border-bottom: none;
    }

    .class-detail-page {
        /* padding: 0 0 0px 0; */
        /* Hapus padding atas/bawah, beri ruang untuk floating bar */
    }

    .product-details {
        padding: 20px;
        /* padding-top: 0px; */
        padding-left: 5px;
        padding-right: 5px;
        /* Beri padding di sekeliling konten teks */
    }

    /* 4. Styling Slider Gambar Mobile */
    .mobile-image-slider {
        width: 100%;
        /* margin-bottom: 20px; */
        height: 500px;
        --swiper-theme-color: #000;
        /* Warna untuk pagination dots */
    }

    .mobile-image-slider .swiper-pagination {
        position: relative;
        /* Pindahkan dots di bawah gambar */
        bottom: auto;
        margin-top: 15px;
    }

    /* 5. Styling Bundle Offer Mobile */
    .bundle-scroll-mobile {
        display: flex;
        overflow-x: auto;
        /* Aktifkan horizontal scroll */
        gap: 10px;
        padding-bottom: 10px;
        /* Ruang untuk scrollbar */
        /* Sembunyikan scrollbar visual */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .bundle-scroll-mobile::-webkit-scrollbar {
        display: none;
    }

    .bundle-card-mobile {
        flex: 0 0 200px;
        /* Lebar setiap kartu bundle */
        border: 1px solid #ccc;
        padding: 10px;
        display: flex;
        align-items: flex-start;
        gap: 8px;
        text-decoration: none;
        color: inherit;
        font-size: 0.8rem;
    }

    /* 6. Styling Floating Action Bar */
    .floating-action-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* 7. Penyesuaian lain-lain */
    .product-details .class-title {
        font-size: 18px;
    }

    .description-accordion {
        padding-right: 5px;
        padding-left: 5px;
        padding-top: 40px;
        border-right: none;
    }

    .accordion-header {
        border-top: 1px solid black;
    }

    .accordion-item:last-child .accordion-header {
        border-bottom: 1px solid black;
    }

    .accordion-content p {
        padding: 15px 0;
    }

    .location-info {
        flex-direction: column;
        gap: 15px;
    }

    /* Pagination Dots */
    .class-detail-page .swiper-pagination {
        bottom: 50px !important;
        /* Posisikan lebih tinggi dari bawah */
    }

    /* Gaya Dot Inaktif: Lingkaran dengan outline */
    .class-detail-page .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        background-color: transparent;
        border: 2px solid #fff;
        opacity: 0.8;
    }

    /* Gaya Dot Aktif: Lingkaran terisi */
    .class-detail-page .swiper-pagination-bullet-active {
        background-color: #fff;
        border: none;
        opacity: 1;
    }
    .class-detail-page{
        border-bottom: none;
    }
}