/*
Theme Name: IdeaConsult Premium
Theme URI: https://ideaconsult.com.br
Author: IdeaConsult Dev Team
Author URI: https://ideaconsult.com.br
Description: Tema premium customizado para WooCommerce, otimizado para altíssima performance, sem Elementor.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: Proprietary
Text Domain: ideaconsult
*/

/* ==========================================================================
   1. DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Cores Principais e Híbridas */
    --color-primary: #0A192F;       
    --color-secondary: #00B4D8;     
    --color-accent: #FFD700;        
    
    /* Cores da Marca e UI */
    --brand-primary: #0F172A; 
    --brand-secondary: #2563EB; 
    --color-success: #059669; 
    --color-danger: #DC2626; 
    --color-warning: #FFC107;

    /* Backgrounds e Bordas */
    --bg-body: #F8FAFC; 
    --bg-surface: #FFFFFF; 
    --border-light: #E2E8F0;
    --border-hover: #CBD5E1;
    --color-bg-light: #F8FAFC;
    --color-bg-white: #FFFFFF;
    
    /* Tipografia */
    --text-dark: #1E293B;
    --text-base: #475569;
    --text-muted: #94A3B8;
    --color-text-dark: #1E293B;
    --color-text-muted: #94A3B8;
    --color-border: #E2E8F0;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    
    /* Espaçamentos e Medidas */
    --container-w: 1240px;
    --container-width: 1240px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Sombras e Bordas */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --shadow-hover: 0 10px 25px -5px rgba(0,0,0,0.05);
    
    /* Transições */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition: all 0.2s ease;
}

/* ==========================================================================
   2. RESET & BASICS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-base);
    background-color: var(--bg-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-align: center;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-bg-white);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.top-nav {
    background-color: var(--brand-primary);
    color: #fff;
    font-size: 12px;
    padding: 8px 0;
    font-weight: 500;
}
.top-nav .container { display: flex; justify-content: space-between; align-items: center; }
.top-nav ul { display: flex; gap: 24px; }
.top-nav a { transition: color 0.2s ease; }
.top-nav a:hover { color: var(--text-muted); }

.main-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
    gap: 40px;
}

.logo img {
    height: 48px;
    width: auto;
    transition: transform 0.2s ease;
}
.logo:hover img {
    transform: scale(1.02);
}

/* Busca Elegante */
.search-box {
    flex: 1;
    max-width: 600px;
    position: relative;
}
.search-box form {
    display: flex;
    width: 100%;
}
.search-box input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background-color: #F1F5F9;
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
    font-family: var(--font-primary);
}
.search-box input:focus {
    outline: none;
    background-color: var(--bg-surface);
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    height: 44px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-base);
    transition: color 0.2s ease;
    background: transparent;
}
.search-box input:focus + button {
    color: var(--brand-secondary);
}

/* Ações do Header */
.header-actions { display: flex; align-items: center; gap: 24px; }
.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
}
.action-btn__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F1F5F9;
    transition: var(--transition);
}
.action-btn:hover .action-btn__icon { 
    background: var(--border-light); 
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.action-btn__text { font-size: 13px; line-height: 1.2; }
.action-btn__text strong { display: block; font-size: 14px; font-weight: 600; }

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--brand-secondary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-surface);
    transition: transform 0.2s ease;
}
.action-btn:hover .cart-badge {
    transform: scale(1.1);
}

/* Menu de Categorias */
.category-nav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}
.category-nav ul {
    display: flex;
    gap: 32px;
    height: 48px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-nav > .container > ul > li {
    height: 100%;
    display: flex;
    align-items: center;
}
.category-nav > .container > ul > li > a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-base);
    white-space: nowrap;
    position: relative;
    padding: 4px 0;
}
.category-nav > .container > ul > li > a:hover { 
    color: var(--brand-secondary); 
}

.category-nav > .container > ul > li:not(.has-dropdown) > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--brand-secondary);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.category-nav > .container > ul > li:not(.has-dropdown) > a:hover::after {
    width: 100%;
}

.has-dropdown { 
    position: relative; 
    padding: 14px 0;
    cursor: pointer; 
    display: flex;
    align-items: center;
}
.has-dropdown > a svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.has-dropdown:hover > a svg {
    transform: scale(1.1);
}
.dropdown-menu {
    position: absolute; 
    top: 100%; 
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-sm);
    min-width: 260px;
    opacity: 0; 
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 50;
    display: flex; 
    flex-direction: column; 
    padding: 8px 0;
}
.has-dropdown:hover .dropdown-menu {
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 10px 20px; 
    font-weight: 400 !important;
    color: var(--text-dark) !important;
    position: relative;
    transition: all 0.2s ease !important;
}
.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--brand-secondary);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.dropdown-menu a:hover {
    background: #F1F5F9; 
    color: var(--brand-secondary) !important;
    padding-left: 28px;
}
.dropdown-menu a:hover::before {
    opacity: 1;
}

/* ==========================================================================
   4. ESTRUTURA PRINCIPAL (HOME)
   ========================================================================== */
.section-padding { padding: 48px 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin: 0;
}
.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-secondary);
}
.section-link:hover { text-decoration: underline; }

/* Banners Home */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 24px;
}
.banner {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #E2E8F0;
}
.banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.banner:hover img { transform: scale(1.05); }
.banner--main { height: 380px; position: relative; display: block; }
.banner--side { height: 380px; display: flex; flex-direction: column; gap: 20px; background: transparent; }
.banner--side .banner { height: 100%; position: relative; display: block; }

