/* ==================== SIDE CART - DESLIZA DA DIREITA ==================== */

/* Side Cart Overlay */
.side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-cart-overlay.active {
    display: block;
    opacity: 1;
}

/* Side Cart Container */
.side-cart {
    position: fixed;
    top: 0;
    right: -500px;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

/* Side Cart Header */
.side-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
    color: white;
    flex-shrink: 0;
}

.side-cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-cart-header h3:before {
    content: "🛒";
    font-size: 1.3rem;
}

.side-cart-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.side-cart-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

/* Side Cart Body */
.side-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Itens do Carrinho */
.side-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    animation: slideInItem 0.3s ease;
}

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

.side-cart-item-imagem {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.side-cart-item-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.side-cart-item-info h4 {
    margin: 0 0 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.side-cart-item-preco {
    font-size: 0.85rem;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

.side-cart-item-quantidade {
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-cart-qtd-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.side-cart-qtd-btn:hover {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.side-cart-qtd-input {
    width: 45px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    font-size: 13px;
}

.side-cart-item-subtotal {
    font-size: 0.85rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 8px;
}

.side-cart-item-remove {
    position: absolute;
    top: 15px;
    right: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.side-cart-item-remove:hover {
    background: #fee;
    color: #e74c3c;
}

/* Carrinho Vazio */
.side-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.side-cart-empty-icon {
    font-size: 70px;
    opacity: 0.4;
    margin-bottom: 20px;
}

.side-cart-empty p {
    color: #666;
    margin-bottom: 20px;
}

.side-cart-empty .btn-continuar {
    display: inline-block;
    padding: 12px 30px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.side-cart-empty .btn-continuar:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* Side Cart Footer */
.side-cart-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.side-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    font-size: 1rem;
}

.side-cart-total span:first-child {
    font-weight: 600;
    color: #2c3e50;
}

.side-cart-total span:last-child {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
}

.side-cart-pix {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.side-cart-pix span:last-child {
    font-weight: bold;
    color: #00a859;
    font-size: 1rem;
}

.side-cart-buttons {
    display: flex;
    gap: 12px;
}

.btn-side-cart {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-side-cart-ver {
    background: #f0f0f0;
    color: #333;
}

.btn-side-cart-ver:hover {
    background: #e0e0e0;
}

.btn-side-cart-finalizar {
    background: #ff6b35;
    color: white;
}

.btn-side-cart-finalizar:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

/* Float Button */
.carrinho-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carrinho-float-btn {
    position: relative;
    width: 60px;
    height: 60px;
    background: #ff6b35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.carrinho-float-btn:hover {
    transform: scale(1.05);
    background: #e55a2b;
}

.carrinho-float-btn .carrinho-icon {
    font-size: 28px;
    color: white;
}

.carrinho-float-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Loading no Side Cart */
.side-cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.side-cart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 768px) {
    .side-cart {
        max-width: 100%;
        width: 100%;
    }
    
    .side-cart-item-imagem {
        width: 60px;
        height: 60px;
    }
    
    .carrinho-float {
        bottom: 20px;
        right: 20px;
    }
    
    .carrinho-float-btn {
        width: 50px;
        height: 50px;
    }
    
    .carrinho-float-btn .carrinho-icon {
        font-size: 24px;
    }
}

/* Toast Notifications */
.carrinho-toast {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #27ae60;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
}

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

.carrinho-toast-success {
    background: #27ae60;
}

.carrinho-toast-error {
    background: #e74c3c;
}
/* Estado de atualização */
.updating {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.side-cart-item.updating {
    background: #f9f9f9;
}
/* Estilos para aviso de expiração */
.swslp-aviso-expiracao {
    animation: slideInRight 0.3s ease-out;
}

.swslp-carrinho-expirado {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Badge de tempo no carrinho */
.carrinho-tempo-restante {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

.carrinho-tempo-restante.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.carrinho-tempo-restante.expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}