/* CSS Variables */
:root {
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: #22d3ee;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --accent: #10b981;
    --sand: #fef3c7;
    --sand-dark: #fde68a;
    --ocean-light: #e0f2fe;
    --ocean: #0ea5e9;
    --ocean-dark: #0369a1;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-800: #1e293b;
    --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-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

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

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

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--ocean) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.25rem;
    font-weight: 600;
}

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

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

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

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

.nav-links a {
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    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;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--ocean-light) 0%, var(--sand) 50%, var(--sand-dark) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

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

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 20px;
    color: var(--gray-800);
}

.hero .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--ocean) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    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(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

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

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 12px;
    color: var(--gray-800);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Products Section */
.products-section {
    padding: 80px 0;
    background: var(--white);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

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

.filter-group label {
    font-weight: 500;
    color: var(--text-light);
}

.filter-group select {
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    font-family: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
    min-width: 160px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.view-toggle {
    display: flex;
    gap: 4px;
    margin-left: auto;
    background: var(--white);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.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: 24px;
}

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

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

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

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-popular {
    background: var(--secondary);
    color: var(--white);
}

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

.badge-sale {
    background: #ef4444;
    color: var(--white);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
    font-family: 'Poppins', sans-serif;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: var(--secondary);
}

.rating-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.feature-tag {
    padding: 4px 10px;
    background: var(--ocean-light);
    color: var(--ocean-dark);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
    margin-top: auto;
}

.product-price .currency {
    font-size: 1rem;
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 8px;
}

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

.btn-compare {
    background: var(--gray-100);
    color: var(--text);
    padding: 10px 12px;
    flex: 0 0 auto;
}

.btn-compare:hover,
.btn-compare.active {
    background: var(--accent);
    color: var(--white);
}

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

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

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

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

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

.table-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.table-product-name {
    font-weight: 500;
}

.table-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 200px;
}

.table-features .feature-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--ocean-light) 0%, var(--sand) 100%);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.quiz-header {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--ocean) 100%);
    color: var(--white);
}

.quiz-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.quiz-header p {
    opacity: 0.9;
}

.quiz-start,
.quiz-questions,
.quiz-results {
    padding: 40px;
}

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

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

.quiz-intro h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.quiz-intro p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.quiz-progress {
    margin-bottom: 32px;
}

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

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

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

.quiz-question {
    animation: fadeIn 0.3s ease;
}

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

.quiz-question h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.quiz-options {
    display: grid;
    gap: 12px;
}

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

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

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

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

.option-text {
    font-weight: 500;
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
}

.result-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.result-header h3 {
    font-size: 1.5rem;
}

.result-products {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.result-product {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.result-product-icon {
    font-size: 2.5rem;
}

.result-product-info {
    flex-grow: 1;
}

.result-product-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.result-product-match {
    font-size: 0.875rem;
    color: var(--accent);
}

#retakeQuizBtn {
    display: block;
    margin: 0 auto;
}

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

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

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

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

.compare-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    cursor: default;
    padding: 16px;
}

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

.slot-placeholder {
    color: var(--text-light);
    font-weight: 500;
}

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

.slot-product-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.slot-product-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.slot-remove {
    background: #ef4444;
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.slot-remove:hover {
    background: #dc2626;
}

.compare-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}

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

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

.compare-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--ocean) 100%);
    color: var(--white);
    font-weight: 600;
}

.compare-table th:first-child {
    text-align: left;
    background: var(--gray-100);
    color: var(--text);
}

.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--gray-50);
}

.compare-table .check {
    color: var(--accent);
    font-size: 1.25rem;
}

.compare-table .cross {
    color: var(--text-lighter);
    font-size: 1.25rem;
}

.compare-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

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

.modal-content h3 {
    margin-bottom: 24px;
    text-align: center;
}

.modal-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.modal-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.modal-product:hover {
    border-color: var(--primary);
    background: var(--ocean-light);
}

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

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

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: var(--white);
}

.seo-content h2 {
    text-align: center;
    margin-bottom: 48px;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.seo-article {
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.seo-article h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

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

.seo-cta {
    text-align: center;
    padding: 48px;
    background: linear-gradient(135deg, var(--ocean-light) 0%, var(--sand) 100%);
    border-radius: var(--radius-lg);
}

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

.seo-cta p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 24px;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-brand p {
    color: var(--text-lighter);
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-lighter);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-lighter);
    margin-bottom: 8px;
}

.affiliate-disclosure {
    font-size: 0.75rem !important;
    opacity: 0.7;
}

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

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

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

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

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--gray-200);
    }

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

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-stats {
        gap: 24px;
    }

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

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

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

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

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

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

    .quiz-container {
        margin: 0 -20px;
        border-radius: 0;
    }
}
