/**
 * Product Comparison & Affiliate Platform
 * Public Frontend CSS Design System
 * Pure Vanilla CSS - Zero external frameworks
 * Dual Theme System: Enhanced High-Contrast Dark Theme + Pristine Light Theme
 */

:root,
[data-theme="dark"] {
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Core Palette - Dark Mode */
    --bg-main: #0a0e17;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2234;
    --bg-card: #141d2e;
    --bg-card-hover: #1b263b;
    --bg-thumb: #0f1420;
    --bg-header: rgba(17, 24, 39, 0.88);
    --bg-footer: #090d16;
    --border-subtle: #243046;
    --border-strong: #334155;

    /* Text - Significantly Enhanced Contrast */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;    /* Slate 200: Crisp, bright, high-legibility body text */
    --text-muted: #cbd5e1;        /* Slate 300: High-visibility secondary/muted text */
    --text-dim: #94a3b8;          /* Slate 400: For small footnotes & counters */

    /* Brand & Accent Colors */
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: rgba(2, 132, 199, 0.15);
    
    --accent-cyan: #38bdf8;
    --accent-emerald: #10b981;
    --accent-emerald-bg: rgba(16, 185, 129, 0.14);
    --accent-amber: #f59e0b;
    --accent-amber-bg: rgba(245, 158, 11, 0.14);
    --accent-rose: #f43f5e;
    --accent-rose-bg: rgba(244, 63, 94, 0.14);

    /* Marketplace Colors */
    --aliexpress-brand: #ff4747;
    --aliexpress-bg: rgba(255, 71, 71, 0.12);
    --amazon-brand: #ff9900;
    --amazon-bg: rgba(255, 153, 0, 0.12);
    --ebay-brand: #0064d2;
    --ebay-bg: rgba(0, 100, 210, 0.12);

    /* Shadows & Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);

    --container-max: 1240px;
}

[data-theme="light"] {
    /* Core Palette - Pristine Light Mode */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-thumb: #f1f5f9;
    --bg-header: rgba(255, 255, 255, 0.92);
    --bg-footer: #ffffff;
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Text - Crisp Dark Contrast */
    --text-primary: #0f172a;      /* Slate 900: Deep, punchy headings */
    --text-secondary: #334155;    /* Slate 700: Rich, high-readability body text */
    --text-muted: #64748b;        /* Slate 500: Clear secondary labels */
    --text-dim: #94a3b8;          /* Slate 400: Subdued captions */

    /* Brand & Accent Colors */
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: rgba(2, 132, 199, 0.08);
    
    --accent-cyan: #0284c7;
    --accent-emerald: #059669;
    --accent-emerald-bg: rgba(16, 185, 129, 0.1);
    --accent-amber: #d97706;
    --accent-amber-bg: rgba(245, 158, 11, 0.1);
    --accent-rose: #e11d48;
    --accent-rose-bg: rgba(244, 63, 94, 0.1);

    /* Marketplace Colors */
    --aliexpress-brand: #e02424;
    --aliexpress-bg: rgba(224, 36, 36, 0.08);
    --amazon-brand: #b45309;
    --amazon-bg: rgba(217, 119, 6, 0.08);
    --ebay-brand: #0053a0;
    --ebay-bg: rgba(0, 83, 160, 0.08);

    /* Shadows for Light Theme */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
}

/* 1. Global Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.25s ease, color 0.25s ease;
    -webkit-text-size-adjust: 100%;
}

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

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

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

/* 2. Layout Structure */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex: 1;
    padding-bottom: 60px;
}

/* 3. Header & Navbar */
.site-header {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    color: #0a0e17;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-search {
    position: relative;
}

.header-search input {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    color: var(--text-primary);
    font-size: 13px;
    padding: 8px 16px 8px 36px;
    width: 220px;
    transition: all 0.2s ease;
}

