/*
Theme Name: TemaPlus
Theme URI: https://example.com/temaplus
Author: Gemini
Author URI: https://example.com
Description: Um tema focado em afiliados estilo Buscapé, desenhado para funcionar com o plugin AfiPlus.
Version: 1.0.0
Text Domain: temaplus
*/

:root {
    --primary-color: #D3212D; /* Vermelho Buscapé */
    --background-color: #f4f4f4;
    --text-color: #333;
    --white: #ffffff;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Cabeçalho Global */
.site-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
    font-weight: 800;
}

/* Layout de Grelha para Arquivos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Cartão do Produto (Global) */
.afi-card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.afi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.afi-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    align-self: center;
}

.afi-card h2 {
    font-size: 1.1rem;
    margin: 0 0 10px;
    flex-grow: 1; /* Empurra o preço para baixo */
}

.afi-card a {
    text-decoration: none;
    color: inherit;
}

/* Preços */
.price-block {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.old-price {
    color: #999;
    font-size: 0.9rem;
    text-decoration: line-through;
    display: block;
}

.current-price {
    color: var(--primary-color); /* Preço em destaque vermelho ou preto forte */
    color: #333;
    font-size: 1.4rem;
    font-weight: 800;
    display: block;
}

/* Botão de Ação */
.btn-oferta {
    display: block;
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    margin-top: 15px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.btn-oferta:hover {
    background-color: #b31b26;
    color: var(--white);
}

/* Layout Single (Detalhe do Produto) */
.single-product-layout {
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .single-product-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .product-image-col {
        flex: 0 0 350px;
        margin-right: 40px;
    }
    .product-info-col {
        flex: 1;
    }
}