@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Poppins:wght@400;500;600;700&display=swap');

/* =========================================
   GRANDPIX - CSS PRINCIPAL (ALINHAMENTO OK)
   ========================================= */

:root {
    --gpix-bg-dark: #0F172A;
    --gpix-bg-card: #1E293B;
    --gpix-primary: #16a34a;
    --gpix-primary-hover: #15803d;
    --gpix-text-white: #ffffff;
    --gpix-text-gray: #94a3b8;
    --gpix-border: #334155;
}

* { box-sizing: border-box; }

.gpix-wrapper {
    font-family: 'Poppins', sans-serif;
    background: var(--gpix-bg-dark);
    min-height: 100vh;
    width: 100%;
    margin: 0; padding: 0;
    color: var(--gpix-text-white);
    line-height: 1.5;
}

h1, h2, h3, h4, .gpix-title-font { font-family: 'Montserrat', sans-serif; font-weight: 800; }

.gpix-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--gpix-bg-dark);
    min-height: 100vh;
    position: relative;
    padding-bottom: 350px !important; 
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* --- FOOTER FIXO BLINDADO --- */
.gpix-sticky-footer {
    position: fixed;
    bottom: 0;
    
    /* Mobile First */
    left: 0;
    width: 100%;
    
    background: #1e293b;
    border-top: 1px solid #334155;
    padding: 20px;
    
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    
    z-index: 9999999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gpix-sticky-footer.is-visible {
    transform: translateY(0) !important;
}

/* DESKTOP: Centralização Idêntica ao App Mode */
@media (min-width: 600px) {
    .gpix-sticky-footer {
        left: 0;
        right: 0;
        margin: 0 auto; /* Centraliza Automaticamente */
        width: 600px;
        
        border-radius: 20px 20px 0 0;
    }
}

/* =========================================
   ELEMENTOS VISUAIS
   ========================================= */
.gpix-top-nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: var(--gpix-bg-dark); border-bottom: 1px solid var(--gpix-border); }
.gpix-nav-btn { text-decoration: none; color: white; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); padding: 8px 14px; border-radius: 30px; transition: 0.2s; border: 1px solid transparent; }
.gpix-nav-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

.gpix-home-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 20px; }
.gpix-logo { font-size: 24px; color: white; letter-spacing: -1px; text-transform: uppercase; }
.gpix-logo span { color: var(--gpix-primary); }
.gpix-btn-header { background: rgba(255,255,255,0.1); color: white; text-decoration: none; font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 8px; }

.gpix-hero-section { padding: 20px; text-align: center; margin-bottom: 20px; }
.gpix-hero-title { font-size: 28px; line-height: 1.2; margin-bottom: 10px; color: white; }
.gpix-hero-sub { color: #94a3b8; font-size: 14px; margin-bottom: 30px; }

.gpix-steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 40px; }
.gpix-step-item { background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); border-radius: 12px; padding: 15px 5px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gpix-step-num { background: var(--gpix-primary); color: white; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; font-family: 'Montserrat', sans-serif; }
.gpix-step-text { font-size: 12px; font-weight: 600; color: #e2e8f0; }

.gpix-section-title { font-size: 18px; color: white; padding: 0 20px; margin: 20px 0 15px 0; display: flex; align-items: center; gap: 8px; }
.gpix-raffle-list { padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.gpix-raffle-card { background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; display: block; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3); }
.gpix-card-img-wrap { height: 180px; background-size: cover; background-position: center; position: relative; }
.gpix-badge { position: absolute; top: 12px; left: 12px; background: var(--gpix-primary); color: white; font-size: 10px; font-weight: 800; padding: 6px 12px; border-radius: 30px; }
.gpix-card-content { padding: 20px; }
.gpix-card-title { font-size: 18px; color: white; margin: 0 0 8px 0; line-height: 1.3; }
.gpix-card-price { color: var(--gpix-primary); font-weight: 700; font-size: 16px; }
.gpix-card-btn { margin-top: 15px; background: var(--gpix-primary); color: white; text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 14px; font-family: 'Montserrat', sans-serif; }

.gpix-winners-carousel { display: flex; gap: 15px; overflow-x: auto; padding: 10px 20px 30px 20px; }
.gpix-winner-item { min-width: 140px; background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); border-radius: 16px; padding: 15px; text-align: center; }
.gpix-winner-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px auto; border: 2px solid var(--gpix-primary); }
.gpix-winner-name { font-size: 13px; font-weight: 700; color: white; display: block; }
.gpix-winner-prize { font-size: 11px; color: #94a3b8; display: block; }

.gpix-raffle-header { padding: 25px 20px; text-align: center; }
.gpix-raffle-title { font-size: 22px; color: white; margin: 0 0 8px 0; line-height: 1.2; }
.gpix-raffle-sub { color: var(--gpix-text-gray); font-size: 13px; }

.gpix-progress-wrapper { margin-top: 20px; background: var(--gpix-bg-card); border-radius: 10px; padding: 10px; border: 1px solid var(--gpix-border); }
.gpix-progress-labels { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; font-weight: 600; }
.gpix-prog-bar-bg { width: 100%; height: 8px; background: #0f172a; border-radius: 4px; overflow: hidden; }
.gpix-prog-bar-fill { height: 100%; background: linear-gradient(90deg, #16a34a, #22c55e); border-radius: 4px; transition: width 1s ease-in-out; }

.gpix-grid-tools { padding: 0 20px 20px 20px; }
.gpix-choose-title { font-size: 16px; color: white; margin: 20px 0 15px 0; display: flex; align-items: center; gap: 8px; }
.gpix-choose-title span { color: var(--gpix-primary); font-size: 18px; }
#gpix-search { width: 100%; padding: 14px 15px; border-radius: 12px; border: 1px solid var(--gpix-border); background: var(--gpix-bg-card); color: white; font-size: 14px; outline: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
#gpix-search:focus { border-color: var(--gpix-primary); }

.gpix-tabs-wrapper { overflow-x: auto; display: flex; gap: 8px; padding-bottom: 5px; margin-top: 15px; }
.gpix-tab { background: var(--gpix-bg-card); color: #94a3b8; border: 1px solid var(--gpix-border); padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.gpix-tab.active { background: var(--gpix-primary); color: white; border-color: var(--gpix-primary); }

#grandpix-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; padding: 0 20px 150px 20px !important; }
.gpix-ticket { aspect-ratio: 1; background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #64748b; cursor: pointer; transition: 0.1s; user-select: none; }
.gpix-ticket.selected { background: var(--gpix-primary); color: white; border-color: var(--gpix-primary); transform: scale(0.95); box-shadow: 0 0 10px rgba(22, 163, 74, 0.4); }
.gpix-ticket.reserved { background: #f59e0b; color: #451a03; border-color: #f59e0b; opacity: 0.8; cursor: not-allowed; }
.gpix-ticket.sold { background: #ef4444 !important; color: white !important; border-color: #ef4444 !important; opacity: 1; text-decoration: none; cursor: not-allowed; }

.gpix-footer-info { display: flex; flex-direction: column; }
.gpix-footer-count { font-size: 12px; color: #94a3b8; }
.gpix-footer-total { font-size: 22px; font-weight: 800; color: var(--gpix-primary); font-family: 'Montserrat', sans-serif; }
#gpix-checkout-btn { background: var(--gpix-primary); color: white; border: none; padding: 12px 25px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 14px; box-shadow: 0 4px 15px rgba(22, 163, 74, 0.4); display: flex; align-items: center; gap: 8px; transition: 0.2s; }
#gpix-checkout-btn:active { transform: scale(0.95); }

.gpix-checkout-spacer { padding-top: 50px; }
.gpix-account-alert { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: #60a5fa; padding: 12px; border-radius: 8px; font-size: 12px; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; line-height: 1.4; }
.gpix-secure-label { text-align: center; font-size: 11px; color: #64748b; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: 500; }
#gpix-btn-checkout { background: var(--gpix-primary); color: white; width: 100%; padding: 16px; border: none; border-radius: 12px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; transition: 0.2s; font-family: 'Montserrat', sans-serif; }
#gpix-btn-checkout:hover { background: var(--gpix-primary-hover); transform: translateY(-2px); }

.gpix-timer-box { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); padding: 12px; border-radius: 8px; font-weight: 700; font-size: 14px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Montserrat', sans-serif; }
.gpix-instructions { text-align: left; margin-top: 25px; border-top: 1px solid var(--gpix-border); padding-top: 20px; }
.gpix-step-row { display: flex; gap: 12px; margin-bottom: 15px; font-size: 13px; color: #94a3b8; line-height: 1.5; }
.gpix-step-icon { flex-shrink: 0; width: 20px; height: 20px; background: var(--gpix-primary); color: white; border-radius: 50%; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.gpix-step-text a { color: var(--gpix-primary); text-decoration: none; font-weight: 600; }
.gpix-btn-outline { display: block; width: 100%; text-align: center; padding: 14px; border-radius: 10px; border: 1px solid var(--gpix-border); background: transparent; color: white; font-weight: 600; text-decoration: none; margin-top: 20px; font-size: 13px; transition: 0.2s; }
.gpix-btn-outline:hover { background: rgba(255,255,255,0.05); border-color: white; }

.gpix-dash-header { padding-top: 60px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; padding-left: 15px; padding-right: 15px; }
.gpix-dash-title { margin: 0; font-size: 22px; color: white; font-family: 'Montserrat', sans-serif; line-height: 1; }
.gpix-btn-logout { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); padding: 8px 16px; border-radius: 20px; text-decoration: none; font-size: 12px; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 5px; }
.gpix-btn-logout:hover { background: #ef4444; color: white; border-color: #ef4444; }

.gpix-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; border: 1px dashed var(--gpix-border); border-radius: 16px; background: rgba(255,255,255,0.02); margin-top: 20px; }
.gpix-empty-icon { font-size: 48px; color: var(--gpix-text-gray); margin-bottom: 15px; opacity: 0.5; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.gpix-empty-text { font-size: 14px; color: var(--gpix-text-gray); font-weight: 500; }

.gpix-dash-nav { display: flex; border-bottom: 1px solid var(--gpix-border); margin-bottom: 25px; gap: 20px; }
.gpix-dash-tab { background: transparent; border: none; padding: 10px 5px; color: var(--gpix-text-gray); font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; position: relative; transition: 0.3s; }
.gpix-dash-tab:hover { color: white; }
.gpix-dash-tab.active { color: var(--gpix-primary); }
.gpix-dash-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--gpix-primary); border-radius: 2px 2px 0 0; }
.gpix-tab-content { display: none; animation: fadeIn 0.3s ease; }
.gpix-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.gpix-profile-card { background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); border-radius: 16px; padding: 25px; }
.gpix-form-label { display: block; color: var(--gpix-text-gray); font-size: 11px; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; }
.gpix-input-readonly { background: #0f172a; border: 1px solid var(--gpix-border); color: #64748b; width: 100%; padding: 12px; border-radius: 8px; font-family: monospace; cursor: not-allowed; opacity: 0.8; }
.gpix-input-edit { background: #0f172a; border: 1px solid var(--gpix-border); color: white; width: 100%; padding: 12px; border-radius: 8px; transition: 0.2s; }
.gpix-input-edit:focus { border-color: var(--gpix-primary); outline: none; }
.gpix-btn-save { background: var(--gpix-primary); color: white; border: none; padding: 12px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.gpix-btn-save:hover { background: var(--gpix-primary-hover); }

.gpix-dash-header-actions { display: flex; align-items: center; gap: 10px; }
.gpix-btn-icon { text-decoration: none; color: white; background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.gpix-btn-icon:hover { border-color: var(--gpix-primary); color: var(--gpix-primary); }

.gpix-aff-wrapper { background: #0f172a; min-height: 100vh; padding: 0 20px 80px 20px; }
.gpix-aff-header { padding-top: 60px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: flex-start; }
.gpix-aff-title { font-size: 22px; color: white; margin: 0; line-height: 1.2; font-family: 'Montserrat', sans-serif; }
.gpix-aff-subtitle { color: #94a3b8; font-size: 13px; font-weight: 500; margin-top: 5px; }
.gpix-aff-highlight { color: var(--gpix-primary); font-weight: 700; }

.gpix-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
@media (min-width: 600px) { .gpix-stats-grid { grid-template-columns: repeat(3, 1fr); } }

.gpix-stat-card { background: var(--gpix-bg-card); border: 1px solid var(--gpix-border); padding: 20px; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; }
.gpix-card-icon { font-size: 24px; margin-bottom: 10px; color: var(--gpix-text-gray); width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.gpix-stat-label { font-size: 11px; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.gpix-stat-value { font-size: 20px; font-weight: 800; color: white; margin-top: 5px; font-family: 'Montserrat', sans-serif; word-break: break-all; }
.gpix-stat-value.money { color: var(--gpix-primary); }

.gpix-link-section { background: var(--gpix-bg-card); padding: 20px; border-radius: 16px; border: 1px solid var(--gpix-border); }
.gpix-link-box { background: #020617; border: 1px solid #334155; border-radius: 10px; padding: 8px; display: flex; align-items: center; margin-top: 10px; }
.gpix-link-url { flex: 1; color: var(--gpix-primary); font-family: monospace; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.gpix-btn-copy { background: var(--gpix-primary); color: white; border: none; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.gpix-btn-copy:active { transform: scale(0.95); }

.gpix-aff-login-container { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.gpix-aff-card-login { background: var(--gpix-bg-card); width: 100%; max-width: 400px; padding: 30px; border-radius: 24px; border: 1px solid var(--gpix-border); text-align: center; }

.gpix-footer-legal { background: #020617; color: #64748b; padding: 40px 20px 80px 20px; margin-top: 40px; font-size: 12px; text-align: center; border-top: 1px solid var(--gpix-border); }
.gpix-footer-copy { border-top: 1px solid #1e293b; padding-top: 20px; margin-top: 20px; opacity: 0.5; }

/* =========================================
   PÁGINAS LEGAIS (TERMOS E PRIVACIDADE)
   ========================================= */

.gpix-legal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
    border-bottom: 1px solid var(--gpix-border);
    background: var(--gpix-bg-dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

.gpix-legal-title {
    font-size: 18px;
    color: white;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.gpix-legal-body {
    padding: 30px 20px;
    color: #cbd5e1; /* Cinza claro para leitura */
    font-size: 14px;
    line-height: 1.8;
}

/* Formatação do Texto Jurídico */
.gpix-legal-body h2, 
.gpix-legal-body h3 {
    color: white;
    font-family: 'Montserrat', sans-serif;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 16px;
    border-left: 3px solid var(--gpix-primary);
    padding-left: 10px;
}

.gpix-legal-body p {
    margin-bottom: 15px;
    text-align: justify;
}

.gpix-legal-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.gpix-legal-body li {
    margin-bottom: 8px;
    list-style-type: disc;
}

.gpix-legal-body strong {
    color: var(--gpix-primary);
}

/* =========================================
   LIMPEZA CIRÚRGICA (Baseado no HTML do Tema)
   ========================================= */

/* 1. MANTÉM A CORREÇÃO DA IMAGEM E FUNDO (Que já funcionou) */
@media screen and (min-width: 768px) {
    .wp-block-post-featured-image,
    .wp-site-blocks .post-thumbnail {
        display: none !important;
    }
    .gpix-wrapper, div[class*="gpix-wrapper"] {
        background-image: none !important;
        background-color: #0F172A !important;
    }
}

/* 2. REMOÇÃO DOS TEXTOS INTRUSOS (Em qualquer tela) */

/* Remove o Título Duplicado do Tema (O H1 que aparece antes da rifa) */
h1.wp-block-post-title {
    display: none !important;
}

/* Remove "Escrito por..." e "em..." */
/* Identificado pelas classes: has-small-font-size + has-accent-4-color */
.wp-block-group.has-small-font-size.has-accent-4-color {
    display: none !important;
}

/* Remove a Navegação (Setinhas "Anterior/Próximo") */
/* Identificado pelo atributo exato que você mandou: aria-label="Navegação de posts" */
nav[aria-label="Navegação de posts"] {
    display: none !important;
}

/* Remove o título "MAIS POSTS" */
/* Removemos qualquer H2 padrão do tema, já que o plugin usa H1 e H3 */
h2.wp-block-heading {
    display: none !important;
}

/* Remove o container vazio que sobrava no final */
.wp-block-query, 
.wp-block-post-template {
    display: none !important;
}

/* Remove linhas separadoras do tema */
hr.wp-block-separator {
    display: none !important;
}