/* Detailing Scout — Premium automotive theme with light/dark mode */
/* Mobile-first, no frameworks, system fonts, minimal JS */

:root {
    --color-primary: #2563eb;
    --color-accent: #f97316;
    --color-accent-hover: #ea580c;

    /* Light palette (default) */
    --color-bg: #f8f8fa;
    --color-bg-raised: #ffffff;
    --color-bg-card: #ffffff;
    --color-bg-hover: #f0f0f4;
    --color-surface: #f3f3f6;

    --color-text: #2d2d32;
    --color-text-secondary: #5a5a66;
    --color-text-muted: #8e8e9a;
    --color-text-bright: #111114;

    --color-border: #e2e2e8;
    --color-border-hover: #c8c8d0;

    --color-chrome: #6b6b78;
    --color-gold: #b07d04;

    /* Nav specific */
    --nav-bg: rgba(248, 248, 250, 0.88);
    --nav-shadow: 0 1px 3px rgba(0,0,0,0.06);

    /* Amazon CTA */
    --cta-shadow: rgba(249, 115, 22, 0.18);
    --cta-shadow-hover: rgba(249, 115, 22, 0.28);

    /* Fonts — system stack, no downloads */
    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-body: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Sizing */
    --max-width: 1200px;
    --content-width: 760px;
    --radius: 10px;
    --radius-sm: 6px;
}

/* Dark mode — applied by OS preference or user toggle */
[data-theme="dark"] {
    --color-bg: #0a0a0b;
    --color-bg-raised: #141416;
    --color-bg-card: #1a1a1e;
    --color-bg-hover: #222228;
    --color-surface: #1e1e23;

    --color-text: #e4e4e7;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;
    --color-text-bright: #fafafa;

    --color-border: #27272a;
    --color-border-hover: #3f3f46;

    --color-chrome: #d4d4d8;
    --color-gold: #ca8a04;

    --nav-bg: rgba(10, 10, 11, 0.85);
    --nav-shadow: none;

    --cta-shadow: rgba(249, 115, 22, 0.25);
    --cta-shadow-hover: rgba(249, 115, 22, 0.35);
}

/* OS preference fallback (when no data-theme is set) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #0a0a0b;
        --color-bg-raised: #141416;
        --color-bg-card: #1a1a1e;
        --color-bg-hover: #222228;
        --color-surface: #1e1e23;

        --color-text: #e4e4e7;
        --color-text-secondary: #a1a1aa;
        --color-text-muted: #71717a;
        --color-text-bright: #fafafa;

        --color-border: #27272a;
        --color-border-hover: #3f3f46;

        --color-chrome: #d4d4d8;
        --color-gold: #ca8a04;

        --nav-bg: rgba(10, 10, 11, 0.85);
        --nav-shadow: none;

        --cta-shadow: rgba(249, 115, 22, 0.25);
        --cta-shadow-hover: rgba(249, 115, 22, 0.35);
    }
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--color-accent); }

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

/* ───────── NAVIGATION ───────── */

.site-header {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--nav-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text-bright);
    letter-spacing: -0.01em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo:hover { color: var(--color-accent); }

.logo-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--color-text-bright);
    border-color: var(--color-border-hover);
    background: var(--color-bg-hover);
}

/* Icon visibility based on theme */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--color-text-bright);
    background: var(--color-bg-card);
}

/* ───────── HERO ───────── */

.hero {
    position: relative;
    text-align: center;
    padding: 0;
    background: #0a0a0b;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    z-index: 2;
}

.hero-image {
    position: relative;
    width: 100%;
    max-height: 420px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 11, 0.1) 0%,
        rgba(10, 10, 11, 0.4) 60%,
        rgba(10, 10, 11, 0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 1.5rem 3rem;
    margin-top: -4rem;
}

.hero-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fafafa;
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

.hero-tagline {
    color: #a1a1aa;
    font-size: 1.15rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ───────── SECTIONS ───────── */

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section + .section {
    border-top: 1px solid var(--color-border);
}

.section h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

/* ───────── ARTICLE CARDS ───────── */

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.article-card:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-hover);
    color: var(--color-text);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

[data-theme="dark"] .article-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .article-card:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }
}

.article-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-bright);
    margin: 0.65rem 0 0.5rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.article-card p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
}

.card-arrow {
    margin-top: auto;
    padding-top: 0.75rem;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.article-card:hover .card-arrow {
    color: var(--color-accent);
    transform: translateX(4px);
}

/* ───────── ARTICLE LIST (rows) ───────── */

.article-list { display: flex; flex-direction: column; }

.article-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    transition: all 0.15s ease;
}

.article-row:first-child { border-top: 1px solid var(--color-border); }