.header-search input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    width: 280px;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.header-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: rotate(15deg) scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* Dark mode: show sun icon (click to switch to light) */
[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
    color: #f59e0b;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

/* Light mode: show moon icon (click to switch to dark) */
[data-theme="light"] .theme-toggle-btn .sun-icon {
    display: none;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
    display: block;
    color: #475569;
}

/* 4. Hero Section */
.hero-section {
    position: relative;
    padding: 70px 0 50px;
    text-align: center;
    background: radial-gradient(circle at 50% 10%, rgba(2, 132, 199, 0.12) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 48px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-emerald-bg);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 9999px;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-title {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

.hero-search-box {
    max-width: 580px;
    margin: 0 auto 32px;
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 9999px;
    padding: 6px;
    box-shadow: var(--shadow-md);
}

.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    padding: 10px 20px;
    outline: none;
}

.hero-search-box button {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.hero-search-box button:hover {
    background: var(--primary-hover);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.hero-stat-lbl {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 5. Section Titles */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 6. Categories Showcase Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-md);
}

.cat-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cat-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.cat-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.cat-count {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
}

/* 7. Product Card Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.product-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-thumb);
    overflow: hidden;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumb {
    transform: scale(1.04);
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.product-brand {
    color: var(--accent-cyan);
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
}

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

/* Comparison Teaser on Product Cards */
.comparison-teaser {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.comp-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-secondary);
}

.comp-badge-aliexpress {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aliexpress-brand);
}

.comp-badge-amazon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amazon-brand);
}

.comp-badge-ebay {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ebay-brand);
}

.comp-price {
    font-weight: 700;
    color: var(--text-primary);
}

.comp-savings-badge {
    background: var(--accent-emerald-bg);
    color: var(--accent-emerald);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-top: 2px;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.btn-compare {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.15s ease;
    width: 100%;
    text-align: center;
}

.btn-compare:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* 8. Category Listing Page Layout */
.category-main-title {
    color: var(--text-primary);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: flex-start;
}

.catalog-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: sticky;
    top: 96px;
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-label:hover {
    color: var(--text-primary);
}

.filter-label input[type="checkbox"],
.filter-label input[type="radio"] {
    accent-color: var(--accent-cyan);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.filter-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-price-inputs input {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 13px;
    width: 100%;
}

.filter-btn-apply {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    margin-top: 14px;
    transition: background 0.15s ease;
}

.filter-btn-apply:hover {
    background: var(--primary-hover);
}

.filter-clear-link {
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

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

/* Catalog Results Area */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.catalog-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.catalog-count strong {
    color: var(--text-primary);
}

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.catalog-sort select {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

/* Breadcrumbs */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    word-break: break-word;
}

.breadcrumb-nav a {
    color: var(--text-secondary);
}

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

.breadcrumb-sep {
    color: var(--border-strong);
}

/* 9. Detailed Product Comparison Page */
.product-detail-hero {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 36px;
}

.detail-gallery {
    background: var(--bg-thumb);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-gallery img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

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

.detail-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    align-self: flex-start;
    margin-bottom: 12px;
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.detail-brand-model {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-summary {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* Head-to-Head Marketplace Comparison Box (Law 2) */
.marketplace-comp-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-md);
}

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

.comp-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.comp-savings-banner {
    background: linear-gradient(135deg, var(--accent-emerald-bg), var(--primary-light));
    border: 1px solid var(--accent-emerald);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.comp-savings-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-emerald);
}

.marketplace-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.offer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.offer-card.best-price {
    border-color: var(--accent-emerald);
    background: linear-gradient(180deg, var(--accent-emerald-bg) 0%, var(--bg-card) 100%);
    box-shadow: var(--shadow-sm);
}

.offer-badge-best {
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--accent-emerald);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.offer-marketplace-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
}

.offer-marketplace-tag.aliexpress {
    color: var(--aliexpress-brand);
}

.offer-marketplace-tag.amazon {
    color: var(--amazon-brand);
}

.offer-marketplace-tag.ebay {
    color: var(--ebay-brand);
}

.offer-price-box {
    margin-bottom: 14px;
}

.offer-price-current {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-primary);
}

.offer-price-original {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}

.offer-meta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.offer-meta-row {
    display: flex;
    justify-content: space-between;
}

.status-in-stock {
    color: var(--accent-emerald);
    font-weight: 700;
}

.status-out-of-stock {
    color: var(--accent-rose);
    font-weight: 700;
}

.btn-marketplace-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-marketplace-cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-marketplace-cta.aliexpress {
    background: var(--aliexpress-brand);
    color: #ffffff;
}

.btn-marketplace-cta.amazon {
    background: var(--amazon-brand);
    color: #ffffff;
}

.btn-marketplace-cta.ebay {
    background: var(--ebay-brand);
    color: #ffffff;
}

/* 10. Specifications Table */
.specs-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 36px;
}

