/* Theme Name: AchadosPRO
File: assets/css/main.css
Description: Estilos globais, Design System, Dark Mode e Layout Responsivo.
*/

:root {
    /* Paleta Identidade Visual: Rei das Promoções */
    --primary: #FF4500; /* Laranja vibrante */
    --primary-hover: #e03e00;
    --secondary: #FFD700; /* Amarelo Promoção */
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f4f4;
    --border: #e2e2e2;
    --text-main: #333333;
    --text-light: #666666;
    
    /* Layout & Performance */
    --container: 1200px;
    --gap: 24px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Variáveis para Dark Mode */
[data-theme="dark"] {
    --primary: #ff6347;
    --primary-hover: #ff4500;
    --secondary: #b39700;
    --dark: #ffffff;
    --light: #1e1e1e; /* Fundo de cards/header no dark */
    --gray: #121212;  /* Fundo do site no dark */
    --border: #333333;
    --text-main: #e0e0e0;
    --text-light: #a0a0a0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* --- 1. RESET & 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 ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin-top: 0; color: var(--text-main); line-height: 1.2; font-weight: 700; }
a { color: inherit; text-decoration: none; transition: 0.2s; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* --- 2. HEADER & NAVEGAÇÃO --- */
.site-header { 
    background: var(--light); 
    box-shadow: var(--shadow); 
    position: sticky; 
    top: 0; 
    z-index: 1000;
    width: 100%;
}

.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 75px; 
}

/* Logo em Texto */
.text-logo {
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-main);
    letter-spacing: -1px;
}
.text-logo .highlight { color: var(--primary); }

/* Menu Desktop */
.main-navigation.desktop-only { margin-left: auto; margin-right: 30px; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.main-navigation a { 
    font-weight: 700; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}
.main-navigation a:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 15px; }
.icon-btn {
    background: transparent; border: 1px solid var(--border); border-radius: 50%; 
    width: 38px; height: 38px; cursor: pointer; display: flex; 
    align-items: center; justify-content: center; color: var(--text-main);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* --- 3. GRID DE ACHADINHOS (SMARTMAG STYLE) --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap);
    margin: 40px 0;
}

.post-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    transition: 0.3s;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.post-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.post-card:hover .post-thumb img { transform: scale(1.08); }

.cat-badge {
    position: absolute; top: 15px; left: 15px;
    background: var(--primary); color: #fff;
    padding: 5px 12px; font-size: 0.7rem; font-weight: 800;
    text-transform: uppercase; border-radius: 6px;
}

.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.post-title { font-size: 1.2rem; margin-bottom: 15px; line-height: 1.4; }

.price-tag {
    margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.currency-value { color: #27ae60; font-weight: 800; font-size: 1.3rem; }
.btn-small {
    background: var(--primary); color: #fff; padding: 8px 16px;
    border-radius: 8px; font-weight: 700; font-size: 0.85rem;
}

/* --- 4. SINGLE POST & CONVERSÃO --- */
.single-header { margin: 50px auto; text-align: center; max-width: 900px; }
.single-title { font-size: 2.5rem; margin-bottom: 20px; }

.content-area { 
    background: var(--light); padding: 40px; border-radius: var(--radius);
    box-shadow: var(--shadow); max-width: 900px; margin: 0 auto 50px;
}

.cta-box {
    background: var(--gray); border: 2px solid var(--primary);
    padding: 30px; border-radius: var(--radius); margin: 30px 0;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 20px;
}

.cta-price { font-size: 2.2rem; color: #27ae60; font-weight: 900; }
.cta-btn {
    background: var(--primary); color: #fff; padding: 18px 35px;
    border-radius: 50px; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}
.cta-btn:hover { background: var(--primary-hover); transform: scale(1.03); color: #fff; }

/* --- 5. MOBILE DRAWER --- */
.mobile-drawer {
    position: fixed; top: 0; right: -300px; width: 300px; height: 100%;
    background: var(--light); z-index: 2000; transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 30px;
}
.mobile-drawer.active { right: 0; }
.drawer-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 1500; opacity: 0; visibility: hidden; transition: 0.3s;
}
.drawer-backdrop.active { opacity: 1; visibility: visible; }

/* --- 6. FOOTER --- */
.site-footer { background: #111; color: #777; padding: 60px 0 30px; text-align: center; margin-top: 80px; }
.site-footer p { font-size: 0.9rem; }

/* --- 7. RESPONSIVIDADE --- */
.mobile-toggle { display: none; }

@media (max-width: 992px) {
    .main-navigation.desktop-only { display: none; }
    .mobile-toggle { display: flex; }
    .single-title { font-size: 2rem; }
}

@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .cta-box { flex-direction: column; text-align: center; }
    .content-area { padding: 20px; }
}