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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0891b2;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --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;
    --transition: 0.2s ease;
}

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: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

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

.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-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

.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;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.logo-text {
    color: var(--gray-900);
}

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

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

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

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

.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: all var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}

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

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

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdfa 100%);
    margin-top: 70px;
}

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

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gray-900), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.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: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

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

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header p {
    color: var(--gray-500);
    margin-top: 0.75rem;
    font-size: 1.125rem;
}

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

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

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

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    transition: width 0.3s ease;
    width: 20%;
}

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

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

.quiz-question h3 {
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

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

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

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

.quiz-option.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.quiz-option input {
    display: none;
}

.quiz-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quiz-option.selected .quiz-option-radio {
    border-color: var(--primary);
}

.quiz-option.selected .quiz-option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

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

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

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

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

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

.hidden {
    display: none !important;
}

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

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    align-items: center;
}

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

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

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

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.view-toggle {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-500);
    transition: all var(--transition);
}

.view-btn:hover {
    background: var(--gray-200);
}

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

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

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

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

.product-image {
    aspect-ratio: 4/3;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

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

.product-badge.popular {
    background: var(--warning);
}

.product-content {
    padding: 1.5rem;
}

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

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

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

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

.product-energy {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.energy-star {
    color: var(--success);
}

.energy-star.inactive {
    color: var(--gray-300);
}

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

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

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

.product-actions .btn {
    flex: 1;
}

.btn-compare {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-compare:hover {
    background: var(--gray-200);
}

.btn-compare.added {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

/* 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 tr:hover {
    background: var(--gray-50);
}

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

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

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

.compare-container {
    max-width: 1000px;
    margin: 0 auto;
}

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

.compare-slot {
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

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

.compare-slot.filled {
    border: 2px solid var(--gray-200);
    border-style: solid;
    cursor: default;
    flex-direction: column;
    padding: 1.5rem;
}

.compare-slot.filled:hover {
    background: var(--gray-50);
}

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

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

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

.compare-slot-image {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.compare-slot-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.compare-slot-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.remove-compare {
    padding: 0.5rem 1rem;
    background: var(--gray-200);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-600);
    cursor: pointer;
    font-size: 0.875rem;
}

.remove-compare:hover {
    background: var(--error);
    color: var(--white);
}

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

.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;
    text-align: left;
    min-width: 150px;
}

.compare-table td {
    min-width: 200px;
}

.compare-table tr:nth-child(even) {
    background: var(--gray-50);
}

#clearCompare {
    display: block;
    margin: 2rem auto 0;
}

@media (max-width: 768px) {
    .compare-slots {
        grid-template-columns: 1fr;
    }
}

/* 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);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
}

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

.modal-content h3 {
    margin-bottom: 1.5rem;
}

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

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

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

.modal-product-icon {
    font-size: 2rem;
}

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

.modal-product-name {
    font-weight: 600;
    color: var(--gray-800);
}

.modal-product-price {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

/* SEO Content Section */
.seo-content {
    padding: 5rem 0;
    background: var(--gray-50);
}

.seo-content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.seo-content h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.seo-article {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

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

.seo-article p:last-child {
    margin-bottom: 0;
}

.seo-summary {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.seo-summary h3 {
    margin-bottom: 1rem;
}

.seo-summary p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.seo-summary p:last-child {
    margin-bottom: 0;
}

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

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

.footer-brand p {
    margin-top: 1rem;
    color: var(--gray-400);
}

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

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

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

.footer-column a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color var(--transition);
}

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

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

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

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 4rem;
    }

    .hero-stats {
        gap: 2rem;
    }

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

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        margin-left: 0;
        justify-content: center;
    }

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

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

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

.product-card {
    animation: fadeIn 0.3s 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; }

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--gray-800);
    color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

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