.article-row:hover {
    color: var(--color-text-bright);
    text-decoration: none;
    padding-left: 0.5rem;
}

.row-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.type-roundup {
    background: rgba(249, 115, 22, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.type-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.row-title {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ───────── CATEGORY GRID ───────── */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    text-align: center;
    transition: all 0.2s ease;
    min-height: 80px;
}

.category-card:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-hover);
    text-decoration: none;
    color: var(--color-text-bright);
}

.category-card h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--color-text-bright);
    text-transform: capitalize;
}

.category-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ───────── ARTICLE PAGES ───────── */

.article-page {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.breadcrumbs {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover { color: var(--color-text-bright); }

.bc-sep {
    margin: 0 0.4rem;
    color: var(--color-border-hover);
}

.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.article-header h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text-bright);
    margin: 0.75rem 0 0.5rem;
}

.article-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    align-items: center;
}

.article-meta time,
.article-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.article-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);
}

/* ───────── ARTICLE BODY ───────── */

.article-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text);
}

.article-body > p:first-child {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
    padding: 1rem 1.25rem;
    background: var(--color-bg-card);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 2rem;
}

.article-body h1 {
    display: none; /* Hide duplicate H1 from markdown content */
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-bright);
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    letter-spacing: -0.01em;
}

.article-body h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.article-body h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-bright);
    margin: 2rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1.15rem;
    color: var(--color-text);
}

.article-body ul, .article-body ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.4rem;
    color: var(--color-text);
}

.article-body strong {
    color: var(--color-text-bright);
    font-weight: 600;
}

/* ── Tables ── */

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-body thead {
    background: var(--color-surface);
}

.article-body th {
    font-weight: 600;
    color: var(--color-text-bright);
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-body td {
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.article-body tbody tr {
    transition: background 0.1s ease;
}

.article-body tbody tr:hover {
    background: var(--color-bg-card);
}

.article-body tbody tr:last-child td {
    border-bottom: none;
}

/* ── Blockquotes ── */

.article-body blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--color-text-secondary);
    background: var(--color-bg-card);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

/* ── Amazon CTA Buttons ── */

.article-body a[href*="amazon"] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0.75rem 0 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--cta-shadow);
    letter-spacing: 0.01em;
}

.article-body a[href*="amazon"]:hover {
    background: var(--color-accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--cta-shadow-hover);
}

.article-body a[href*="amazon"]::after {
    content: '→';
    font-size: 1rem;
    transition: transform 0.15s ease;
}

.article-body a[href*="amazon"]:hover::after {
    transform: translateX(3px);
}

/* ───────── PRODUCT CARDS ───────── */

.product-cards-section {
    max-width: var(--content-width);
    margin: 0 auto 2rem;
    padding: 0;
}

.product-cards-heading {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.product-card {
    position: relative;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.25rem;
    align-items: start;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    padding-top: 1.75rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.product-card:hover {
    border-color: var(--color-border-hover);
}

/* ── Product Badge ── */

.product-badge {
    position: absolute;
    top: -1px;
    left: 1.25rem;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem 0.35rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    line-height: 1;
    z-index: 1;
}

/* ── Product Images ── */

.product-images {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: sticky;
    top: 80px;
}

.product-carousel {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}

[data-theme="dark"] .product-carousel,
[data-theme="dark"] .product-single-image {
    background: #1a1a1e;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .product-carousel,
    :root:not([data-theme="light"]) .product-single-image {
        background: #1a1a1e;
    }
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 0.75rem;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-thumbs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.carousel-thumbs::-webkit-scrollbar { display: none; }

.thumb {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 2px solid var(--color-border);
    border-radius: 3px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease;
}

[data-theme="dark"] .thumb { background: #1a1a1e; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .thumb { background: #1a1a1e; }
}

.thumb:hover, .thumb.active {
    border-color: var(--color-accent);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-single-image {
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 0.75rem;
    background: #fff;
}

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

/* ── Product Info ── */

.product-info {
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.product-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-bright);
    line-height: 1.35;
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}

/* ── Product Specs Bar ── */

.product-specs-bar {
    display: flex;
    gap: 0;
    margin-bottom: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.85rem;
    border-right: 1px solid var(--color-border);
    min-width: 0;
}

.spec-item:last-child { border-right: none; }

.spec-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.spec-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-bright);
    line-height: 1.2;
    white-space: nowrap;
}

.spec-price {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-bright);
}

.stars-inline {
    color: #f59e0b;
}

.rating-count {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

.product-features {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    flex-grow: 1;
}

.product-features li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: var(--color-accent);
    border-radius: 50%;
}

.product-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-accent);
    color: #fff !important;
    padding: 0.7rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--cta-shadow);
    letter-spacing: 0.01em;
    text-decoration: none !important;
    align-self: flex-start;
    margin-top: auto;
}