.specs-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.specs-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

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

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 38%;
}

.specs-table td {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 10.5 Our Verdict & Customer Sentiment Card */
.verdict-sentiment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
}

.verdict-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.verdict-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.verdict-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
    color: #0a0e17;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.verdict-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.sentiment-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-emerald-bg);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
}

.verdict-lead {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.verdict-body {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
}

.sentiment-bar-wrap {
    background: var(--bg-surface-elevated);
    border-radius: 9999px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
}

.sentiment-bar-pos { background: var(--accent-emerald); height: 100%; }
.sentiment-bar-neu { background: var(--accent-amber); height: 100%; }
.sentiment-bar-neg { background: var(--accent-rose); height: 100%; }

.sentiment-platforms {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.sentiment-platform-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.sentiment-platform-pill strong {
    color: var(--text-primary);
}

.consensus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.consensus-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-width: 0;
}

.consensus-box.pros { border-left: 4px solid var(--accent-emerald); }
.consensus-box.cons { border-left: 4px solid var(--accent-rose); }

.consensus-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.consensus-title.pros { color: var(--accent-emerald); }
.consensus-title.cons { color: var(--accent-rose); }

.consensus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consensus-list li {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    line-height: 1.5;
}

.consensus-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.consensus-tag.pros { background: var(--accent-emerald-bg); color: var(--accent-emerald); }
.consensus-tag.cons { background: var(--accent-rose-bg); color: var(--accent-rose); }

/* 11. Pros and Cons Grid */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}

.pros-card {
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.cons-card {
    background: var(--bg-card);
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.pros-cons-title {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pros-title { color: var(--accent-emerald); }
.cons-title { color: var(--accent-rose); }

.pros-cons-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pros-cons-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pros-cons-list li span.bullet {
    font-weight: 800;
    font-size: 14px;
}

.pros-cons-list.pros-list li span.bullet { color: var(--accent-emerald); }
.pros-cons-list.cons-list li span.bullet { color: var(--accent-rose); }

/* 12. Buyer Guidance (Who should buy / avoid) */
.guidance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 36px;
}

.guidance-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.guidance-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.guidance-card.who-buy .guidance-title { color: var(--accent-cyan); }
.guidance-card.who-avoid .guidance-title { color: var(--accent-amber); }

.guidance-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 13. Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* 14. Footer */
.site-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border-subtle);
    padding: 50px 0 30px;
    margin-top: auto;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 400px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.15s ease;
}

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

.footer-disclosure {
    background: transparent;
    border: none;
    padding: 8px 16px;
    margin: 0 auto 16px;
    text-align: center;
}

