/*
========================================
  CART FLYOUT PANEL STYLES
========================================
*/

/* 1. Overlay (Latar Belakang Gelap) */
.cart-flyout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


.cart-flyout-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.cart-item-flyout.is-bundle {
    margin-left: 20px;
}

.cart-item-flyout-flex.is-bundle {
    margin-left: 20px;
}

.bundle-label {
    font-size: 14px;
    font-weight: 500;
    color: #FF9358;
    /* Warna oranye/tan */
    text-transform: uppercase;
}

/* 2. Panel Putih (Yang Bergerak) */
.cart-flyout-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 90vw;
    /* Lebar default untuk mobile */
    max-width: 400px;
    /* Batas lebar maksimum */
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cart-flyout-overlay.is-hidden .cart-flyout-panel {
    transform: translateX(100%);
    /* Geser ke kanan saat tersembunyi */
}

/* 3. Header Panel */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    /* Mencegah header menyusut */
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
}

.panel-close-btn {
    background: none;
    border: none;
    cursor: pointer;
}


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

.old-price-cart {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
}

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

/* 4. Body Panel (Area Scroll) */
.panel-body {
    flex-grow: 1;
    /* Mengisi sisa ruang */
    overflow-y: auto;
    /* Aktifkan scroll vertikal jika konten panjang */
    padding: 20px;
}

.cart-section-flyout h3 {
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    /* border-bottom: 1px solid black; */
}

.cart-select-all {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-select-all label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.delete-all-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* 5. Styling Item di Dalam Panel */
.cart-item-flyout {
    display: grid;
    grid-template-columns: auto 160px 1fr auto;
    /* Checkbox | Gambar | Info | Hapus */
    gap: 15px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid black;
}

.cart-item-flyout:last-child {
    border-bottom: none;
}

.cart-item-flyout img {
    width: 162px;
    height: 157px;
    object-fit: cover;
}

.cart-item-flyout .item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* flex */
.cart-item-flyout-flex {
    display: flex;
    /* Checkbox | Gambar | Info | Hapus */
    gap: 15px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid black;
}

.cart-item-flyout-flex:last-child {
    border-bottom: none;
}

.cart-item-flyout-flex img {
    width: 162px;
    height: 157px;
    object-fit: cover;
}

.cart-item-flyout-flex .item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-details .artist-name {
    font-size: 14px;
}

.item-details .item-title {
    font-weight: 600;
}

.item-details .item-price {
    font-size: 14px;
    font-weight: 500;
}

.item-details .quantity-selector {
    margin-top: 10px;
}

/* Atur quantity selector dari cart page */
.delete-item-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.quantity-selector {
    display: flex;
    gap: 10px;
}

.quantity-selector input {
    width: 86px;
    height: 48px;
    text-align: center;
    border: 1px solid black;
    /* border-left: none;
    border-right: none; */
    font-size: 1rem;
    font-weight: 500;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border: 1px solid black;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
}

/* 6. Footer Panel */
.panel-footer {
    padding: 20px;
    border-top: 1px solid black;
    gap: 10px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.btn-primary {
    padding: 16px 30px;
    background-color: black;
    color: white;
}

.btn-outline {
    padding: 16px 30px;
    border: 1px solid black;
    background-color: white;
    color: black;
}

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

.desktop-only {
    display: none;
}

.mobile-only {
    display: block;
}

.cart-item-mobile-pop.is-bundle {
    padding-left: 20px;
}

.cart-item-mobile-pop {
    padding: 20px;
    padding-left: 0px;
    border-bottom: 1px solid black;
}

.item-main-info {
    display: flex;
    align-items: flex-start;
    /* Sejajarkan checkbox dengan awal teks */
    gap: 15px;
    margin-bottom: 20px;
}

.item-controls {
    display: flex;
    justify-content: space-between;
    /* Mendorong item ke sisi berlawanan */
    align-items: center;
    padding-left: 35px;
}

.lebar-ya {
    width: 60px !important;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quantity-selector .qty-btn,
.quantity-selector .qty-value {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    background-color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.item-details .item-title {
    font-size: 14px;
    font-weight: 500;
}

.continue-shopping{
    justify-content: center;
    padding-top: 50%;
}

.select-all-cart {
    font-size: 14px;
}

/* ================== DESKTOP OVERRIDES ================== */
@media (min-width: 769px) {
    .cart-flyout-panel {
        max-width: 600px;
    }

    .desktop-only {
        display: block;
    }

    .mobile-only {
        display: none;
    }


    .quantity-selector .qty-btn,
    .quantity-selector .qty-value {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #000;
        background-color: #fff;
        font-size: 1.2rem;
        font-weight: 500;
    }

    .lebar-ya {
        width: 86px !important;
    }

    .item-details .item-title {
        font-size: 16px;
        font-weight: 500;
    }

    .cart-section-flyout h3 {
        font-weight: 400;
        font-size: 24px;
        margin-bottom: 15px;
        padding-bottom: 15px;
        
    }
/* 
    .cart-section-flyout h3:last-child {
        border-bottom: 1px solid black;
    } */

    .panel-title {
        font-size: 28px;
        font-weight: 600;
    }

    .select-all-cart {
        font-size: 14px;
    }
}