/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    background: #d97706;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-au {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

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

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
}

/* Hero */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    margin-top: 70px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Categories */
.categories {
    padding: 3rem 0;
    background: var(--white);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-tabs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: var(--radius-lg);
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Products */
.products {
    padding: 3rem 0;
    background: var(--gray-50);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.view-btn {
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.view-btn:hover {
    color: var(--gray-600);
}

.view-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: var(--gray-100);
    overflow: hidden;
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.product-compare-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

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

.product-compare-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.product-info {
    padding: 1.25rem;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.product-rating .star {
    color: var(--accent);
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-feature {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
}

.product-cta {
    width: 100%;
}

/* Products Table */
.products-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

.products-table th,
.products-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.products-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.products-table tr:hover {
    background: var(--gray-50);
}

.products-table .product-name-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.products-table .product-thumb {
    width: 50px;
    height: 50px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Quiz Section */
.quiz-section {
    padding: 4rem 0;
    background: var(--white);
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

.quiz-start {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--gray-200);
}

.quiz-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.quiz-intro h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.quiz-intro p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.quiz-questions {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.quiz-question h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.quiz-options {
    display: grid;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--white);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.quiz-option-icon {
    font-size: 1.5rem;
}

.quiz-option-text {
    font-weight: 500;
    color: var(--gray-700);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.quiz-result-products {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-result-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    text-align: left;
}

.quiz-result-image {
    width: 80px;
    height: 80px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.quiz-result-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.quiz-result-info p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* Compare Section */
.compare-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.compare-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.compare-slot {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.compare-slot:hover {
    border-color: var(--primary);
}

.compare-slot.filled {
    border-style: solid;
    border-color: var(--gray-200);
    cursor: default;
}

.slot-placeholder {
    text-align: center;
    color: var(--gray-400);
}

.plus-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.compare-product {
    text-align: center;
    width: 100%;
}

.compare-product-image {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.compare-product-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.compare-product-price {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.compare-remove-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: var(--error);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.compare-remove-btn:hover {
    background: #dc2626;
}

.compare-table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

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

.compare-table th,
.compare-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.compare-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.compare-table .feature-label {
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
}

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

#clear-compare {
    display: block;
    margin: 0 auto;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.modal-search:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-products {
    display: grid;
    gap: 0.5rem;
}

.modal-product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.modal-product-item:hover {
    background: var(--gray-100);
}

.modal-product-thumb {
    width: 48px;
    height: 48px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-product-info {
    flex: 1;
}

.modal-product-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.modal-product-price {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* SEO Content */
.seo-content {
    padding: 4rem 0;
    background: var(--white);
}

.seo-content h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--secondary);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.seo-article {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.seo-article h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.seo-article p {
    color: var(--gray-600);
    line-height: 1.7;
}

.seo-cta {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    color: var(--white);
}

.seo-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.seo-cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.seo-cta .btn {
    background: var(--white);
    color: var(--primary);
}

.seo-cta .btn:hover {
    background: var(--gray-100);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-brand .logo {
    color: var(--white);
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    text-align: center;
}

.affiliate-disclosure {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.copyright {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .compare-slots {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }

    .category-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

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

    .compare-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .compare-slot {
        min-height: 150px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 1rem;
    }

    .footer-brand .logo {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .compare-slots {
        grid-template-columns: 1fr;
    }

    .products-table th,
    .products-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

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

.product-card {
    animation: fadeIn 0.4s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }
