/* css/sidebar.css */

/* --- OVERLAY OSCURO --- */
.cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- PANEL LATERAL DEL CARRITO --- */
.cart-sidebar {
    position: fixed;
    top: 0; right: -400px;
    width: 100%; max-width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-sidebar.active {
    right: 0;
}
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}
.cart-header button {
    background: none; border: none;
    font-size: 20px; cursor: pointer;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-sidebar-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.cart-sidebar-item img {
    width: 70px; height: 70px;
    object-fit: cover; border-radius: 5px;
}
.cart-sidebar-info h4 { margin: 0 0 5px 0; font-size: 14px; }
.cart-sidebar-info p { color: #d32f2f; margin: 0 0 10px 0; font-weight: bold;}
.quantity-controls {
    display: flex; align-items: center; gap: 10px;
}
.quantity-controls button {
    border: 1px solid #ddd; background: white;
    width: 25px; height: 25px; cursor: pointer;
}
.remove-item {
    background: none; border: none; color: #999;
    cursor: pointer; align-self: flex-start;
}
.remove-item:hover { color: #f44336; }
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}
.btn-checkout {
    width: 100%; padding: 15px;
    background: #4CAF50; color: white;
    border: none; border-radius: 5px;
    font-size: 16px; font-weight: bold; cursor: pointer;
}

/* --- BOTÓN WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px; left: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    width: 60px; height: 60px;
    display: flex; justify-content: center; align-items: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); }