/* =================================================
   1. BOX DE PRODUTO ÚNICO (SIMPLE)
   ================================================= */
.aab-box-simple {
    /* ALTERAÇÃO: Mudei para coluna para permitir o rodapé embaixo */
    display: flex;
    flex-direction: column; 
    
    /* SEU ESTILO ORIGINAL MANTIDO: */
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border: 1px solid #d1d1d1;
    margin: 50px 0;
}

/* NOVO: Classe para manter a imagem e botões lado a lado (CIMA) */
.aab-internal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* NOVO: O Rodapé com a descrição e a linha */
.aab-footer-description {
    width: 100%;
    margin-top: 25px;       /* Espaço acima */
    padding-top: 20px;      /* Espaço interno */
    border-top: 1px solid #eeeeee; /* A LINHA DE SEPARAÇÃO */
    font-size: 14px;
    color: #555;
    text-align: left;
    line-height: 1.6;
}

.aab-img-wrap-simple { flex: 0 0 300px; }
.aab-img-wrap-simple img { max-width: 100%; height: auto; }

.aab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.aab-title-simple {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
    margin-bottom: 8px;
}

/* Estrelas e Avaliação */
.aab-stars {
    color: #ff6900;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 16px !important;
}
.aab-stars-text { 
    color: #444444;
    font-size: 14px;
}

.aab-btn-simple p { 
    font-size: 13px; 
    color: #333;
    margin-top: 8px;
}

/* =================================================
   2. PADRONIZAÇÃO VISUAL DOS BOTÕES PRINCIPAIS 
   (Amazon Simple, Grid Button e List Button)
   ================================================= */
.aab-btn-simple a,
.aab-box-grid .aab-btn-simple a,
.aab-btn-list {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, #ff9900 0%, #ff6200 100%) !important; 
    color: #ffffff !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 15px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    transition: all 0.2s ease !important;
    border: 2px solid #ff6200;
}

.aab-btn-list::before {
    content: "\f162";
    font-family: dashicons;
    font-size: 20px;
    margin-right: 2px;
    font-weight: normal !important;
}

.aab-btn-simple a:hover,
.aab-box-grid .aab-btn-simple a:hover,
.aab-btn-list:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 126, 0, 0.6) !important;
    background: linear-gradient(1deg, #ff9900 0%, #ff6200 100%) !important;
}

.aab-btn-simple { width: 100%; }
.aab-btn-simple a { padding: 10px 35px; }
.aab-box-grid .aab-btn-simple a { width: 85%; font-size: 13px; padding: 12px 10px; }
.aab-btn-list { width: 100%; max-width: 180px; padding: 4px 20px; font-size: 14px; }

/* =================================================
   3. LOJAS ALTERNATIVAS (BOX SIMPLE)
   ================================================= */
