/* ড্রয়ার মেইন স্টাইল */
.cart-side-drawer {
    position: fixed;
    top: 0;
    right: -400px; /* শুরুতে স্ক্রিনের বাইরে থাকবে */
    width: 350px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 99999;
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.cart-side-drawer.open {
    right: 0;
}

/* ওভারলে (পেছনের কালো ঝাপসা অংশ) */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    display: none;
    backdrop-filter: blur(2px);
}

.cart-drawer-overlay.show {
    display: block;
}

/* ড্রয়ার হেডার */
.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
}

.drawer-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

#close-cart-drawer {
    background: none;
    border: none;
    font-size: 22px;
    color: #ff4d6d;
    cursor: pointer;
}

/* ড্রয়ার বডি ও আইটেম লিস্ট */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.item-img img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    margin-bottom: 4px;
}

.item-qty { font-size: 12px; color: #777; margin: 0; }
.item-price { font-size: 15px; font-weight: 700; color: #ff4d6d; margin: 0; }

.remove-item-btn {
    position: absolute;
    right: 0;
    top: 10px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    transition: 0.3s;
}

.remove-item-btn:hover { color: #f44336; }

/* ড্রয়ার ফুটার */
.drawer-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

.subtotal-area {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 17px;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #013477;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.3);
}

.checkout-btn:hover {
    background: #C60202;
    transform: translateY(-2px);
}

/* রেসপন্সিভনেস */
/* মোবাইল রেস্পন্সিভ ফিক্স */
@media (max-width: 767px) {
    .cart-side-drawer {
        width: 100% !important; /* মোবাইলে পুরো স্ক্রিন জুড়ে থাকবে */
        right: -100% !important; /* শুরুতে বামে বা ডানে স্ক্রিনের বাইরে থাকবে */
    }

    .cart-side-drawer.open {
        right: 0 !important;
    }

    .drawer-body {
        padding: 10px !important;
    }

    .item-img img {
        width: 60px !important;
        height: 60px !important;
    }

    .item-name {
        font-size: 13px !important;
    }

    /* মোবাইলে চেকআউট বাটনটি একটু বড় এবং নিচেই থাকবে */
    .drawer-footer {
        padding: 15px !important;
        position: sticky;
        bottom: 0;
        background: #fff;
    }

    .checkout-btn {
        padding: 16px !important;
        font-size: 16px !important;
    }
}



/* ড্রয়ার এবং ওভারলে সবকিছুর উপরে থাকার জন্য */
.cart-side-drawer {
    position: fixed !important;
    top: 0;
    right: -100%; /* শুরুতে বাইরে */
    width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 99999999 !important; /* সর্বোচ্চ লেভেল */
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.cart-side-drawer.open {
    right: 0 !important;
}

.cart-drawer-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 99999998 !important; /* ড্রয়ারের ঠিক নিচে */
    display: none;
    backdrop-filter: blur(3px);
}

/* মোবাইলে স্টাক হওয়া বন্ধ করতে */
body.cart-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}



/* Floating Side Cart Style */
.floating-side-cart {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cart-icon-box {
    background-color: #013477; /* Dark background from screenshot */
    color: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top-left-radius: 5px;
}

.cart-info-box {
    background-color: #c80000; /* Pinkish background from screenshot */
    color: #fff;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom-left-radius: 5px;
}

.item-count {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.total-amount {
    font-size: 13px;
    font-weight: 700;
}

/* Mobile & Tablet Responsive */
@media (max-width: 768px) {
    .floating-side-cart {
        top: auto;
        bottom: 100px; /* মোবাইল মেনুর একটু উপরে রাখার জন্য */
        transform: none;
    }
    
    .item-count { font-size: 9px; }
    .total-amount { font-size: 11px; }
}