/* CSS Variables */
:root {
    --primary-color: #e63946;
    --primary-dark: #c1121f;
    --secondary-color: #1d3557;
    --accent-color: #457b9d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s 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(--text-dark);
    background-color: var(--white);
}

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

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
    color: var(--white);
}

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

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

.btn-amazon {
    background: linear-gradient(135deg, #ff9900, #e88b00);
    color: var(--text-dark);
    font-weight: 700;
}

.btn-amazon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
    color: var(--text-dark);
}

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

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

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

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

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

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link: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 {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

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

.hero h1 {
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

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

.hero-trust {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.trust-icon {
    color: var(--success-color);
    font-weight: bold;
}

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

.section-header p {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 1.1rem;
}

/* Products Section */
.products-section {
    padding: 80px 0;
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--light-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

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

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

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

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

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

.product-badge.bestseller {
    background: var(--success-color);
}

.product-badge.budget {
    background: var(--accent-color);
}

.product-image {
    position: relative;
    padding: 20px;
    background: var(--light-bg);
    text-align: center;
}

.product-image img {
    max-width: 200px;
    height: 200px;
    object-fit: contain;
}

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

.product-brand {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

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

.stars {
    color: #ffc107;
    font-size: 1rem;
}

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

.product-features {
    list-style: none;
    margin-bottom: 16px;
    flex-grow: 1;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.product-features li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

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

.product-price .from {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

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

.product-actions .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.9rem;
}

/* Products Table */
.products-table-container {
    overflow-x: auto;
}

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

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

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

.products-table tbody tr:hover {
    background: var(--light-bg);
}

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

.products-table .product-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: var(--light-bg);
    border-radius: var(--radius-sm);
    padding: 5px;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--secondary-color), #2a4a6b);
    color: var(--white);
}

.quiz-section .section-header h2,
.quiz-section .section-header p {
    color: var(--white);
}

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

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

.progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    width: 20%;
    transition: width 0.4s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.quiz-question h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--secondary-color);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px 24px;
    background: var(--light-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 1rem;
    color: var(--text-dark);
}

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

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(230, 57, 70, 0.1);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: 16px;
}

.quiz-nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.quiz-nav-btn.prev {
    background: var(--light-bg);
    color: var(--text-dark);
}

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

.quiz-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.quiz-result h3 {
    color: var(--secondary-color);
    margin-bottom: 24px;
}

.result-product {
    background: var(--light-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.result-product img {
    max-width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 16px;
}

.result-product h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.result-reasons {
    text-align: left;
    margin: 16px 0;
    padding-left: 20px;
}

.result-reasons li {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.quiz-restart {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
}

.quiz-restart:hover {
    text-decoration: underline;
}

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

.compare-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.compare-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

.compare-table-container {
    overflow-x: auto;
}

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

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

.compare-table th {
    background: var(--light-bg);
    font-weight: 600;
    text-align: left;
}

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

.compare-table .product-header {
    padding: 20px;
    background: var(--white);
}

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

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

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

/* Guide Section */
.guide-section {
    padding: 80px 0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.guide-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.guide-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.guide-card h3 {
    margin-bottom: 12px;
}

.guide-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

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

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

.seo-content h2 {
    text-align: center;
    margin-bottom: 32px;
}

.seo-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
}

.seo-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

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

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

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
}

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

.footer-column h4 {
    color: var(--white);
    margin-bottom: 16px;
}

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

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

.footer-column a {
    color: rgba(255,255,255,0.7);
}

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

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

.affiliate-disclosure {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 20px;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .hero {
        padding: 120px 0 60px;
    }

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

    .hero-trust {
        flex-direction: column;
        gap: 12px;
    }

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

    .quiz-container {
        padding: 24px;
    }

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

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .btn {
        width: 100%;
    }

    .product-actions {
        flex-direction: column;
    }

    .quiz-navigation {
        flex-direction: column;
    }
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Compare Checkbox for Products */
.compare-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.compare-checkbox-wrapper input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.compare-checkbox-wrapper label {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Placeholder Image */
.placeholder-img {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: var(--radius-md);
}