/* Textos e Overlays dos Banners */
.banner::after {
    content: ''; 
    position: absolute; 
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 60%);
    pointer-events: none;
}
.banner-content {
    position: absolute; 
    bottom: 24px; 
    left: 24px; 
    right: 24px;
    z-index: 2; 
    color: #fff;
}
.banner--side .banner-content { bottom: 16px; left: 16px; right: 16px; }
.banner-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; line-height: 1.2; }
.banner--side .banner-title { font-size: 18px; margin-bottom: 4px; }
.banner-desc { font-size: 14px; color: #CBD5E1; line-height: 1.4; }
.banner--side .banner-desc { font-size: 12px; }

/* Categorias em Círculos (Limpo e Minimalista) */
.quick-cats {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-top: 40px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
}
.quick-cats::-webkit-scrollbar { display: none; }
.q-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100px;
    flex-shrink: 0;
}
.q-cat__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.q-cat__icon svg { 
    width: 32px; 
    height: 32px; 
    color: var(--brand-primary); 
    transition: var(--transition); 
}
.q-cat:hover .q-cat__icon { 
    border-color: var(--brand-secondary); 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-hover); 
}
.q-cat:hover .q-cat__icon svg {
    color: var(--brand-secondary);
    transform: scale(1.1);
}
.q-cat span { font-size: 13px; font-weight: 500; color: var(--text-dark); text-align: center; }

/* ==========================================================================
   5. GRID E CARDS DE PRODUTO (O Segredo do Padrão)
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: var(--transition);
}
.product-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

/* Área da Imagem */
.product-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #FFFFFF;
    border-radius: 4px;
    margin-bottom: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    mix-blend-mode: multiply;
}
.product-card__image img {
    max-height: 90%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.product-card:hover .product-card__image img { transform: scale(1.05); }

/* Tags e Badges */
.tag-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

/* Conteúdo do Card */
.product-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.product-card__title {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}
.product-card__title:hover {
    color: var(--brand-secondary);
}

/* Área de Preço */
.product-card__price-area {
    margin-top: auto; 
    display: flex;
    flex-direction: column;
}

.price-old {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 2px;
    min-height: 18px; 
}

.price-current {
    font-size: 18px;
    color: var(--brand-primary);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.price-installments {
    font-size: 12px;
    color: var(--color-success);
    font-weight: 500;
}

/* Botão de Compra */
.btn-add-cart {
    margin-top: 16px;
    width: 100%;
    height: 40px;
    border-radius: var(--radius-sm);
    background: #F1F5F9;
    color: var(--brand-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card:hover .btn-add-cart {
    background: var(--brand-primary);
    color: #fff;
}

/* Marketplaces Section */
.marketplaces-section {
    padding: 48px 0;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 64px;
    text-align: center;
}
.marketplaces-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-base);
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.marketplaces-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
}
.marketplace-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.marketplace-logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}
.marketplace-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Call To Action (Pedidos Especiais) */
.special-request-box {
    background: var(--brand-primary);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 64px;
    position: relative;
    overflow: hidden;
}
.special-request-box::before {
    content: ''; position: absolute; right: -50px; top: -100px; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%); border-radius: 50%;
}
.sr-text { position: relative; z-index: 2; max-width: 600px; }
.sr-text h2 { font-size: 28px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; }
.sr-text p { color: #CBD5E1; font-size: 15px; line-height: 1.6; margin: 0; }
.btn-whatsapp { 
    background: #25D366; color: #fff; padding: 14px 28px; border-radius: var(--radius-sm); 
    font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; 
    transition: var(--transition); white-space: nowrap; position: relative; z-index: 2;
}
.btn-whatsapp:hover { background: #1EBC5C; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3); color: #fff; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 64px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-logo-img {
    height: 44px;
    margin-bottom: 24px;
    display: block;
}

.footer-about-text {
    font-size: 13px;
    color: var(--text-base);
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-contact-direct {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.6;
}

.footer-phone-link {
    display: block;
    margin-bottom: 4px;
}

.footer-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links, .footer-contact-list, .footer-address-list {
    color: var(--text-base);
    font-size: 13px;
    line-height: 1.6;
}

.footer-links li { 
    margin-bottom: 12px; 
}

.footer-contact-list li:not(:last-child),
.footer-address-list li:not(:last-child) {
    margin-bottom: 16px;
}

.footer-links li strong {
    color: var(--text-dark);
}

.footer-links a { 
    font-size: 13px; 
    color: var(--text-base); 
}

.footer-links a:hover { 
    color: var(--brand-secondary); 
    padding-left: 4px; 
}

.footer-maps-link {
    color: var(--brand-secondary) !important;
    font-weight: 500;
}

.footer-secure-box {
    background: #F1F5F9;
    padding: 24px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.mercado-pago-icon {
    height: 48px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    transition: transform 0.3s ease;
}

.mercado-pago-icon:hover {
    transform: scale(1.05);
}

.mercado-pago-text {
    font-weight: 700;
    color: var(--brand-primary);
    margin-top: 12px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.secure-environment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--text-base);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 16px;
}

/* Botão Flutuante do WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #25D366;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-4px);
    background-color: #1EBC5C;
    color: white;
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .banner--side { display: none; } /* Opcionalmente, pode mudar para grid no mobile */
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .special-request-box { flex-direction: column; text-align: center; padding: 32px 20px; }
}

@media (max-width: 768px) {
    .header-wrapper { flex-direction: column; }
    .header-search { width: 100%; max-width: 100%; }
    .top-nav { display: none; }
    .action-btn__text { display: none; }
    .search-box { display: none; }
    .main-header__inner { gap: 16px; }
    .main-menu { flex-direction: column; display: none; }
    .woocommerce ul.products { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { padding: 12px; }
    .q-cat { min-width: 80px; }
    .marketplaces-logos { gap: 32px; }
    .marketplace-logo img { height: 28px; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .site-footer { padding: 48px 0 24px; }
}

@media (max-width: 480px) {
    .woocommerce ul.products { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
}