:root {
    --bg-deep: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.1);
    --text-main: #000000;
    --text-dim: #555555;
    --glass-border: #eef0f2;
    --transition: all 0.3s ease;
    --max-w: 1300px;
    --header-height: 106px;
}

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

.container {
    max-width: 1300px !important;
    margin: 0 auto !important;
    width: 100% !important;
    height: 100%;
}

@media (max-width: 1300px) {
    .container {
        padding: 0 5%;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

    font-weight: 500;
    transition: var(--transition);
}

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

.main-container {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    padding: 0 20px; /* Alinhado com o header */
    box-sizing: border-box;
}

/* --- HERO REFEITO DO ZERO (FLEXBOX) --- */
.hero-wrapper-new {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--glass-border);
    padding: 30px 0;
    margin-bottom: 30px;
    display: block;
    height: auto; /* IMPORTANTE: Deixa crescer conforme as fotos */
}

.hero-content-new {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    height: 720px; /* SOMA DOS DOIS QUADRADOS (350+350) + GAP (20) */
}

.hero-main-col {
    flex: 1;
    height: 100%;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #f0f2f5;
}

.hero-side-col {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-small-box {
    flex: none;
    width: 100%;
    height: 350px !important; /* FORÇA O QUADRADO */
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #f0f2f5;
}

.hero-main-col img, .hero-small-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main-col:hover img, .hero-small-box:hover img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: #ffffff;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.featured-item {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    width: 100%;
}

.featured-main h2 { font-size: 1.8rem; margin: 5px 0; line-height: 1.1; }
.featured-small h3 { font-size: 1.1rem; margin: 3px 0; line-height: 1.2; }

/* Esconde as categorias nos destaques conforme solicitado */
.hero-wrapper-new .news-category {
    display: none !important;
}

@media (max-width: 1100px) {
    .hero-content-new {
        flex-direction: column;
        height: auto;
    }
    .hero-main-col {
        height: 400px;
    }
    .hero-side-col {
        width: 100%;
        flex-direction: row;
    }
    .hero-small-box {
        height: 250px !important;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .hero-wrapper-new {
        padding: 15px 0;
        margin-bottom: 15px;
    }
    .hero-main-col {
        height: 250px;
        border-radius: 16px;
    }
    .hero-side-col {
        flex-direction: row;
        gap: 10px;
    }
    .hero-small-box {
        height: 160px !important;
        border-radius: 12px;
        flex: 1;
    }
    .featured-main h2 { font-size: 1.3rem; }
    .featured-small h3 { font-size: 0.9rem; }
    .featured-overlay { padding: 15px; }
    .hero-content-new { gap: 10px; }
}

/* --- PÁGINA DE DETALHES (FICHA TÉCNICA) --- */
.product-hero {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 20px;
}

.product-image-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
}

.product-image-box img {
    max-width: 100%;
    height: 450px;
    object-fit: contain;
}

.product-info-box h1 {
    font-size: 3.5rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 10px;
    line-height: 1.1;
}

