/* Affiliate Engine — Professional product review layout
   Inspired by Wirecutter & RTINGS design patterns */

.ae-article {
    max-width: 700px;
    margin: 0 auto;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.75;
    color: #1a1a1a;
}

.ae-article h1 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 2.2em;
    line-height: 1.15;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ae-article h2 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.4em;
    margin: 40px 0 16px;
    color: #1a1a2e;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* === Verdict Box === */
.ae-article .ae-verdict {
    background: #fefce8;
    border-left: 5px solid #2563eb;
    padding: 20px 24px;
    margin: 28px 0;
    font-weight: 600;
    font-size: 1.02em;
    line-height: 1.6;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
}
.ae-article .ae-verdict::before {
    content: 'Our Verdict';
    display: block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2563eb;
    margin-bottom: 8px;
}

/* === Author Byline === */
.ae-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    margin: 0 0 24px;
    border-bottom: 1px solid #e5e5e5;
}
.ae-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ae-author-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9em;
    font-weight: 600;
    color: #1a1a2e;
}
.ae-author-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8em;
    color: #595959;
    font-weight: 400;
}

/* === Table of Contents === */
.ae-toc {
    background: #fafaf8;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0 0 32px;
}
.ae-toc .ae-toc-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a1a2e;
    margin: 0 0 12px;
}
.ae-toc a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
    color: #2563eb;
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88em;
    font-weight: 500;
    transition: color 0.15s;
}
.ae-toc a:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ae-toc a:hover {
    color: #1d4ed8;
}

/* === Methodology Box === */
.ae-methodology {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 0 0 36px;
}
.ae-methodology .ae-methodology-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563eb;
    margin: 0 0 8px;
}
.ae-methodology p {
    font-size: 0.9em;
    color: #444;
    margin: 0;
    line-height: 1.65;
}

/* === Product Cards === */
.ae-product-card {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 24px;
    margin: 36px 0;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}
.ae-product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Pick Badges */
.ae-pick-badge {
    position: absolute;
    top: -1px;
    left: 20px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.65em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 14px;
    border-radius: 0 0 6px 6px;
    color: #fff;
}
.ae-pick-badge.ae-pick-1 { background: #c1121f; }
.ae-pick-badge.ae-pick-2 { background: #2563eb; }
.ae-pick-badge.ae-pick-3 { background: #047857; }

.ae-product-card img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f8f8f6;
    padding: 8px;
}

.ae-product-card .ae-product-info h3 {
    margin: 0 0 6px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

.ae-product-card .ae-price {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5em;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.ae-product-card .ae-rating {
    color: #b45309;
    font-size: 1em;
    margin-bottom: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
}

.ae-product-card .ae-product-info p {
    font-size: 0.92em;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.6;
}

.ae-best-for {
    font-size: 0.875rem;
    color: #1e6b38;
    margin: 4px 0 8px;
}

/* === CTA Button — Editorial Blue === */
.ae-btn-buy {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 11px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.ae-btn-buy:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

/* === Pros / Cons === */
.ae-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0 28px;
}

.ae-pros {
    background: #f0fdf4;
    padding: 18px 20px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}
.ae-cons {
    background: #fef2f2;
    padding: 18px 20px;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.ae-pros h4 {
    font-family: 'Inter', system-ui, sans-serif;
    color: #15803d;
    margin: 0 0 10px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ae-cons h4 {
    font-family: 'Inter', system-ui, sans-serif;
    color: #b91c1c;
    margin: 0 0 10px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ae-pros ul, .ae-cons ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ae-pros li, .ae-cons li {
    margin-bottom: 6px;
    font-size: 0.9em;
    padding-left: 22px;
    position: relative;
    line-height: 1.5;
}
.ae-pros li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #15803d;
    font-weight: 700;
}
.ae-cons li::before {
    content: '\2717';
    position: absolute;
    left: 0;
    color: #b91c1c;
    font-weight: 700;
}

/* === Comparison Table === */
.ae-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin: 24px 0;
}
.ae-comparison-table {
    width: 100%;
    min-width: 500px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9em;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.ae-comparison-table thead th {
    background: #1a1a2e;
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.01em;
}
.ae-comparison-table thead th:first-child {
    border-radius: 8px 0 0 0;
}
.ae-comparison-table thead th:last-child {
    border-radius: 0 8px 0 0;
}
.ae-comparison-table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
}
.ae-comparison-table tbody tr:nth-child(even) {
    background: #fafaf8;
}
.ae-comparison-table tbody tr:hover {
    background: #f5f5f0;
}
.ae-comparison-table tbody tr:last-child td {
    border-bottom: none;
}
.ae-comparison-table tbody td:first-child {
    color: #666;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* === FAQ Section === */
.ae-faq-section {
    margin: 40px 0;
    padding: 28px 28px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}
.ae-faq-section h2 {
    margin-top: 0;
    font-size: 1.2em;
}
.ae-faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.ae-faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.ae-faq-item h3 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.98em;
    color: #1a1a2e;
    margin: 0 0 8px;
    font-weight: 600;
    padding-left: 28px;
    position: relative;
}
.ae-faq-item h3::before {
    content: 'Q';
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: 0.85em;
    color: #fff;
    background: #2563eb;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ae-faq-item p {
    color: #555;
    margin: 0;
    font-size: 0.92em;
    padding-left: 28px;
    line-height: 1.65;
}

/* === Disclosure === */
.ae-disclosure {
    margin-top: 48px;
    padding: 16px 20px;
    border-radius: 6px;
    background: #f8f8f6;
    font-size: 0.8em;
    color: #666;
    font-family: 'Inter', system-ui, sans-serif;
}
.ae-disclosure p {
    margin: 0;
    font-style: normal;
    line-height: 1.5;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .ae-article {
        font-size: 16px;
        padding: 0 16px;
    }
    .ae-article h1 {
        font-size: 1.7em;
    }
    .ae-article h2 {
        font-size: 1.25em;
        margin-top: 32px;
    }
    .ae-product-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .ae-product-card img {
        width: 160px;
        height: 160px;
    }
    .ae-pick-badge {
        left: 50%;
        transform: translateX(-50%);
    }
    .ae-pros-cons {
        grid-template-columns: 1fr;
    }
    .ae-comparison-table {
        font-size: 0.82em;
        min-width: 480px;
    }
    .ae-comparison-table thead th,
    .ae-comparison-table tbody td {
        padding: 10px 12px;
    }
    .ae-table-wrap {
        margin: 16px -16px;
        border-radius: 0;
    }
    .ae-verdict {
        padding: 16px 18px;
    }
    .ae-btn-buy {
        display: block;
        text-align: center;
        padding: 13px 24px;
    }
    .ae-faq-section {
        padding: 20px;
    }
    .ae-toc {
        padding: 16px 18px;
    }
    .ae-methodology {
        padding: 16px 18px;
    }
}

/* Print */
@media print {
    .ae-btn-buy { display: none; }
    .ae-product-card { box-shadow: none; border: 1px solid #ccc; }
    .ae-article { max-width: 100%; }
    .ae-pick-badge { print-color-adjust: exact; }
    .ae-toc, .ae-methodology { display: none; }
}
