/* OFF-CANVAS CART */
.cart-drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6); z-index: 9998;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.cart-drawer-overlay.active { opacity: 1; visibility: visible; }

.cart-drawer {
    position: fixed; top: 0; right: -450px; width: 450px; height: 100vh;
    background: #fff; z-index: 9999;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; flex-direction: column;
}
.cart-drawer.active { right: 0; }

.cart-header {
    padding: 25px 30px; background: #faf5f0;
    border-bottom: 1px solid #eaeaea;
    display: flex; justify-content: space-between; align-items: center;
}
.cart-header h3 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; color: var(--eden-wine); }
.cart-close {
    background: none; border: none; font-size: 1.5rem; color: #555;
    cursor: pointer; transition: 0.3s;
}
.cart-close:hover { color: var(--eden-wine); transform: scale(1.1); }

.cart-items { flex: 1; overflow-y: auto; padding: 25px 30px; display: flex; flex-direction: column; gap: 20px; }
.cart-empty-msg { text-align: center; color: #999; margin-top: 50px; font-size: 1.1rem; }

.cart-item {
    display: flex; gap: 15px; border-bottom: 1px solid #f5ede8; padding-bottom: 15px; position: relative;
}
.cart-item-img {
    width: 80px; height: 80px; border-radius: 8px; overflow: hidden; background: #fdfdfd; border: 1px solid #eaeaea;
    display: flex; align-items: center; justify-content: center;
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.cart-item-info h4 { margin: 0; font-size: 0.95rem; color: #333; line-height: 1.3; padding-right: 25px; }
.cart-item-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; }

.qty-control {
    display: flex; align-items: center; border: 1px solid #e0d0c8; border-radius: 20px; overflow: hidden;
}
.qty-control span {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    background: #faf5f0; cursor: pointer; color: #555; font-weight: bold; transition: 0.2s;
}
.qty-control span:hover { background: #e0d0c8; }
.qty-control input {
    width: 35px; text-align: center; border: none; background: transparent; font-size: 0.9rem; pointer-events: none;
}
.cart-item-price { font-weight: 700; color: var(--eden-wine); }
.cart-item-remove {
    position: absolute; top: 0; right: 0; background: none; border: none; cursor: pointer; color: #ccc; transition: 0.3s;
}
.cart-item-remove:hover { color: #cc0000; }
.cart-item-remove svg { width: 18px; height: 18px; }

.cart-footer { padding: 30px; background: #fff; border-top: 1px solid #eaeaea; box-shadow: 0 -5px 15px rgba(0,0,0,0.03); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; color: #333; }
.cart-checkout-btn {
    width: 100%; background: #2ba64e; color: #fff; border: none; padding: 18px; border-radius: 30px;
    font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: space-between;
}
.cart-checkout-btn:hover { background: #238c40; box-shadow: 0 5px 15px rgba(43, 166, 78, 0.4); }
.cart-continue-btn {
    width: 100%; background: transparent; color: #777; border: none; padding: 15px; margin-top: 10px;
    font-size: 0.9rem; cursor: pointer; text-decoration: underline;
}
.cart-continue-btn:hover { color: var(--eden-wine); }

/* Add to Cart Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6); z-index: 999998 !important;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.add-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    background: #fff; padding: 40px; border-radius: 12px; z-index: 999999 !important;
    width: 90%; max-width: 450px; text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.add-modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.add-modal h3 { font-family: var(--font-display); color: var(--eden-wine); margin-top: 0; margin-bottom: 15px; font-size: 1.8rem; }
.add-modal p { color: #555; margin-bottom: 30px; font-size: 1rem; line-height: 1.5; }
.add-modal strong { color: #333; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.modal-actions button {
    width: 100%; padding: 14px; border-radius: 30px; font-weight: 700; font-size: 0.85rem; letter-spacing: 1px; cursor: pointer; transition: 0.3s; text-transform: uppercase;
}
.btn-continue { background: transparent; color: #555; border: 1px solid #e0d0c8; }
.btn-continue:hover { border-color: #aa5d65; color: #aa5d65; background: #faf5f0; }
.btn-checkout { background: #b44d7a; color: #fff; border: none; }
.btn-checkout:hover { background: #8c3b5f; box-shadow: 0 4px 15px rgba(180, 77, 122, 0.3); }

@media(max-width: 500px) {
    .cart-drawer { width: 100%; right: -100%; }
    .cart-drawer.active { right: 0; }
    .modal-actions { flex-direction: column; }
}

/* Fly to Cart Glow / Bounce */
@keyframes cartBounceAnim {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(102, 8, 16, 0); }
    50% { transform: scale(1.3); box-shadow: 0 0 20px rgba(102, 8, 16, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(102, 8, 16, 0); }
}
.cart-bounce-anim {
    animation: cartBounceAnim 0.4s ease-out;
    border-radius: 50%;
}

/* FABs Copied from cards.css */
.whatsapp-fab {
            position: fixed; bottom: 28px; left: 28px;
            z-index: 9000; width: 56px; height: 56px;
            background: #25D366; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 4px 24px rgba(37, 211, 102, 0.3);
            transition: all 0.3s ease;
            animation: fabPulse 2s ease infinite;
        }

.whatsapp-fab:hover { transform: scale(1.1); }



/* Cart FAB */
.cart-fab {
    position: fixed; bottom: 100px; right: 28px;
    z-index: 9000; box-sizing: border-box; width: 60px !important; height: 60px !important;
    background: linear-gradient(135deg, var(--eden-wine) 0%, var(--eden-burgundy) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(102, 8, 16, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.1);
}
.cart-fab:hover { 
    transform: scale(1.1) translateY(-5px); 
    box-shadow: 0 12px 40px rgba(102, 8, 16, 0.6);
}
.cart-fab svg { 
    width: 28px; height: 28px; 
    stroke: #ffffff; 
    transition: all 0.3s ease;
}
.cart-fab:hover svg {
    stroke: #f8e5eb;
    transform: scale(1.05);
}

.cart-fab .nav-badge {
    position: absolute; top: -2px; right: -2px;
    background: #ff3366; color: white;
    font-size: 0.65rem; font-weight: bold;
    width: 18px; height: 18px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%; border: 1px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cart-fab svg { width: 24px; height: 24px; stroke: white; }


