/*
Theme Name: AchadosPRO
Description: Tema focado em Core Web Vitals, SEO e Conversão.
Version: 1.0.1
Author: King Promotion
*/

:root {
    /* Paleta "Rei das Promoções" */
    --primary: #FF4500; /* Laranja avermelhado vibrante */
    --secondary: #FFD700; /* Amarelo Promoção */
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f4f4;
    --text-main: #333333;
    --text-light: #666666;
    
    /* Layout */
    --container: 1200px;
    --gap: 24px;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary: #ff6347;
    --secondary: #b39700;
    --dark: #ffffff; /* Inversão para textos */
    --light: #121212; /* Fundo escuro */
    --gray: #1e1e1e;
    --text-main: #e0e0e0;
    --text-light: #a0a0a0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* Reset e Base */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--gray);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Header SmartMag Style */
.site-header { background: var(--light); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.site-branding a { font-weight: 900; font-size: 1.5rem; text-transform: uppercase; color: var(--primary); letter-spacing: -1px; }

/* Dark Mode Toggle */
.theme-switch { cursor: pointer; background: none; border: 1px solid var(--text-light); border-radius: 20px; padding: 5px 10px; color: var(--text-main); }

/* Grid Layout (Achadinhos) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
    margin: 40px 0;
}

.post-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.post-card:hover { transform: translateY(-5px); }

.post-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }

/* Badges e Labels */
.cat-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--primary); color: #fff;
    padding: 4px 8px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; border-radius: 4px;
}

.card-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.post-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }

.price-tag {
    color: #27ae60; font-weight: 800; font-size: 1.2rem;
    margin-top: auto; /* Empurra para baixo */
    display: flex; justify-content: space-between; align-items: center;
}
.btn-small {
    background: var(--primary); color: #fff; padding: 5px 12px;
    border-radius: 4px; font-size: 0.9rem; font-weight: 600;
}

/* Single Post */
.single-header { margin: 40px 0 20px; text-align: center; }
.single-title { font-size: 2.5rem; color: var(--text-main); margin-bottom: 10px; }
.breadcrumbs { font-size: 0.9rem; color: var(--text-light); margin-bottom: 20px; }

.content-area { background: var(--light); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 900px; margin: 0 auto; }

.cta-box {
    background: linear-gradient(135deg, var(--gray) 0%, #fff 100%);
    border-left: 5px solid var(--primary);
    padding: 20px; margin: 30px 0;
    display: flex; align-items: center; justify-content: space-between;
    border-radius: var(--radius);
}
.cta-btn {
    background: var(--primary); color: #fff; padding: 15px 30px;
    border-radius: 50px; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255,69,0,0.4); transition: 0.3s;
}
.cta-btn:hover { background: #e03e00; transform: scale(1.02); }

/* Footer */
.site-footer { background: #111; color: #aaa; padding: 40px 0; margin-top: 60px; text-align: center; }

/* --- Melhorias do Header --- */
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
}

.search-trigger {
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.search-trigger:hover { color: var(--primary); }

/* Barra de Busca Expansível */
.search-bar-expand {
    display: none;
    background: var(--light);
    padding: 15px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.search-bar-expand.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Menu Mobile (Hambúrguer) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 992px) {
    .menu-toggle { display: flex; }

    .main-navigation {
        display: none; /* Esconde menu padrão no mobile */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--light);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }

    .main-navigation.is-active {
        display: flex;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
        list-style: none;
        padding: 0;
    }
}

/* Ajuste no Destaque do Logo */
.text-logo .highlight {
    color: var(--primary);
    background: var(--secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .single-title { font-size: 1.8rem; }
    .cta-box { flex-direction: column; text-align: center; gap: 15px; }
}