.product-brand-tag {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.spec-grid-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.spec-card-detail {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #eee;
    transition: var(--transition);
}

.spec-card-detail:hover {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.spec-card-detail span {
    display: block;
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

.spec-card-detail strong {
    font-weight: 600;
    font-size: 1.2rem;
    color: #000;
}

.details-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 1100px) {
    .product-hero { grid-template-columns: 1fr; }
    .product-info-box h1 { font-size: 2.5rem; }
}

.main-section {
    width: 100%;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.content-area {
    min-width: 0;
}

.sidebar {
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 5;
    min-width: 350px;
}

@media (max-width: 1100px) {
    .main-grid { grid-template-columns: 1fr; }
    .sidebar { min-width: 100%; }
}

.sidebar-block {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 25px;
    position: relative !important; /* Força bruta contra qualquer cache de sticky */
    display: block;
    z-index: 1;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-item {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.sidebar-item:hover { color: var(--accent); }

.sidebar-item img {
    width: 50px;
    height: 60px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 5px;
}

.sidebar-link {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
}

/* News Feed & Articles */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.news-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    padding: 20px 0;
    transition: var(--transition);
    align-items: start;
}

@media (max-width: 600px) {
    .news-item {
        grid-template-columns: 1fr;
    }
    .news-image-wrapper {
        height: 200px;
    }
}

.news-item:hover {
    border-color: var(--accent);
    transform: none;
}

.news-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 160px;
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category {
    display: inline-block;
    background: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px; /* Garante que fique ACIMA do título sem tocar */
}

.news-content h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.news-meta-bottom {
    color: #999;
    font-size: 0.8rem;
    font-weight: 500;
    display: block;
    margin-top: 15px;
}

.news-content p {
    color: var(--text-dim);
    margin-bottom: 20px;
}

/* Removido o link manual para dar lugar ao clique total no card */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title { font-size: 2rem; }

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.device-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.device-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.device-card.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.device-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.device-info h3 { margin-bottom: 8px; font-size: 1.25rem; }
.device-info p { color: var(--text-dim); font-size: 0.9rem; }

/* Comparison Table */
.compare-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    margin-top: 40px;
}

.compare-scroll { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th, td {
    padding: 20px 30px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.sticky-header {
    position: sticky;
    top: 100px;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.spec-category {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.spec-label {
    width: 250px;
    color: var(--text-dim);
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.02);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up { animation: fadeInUp 0.8s ease-out forwards; }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .section { padding: 60px 5%; }
}

/* --- ESTILOS DE NOTÍCIA (ESTILO TECMUNDO) --- */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.breadcrumb a {
    text-decoration: none;
    color: var(--accent);
}
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

.article-header {
    margin-bottom: 40px;
}

.article-category {
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.article-title {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 25px;
    color: #111;
}

.article-meta-new {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #777;
    font-size: 0.9rem;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.reading-time {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-content-body {
    font-size: 1.2rem;
    line-height: 1.85;
    color: #333;
}

.article-content-body p {
    margin-bottom: 25px;
}

.article-content-body h2 {
    font-size: 1.8rem;
    margin: 45px 0 20px;
    color: #111;
}

.article-featured-image-new {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
}

.article-featured-image-new img {
    width: 100%;
    height: auto;
    display: block;
}

.article-share {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.2s;
}

@media (max-width: 768px) {
    .article-title { font-size: 2.2rem; }
    .article-meta-new { flex-direction: column; align-items: flex-start; gap: 15px; }
    .reading-time { margin-left: 0; }
}

/* COMPARATIVO ESTILO GSMARENA - REFINADO */
.compare-page {
    background: #fff;
    padding-bottom: 80px;
    font-family: Arial, sans-serif;
}

.compare-header-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.compare-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #b80000; /* Vermelho GSMArena */
    margin: 0;
}

.compare-subtitle {
    color: #444;
    font-size: 0.9rem;
    margin-top: 5px;
}

.device-selector-wrapper {
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.selector-label {
    font-size: 0.8rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.device-card-mini {
    flex: 0 0 100px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    background: #fff;
}

.device-card-mini.selected { border: 2px solid #b80000; }
.device-card-mini img { width: 50px; height: 70px; object-fit: contain; }
.device-card-mini h4 { font-size: 0.75rem; color: #b80000; margin: 5px 0 0 0; }

.gsm-compare-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid #ddd;
}

.gsm-compare-table th, 
.gsm-compare-table td {
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    padding: 8px 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;
}

/* Coluna de labels */
.gsm-compare-table .spec-label {
    width: 140px;
    background: #fafafa;
    color: #e83e8c;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-align: left;
    border-right: 1px solid #ddd;
}

/* Headers de Categoria */
.gsm-compare-table .category-header {
    background: #f6f6f6 !important;
    color: #b80000 !important;
    font-weight: bold !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    padding: 10px 12px !important;
    border-top: 2px solid #ddd !important;
    border-bottom: 1px solid #ddd !important;
    text-align: left;
}

.gsm-compare-table thead th {
    background: #fff;
    padding: 20px 10px;
    border-bottom: 3px solid #b80000;
    position: sticky;
    top: 70px; /* Alinhado com a altura da nav fixada */
    z-index: 1000;
}

.device-header-cell img {
    height: 100px;
    margin-bottom: 10px;
}

.device-header-name {
    color: #b80000;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
}

/* Estilo de valor de especificação */
.gsm-compare-table td:not(.spec-label):not(.category-header) {
    background: #fff;
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    color: #333 !important;
    font-family: Arial, sans-serif !important;
    text-align: left !important;
    line-height: 1.4 !important;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .gsm-compare-table thead th { top: 60px; }
    .gsm-compare-table .spec-label { width: 90px !important; font-size: 0.65rem !important; }
    .gsm-compare-table td { padding: 6px !important; font-size: 0.75rem !important; }
}

/* ELEMENTOS DA BUSCA E BOTÃO REMOVER NA TABELA GSMARENA */
.device-header-cell {
    position: relative;
    vertical-align: bottom;
}

.device-header-cell.empty-slot {
    vertical-align: middle;
}

.remove-device-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-device-btn:hover {
    color: #b80000;
    background: #f8d7da;
}

.compare-search-wrapper {
    position: relative;
    width: 100%;
    margin-top: 20px;
}

.compare-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
}

.compare-search-input:focus {
    outline: none;
    border-color: #b80000;
    box-shadow: 0 0 0 2px rgba(184, 0, 0, 0.1);
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 2000;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 0 0 4px 4px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}

.autocomplete-item:hover {
    background: #fdfdfd;
}

.autocomplete-item img {
    width: 24px;
    height: 32px;
    object-fit: contain;
    margin-right: 10px;
    margin-bottom: 0 !important;
}

.autocomplete-item span {
    font-size: 0.85rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
