/* Botão flutuante do carrinho */
.carrinho-flutuante {
    position: fixed;
    right: 5.5rem;
    bottom: 1.5rem;
    z-index: 40;
    transition: all 0.3s ease;
    transform: scale(0);
    opacity: 0;
}

.carrinho-flutuante.visivel {
    transform: scale(1);
    opacity: 1;
}

.carrinho-flutuante.hidden {
    display: none;
}

.carrinho-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carrinho-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carrinho-count {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
}

/* Toast de feedback */
.carrinho-toast {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .carrinho-flutuante {
        right: 1.5rem;
        bottom: 1rem;
    }
    
    .carrinho-btn {
        width: 3rem;
        height: 3rem;
    }
    
    .carrinho-count {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.7rem;
        min-width: 1.25rem;
    }
}

/* Dispositivos muito pequenos */
@media (max-width: 480px) {
    .carrinho-flutuante {
        right: 1.5rem;
        bottom: 0.75rem;
    }
    
    .carrinho-btn {
        width: 2.75rem;
        height: 2.75rem;
    }
    
    .carrinho-count {
        width: 1rem;
        height: 1rem;
        font-size: 0.65rem;
        min-width: 1rem;
    }
}

/* Modal do carrinho */
#modalCarrinho {
    animation: fadeIn 0.3s ease;
}

#modalCarrinho .bg-white {
    animation: slideInUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        transform: translateY(20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scroll personalizado para o modal */
#modalCarrinho .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

#modalCarrinho .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#modalCarrinho .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#modalCarrinho .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    #modalCarrinho .max-w-2xl {
        max-width: 95%;
        margin: 1rem;
    }
    
    #modalCarrinho .max-h-\[90vh\] {
        max-height: 95vh;
    }
    
    #modalCarrinho .max-h-\[70vh\] {
        max-height: 75vh;
    }
}

/* Garantir que o botão scroll to top tenha prioridade visual */
#backToTop {
    z-index: 50 !important;
}

/* Garantir cores corretas no modal do carrinho */
#modalCarrinho {
    color: #1f2937; /* Cor padrão do texto */
}

#modalCarrinho .text-gray-900,
#modalCarrinho .text-neutral-900 {
    color: #111827 !important;
}

#modalCarrinho .text-green-600 {
    color: #16a34a !important;
}

#modalCarrinho .text-neutral-400 {
    color: #a3a3a3 !important;
}

#modalCarrinho .text-gray-500 {
    color: #6b7280 !important;
}

#modalCarrinho .text-gray-600 {
    color: #4b5563 !important;
}

#modalCarrinho .text-gray-700 {
    color: #374151 !important;
}

#modalCarrinho .text-gray-800 {
    color: #1f2937 !important;
}

#modalCarrinho .text-blue-600 {
    color: #2563eb !important;
}

#modalCarrinho .line-through {
    text-decoration: line-through;
}