/* ============================================
   VitrineUDI - Tema v1.3 DEFINITIVO
   ============================================ */

/* ===== DARK MODE (padrão) ===== */
:root,
html[data-vu-theme="dark"] {
    --vu-bg-primary: #0A1628;
    --vu-bg-card: #112240;
    --vu-text-primary: #F8FAFC;
    --vu-text-secondary: #CBD5E1;
    --vu-text-muted: #94A3B8;
    --vu-brand-primary: #F39200;
    --vu-brand-secondary: #FFB627;
    --vu-border: rgba(243, 146, 0, 0.15);
    --vu-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ===== LIGHT MODE ===== */
html[data-vu-theme="light"] {
    --vu-bg-primary: #FFF8EE;
    --vu-bg-card: #FFFFFF;
    --vu-text-primary: #1a2540;
    --vu-text-secondary: #334155;
    --vu-text-muted: #64748B;
    --vu-brand-primary: #F39200;
    --vu-brand-secondary: #FFB627;
    --vu-border: rgba(243, 146, 0, 0.25);
    --vu-shadow: 0 8px 20px rgba(26, 37, 64, 0.12);
}

/* ===== TRANSIÇÕES ===== */
html, body, header, footer,
.vu-card-anuncio, .vu-cat-item, .vu-cat-card, 
.vu-passo-card, .vu-hero-stat {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* ============================================
   LIGHT MODE - CORREÇÕES COMPLETAS
   ============================================ */

html[data-vu-theme="light"] body {
    background: #FFF8EE !important;
    color: #1a2540 !important;
}

/* ===== HEADER - LOGO E MENU ===== */
html[data-vu-theme="light"] header,
html[data-vu-theme="light"] .site-header,
html[data-vu-theme="light"] #masthead {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(243, 146, 0, 0.2) !important;
    box-shadow: 0 2px 12px rgba(26, 37, 64, 0.05);
}

/* LOGO "VitrineUDI" - era invisível */
html[data-vu-theme="light"] .vu-logo-text,
html[data-vu-theme="light"] .site-title,
html[data-vu-theme="light"] header .logo-text,
html[data-vu-theme="light"] header h1,
html[data-vu-theme="light"] header h2,
html[data-vu-theme="light"] header strong,
html[data-vu-theme="light"] header a.logo {
    color: #1a2540 !important;
}

/* Manter "UDI" laranja no logo */
html[data-vu-theme="light"] header .logo-text span,
html[data-vu-theme="light"] header h1 span,
html[data-vu-theme="light"] .vu-logo-udi {
    color: #F39200 !important;
}

/* SLOGAN abaixo do logo */
html[data-vu-theme="light"] header small,
html[data-vu-theme="light"] header .tagline,
html[data-vu-theme="light"] header .vu-slogan,
html[data-vu-theme="light"] header p {
    color: #64748B !important;
}

/* MENU PRINCIPAL - Anuncie, Lojas, Guia, Blog */
html[data-vu-theme="light"] header nav a,
html[data-vu-theme="light"] header .menu a,
html[data-vu-theme="light"] header ul li a,
html[data-vu-theme="light"] header .nav-menu a {
    color: #1a2540 !important;
    font-weight: 600;
}

html[data-vu-theme="light"] header nav a:hover,
html[data-vu-theme="light"] header .menu a:hover {
    color: #F39200 !important;
}

/* SINO DE NOTIFICAÇÃO */
html[data-vu-theme="light"] header svg,
html[data-vu-theme="light"] header .vu-notif-icon,
html[data-vu-theme="light"] header .dashicons,
html[data-vu-theme="light"] header [class*="icon"] {
    color: #1a2540 !important;
    fill: #1a2540 !important;
}

/* CORAÇÃO DE FAVORITOS */
html[data-vu-theme="light"] header .vu-fav-link,
html[data-vu-theme="light"] header a[href*="favoritos"] {
    color: #F39200 !important;
}

/* Badge de contagem (vermelho) */
html[data-vu-theme="light"] .vu-notif-badge,
html[data-vu-theme="light"] .badge-count {
    background: #F39200 !important;
    color: #fff !important;
}

/* ===== HERO ===== */
html[data-vu-theme="light"] .vu-hero-bg,
html[data-vu-theme="light"] .vu-hero {
    background: radial-gradient(ellipse at 50% 30%, rgba(243,146,0,0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(30,91,191,0.08) 0%, transparent 60%),
                #FFF8EE !important;
}

html[data-vu-theme="light"] .vu-hero-title,
html[data-vu-theme="light"] .vu-hero h1 {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] .vu-hero-subtitle,
html[data-vu-theme="light"] .vu-hero p {
    color: #334155 !important;
}

/* ===== BARRA DE BUSCA DO TOPO ===== */
html[data-vu-theme="light"] .vu-busca-topo,
html[data-vu-theme="light"] .vu-search-topbar {
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(243, 146, 0, 0.15) !important;
}

html[data-vu-theme="light"] .vu-busca-topo input,
html[data-vu-theme="light"] .vu-search-topbar input {
    background: transparent !important;
    color: #1a2540 !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
}

html[data-vu-theme="light"] .vu-busca-topo input::placeholder {
    color: #64748B !important;
}

/* ===== HERO SEARCH ===== */
html[data-vu-theme="light"] .vu-hero-search {
    background: #FFFFFF !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    box-shadow: 0 8px 20px rgba(26, 37, 64, 0.12) !important;
}

html[data-vu-theme="light"] .vu-hero-search-input,
html[data-vu-theme="light"] .vu-hero-search-select {
    color: #1a2540 !important;
    background: transparent !important;
}

html[data-vu-theme="light"] .vu-hero-search-input::placeholder {
    color: #64748B !important;
}

/* ===== ESTATÍSTICAS (0 Lojas, 1 Anúncios, etc) ===== */
html[data-vu-theme="light"] .vu-hero-stat {
    background: #FFFFFF !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    box-shadow: 0 2px 8px rgba(26, 37, 64, 0.08) !important;
}

html[data-vu-theme="light"] .vu-hero-stat strong,
html[data-vu-theme="light"] .vu-hero-stat-num {
    color: #F39200 !important;
}

html[data-vu-theme="light"] .vu-hero-stat span {
    color: #64748B !important;
}

/* ===== BOTÕES CTA - "Anunciar Grátis" e "Ver Lojas" ===== */
html[data-vu-theme="light"] .vu-btn-cta-primary {
    background: linear-gradient(135deg, #F39200, #FFB627) !important;
    color: #1a2540 !important;
    box-shadow: 0 8px 20px rgba(243, 146, 0, 0.3) !important;
}

html[data-vu-theme="light"] .vu-btn-cta-primary:hover {
    box-shadow: 0 12px 28px rgba(243, 146, 0, 0.5) !important;
    transform: translateY(-2px);
}

/* BOTÃO "VER LOJAS" - era invisível */
html[data-vu-theme="light"] .vu-btn-cta-secondary {
    background: #FFFFFF !important;
    color: #1a2540 !important;
    border: 2px solid #F39200 !important;
}

html[data-vu-theme="light"] .vu-btn-cta-secondary:hover {
    background: #FFF3DC !important;
    color: #F39200 !important;
}

/* ===== SEÇÕES ===== */
html[data-vu-theme="light"] .vu-section-header h2,
html[data-vu-theme="light"] section h2,
html[data-vu-theme="light"] .vu-section h2 {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] .vu-section-header p,
html[data-vu-theme="light"] section p {
    color: #334155 !important;
}

/* ===== CARDS DE CATEGORIA ===== */
html[data-vu-theme="light"] .vu-cat-item,
html[data-vu-theme="light"] .vu-cat-card {
    background: #FFFFFF !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    box-shadow: 0 2px 8px rgba(26, 37, 64, 0.08) !important;
}

html[data-vu-theme="light"] .vu-cat-item:hover,
html[data-vu-theme="light"] .vu-cat-card:hover {
    box-shadow: 0 12px 28px rgba(26, 37, 64, 0.15) !important;
    border-color: #F39200 !important;
    transform: translateY(-4px);
}

html[data-vu-theme="light"] .vu-cat-item-name,
html[data-vu-theme="light"] .vu-cat-card-name {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] .vu-cat-item-count,
html[data-vu-theme="light"] .vu-cat-card-count {
    color: #64748B !important;
}

/* ===== CARDS DE ANÚNCIO ===== */
html[data-vu-theme="light"] .vu-card-anuncio {
    background: #FFFFFF !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    box-shadow: 0 2px 8px rgba(26, 37, 64, 0.08) !important;
}

html[data-vu-theme="light"] .vu-card-anuncio:hover {
    box-shadow: 0 12px 28px rgba(26, 37, 64, 0.15) !important;
    border-color: #F39200 !important;
}

html[data-vu-theme="light"] .vu-card-titulo,
html[data-vu-theme="light"] .vu-card-titulo a {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] .vu-card-local {
    color: #64748B !important;
}

html[data-vu-theme="light"] .vu-card-categoria {
    color: #1E5BBF !important;
}

/* Botão favorito no card */
html[data-vu-theme="light"] .vu-btn-fav {
    background: #FFFFFF !important;
    border: 1px solid rgba(243, 146, 0, 0.25) !important;
    color: #64748B !important;
}

html[data-vu-theme="light"] .vu-btn-fav:hover,
html[data-vu-theme="light"] .vu-btn-fav.is-fav {
    background: #F39200 !important;
    color: #fff !important;
}

/* ===== PASSO CARDS (Como funciona) ===== */
html[data-vu-theme="light"] .vu-passo-card {
    background: #FFFFFF !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    box-shadow: 0 2px 8px rgba(26, 37, 64, 0.08) !important;
}

html[data-vu-theme="light"] .vu-passo-card h3 {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] .vu-passo-card p {
    color: #334155 !important;
}

/* ===== CTA FINAL ===== */
html[data-vu-theme="light"] .vu-cta-final {
    background: linear-gradient(135deg, rgba(243,146,0,0.08), rgba(30,91,191,0.05)) !important;
}

html[data-vu-theme="light"] .vu-cta-final h2 {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] .vu-cta-final p {
    color: #334155 !important;
}

/* ===== FOOTER ===== */
html[data-vu-theme="light"] footer,
html[data-vu-theme="light"] .site-footer {
    background: #FFFFFF !important;
    border-top: 1px solid rgba(243, 146, 0, 0.2) !important;
    color: #1a2540 !important;
}

html[data-vu-theme="light"] footer h3,
html[data-vu-theme="light"] footer h4,
html[data-vu-theme="light"] footer strong {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] footer p,
html[data-vu-theme="light"] footer li {
    color: #334155 !important;
}

html[data-vu-theme="light"] footer a {
    color: #1a2540 !important;
}

html[data-vu-theme="light"] footer a:hover {
    color: #F39200 !important;
}

html[data-vu-theme="light"] footer input {
    background: #FFF8EE !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    color: #1a2540 !important;
}

/* ===== FORMS ===== */
html[data-vu-theme="light"] input[type="text"],
html[data-vu-theme="light"] input[type="number"],
html[data-vu-theme="light"] input[type="email"],
html[data-vu-theme="light"] input[type="tel"],
html[data-vu-theme="light"] input[type="url"],
html[data-vu-theme="light"] input[type="password"],
html[data-vu-theme="light"] input[type="search"],
html[data-vu-theme="light"] textarea,
html[data-vu-theme="light"] select {
    background: #FFFFFF !important;
    border-color: rgba(243, 146, 0, 0.25) !important;
    color: #1a2540 !important;
}

html[data-vu-theme="light"] input::placeholder,
html[data-vu-theme="light"] textarea::placeholder {
    color: #64748B !important;
}

/* ===== "O melhor de Uberlândia-MG" badge ===== */
html[data-vu-theme="light"] .vu-hero-badge {
    background: rgba(243, 146, 0, 0.15) !important;
    color: #F39200 !important;
    border: 1px solid rgba(243, 146, 0, 0.3) !important;
}

/* ============================================
   BOTÃO FLUTUANTE - SEMPRE VISÍVEL
   ============================================ */
#vu-theme-btn {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 999999 !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #F39200, #FFB627) !important;
    border: 2px solid #fff !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(243, 146, 0, 0.6), 0 0 0 4px rgba(243, 146, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#vu-theme-btn:hover {
    transform: scale(1.1) rotate(15deg) !important;
    box-shadow: 0 12px 32px rgba(243, 146, 0, 0.8), 0 0 0 6px rgba(243, 146, 0, 0.2) !important;
}

#vu-theme-btn:active {
    transform: scale(0.95) !important;
}

#vu-theme-btn svg {
    width: 28px !important;
    height: 28px !important;
    fill: #fff !important;
    stroke: #fff !important;
}

