/* =========================
   LAYOUT
========================= */

.bundle-wrapper{
    display:grid;
    grid-template-columns:minmax(0,1fr) 380px;
    gap:30px;
    align-items:start;
}

.bundle-products{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:24px;
}

/* =========================
   PRODUCT CARD
========================= */

.bundle-card{
    position:relative;
    background:#f8f4ef;
    border-radius:20px;
    padding:20px;
    text-align:center;
    transition:.25s;
}

.bundle-card:hover{
    transform:translateY(-4px);
}

.discount-badge{
    position:absolute;
    top:14px;
    left:14px;
    background:#f4c84c;
    color:#000;
    font-size:12px;
    font-weight:700;
    padding:6px 10px;
    border-radius:20px;
}

.bundle-image{
    height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:15px;
}

.bundle-card img{
    max-width:100%;
    max-height:200px;
    object-fit:contain;
}

.bundle-card h4{
    margin:0 0 12px;
    font-size:17px;
    line-height:1.4;
    color:#222;
}

.bundle-price{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    margin-bottom:15px;
}

.sale-price{
    font-size:20px;
    font-weight:700;
    color:#111;
}

.regular-price{
    text-decoration:line-through;
    color:#888;
    font-size:15px;
}

.bundle-add{
    width:100%;
    height:48px;
    border:none;
    border-radius:999px;
    background:#111;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:.25s;
}

.bundle-add:hover{
    opacity:.9;
}

.bundle-add:disabled{
    opacity:.6;
    cursor:not-allowed;
}

/* =========================
   SIDEBAR
========================= */

.bundle-sidebar{
    position:sticky;
    top:20px;
    background:#fff;
    border:1px solid #ececec;
    border-radius:22px;
    padding:24px;
    box-shadow:0 10px 40px rgba(0,0,0,.05);
}

.bundle-sidebar h3{
    margin:0 0 15px;
}

.bundle-progress{
    background:#f7f3ec;
    padding:12px;
    border-radius:12px;
    font-size:14px;
    margin-bottom:18px;
    text-align:center;
    font-weight:600;
}

/* =========================
   BUNDLE ITEMS
========================= */

#bundle-items{
    max-height:380px;
    overflow:auto;
    padding-right:5px;
}

.bundle-item{
    display:flex;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid #eee;
}

.bundle-item img{
    width:72px;
    height:72px;
    object-fit:contain;
    border-radius:12px;
    background:#f7f7f7;
}

.bundle-info{
    flex:1;
}

.bundle-info h4{
    margin:0 0 8px;
    font-size:14px;
    line-height:1.4;
}

.bundle-price-row{
    display:flex;
    gap:8px;
    align-items:center;
    margin-bottom:8px;
}

.compare-price{
    text-decoration:line-through;
    color:#999;
    font-size:13px;
}

.qty{
    display:flex;
    align-items:center;
    gap:8px;
}

.qty button{
    width:30px;
    height:30px;
    border:none;
    border-radius:50%;
    background:#111;
    color:#fff;
    cursor:pointer;
}

.remove-item{
    background:#e53935 !important;
}

/* =========================
   SUMMARY
========================= */

.bundle-summary{
    margin-top:20px;
    border-top:1px solid #eee;
    padding-top:18px;
}

.bundle-summary div{
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
}

#bundle-saving{
    color:#16a34a;
    font-weight:700;
}

.bundle-total{
    margin-top:10px;
    padding-top:15px;
    border-top:1px solid #eee;
    font-size:22px;
    font-weight:700;
}

#bundle-cart-btn{
    width:100%;
    height:54px;
    border:none;
    border-radius:999px;
    background:#111;
    color:#fff;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    margin-top:18px;
}

/* =========================
   MOBILE STICKY BAR
========================= */

.mobile-bundle-bar{
    display:none;
}

.mobile-thumb{
    width:34px;
    height:34px;
    object-fit:cover;
    border-radius:50%;
    border:2px solid #fff;
    margin-right:-8px;
}

/* =========================
   MOBILE
========================= */

@media(max-width:991px){

    .bundle-wrapper{
        grid-template-columns:1fr;
    }

    .bundle-products{
        grid-template-columns:repeat(2,1fr);
    }

    .bundle-sidebar{

        position:fixed;
        left:0;
        right:0;
        bottom:70px;

        top:auto;

        z-index:9999;

        max-height:75vh;

        overflow:auto;

        border-radius:24px 24px 0 0;

        transform:translateY(110%);
        transition:.3s ease;
    }

    .bundle-sidebar.active{
        transform:translateY(0);
    }

    .mobile-bundle-bar{
        display:flex;
        justify-content:space-between;
        align-items:center;

        position:fixed;
        left:0;
        right:0;
        bottom:0;

        background:#fff;
        padding:12px 15px;

        box-shadow:0 -5px 25px rgba(0,0,0,.08);

        z-index:10000;
    }

    .mobile-bundle-info{
        display:flex;
        align-items:center;
        gap:10px;
    }

    #mobile-thumbs{
        display:flex;
    }

    .mobile-bundle-text{
        display:flex;
        flex-direction:column;
    }

    #mobile-count{
        font-size:14px;
    }

    #mobile-total{
        font-size:13px;
        color:#666;
    }

    #mobile-open-bundle{
        border:none;
        background:#111;
        color:#fff;
        border-radius:999px;
        padding:12px 18px;
        font-weight:600;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media(max-width:640px){

    .bundle-products{
        grid-template-columns:1fr;
    }

    .bundle-image{
        height:180px;
    }

    .bundle-card img{
        max-height:160px;
    }
}