/* Tailwind Utilities */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
[data-theme="light"] .text-gray-300 { color: #475569; }
[data-theme="light"] .text-gray-400 { color: #64748b; }
[data-theme="light"] .text-gray-500 { color: #94a3b8; }
.text-center { text-align: center; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.leading-relaxed { line-height: 1.625; }

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim, #94a3b8);
}

/* 15. Responsive Media Queries (Mobile, Tablet, Desktop) */

/* Laptop / Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .product-detail-hero {
        grid-template-columns: 360px 1fr;
        gap: 28px;
    }
}

/* Tablet Landscape & Below (max-width: 992px) */
@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: static;
        margin-bottom: 28px;
    }

    .product-detail-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .detail-gallery {
        max-height: 380px;
    }

    .marketplace-offers-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* Tablet Portrait & Large Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .site-header {
        position: sticky;
        top: 0;
    }

    .nav-wrap {
        height: 64px;
        gap: 12px;
    }

    .brand-logo {
        font-size: 17px;
        gap: 8px;
    }

    .header-actions {
        gap: 10px;
    }

    .header-search input {
        width: 130px;
        padding: 6px 12px 6px 32px;
        font-size: 12px;
    }

    .header-search input:focus {
        width: 160px;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }

    /* Hero Section */
    .hero-section {
        padding: 48px 0 36px;
        margin-bottom: 36px;
    }

    .hero-title {
        font-size: 28px;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin-top: 24px;
    }

    /* Grids & Cards */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
        margin-bottom: 36px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
        margin-bottom: 36px;
    }

    .consensus-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pros-cons-grid,
    .guidance-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .verdict-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .catalog-sort {
        width: 100%;
        justify-content: space-between;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Mobile Screens (max-width: 640px) */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .nav-wrap {
        height: 60px;
        gap: 8px;
    }

    .brand-logo {
        font-size: 16px;
        gap: 6px;
    }

    .brand-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-search input {
        width: 110px;
        font-size: 12px;
        padding: 6px 10px 6px 28px;
    }

    .header-search input:focus {
        width: 135px;
    }

    .header-search svg {
        left: 10px;
        width: 12px;
        height: 12px;
    }

    .theme-toggle-btn {
        width: 34px;
        height: 34px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 14px;
        line-height: 1.55;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .hero-stat-val {
        font-size: 18px;
    }

    .hero-stat-lbl {
        font-size: 11px;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 14px;
        gap: 8px;
    }

    .cat-icon-badge {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .cat-name {
        font-size: 14px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-detail-hero {
        padding: 16px;
        gap: 18px;
        border-radius: var(--radius-lg);
        margin-bottom: 24px;
    }

    .detail-gallery {
        max-height: 300px;
    }

    .detail-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .detail-summary {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 16px;
    }

    .marketplace-comp-card {
        padding: 16px;
        margin-bottom: 24px;
        border-radius: var(--radius-lg);
    }

    .comp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .comp-header h2 {
        font-size: 16px;
    }

    .comp-savings-banner {
        padding: 10px 14px;
        font-size: 13px;
    }

    .marketplace-offers-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .offer-card {
        padding: 16px;
    }

    .offer-price-current {
        font-size: 24px;
    }

    .btn-marketplace-cta {
        padding: 12px 16px;
        font-size: 13px;
        min-height: 44px;
    }

    .verdict-sentiment-card {
        padding: 18px 16px;
        margin-bottom: 24px;
        border-radius: var(--radius-lg);
    }

    .verdict-header h2 {
        font-size: 18px;
    }

    .verdict-lead {
        font-size: 16px;
    }

    .verdict-body {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 18px;
    }

    .consensus-box {
        padding: 16px;
    }

    .specs-section {
        padding: 18px 16px;
        margin-bottom: 24px;
        border-radius: var(--radius-lg);
    }

    .pros-card,
    .cons-card,
    .guidance-card {
        padding: 16px;
    }
}

/* Small Mobile / Narrow Screens (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .nav-wrap {
        height: 56px;
        gap: 6px;
    }

    .brand-logo {
        font-size: 14px;
        gap: 5px;
    }

    .brand-logo span:first-child {
        letter-spacing: -0.01em;
    }

    .header-actions {
        gap: 6px;
    }

    .header-search input {
        width: 88px;
        font-size: 11px;
        padding: 5px 8px 5px 24px;
    }

    .header-search input:focus {
        width: 112px;
    }

    .header-search svg {
        left: 8px;
        width: 11px;
        height: 11px;
    }

    .theme-toggle-btn {
        width: 32px;
        height: 32px;
    }

    /* Hero search form stacks smoothly */
    .hero-search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 6px;
        gap: 6px;
    }

    .hero-search-box input {
        padding: 8px 12px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }

    .hero-search-box button {
        width: 100%;
        border-radius: var(--radius-md);
        padding: 10px;
        font-size: 13px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hero-stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--bg-surface);
        padding: 10px 16px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-subtle);
    }

    .hero-stat-val {
        font-size: 16px;
    }

    .hero-stat-lbl {
        font-size: 12px;
        margin-top: 0;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    /* Specs Table: Mobile Responsive Transformation (No horizontal overflow or clipping) */
    .specs-table,
    .specs-table tbody,
    .specs-table tr,
    .specs-table th,
    .specs-table td {
        display: block;
        width: 100%;
    }

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

    .specs-table th {
        padding: 0 0 4px 0;
        font-size: 12px;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .specs-table td {
        padding: 0;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-primary);
        word-break: break-word;
    }

    /* Consensus Lists */
    .consensus-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .consensus-tag {
        align-self: flex-start;
    }

    .sentiment-platforms {
        flex-direction: column;
        gap: 6px;
    }

    .sentiment-platform-pill {
        width: 100%;
        justify-content: space-between;
    }

    .sentiment-score-badge {
        font-size: 12px;
        padding: 4px 10px;
    }
}