.aab-btn-alternative {
    width: 100%;
    border-top: 1px solid #eeeeee;
    padding-top: 20px;
}
.aab-alt-label {
    font-size: 12px;
    color: #444;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.aab-alt-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.aab-alt-row a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: 0.8px;
    transition: all 0.2s ease;
}
.aab-alt-row a::after {
    content: "\f504";
    font-weight: 500;
    font-style: normal;
    font-family: dashicons;
    font-size: 18px;
}
.aab-alt-row a:hover {
    font-weight: 900;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-ml { background-color: #FFE600; color: #1f4e96 !important; border: 2px solid #1f4e96; }
.btn-shopee { background-color: #D43C1C; color: #ffffff !important; border: 2px solid #9a1d04; }
.btn-ali { background-color: #6663; color: #000 !important; border: 2px solid #000;}
.btn-magalu {background-color: #FFF; color: ##0075E2 !important; border: 2px solid #0075E2; }

/* =================================================
   4. GRID DE PRODUTOS
   ================================================= */
.aab-grid-wrapper {
    display: grid;
    gap: 20px;
    margin: 40px 0;
}
.aab-grid-2 { grid-template-columns: repeat(2, 1fr); }
.aab-grid-3 { grid-template-columns: repeat(3, 1fr); }
.aab-grid-4 { grid-template-columns: repeat(4, 1fr); }

.aab-box-grid {
    flex-direction: column !important;
    text-align: center;
    padding: 25px 15px !important;
    margin: 0 !important;
    height: 100%;
}

/* NOVO: Ajuste para o grid respeitar a estrutura interna */
.aab-box-grid .aab-internal-row {
    flex-direction: column;
}

.aab-box-grid .aab-img-wrap-simple {
    flex: 0 0 auto;
    margin-bottom: 20px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aab-box-grid .aab-img-wrap-simple img {
    max-height: 160px;
    object-fit: contain;
}
.aab-box-grid .aab-title-simple {
    font-size: 1.1rem;
    height: 3em;
    overflow: hidden;
}

/* =================================================
   5. LISTA VERTICAL (RANKING)
   ================================================= */
.aab-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}
.aab-list-item {
    display: grid;
    grid-template-columns: 50px 120px 1fr 180px;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}
.aab-list-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.aab-list-action span {
    font-size: 12px;
    padding: 1px 0!important;
}

/* =================================================
   6. DESCRIÇÃO E DETALHES
   ================================================= */
.aab-footer-description ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}
.aab-footer-description li { margin-bottom: 5px; }
.aab-footer-description strong { color: #333; font-weight: 700; }

/* Ajuste fino para não quebrar o Grid se a descrição for grande */
.aab-box-grid .aab-footer-description {
    font-size: 13px;
    max-height: 200px;
    overflow-y: auto;
}

/* =================================================
   7. RESPONSIVIDADE (MEDIA QUERIES)
   ================================================= */

/* --- Tablets (1024px) --- */
@media (max-width: 1024px) {
    .aab-grid-3, .aab-grid-4 { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* --- Mobile Intermediário (768px) --- */
@media (max-width: 768px) {
    /* ALTERAÇÃO: Agora miramos no .aab-internal-row para quebrar, não no box todo */
    .aab-internal-row { flex-direction: column; }
    
    .aab-alt-row a { flex: 1; min-width: 150px; justify-content: center; }
    
    /* Títulos no Grid */
    .aab-box-grid .aab-title-simple {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 2.8em;
        font-size: 14px;
    }
}

/* --- Celulares (600px ou menos) --- */
@media (max-width: 600px) {
    /* Estrutura de Grades e Listas */
    .aab-grid-2, .aab-grid-3, .aab-grid-4 { grid-template-columns: 1fr; }

    .aab-list-item {
        grid-template-columns: 35px 85px 1fr; 
        grid-template-areas: "num img title" "num img action";
        gap: 10px; 
        padding: 15px 10px; 
        align-items: center;
    }

    /* Áreas da Lista */
    .aab-list-number { grid-area: num; font-size: 18px; }
    .aab-list-img { grid-area: img; }
    .aab-list-img img { max-width: 80px !important; }
    .aab-list-action { grid-area: action; margin-top: 5px; }

    /* Títulos na Lista Mobile */
    .aab-list-title { 
        grid-area: title; 
        font-size: 14px; 
        text-align: center; 
        width: 100%; 
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical; 
        overflow: hidden;
    }

    /* Configuração de Botões (Tamanhos e Paddings) */
    .aab-box-grid .aab-btn-simple a {
        width: auto !important;
        min-width: 150px;
        max-width: 170px;
        padding: 6px 20px !important;
        font-size: 14px !important;
        margin: 0 auto;
    }

    .aab-btn-list {
        max-width: 140px !important;
        padding: 2px 10px !important;
        font-size: 12px !important;
        height: auto;
    }

    /* Ícones e Subtextos */
    .aab-btn-list::before, 
    .aab-box-grid .aab-btn-simple a .dashicons,
    .dashicons-amazon {
        font-size: 18px !important;
    }

    .aab-list-action span, 
    .aab-btn-simple p { 
        font-size: 12px !important;
        margin: 0;
    }
    
    .aab-box-simple  {
    padding: 20px!important;   
    }
    
    .aab-footer-description ul, .aab-footer-description ol {
        padding: 10px 0;
        font-size: 16px;
    }
    
    .aab-footer-description ul li {
        font-size: 16px!important;
        margin: 0 0 12px 20px!important;
    }
    
}

