/* Reset and Base Styles */
:root {
    --cor-primaria: #ff954e;
    --cor-secundaria: #ffaf7a;
    --cor-destaque: #ff5757;
    --cor-texto: #1a1a1a;
    --cor-texto-suave: #666;
    --cor-fundo: #f9fafb;
    --cor-borda: rgba(0, 0, 0, 0.03);
    --sombra-suave: 0 6px 18px rgba(0, 0, 0, 0.06);
    --sombra-destaque: 0 10px 30px rgba(255, 149, 78, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:#ffffff;
    color: var(--cor-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Container Principal */
.featured-products {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Grade de Produtos */
#product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Card de Produto */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--cor-borda);
    text-align: center;
    will-change: transform;
    backface-visibility: hidden;
}

.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

/* Container de Imagem */
.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0) 60%
    );
    z-index: 1;
    transition: all 0.4s ease;
}

.product-card:hover .product-image-container::after {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0) 70%
    );
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

/* Badge de Desconto */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--cor-destaque) 0%, #ff7373 100%);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(255, 36, 36, 0.25);
    transform: rotate(-5deg);
    transition: all 0.4s ease;
}

.product-card:hover .product-badge {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 36, 36, 0.35);
}

/* Corpo do Produto */
.product-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    justify-content: space-between;
    align-items: center;
}

/* Título do Produto */
.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cor-texto);
    margin: 0 0 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 0.4rem;
}

/* Preço */
.product-price {
    /* margin-bottom: 0.8rem; */
    width: 100%;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    padding: 0.3rem 0;
}

.original-price {
    color: #ff0000;
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-card:hover .original-price {
    opacity: 0.8;
}

.current-price {
    color: var(--cor-primaria);
    font-weight: 700;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
}

/* Ações do Produto */
.product-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding-top: 0.5rem;
}

/* Botão Principal */
.btn-view-product {
    background: linear-gradient(135deg, var(--cor-secundaria) 0%, var(--cor-primaria) 100%);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 149, 78, 0.3);
    flex: 1;
    max-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-view-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--cor-primaria) 0%, #ff7e3d 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-view-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 149, 78, 0.4);
}

.btn-view-product:hover::before {
    opacity: 1;
}

.btn-view-product:active {
    transform: translateY(1px);
}

.btn-view-product i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-view-product:hover i {
    transform: translateX(3px);
}

/* Botão de Favoritos */
.btn-favorite {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    color: #ccc;
    font-size: 1.2rem;
}

.btn-favorite::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 149, 78, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.btn-favorite:hover {
    color: #ff7e7e;
}

.btn-favorite:hover::before {
    transform: scale(1);
}

.btn-favorite.favorito-ativo {
    color: var(--cor-destaque);
    transform: scale(1.1);
}

.btn-favorite.favorito-ativo i {
    will-change: transform;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Estado Vazio */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--sombra-suave);
    margin: 1.5rem auto;
    max-width: 500px;
    border: 1px solid var(--cor-borda);
    transition: all 0.3s ease;
}

.empty-state:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--cor-primaria);
    margin-bottom: 1.2rem;
    opacity: 0.8;
}

.empty-state h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cor-texto);
    margin-bottom: 0.6rem;
}

.empty-state .text-muted {
    color: var(--cor-texto-suave);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.empty-state .btn-view-product {
    max-width: 180px;
    margin: 0 auto;
}

/* Spinner de Carregamento */
#loading-spinner {
    display: none;
}

#loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.4rem;
    color: var(--cor-primaria);
}

/* Barra de Rolagem Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cor-fundo);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--cor-primaria);
    border-radius: 4px;
    border: 2px solid var(--cor-fundo);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--cor-secundaria);
}

/* Responsividade */
@media (max-width: 1200px) {
    #product-grid {
        gap: 1.3rem;
    }
}

@media (max-width: 992px) {
    #product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .product-title {
        font-size: 1.05rem;
    }
    
    .current-price {
        font-size: 1.3rem;
    }
    
    .btn-view-product {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    #product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .product-card {
        border-radius: 14px;
    }
    
    .product-body {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .current-price {
        font-size: 1.2rem;
    }
    
    .btn-view-product {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        max-width: 130px;
    }
    
    .product-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .product-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 576px) {
    #product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    .btn-view-product {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
        max-width: 110px;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state h4 {
        font-size: 1.3rem;
    }
    
    .empty-state .text-muted {
        font-size: 0.9rem;
    }
}

/* Transição de Carregamento Suave */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}