@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Evita que a sidebar crie barra de rolagem lateral ao estar escondida */
}

/* --- AJUSTE CRÍTICO DO CARRINHO --- */
.cart-sidebar { 
    position: fixed !important;
    top: 0;
    right: 0; /* Começa na direita */
    width: 350px;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%; /* Ocupa tela cheia no celular */
        transform: translateX(100%);
    }
}

.cart-sidebar.open { 
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Overlay do Carrinho */
#cartOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 9998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

/* Quando o overlay estiver ativo */
#cartOverlay.active { 
    opacity: 1; 
    pointer-events: auto; 
}

/* --- RESTANTE DOS ESTILOS --- */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 768px) {
    .product-card { padding: 1rem; border-radius: 1.5rem; }
    .product-card img { height: 120px; }
}
.product-card:hover { transform: translateY(-8px); }

@keyframes pulse-soft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.98); }
}
.animate-pulse-soft { animation: pulse-soft 3s infinite ease-in-out; }

@keyframes bounce-short {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-bounce-short { animation: bounce-short 0.6s ease-out; }

@keyframes cart-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.cart-bump { animation: cart-bump 0.4s ease-out; }

.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); 
}
.reveal-active { 
    opacity: 1; 
    transform: translateY(0); 
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#history-list::-webkit-scrollbar { width: 4px; }
#history-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

.transition-active:active { transform: scale(0.95); }

/* Animação do Toast */
.toast-show { transform: scale(1) !important; opacity: 1 !important; }

#toastContainer { 
    transition: background 0.3s ease; 
    z-index: 99999 !important; /* Garante que fique acima de modais (150) e sidebar (9999) */
}