/* ==========================================================================
   DESIGN SYSTEM - INFOROZA OFERTAS (EDITORIAL / CLEAN / E-E-A-T)
   ========================================================================== */

:root {
    /* Cores Editoriais Claras */
    --bg-main: #fafafa;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;

    --border-color: #e5e7eb;
    --border-hover: #d1d5db;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --accent-main: #000000;
    --accent-main-hover: #374151;

    /* Cores de Marketplace */
    --color-amazon: #ff9900;
    --color-amazon-hover: #e08800;
    --color-mercadolivre: #ffe600;
    --color-mercadolivre-hover: #e5cf00;
    --text-mercadolivre: #2d3277;
    --color-whatsapp: #25d366;
    --color-whatsapp-hover: #20ba59;

    --color-price: #2b74b6;
    /* Azul Inforoza */
    --color-badge: #dc2626;

    /* Tipografia */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Outfit', var(--font-primary);

    /* Efeitos Sutis */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.2s ease-in-out;
}

/* Reset e Configurações Básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-main);
    font-family: var(--font-primary);
    color: var(--text-primary);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Container Principal */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px 40px 16px;
        gap: 32px;
    }
}

/* ==========================================================================
   HEADER EDITORIAL (NAV HORIZONTAL)
   ========================================================================== */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 32px;
}

/* LOGO EMPILHADA */
.logo-area {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1;
}

.logo-top {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: #111;
}

.logo-bottom {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.15rem;
    /* Um pouco maior para compensar o minúsculo */
    color: #2b74b6;
    /* Tom de azul do Inforoza */
    letter-spacing: 0.5px;
    margin-top: -4px;
}

/* NAVEGAÇÃO */
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: flex-end;
}

/* Busca Pequena Frontal */
.nav-search {
    position: relative;
    width: 100%;
    max-width: 200px; /* Levemente maior para não cortar o S de Produtos */
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-search input {
    width: 100%;
    height: 30px; /* Altura fixa bem próxima à altura do texto Todos */
    padding: 0 16px 0 32px; /* Espaço na esquerda para o ícone */
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: var(--transition-smooth);
    text-align: left; /* Texto à esquerda */
}

.nav-search input:focus {
    border-color: var(--accent-main);
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03);
}

/* Ícone de lupa à esquerda */
.search-icon-svg {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%); /* Apenas centraliza verticalmente */
    pointer-events: none;
    color: var(--text-secondary); /* Cinza escuro / preto */
    transition: var(--transition-smooth);
}

/* (Nenhuma regra de ocultar o ícone) */

/* Links do Menu */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    color: #000;
}

.nav-item.active {
    font-weight: 700;
}

.highlight-vip {
    color: var(--color-whatsapp) !important;
    font-weight: 700;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    list-style: none;
    padding: 8px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-main);
    color: #000;
}

/* Responsividade Header */
@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }

    .main-nav {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .nav-search {
        max-width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* ==========================================================================
   HERO DESTAQUE (ACHADO DO DIA)
   ========================================================================== */
.hero-featured {
    display: none;
    /* Só exibe via JS quando houver oferta em destaque */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.hero-featured:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.hero-featured-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.hero-badge-container {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

.badge-editor {
    background: var(--accent-main);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-image-col {
    flex: 1;
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    min-height: 350px;
    border-right: 1px solid var(--border-color);
}

.hero-image-col img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.hero-content-col {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-pricing {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.hero-price-old {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.hero-price-new {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-price);
    font-family: var(--font-heading);
    line-height: 1;
}

/* ==========================================================================
   BOTÃO FLUTUANTE WHATSAPP
   ========================================================================== */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--color-whatsapp);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.floating-whatsapp:hover {
    background-color: var(--color-whatsapp-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
}

@media (max-width: 768px) {
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
}

.hero-price-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    width: fit-content;
}

@media (max-width: 768px) {
    .hero-featured-inner {
        flex-direction: column;
    }

    .hero-image-col {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-height: 250px;
        padding: 24px;
    }

    .hero-content-col {
        padding: 24px;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-price-new {
        font-size: 2rem;
    }

    .hero-btn {
        width: 100%;
    }
}

/* ==========================================================================
   CONTROLES: BUSCA E FILTROS (MIGRADOS PARA O HEADER)
   ========================================================================== */
.search-box {
    position: relative;
    width: 100%;
    flex: 1;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

#search-input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 48px;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

#search-input:focus {
    border-color: var(--accent-main);
    box-shadow: 0 0 0 1px var(--accent-main);
}

.clear-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* Chips de Categoria */
.chips-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.chip {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 99px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.chip:hover {
    border-color: var(--accent-main);
    color: var(--text-primary);
}

.chip.active {
    background: var(--accent-main);
    color: #fff;
    border-color: var(--accent-main);
}

@media (max-width: 768px) {
    .chips-container {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .chips-container::-webkit-scrollbar {
        display: none;
    }

    .chip {
        flex: 0 0 auto;
    }
}

.search-results-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: -10px;
}

/* ==========================================================================
   GRID DE PRODUTOS
   ========================================================================== */
.grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    width: 100%;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Badge Superior */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-badge);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
}

/* Container de Imagem */
.card-image-wrapper {
    width: 100%;
    height: 200px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin-bottom: 16px;
}

.card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.img-placeholder {
    font-size: 3rem;
    opacity: 0.2;
}

/* Informações do Card */
.card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    height: 2.8rem;
}

.card-pricing {
    margin-bottom: 16px;
}

.price-old {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 2px;
}

.price-new {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-price);
    font-family: var(--font-heading);
}

.price-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Botão de Redirecionamento */
.card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    margin-top: auto;
}

/* Estilos de Botão por Marketplace */
.card-btn.amazon,
.hero-btn.amazon {
    background-color: var(--color-amazon);
    color: #000;
}

.card-btn.amazon:hover,
.hero-btn.amazon:hover {
    background-color: var(--color-amazon-hover);
}

.card-btn.mercadolivre,
.hero-btn.mercadolivre {
    background-color: var(--color-mercadolivre);
    color: #000;
    /* Texto Preto como pedido */
}

.card-btn.mercadolivre:hover,
.hero-btn.mercadolivre:hover {
    background-color: var(--color-mercadolivre-hover);
}

.card-btn.generic,
.hero-btn.generic {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.card-btn.generic:hover,
.hero-btn.generic:hover {
    border-color: var(--text-primary);
}

/* ==========================================================================
   CARDS DE SKELETON
   ========================================================================== */
.card.skeleton {
    height: 380px;
    background: linear-gradient(90deg,
            #f3f4f6 25%,
            #e5e7eb 50%,
            #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite linear;
    border-color: transparent;
    pointer-events: none;
}

@keyframes loadingShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Mensagem Vazia */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.no-results h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ==========================================================================
   PAGINAÇÃO
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 20px;
    grid-column: 1 / -1; /* Para garantir que ocupe a largura inteira caso esteja no grid */
    width: 100%;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
}

.page-btn:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-main);
    color: var(--accent-main);
}

.page-btn.active {
    background-color: var(--accent-main);
    color: white;
    border-color: var(--accent-main);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-section {
    text-align: center;
    padding: 40px 0 24px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.footer-links {
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--accent-main);
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}