/* =========================================
   1. PALETA DE CORES PREMIUM (Variáveis)
   ========================================= */
:root {
    color-scheme: light;
    
    /* TEMA: CASHMERE & TERRACOTA (Premium, Casual e Unissex) */
    --bg-site: #DFD3C3; 
    --bg-card: #FFFFFF; 
    --texto-titulo: #3A2A22; 
    --texto-paragrafo: #685750; 
    --cor-destaque: #B84B31; 
    --cor-destaque-fundo: #F5E6E1; 
    --borda-suave: #CFC0AD; 
    --sidebar-bg: #F7F4F0; 
    --badge-rank: #B84B31; 
    
    --shadow-sm: 0 4px 10px rgba(58, 42, 34, 0.05);
    --shadow-md: 0 15px 30px rgba(58, 42, 34, 0.10);
}

/* TEMA BELEZA E MAQUIAGEM */
body.tema-beleza {
    --bg-site: #FFF5F7; 
    --bg-card: #FFFFFF;
    --texto-titulo: #2D3748;
    --texto-paragrafo: #4A5568;
    --cor-destaque: #E11D48; 
    --cor-destaque-fundo: #FFE4E6;
    --borda-suave: #FECDD3;
    --sidebar-bg: #FFFCFD;
    --badge-rank: linear-gradient(135deg, #D08C9A 0%, #B56576 100%);
}

/* =========================================
   2. RESET E BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif; 
}

body {
    background-color: var(--bg-site);
    color: var(--texto-paragrafo);
    transition: background-color 0.3s ease; 
}

h1, h2, h3, h4 { color: var(--texto-titulo); }

.layout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   3. MENU SUPERIOR E LOGO
   ========================================= */
.sidebar {
    width: 100%;
    background-color: var(--sidebar-bg) !important;
    border-bottom: 1px solid var(--borda-suave);
    padding: 1.5rem 0; 
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.sidebar-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    margin-bottom: 0.8rem;
}

.top-spacer {
    flex: 1; 
}

.logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.site-logo {
    width: auto;
    max-height: 110px; 
    object-fit: contain;
}

.user-menu-top {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
    align-items: center; 
    font-size: 0.95rem;
}

.menu ul { 
    list-style: none; 
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.menu ul li a {
    display: block;
    padding: 0.6rem 1.2rem;
    margin: 0.2rem 0.5rem;
    color: var(--texto-paragrafo);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu ul li a:hover, .menu ul li a.active {
    background-color: var(--cor-destaque-fundo);
    color: var(--cor-destaque);
}

/* =========================================
   4. CONTEÚDO PRINCIPAL E ANIMAÇÕES
   ========================================= */
.main-content {
    flex: 1;
    margin: 0 auto; 
    padding: 3rem 2rem;
    width: 100%;
    max-width: 1200px; 
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.top-header { margin-bottom: 3rem; text-align: center; }
.top-header h1 { font-size: 2.8rem; font-weight: 700; letter-spacing: -0.03em; }
.top-header p { font-size: 1.2rem; color: var(--texto-paragrafo); margin-top: 0.5rem; opacity: 0.8; }
.section-title { font-size: 1.8rem; margin: 2rem 0 1.5rem; }

/* =========================================
   5. CARDS DE PRODUTOS E LINKS
   ========================================= */
.card-link { text-decoration: none !important; color: inherit; display: block; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.5rem; }

.review-card {
    background: var(--bg-card);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--borda-suave);
    transition: all 0.3s cubic-bezier(0.15, 0, 0.15, 1);
    height: 100%;
}

.card-link:hover .review-card { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.review-image-placeholder { width: 100%; height: 230px; background-color: #f9fafb; border-bottom: 1px solid var(--borda-suave); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.review-image-placeholder img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.review-content { padding: 1.8rem; background: var(--bg-card); flex-grow: 1; }
.category-tag { display: inline-block; background-color: var(--cor-destaque-fundo); color: var(--cor-destaque); font-weight: 700; padding: 6px 14px; border-radius: 8px; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1rem; }
.review-content h3 {
    min-height: 4.5rem; 
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    padding-bottom: 5px;
    overflow: hidden;
    line-height: 1.4;
    font-size: 1.25rem;
    margin-top: 0.8rem;
    color: var(--texto-titulo);
}
.description { color: var(--texto-paragrafo); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; }

/* =========================================
   6. PÁGINA DO REVIEW (ARTIGO)
   ========================================= */
.review-article { max-width: 800px; margin: 0 auto; padding-bottom: 5rem; }
.btn-back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--texto-paragrafo); text-decoration: none; font-weight: 500; margin-bottom: 2rem; transition: color 0.2s ease; }
.btn-back:hover { color: var(--cor-destaque); }
.article-header { margin-bottom: 2rem; }
.article-header h1 { font-size: 3rem; line-height: 1.1; letter-spacing: -0.04em; margin: 1.5rem 0 1rem; }
.article-subtitle { font-size: 1.3rem; color: var(--texto-paragrafo); line-height: 1.5; opacity: 0.9; }
.article-hero { width: 100%; max-width: 600px; margin: 20px auto; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; display: flex; justify-content: center; align-items: center; background-color: var(--bg-card); border: 1px solid var(--borda-suave); padding: 1rem; }
.hero-image { width: 100%; height: 100%; object-fit: contain; }
.article-body { font-size: 1.15rem; line-height: 1.8; }
.article-body h2 { font-size: 1.8rem; margin: 2.5rem 0 1rem; letter-spacing: -0.02em; }
.article-body p { margin-bottom: 1.5rem; }

.article-actions { display: flex; gap: 1rem; margin: 2rem 0 3rem; padding: 2rem; background-color: var(--bg-card); border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--borda-suave); }
.btn-large, .btn-amazon, .btn-ml, .btn-shopee, .affiliate-links a { flex: 1; text-align: center; padding: 1rem; border-radius: 12px; font-size: 1rem; font-weight: 600; text-decoration: none; color: white !important; background-color: var(--cor-destaque) !important; transition: transform 0.2s ease, opacity 0.2s ease; border: none; }
.btn-large:hover, .btn-amazon:hover, .btn-ml:hover, .btn-shopee:hover, .affiliate-links a:hover { transform: translateY(-3px); opacity: 0.95; }

/* =========================================
   7. LISTAS E RANKINGS (Top 5, Top 10)
   ========================================= */
.list-container { max-width: 900px; margin: 0 auto; padding-bottom: 5rem; }

.list-item { 
    background: var(--bg-card); 
    border-radius: 24px; 
    padding: 2.5rem; 
    margin-bottom: 3.5rem; 
    display: grid; 
    grid-template-columns: 280px 1fr; 
    gap: 3rem; 
    box-shadow: var(--shadow-sm); 
    border: 1px solid var(--borda-suave); 
    position: relative; 
    align-items: flex-start; 
}

.rank-badge { position: absolute; top: -20px; left: -20px; background: var(--badge-rank); color: white; font-size: 1.8rem; font-weight: 800; width: 65px; height: 65px; display: flex; align-items: center; justify-content: center; border-radius: 18px; box-shadow: var(--shadow-md); z-index: 2; }

.list-item-image { 
    width: 100%; 
    max-width: 320px; 
    aspect-ratio: 1 / 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    border-radius: 20px;
    justify-self: center; 
    align-self: center;   
}

.list-item-image img { width: 100%; height: 100%; object-fit: contain; padding: 0; }

.list-item-content { 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    gap: 1.5rem; 
}

.list-item-content h2 { font-size: 1.8rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }

.long-text p, .long-text li { 
    font-size: 1.05rem; 
    line-height: 1.8; 
    margin-bottom: 1.2rem; 
    color: var(--texto-paragrafo);
}

.long-text ul { margin-bottom: 1.5rem; padding-left: 1.2rem; }

.list-item-content .affiliate-links { 
    margin-top: auto; 
    display: flex; 
    gap: 1rem; 
    padding-top: 1rem;
}

/* =========================================
   8. MENU DE USUÁRIO (BOTOES DE LOGIN E PERFIL)
   ========================================= */
.user-actions { display: flex; gap: 1.5rem; align-items: center; }
.btn-login { color: var(--texto-paragrafo); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.btn-login:hover { color: var(--cor-destaque); }

.btn-signup {
    background-color: var(--cor-destaque) !important;
    color: white !important;
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-signup:hover { transform: scale(1.05); }

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--bg-card);
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--borda-suave);
}

.avatar {
    width: 38px;
    height: 38px;
    background: var(--cor-destaque);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.user-profile span { color: var(--texto-paragrafo); }
.user-profile strong { color: var(--texto-titulo); }
.btn-logout { color: #dc2626; text-decoration: none; font-weight: 600; font-size: 0.85rem; margin-left: 0.5rem; padding-left: 0.8rem; border-left: 1px solid var(--borda-suave); }

/* =========================================
   9. SISTEMA DE COMENTÁRIOS
   ========================================= */
.comments-section { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--borda-suave); }
.comments-section h2 { font-size: 1.5rem; margin-bottom: 2rem; }

.login-prompt { background-color: var(--bg-card); padding: 2rem; border-radius: 16px; text-align: center; border: 1px solid var(--borda-suave); box-shadow: var(--shadow-sm); margin-bottom: 2.5rem; }
.login-prompt p { font-weight: 600; color: var(--texto-titulo); margin-bottom: 1rem; }
.prompt-actions { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.btn-login-prompt { font-weight: 600; color: var(--texto-paragrafo); text-decoration: none; }
.btn-login-prompt:hover { color: var(--cor-destaque); }
.btn-signup-prompt { font-weight: 600; color: var(--cor-destaque); text-decoration: none; }

.comment-form { display: flex; gap: 1.5rem; margin-bottom: 3rem; align-items: flex-start; }
.user-avatar-small { width: 45px; height: 45px; background-color: var(--cor-destaque-fundo); color: var(--cor-destaque); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.input-wrapper { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem; }
.input-wrapper textarea { width: 100%; padding: 1.2rem; border: 1px solid var(--borda-suave); border-radius: 16px; background-color: var(--bg-card); font-family: inherit; font-size: 1rem; color: var(--texto-paragrafo); outline: none; resize: vertical; transition: border-color 0.2s; }
.input-wrapper textarea:focus { border-color: var(--cor-destaque); }
.btn-comentar { background-color: var(--cor-destaque); color: white; padding: 0.8rem 1.5rem; border-radius: 12px; border: none; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.btn-comentar:hover { opacity: 0.9; }

.comments-list { display: flex; flex-direction: column; gap: 1.5rem; }
.comment-card { display: flex; gap: 1.2rem; background: var(--bg-card); padding: 1.5rem; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--borda-suave); }

.comment-avatar { 
    width: 45px; 
    height: 45px; 
    background-color: var(--cor-destaque); 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    flex-shrink: 0; 
}

.comment-content { flex: 1; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.comment-date { font-size: 0.85rem; color: #9CA3AF; }
.comment-text { line-height: 1.6; color: var(--texto-paragrafo); }
.no-comments { text-align: center; color: var(--texto-paragrafo); font-style: italic; padding: 2rem; }

/* =========================================
   10. PAINEL ADMIN
   ========================================= */
.admin-body { background-color: #f4f4f4; display: flex; justify-content: center; padding: 40px 20px; }
.admin-container { width: 100%; max-width: 900px; background: var(--bg-card); padding: 30px; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--borda-suave); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.admin-form label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--texto-titulo); }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid var(--borda-suave); border-radius: 8px; font-family: inherit; background-color: #f9fafb; }
.btn-salvar { background-color: #16a34a; color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; transition: opacity 0.2s; }
.btn-salvar:hover { opacity: 0.9; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.admin-table th, .admin-table td { padding: 15px; border-bottom: 1px solid var(--borda-suave); text-align: left; }
.admin-table th { background-color: #f9fafb; color: var(--texto-titulo); }
.btn-itens { background: var(--cor-destaque); color: white; text-decoration: none; padding: 8px 14px; border-radius: 6px; font-size: 0.9em; font-weight: 600; }

/* =========================================
   11. TABELA DE MILHAS E VIAGENS
   ========================================= */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;       
    max-height: 85vh; 
    border-radius: 12px;
    border: 1px solid var(--borda-suave);
    scroll-behavior: smooth;
}

.tabela-milhas {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: white;
    font-size: 0.85rem; 
}

.tabela-milhas thead {
    background-color: var(--sidebar-bg);
}

.tabela-milhas th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--sidebar-bg); 
    padding: 1.2rem;
    border-bottom: 2px solid var(--borda-suave);
    font-weight: 700;
    color: var(--texto-titulo);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tabela-milhas td {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--borda-suave);
    vertical-align: middle;
}

.tabela-milhas tr:last-child td { border-bottom: none; }
.tabela-milhas tr:hover td { background-color: #faf9f7; }

.link-pontos, .box-pontos {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.link-pontos:hover {
    background-color: var(--cor-destaque-fundo);
    transform: scale(1.05);
}

/* =========================================
   12. RESPONSIVIDADE MÁXIMA (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    .sidebar { padding: 1rem 0 0 0; min-height: auto; }
    .site-logo { max-height: 70px; }
    
    .top-row { flex-direction: column; gap: 10px; margin-bottom: 0.5rem; }
    .top-spacer { display: none; } 
    .user-menu-top { justify-content: center; }

    .menu ul { display: flex; overflow-x: auto; padding: 0.5rem 1rem 1rem 1rem; white-space: nowrap; justify-content: flex-start; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; }
    .menu ul::-webkit-scrollbar { display: none; }
    .menu ul { -ms-overflow-style: none; scrollbar-width: none; }
    .menu ul li a { margin: 0 0.5rem 0 0; padding: 0.6rem 1.2rem; font-size: 0.95rem; }

    .main-content { padding: 2rem 1.2rem; animation: none; }
    .top-header h1 { font-size: 2.2rem; }
    .article-header h1 { font-size: 2.2rem; margin: 1rem 0; }
    .article-hero { height: auto; aspect-ratio: 1 / 1; padding: 1rem; }
    
    .article-actions, .list-item-content .affiliate-links { flex-direction: column; padding: 1.5rem; }
    .list-item { grid-template-columns: 1fr; padding: 2rem 1.5rem; gap: 1.5rem; }
    .rank-badge { left: 10px; top: -15px; width: 55px; height: 55px; font-size: 1.4rem; }
}