/*
 * Estilos CSS para a Vitrine de Produtos Amazon Afiliado
 * Arquivo: ava-vitrine.css
 */

/* Container Principal da Vitrine */
.ava-vitrine-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espaçamento entre os cards */
    justify-content: center;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Card Individual do Produto: Ajustado para layout lado a lado */
.ava-product-card {
    /* Flex: 1 1 0% garante que os 3 cards se dividam igualmente no container */
    flex: 1 1 0%; 
    min-width: 200px; /* Largura mínima reduzida */
    max-width: 300px; /* Limite máximo reduzido */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.ava-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Rótulo (Bestseller, Top Escolha, etc.) */
.ava-product-label {
    background-color: #e6ffe6; /* Verde claro, como na imagem */
    color: #008000; /* Verde escuro */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    margin: -15px -15px 15px -15px; /* Estende para as bordas do card */
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #c6e6c6;
}

/* Imagem do Produto */
.ava-product-image-wrapper {
    height: 200px; /* Altura fixa para o wrapper da imagem */
    min-height: 100px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.ava-product-image {
    width: 100%; /* Imagem preenche a largura do wrapper */
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* Classes de Ajuste de Tamanho de Imagem */
.ava-image-size-small .ava-product-image {
    width: 100%; /* Imagem preenche a largura do wrapper */
    max-height: 100%;
}

.ava-image-size-medium .ava-product-image {
    width: 100%; /* Imagem preenche a largura do wrapper */
    max-height: 100%;
}

.ava-image-size-large .ava-product-image {
    width: 100%; /* Imagem preenche a largura do wrapper */
    max-height: 100%;
}

/* Título do Produto */
.ava-product-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin: 10px 0;
    min-height: 40px; 
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
}

/* Linha de Preço e Prime */
.ava-product-price-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin: 10px 0 20px 0;
}

/* Preço */
.ava-product-price {
    font-size: 1.6em;
    font-weight: bold;
    color: #111;
    margin-right: 10px;
}

/* Badge Prime (simulado) */
.ava-prime-badge {
    font-size: 0.8em;
    font-weight: bold;
    color: #000;
    background-color: #ff9900; 
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botão de Compra */
.ava-buy-button {
    font-size: 0.9em; /* Fonte menor para o botão */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: #f7e08f; 
    color: #111;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1em;
    border: 1px solid #f0c14b;
    transition: background-color 0.2s;
    margin-top: auto; /* Empurra o botão para o final do card */
}

.ava-buy-button:hover {
    background-color: #f0c14b; 
    color: #111;
}

/* Logo 'a' da Amazon no botão */
.ava-amazon-logo {
    /* Removendo estilos de fonte para a letra 'a' */
    /* font-size: 1.5em; */
    /* font-style: italic; */
    /* font-weight: 900; */
    margin-right: 5px;
    line-height: 1;
    width: 20px; /* Largura para a imagem da logo */
    height: 20px; /* Altura para a imagem da logo */
    background-image: url('Amazon.png'); /* Assumindo que a imagem será colocada na mesma pasta ou acessível */
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    text-indent: -9999px; /* Esconde o texto 'a' */
    line-height: 1;
}

/* Aviso de Preço Manual (Removido do PHP, mas mantido o estilo caso o usuário adicione) */
.ava-price-disclaimer {
    display: none; /* Esconde por padrão, já que foi removido do PHP */
}

/* Classes para Ajuste de Tamanho dos Cards */
.ava-card-size-small .ava-product-card {
    min-width: 150px;
    max-width: 200px;
}

.ava-card-size-small .ava-product-image-wrapper {
    height: 150px;
}

.ava-card-size-medium .ava-product-card {
    min-width: 200px;
    max-width: 300px;
}

.ava-card-size-medium .ava-product-image-wrapper {
    height: 200px;
}

.ava-card-size-large .ava-product-card {
    min-width: 250px;
    max-width: 350px;
}

.ava-card-size-large .ava-product-image-wrapper {
    height: 250px;
}

/* Responsividade: Em telas muito pequenas, empilha para melhor visualização */
@media (max-width: 600px) {
    .ava-product-card {
        flex: 1 1 100%;
        max-width: 90%;
    }
}
