/**
 * Estilos para Artículos SEO - Tu Compra Experta
 * Usa variables globales del sistema de diseño
 * Aplicado a artículos generados dinámicamente por n8n
 */

/* ============================================
   ESTRUCTURA BASE Y TÍTULOS PROTEGIDOS
   ============================================ */


/* Estilo para el título de WordPress (H1 oficial) */
.entry-title {
    max-width: 850px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 3rem 1.5rem 0.5rem 1.5rem !important;
    font-size: 3.25rem !important;
    font-weight: var(--font-weight-black) !important;
    color: var(--text-main);
    letter-spacing: -0.05em !important;
    line-height: 1.1 !important;
    text-align: left;
}

/* Alineación de Meta Datos (Fecha y Autor) */
.entry-meta {
    max-width: 850px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1.5rem 2rem 1.5rem !important;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: left;
}

@media (max-width: 768px) {
    .entry-title {
        font-size: 2.25rem !important;
        padding: 2rem 1rem 0.5rem 1rem !important;
    }
}

/* Centrado de la Tabla de Contenidos (Easy TOC) */
#ez-toc-container {
    margin: 2rem auto !important;
    display: table !important;
    /* Mantiene el ancho ajustado al contenido pero permite centrar */
    float: none !important;
}

/* ============================================
   SECCIÓN DE INTRODUCCIÓN
   ============================================ */

.article-content {
    max-width: 850px;
    margin: 0 auto;
}

.article-content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    margin-bottom: 1.5rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    text-align: left !important;
    hyphens: none !important;
}

.article-intro {
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ============================================
   TARJETAS DE PRODUCTO (MINIMALIST PREMIUM)
   ============================================ */

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 850px;
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.product-card:hover {
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.product-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
        /* Imagen arriba, texto abajo */
        text-align: center;
        gap: 2rem;
    }
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .product-info {
        align-items: center;
    }
}

.product-name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: var(--font-weight-black);
    line-height: 1.2;
}

.product-name a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: var(--accent);
}

.product-image-container {
    flex-shrink: 0;
}

.product-image {
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: white;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.rating-stars {
    color: #f59e0b;
    font-size: 1.1rem;
}

.rating-value {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   PROS Y CONTRAS
   ============================================ */

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

.pros {
    background: #ecfdf5;
    border-left: 3px solid var(--success);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.cons {
    background: #fef2f2;
    border-left: 3px solid var(--danger);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

@media (prefers-color-scheme: dark) {
    .pros {
        background: rgba(5, 150, 105, 0.1);
    }

    .cons {
        background: rgba(220, 38, 38, 0.1);
    }
}

.pros strong {
    color: var(--success);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-semibold);
}

.cons strong {
    color: var(--danger);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-semibold);
}

.pros ul,
.cons ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.pros li,
.cons li {
    margin-bottom: 0.25rem;
}

/* ============================================
   ESPECIFICACIONES
   ============================================ */

.product-specs {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.product-specs summary {
    cursor: pointer;
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
    font-size: 0.875rem;
}

.specs-table {
    width: 100%;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-table td {
    padding: 0.5rem;
}

.specs-table td:first-child {
    font-weight: var(--font-weight-semibold);
    color: var(--text-muted);
}

.specs-table td:last-child {
    color: var(--text-main);
}

/* ============================================
   BOTÓN CTA
   ============================================ */

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
    color: white !important;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    /* Botón pill-shaped más moderno */
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    margin-top: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(234, 88, 12, 0.2);
    width: fit-content;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.3);
    color: white !important;
}

/* ============================================
   GUÍA DE COMPRA
   ============================================ */

.buying-guide {
    margin: 3rem 0;
}

.buying-guide h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.buying-guide-content {
    background: #fff7ed;
    border-left: 4px solid var(--accent);
    padding: 2rem;
    border-radius: var(--radius-sm);
}

@media (prefers-color-scheme: dark) {
    .buying-guide-content {
        background: rgba(245, 158, 11, 0.1);
    }
}

.buying-guide-content p {
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* ============================================
   ENLACES INTERNOS
   ============================================ */

.related-links {
    margin: 3rem 0;
}

.related-links h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.related-links ul {
    list-style: none;
    padding: 0;
}

.related-links li {
    margin: 1rem 0;
}

.related-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: color 0.2s ease;
}

.related-links a:hover {
    color: var(--primary-dark);
}

/* ============================================
   FAQs
   ============================================ */

.faqs-section {
    margin: 3rem 0;
}

.faqs-section h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.faq-item {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.faq-item summary {
    cursor: pointer;
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
}

.faq-item p {
    margin-top: 1rem;
    color: var(--text-muted);
}

/* ============================================
   FOOTER DEL ARTÍCULO
   ============================================ */

.article-footer {
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   ESTILOS ESPECÍFICOS DE REVIEWS
   ============================================ */

.verdict-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin: 2rem 0;
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
}

.analysis-section {
    margin: 3rem 0;
}

.analysis-block {
    margin: 2rem 0;
}

.analysis-title {
    color: #667eea;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.specs-section {
    margin: 3rem 0;
}

.specs-section h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.specs-section .specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.specs-section .specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-section .specs-table td:first-child {
    padding: 0.75rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
    width: 40%;
}

.specs-section .specs-table td:last-child {
    padding: 0.75rem;
    color: var(--text-muted);
}

.recommended-box {
    background: #fff7ed;
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
}

@media (prefers-color-scheme: dark) {
    .recommended-box {
        background: rgba(245, 158, 11, 0.1);
    }
}

.recommended-box h3 {
    color: #ea580c;
    margin-top: 0;
}

.recommended-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.recommended-box li {
    margin: 0.5rem 0;
}