/* css/carrito.css - Estilos para el carrito de compras */

/* Botón flotante del carrito */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--seisa-accent, #0ea5e9);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.4);
    cursor: pointer;
    z-index: 90;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.cart-floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: var(--seisa-cobalt, #1e3a8a);
    box-shadow: 0 15px 30px -5px rgba(30, 58, 138, 0.5);
}

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

/* Sidebar del Carrito */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* Hidden by default */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

/* Overlay oscuro de fondo */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Header del Carrito */
.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.close-cart:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Contenido de items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Footer del carrito */
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.cart-total-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e293b;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.checkout-btn:hover {
    background: #0284c7;
}

@media (max-width: 480px) {
    .cart-sidebar {
        max-width: 100%;
        right: -100%;
    }
}
