/* ================== BODY SCROLL LOCK ================== */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
    height: 100dvh;
}

/* ================== SIDEBAR LAYOUT ================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -400px;
    width: 360px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    transition: right 0.4s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.active {
    right: 0;
}

/* ✅ MOBILE RESPONSIVE (85% WIDTH) */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 90%;
        right: -100%;
    }

    .cart-sidebar.active {
        right: 0;
    }
}

/* ================== HEADER ================== */
.cart-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.cart-header h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #111;
}

.close-cart {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
}

/* ================== CART ITEMS ================== */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-bottom: 1px solid #f2f2f2;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item h6 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #222;
}

.cart-item p {
    font-size: 12px;
    color: #777;
}

.cart-item span,
.cart-item small {
    font-size: 12px;
}

/* ================== SUMMARY ================== */
.cart-summary {
    font-size: 12px;
    background: #fafafa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 10px;
}

/* ================== OFFERS & BENEFITS ================== */
.cart-benefits {
    font-size: 12px;
    text-align: center;
}

.cart-benefits i {
    font-size: 18px;
}

.cart-benefits small {
    font-size: 11px;
}

/* ================== TRUST BADGE ================== */
.cart-trust small {
    font-size: 11px;
}

/* ================== FOOTER ================== */
.cart-footer {
    border-top: 1px solid #eee;
    padding: 15px;
    background: #fff;
}

.cart-footer small {
    font-size: 12px;
}

.cart-footer span {
    font-size: 14px;
}

.cart-footer .btn {
    font-size: 13px;
    padding: 10px 0;
    width: 100%;
}

/* ================== BADGE ================== */
.cart-badge {
    background: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    padding: 3px 6px;
    position: absolute;
    top: -6px;
    right: -8px;
}

/* ================== OVERLAY ================== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1999;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================== SCROLLABLE CONTENT ================== */
.cart-content {
    overflow-y: auto;
    flex-grow: 1;
    font-size: 13px;
    padding-bottom: 60px;
}

/* ================== MOBILE IMPROVEMENTS ================== */
@media (max-width: 480px) {
    .cart-item img {
        width: 60px;
        height: 60px;
    }

    .cart-header h6 {
        font-size: 13px;
    }

    .cart-footer .btn {
        font-size: 12px;
        padding: 9px 0;
    }
}

/* ===== Custom Modal ===== */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    animation: fadeIn 0.2s ease;
}

.custom-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3001;
    animation: slideUp 0.25s ease;
}

.custom-modal-content {
    padding: 20px;
}

.custom-modal-content .btn,
.cart-empty-view .btn {
    width: auto !important;
    height: auto !important;
    min-width: 140px;
    padding: 12px 30px !important;
    font-size: 14px !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.cart-sidebar .btn-dark,
.cart-sidebar .btn-danger {
    color: #fff !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translate(-50%, -40%); opacity: 0; }
    to   { transform: translate(-50%, -50%); opacity: 1; }
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .custom-modal {
        width: 85%;
    }
}
