/* Estilos adicionais para a loja moderna */

/* Animações suaves */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}



/* Melhorias nos cards de produto */
.product-card {
    will-change: transform, box-shadow;
}

/* Otimização de performance para produtos featured */
.product-card.featured {
    will-change: transform, box-shadow, border-color;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* Produtos em destaque com efeito elegante */
.product-card.featured {
    position: relative;
    box-shadow: 0 8px 32px rgba(255, 221, 0, 0.15);
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                linear-gradient(135deg, #ffdd00, #ffc107, #ffdd00) border-box;
    overflow: hidden;
}

/* Efeito de borda animada sutil */
.product-card.featured {
    background-size: 200% 200%;
    animation: borderShift 4s ease-in-out infinite;
}

@keyframes borderShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Badge sem animação excessiva */
.product-badge {
    transition: transform 0.3s ease;
}

.product-card:hover .product-badge {
    transform: scale(1.05);
}



/* Efeitos hover melhorados */
.product-card:hover .product-name {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.product-card:hover .product-description {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Hover especial para produtos featured */
.product-card.featured:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 221, 0, 0.25);
    border-color: var(--primary-color);
}

/* Efeito de glow no badge dos produtos featured */
.product-card.featured .product-badge {
    box-shadow: 0 0 15px rgba(255, 221, 0, 0.4);
    animation: subtleGlow 3s ease-in-out infinite alternate;
}

@keyframes subtleGlow {
    0% {
        box-shadow: 0 0 15px rgba(255, 221, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 221, 0, 0.6);
    }
}

/* Botões de categoria com estilo limpo */
.category-btn:not(.active):hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Melhorias no loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Melhorias no carrinho */
.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(255, 221, 0, 0.05);
    border-radius: 8px;
    padding: 1rem 0.5rem;
}

/* Estilo limpo para produtos VPS */
.product-card[data-category="vps"] .product-price {
    font-size: 1.25rem;
}

/* Melhorias responsivas */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .categories {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Efeito de brilho sutil para produtos em destaque */
.product-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 221, 0, 0.1) 0%, transparent 50%);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

/* Efeito de shimmer no hover dos produtos featured */
.product-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 221, 0, 0.1), 
        transparent
    );
    border-radius: 20px;
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 2;
}

.product-card.featured:hover::after {
    left: 100%;
}

/* Melhorar o z-index do conteúdo dos cards featured */
.product-card.featured .product-image,
.product-card.featured .product-info {
    position: relative;
    z-index: 3;
}

/* Melhorias na tipografia */
.product-name {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.product-description {
    line-height: 1.6;
}

/* Efeitos de hover nos botões */
.add-to-cart {
    position: relative;
    overflow: hidden;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart:hover::before {
    left: 100%;
}

/* Melhorias no modal do carrinho */
.cart-dropdown {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 221, 0, 0.2);
}

.cart-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--bg-card);
}

/* Indicadores visuais */
.product-card[data-new="true"]::after {
    content: 'NOVO';
    position: absolute;
    top: 1rem;
    left: -30px;
    background: var(--error-color);
    color: white;
    padding: 0.25rem 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    transform: rotate(-45deg);
    z-index: 10;
}

/* Melhorias na acessibilidade */
.category-btn:focus,
.add-to-cart:focus,
.cart-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Transições suaves para todos os elementos interativos */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Melhorias no scroll */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}