.product-cta:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--cta-shadow-hover);
    color: #fff !important;
}

.product-cta .cta-arrow {
    font-size: 1rem;
    transition: transform 0.15s ease;
}

.product-cta:hover .cta-arrow {
    transform: translateX(3px);
}

/* ── Features Toggle (mobile only) ── */

.features-toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    transition: all 0.15s ease;
    width: 100%;
    justify-content: center;
}

.features-toggle:hover {
    color: var(--color-text-bright);
    border-color: var(--color-border-hover);
}

.features-toggle .toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
}

.features-toggle.open .toggle-icon {
    transform: rotate(180deg);
}

/* ── Product Card Responsive ── */

@media (max-width: 768px) {
    .product-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }

    .product-carousel, .product-single-image {
        max-width: 240px;
        margin: 0 auto;
    }

    .carousel-thumbs {
        justify-content: center;
    }

    .product-title { font-size: 1.05rem; }
    .product-specs-bar { flex-wrap: wrap; }
    .spec-item { flex: 1 1 45%; border-bottom: 1px solid var(--color-border); }
    .spec-item:nth-child(even) { border-right: none; }
    .product-cta { width: 100%; justify-content: center; }

    /* Collapsible bullets on mobile */
    .product-features {
        max-height: 0;
        overflow: hidden;
        margin: 0;
        transition: max-height 0.3s ease;
    }
    .product-features.expanded { max-height: 500px; }
    .features-toggle { display: flex; }
    .product-images { position: static; }
}

/* ── Inline links ── */

.article-body a:not([href*="amazon"]) {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease;
}

.article-body a:not([href*="amazon"]):hover {
    text-decoration-color: var(--color-primary);
}

/* ───────── RELATED ARTICLES ───────── */

.related-articles, .related-cta {
    margin-top: 3rem;
    padding: 1.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.related-articles h2, .related-cta h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-bright);
    margin-bottom: 1rem;
    border: none;
    padding: 0;
}

.related-articles ul, .related-cta ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-articles li, .related-cta li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    margin: 0;
}

.related-articles li:last-child, .related-cta li:last-child {
    border-bottom: none;
}

.related-articles a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
}

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

.cta-link {
    color: var(--color-accent) !important;
    font-weight: 600;
    text-decoration: none !important;
}
.cta-link:hover { color: var(--color-accent-hover) !important; }

/* ───────── CATEGORY PAGE ───────── */

.category-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.category-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.category-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-bright);
    letter-spacing: -0.02em;
    text-transform: capitalize;
}

.category-header p { color: var(--color-text-muted); font-size: 0.9rem; }

.category-section { margin-bottom: 3rem; }

.category-section h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

/* ───────── ERROR PAGE ───────── */

.error-page {
    text-align: center;
    padding: 6rem 1.5rem;
    max-width: var(--content-width);
    margin: 0 auto;
}

.error-code {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    color: var(--color-border-hover);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.error-page h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text-bright);
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.65rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--color-accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ───────── FOOTER ───────── */

.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    background: var(--color-bg-raised);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-bright);
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin: 1.25rem 0;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--color-text-bright); }

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

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

/* ───────── MOBILE NAV ───────── */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-secondary);
    border-radius: 1px;
    transition: all 0.2s ease;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
    display: none;
    flex-direction: column;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1.5rem 1rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
    color: var(--color-text-secondary);
    padding: 0.65rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--color-text-bright); }

/* ───────── RESPONSIVE ───────── */

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .hero-image { max-height: 280px; }
    .hero-image img { height: 280px; }
    .hero-content { margin-top: -3rem; padding-bottom: 2rem; }
    .hero h1 { font-size: 2rem; }
    .hero-tagline { font-size: 1rem; }
    .section { padding: 2rem 1.25rem; }
    .article-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .article-page { padding: 2rem 1.25rem 3rem; }
    .article-header h1 { font-size: 1.6rem; }
    .article-body { font-size: 1rem; }
    .article-body h2 { font-size: 1.3rem; margin: 2.5rem 0 0.75rem; padding-top: 1.5rem; }
    .article-body h3 { font-size: 1.1rem; }
    .article-body table { font-size: 0.82rem; }
    .article-body th, .article-body td { padding: 0.5rem 0.65rem; }
    .footer-links { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.65rem; }
    .category-grid { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 1.4rem; }
}

/* ───────── PRINT ───────── */

@media print {
    .site-header, .site-footer, .related-articles, .related-cta { display: none; }
    body { background: #fff; color: #111; }
    .article-body a[href*="amazon"] { background: none; color: #111; padding: 0; box-shadow: none; }
    .article-body a[href*="amazon"]::after { content: ' (' attr(href) ')'; font-size: 0.8rem; }
}