/* ============================================
   Mini Cart Modal - Premium Production Version
   Bogura Bazar Theme
============================================ */

/* ========== মডাল কন্টেইনার ========== */
.mini-cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

.mini-cart-modal.active {
    visibility: visible;
    opacity: 1;
}

.mini-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.mini-cart-container {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #ffffff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.mini-cart-modal.active .mini-cart-container {
    right: 0;
}

/* ========== হেডার ========== */
.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mini-cart-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-cart-header h3 i {
    font-size: 22px;
    color: #00A65A;
}

.cart-count-badge {
    background: linear-gradient(135deg, #00A65A, #008D4C);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0, 166, 90, 0.25);
}

.close-mini-cart {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #64748b;
}

.close-mini-cart:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg) scale(1.05);
}

/* ========== বডি ========== */
.mini-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scroll-behavior: smooth;
}

.mini-cart-body::-webkit-scrollbar {
    width: 4px;
}

.mini-cart-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.mini-cart-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* লোডিং স্টেট */
.mini-cart-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.mini-cart-loading i {
    font-size: 40px;
    margin-bottom: 15px;
    color: #00A65A;
}

.mini-cart-loading p {
    font-size: 14px;
}

/* খালি কার্ট স্টেট */
.mini-cart-empty {
    text-align: center;
    padding: 80px 24px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-cart-icon-wrapper {
    width: 100px;
    height: 100px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 1px solid #dcfce7;
    box-shadow: 0 8px 24px rgba(0, 166, 90, 0.05);
    transition: all 0.3s ease;
}

.empty-cart-icon-wrapper i {
    font-size: 40px;
    color: #00A65A;
    margin: 0;
    opacity: 0.9;
}

.mini-cart-empty h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.mini-cart-empty p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto 28px;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #00A65A, #008D4C);
    color: white !important;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 166, 90, 0.2);
    border: none;
    cursor: pointer;
}

.btn-shop-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 166, 90, 0.3);
    background: linear-gradient(135deg, #008D4C, #00733E);
}

/* ========== কার্ট আইটেম ========== */
.mini-cart-items {
    display: flex;
    flex-direction: column;
    padding: 8px 16px;
}

.mini-cart-item {
    display      : flex;
    gap          : 16px;
    padding      : 5px;
    margin-bottom: 8px;
    background   : #ffffff;
    border-radius: 12px;
    border       : 1px solid #eef2f6;
    transition   : all 0.3s;
    position     : relative;
    animation    : slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mini-cart-item:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mini-cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    background: #f8fafc;
}

.mini-cart-item-info {
    flex: 1;
}

.mini-cart-item-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1e293b;
    line-height: 1.4;
}

.mini-cart-item-info .item-price {
    font-size: 16px;
    font-weight: 700;
    color: #00A65A;
    margin: 0 0 8px;
}

/* কোয়ান্টিটি কন্ট্রোল */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border-radius: 30px;
    padding: 4px;
    width: fit-content;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qty-btn:hover {
    background: #00A65A;
    color: white;
    transform: scale(1.05);
}

.qty-value {
    font-size: 14px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    color: #1e293b;
}

/* রিমুভ বাটন */
.remove-item {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: #fee2e2;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    opacity: 0.7;
}

.remove-item:hover {
    background: #ef4444;
    color: white;
    opacity: 1;
    transform: scale(1.05);
}

/* ========== ফুটার ========== */
.mini-cart-footer {
    padding: 20px 24px;
    background: #ffffff;
    border-top: 1px solid #eef2f6;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.02);
}

.mini-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.mini-cart-subtotal span {
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
}

.mini-cart-subtotal strong {
    font-size: 24px;
    font-weight: 800;
    color: #00A65A;
}

.mini-cart-actions {
    display: flex;
    gap: 12px;
}

.btn-view-cart,
.btn-checkout {
    flex           : 1;
    text-align     : center;
    padding        : 5px 10px;
    border-radius  : 12px;
    text-decoration: none;
    font-weight    : 600;
    font-size      : 14px;
    transition     : all 0.3s;
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    gap            : 8px;
}

.btn-view-cart {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-view-cart:hover {
     color: #ffffff;
    background: #f55212;
    transform: translateY(-2px);
}

.btn-checkout {
    background: linear-gradient(135deg, #00A65A, #008D4C);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 166, 90, 0.25);
}

.btn-checkout:hover {
     background: #f55212;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 166, 90, 0.35);
}

/* ========== রেস্পন্সিভ ========== */
@media (max-width: 768px) {
    .mini-cart-container {
        max-width: 100%;
    }
    .mini-cart-header {
        padding: 16px 20px;
    }
    .mini-cart-header h3 {
        font-size: 18px;
    }
    .mini-cart-items {
        padding: 8px 12px;
    }
    .mini-cart-item {
        padding: 12px;
    }
    .mini-cart-item img {
        width: 65px;
        height: 65px;
    }
    .mini-cart-item-info h4 {
        font-size: 13px;
    }
    .mini-cart-footer {
        padding: 16px 20px;
    }
    .mini-cart-subtotal strong {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .mini-cart-item {
        flex-wrap: wrap;
    }
    .mini-cart-item img {
        width: 60px;
        height: 60px;
    }
    .item-quantity {
        margin-top: 8px;
    }
    .btn-view-cart,
    .btn-checkout {
        padding: 12px;
        font-size: 13px;
    }
}

/* অ্যানিমেশন */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cart-count-badge.update {
    animation: pulse 0.3s ease;
}
