/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #f97316;
    --secondary-dark: #ea580c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --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, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

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

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

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

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-900);
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: var(--transition);
}

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

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    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);
}

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

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

.btn-amazon {
    background: #ff9900;
    color: var(--gray-900);
}

.btn-amazon:hover {
    background: #e68a00;
}

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

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: var(--white);
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: var(--secondary);
}

.hero .btn-primary:hover {
    background: var(--secondary-dark);
}

.hero .btn-secondary {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

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

/* Stats Section */
.stats {
    padding: 3rem 0;
    background: var(--white);
    margin-top: -2rem;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

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

/* Section Styles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
}

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

.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

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

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

.quiz-question {
    margin-bottom: 1.5rem;
}

.quiz-question h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

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

.quiz-option input {
    margin-right: 0.75rem;
    accent-color: var(--primary);
}

.quiz-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.quiz-result {
    text-align: center;
}

.quiz-result h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--success);
}

.quiz-result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
}

.quiz-result-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.quiz-result-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

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

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

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

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    color: var(--gray-700);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

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

.view-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover,
.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);
}

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

.product-image {
    position: relative;
    height: 200px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

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

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

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

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

.product-content {
    padding: 1.25rem;
}

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

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-stars {
    color: var(--warning);
    font-size: 0.875rem;
}

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

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.product-price span {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 400;
}

.product-features {
    margin-bottom: 1rem;
}

.product-features li {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
    list-style: none;
    padding-left: 1rem;
    position: relative;
}

.product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-size: 0.75rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    font-size: 0.875rem;
}

/* 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);
    font-size: 0.875rem;
    white-space: nowrap;
}

.products-table td {
    font-size: 0.875rem;
    color: var(--gray-600);
}

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

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

.products-table .product-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.table-compare-btn {
    width: 32px;
    height: 32px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

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

/* Compare Section */
.compare-section {
    padding: 5rem 0;
    background: var(--white);
}

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

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

.compare-slot.empty {
    cursor: pointer;
}

.compare-slot.empty:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.compare-slot-text {
    color: var(--gray-400);
    font-weight: 500;
}

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

.compare-slot-product {
    width: 100%;
}

.compare-slot-product img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.compare-slot-product h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.compare-slot-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.compare-slot-remove:hover {
    color: var(--danger);
}

.compare-table-container {
    overflow-x: auto;
    margin-top: 2rem;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.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 td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--gray-50);
}

.compare-table .compare-product-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.compare-table .compare-product-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.clear-compare {
    margin-top: 1.5rem;
}

/* SEO Section */
.seo-section {
    padding: 4rem 0;
    background: var(--gray-100);
}

.seo-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.seo-content {
    max-width: 900px;
}

.seo-content p {
    margin-bottom: 1rem;
    color: var(--gray-700);
    line-height: 1.8;
}

.seo-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-800);
}

.seo-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

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

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

.footer-brand .logo-icon {
    font-size: 2rem;
}

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

.footer-tagline {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

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

.footer-column h4 {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

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

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

.affiliate-disclosure {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    font-size: 1.25rem;
    color: var(--gray-800);
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

/* Compare Toast */
.compare-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    transition: transform 0.3s ease;
}

.compare-toast.show {
    transform: translateX(-50%) translateY(0);
}

.compare-toast-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

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

    .hero {
        padding: 7rem 0 3rem;
    }

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

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

    .section-title {
        font-size: 1.5rem;
    }

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

    .filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
    }

    .filter-buttons {
        width: 100%;
    }

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

    .compare-table {
        font-size: 0.75rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.75rem 0.5rem;
    }
}

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

    .hero-buttons .btn {
        width: 100%;
    }

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

    .stat-number {
        font-size: 1.75rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        padding: 1.5rem;
    }
}

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

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

/* Print Styles */
@media print {
    .header,
    .quiz-section,
    .compare-section,
    .footer,
    .btn {
        display: none !important;
    }

    .hero {
        background: none;
        color: var(--gray-900);
        padding: 2rem 0;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