/* Ocultar toggle antigo */
.vu-theme-toggle {
    display: none !important;
}

@media (max-width: 768px) {
    #vu-theme-btn {
        width: 48px !important;
        height: 48px !important;
        bottom: 80px !important;
        right: 16px !important;
    }
    #vu-theme-btn svg {
        width: 24px !important;
        height: 24px !important;
    }
}

/* ===== ANIMAÇÃO DE SPIN ===== */
@keyframes vu-theme-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(0.7); }
    100% { transform: rotate(360deg) scale(1); }
}

#vu-theme-btn.is-spinning svg {
    animation: vu-theme-spin 0.5s ease;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--vu-bg-primary); }
::-webkit-scrollbar-thumb { background: var(--vu-brand-primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--vu-brand-secondary); }

::selection {
    background: var(--vu-brand-primary);
    color: #fff;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CORREÇÕES SEGURAS v1.4.1 (sem afetar emojis)
   ============================================ */

/* Botão Buscar do hero - apenas altura */
.vu-hero-search button[type="submit"],
.vu-hero-search .vu-btn-hero-buscar {
    height: 44px !important;
    padding: 0 24px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #F39200, #FFB627) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(243, 146, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.vu-hero-search button[type="submit"]:hover,
.vu-hero-search .vu-btn-hero-buscar:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(243, 146, 0, 0.5) !important;
}

/* APENAS imagens REAIS dentro de cards - não emojis */
.vu-card-anuncio > a > img,
.vu-card-anuncio > .vu-card-foto img,
article.vu-card-anuncio > img:first-of-type {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 12px 12px 0 0 !important;
}

/* NUNCA aplicar object-fit a emojis ou ícones */
.vu-card-categoria img,
.vu-card-negociavel img,
.vu-card-local img,
.vu-card-anuncio span img,
.vu-card-anuncio small img {
    width: auto !important;
    height: 1em !important;
    display: inline !important;
    vertical-align: middle !important;
}
