/* CSS Reset & Variables */
:root {
    --primary-color: #2D5A4A;
    --primary-dark: #1E3D32;
    --primary-light: #4A8B74;
    --secondary-color: #D4A574;
    --secondary-light: #E8C9A8;
    --accent-color: #8B7355;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-light: #888888;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F6F3;
    --bg-tertiary: #EDE8E2;
    --border-color: #E0DCD6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --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;
    --container-width: 1200px;
    --header-height: 72px;
}

*, *::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;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

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

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

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

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

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

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

.btn-small {
    padding: 10px 18px;
    font-size: 14px;
}

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

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.logo-icon {
    font-size: 28px;
}

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

.nav-menu {
    display: flex;
    gap: 32px;
}

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

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: calc(var(--header-height) + 60px) 0 80px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

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

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-placeholder {
    width: 100%;
    max-width: 450px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.hero-image-placeholder svg {
    width: 100%;
    height: auto;
}

/* Features Bar */
.features-bar {
    background: var(--primary-color);
    padding: 20px 0;
}

.features-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.feature-icon {
    font-size: 20px;
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Products Section */
.products-section {
    background: var(--bg-primary);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

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

.filter-group label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.filter-group select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 140px;
}

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

.view-toggle {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.view-btn {
    padding: 10px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

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

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

.product-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

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

.product-image svg {
    width: 80%;
    height: 80%;
    opacity: 0.8;
}

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

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

.product-badge.new {
    background: #4A90D9;
}

.product-badge.sale {
    background: #D94A4A;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-light);
}

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

.stars {
    color: #FFB800;
    letter-spacing: 2px;
}

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

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

.product-price .original {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

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

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

.compare-btn {
    padding: 10px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

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

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

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

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

.products-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.products-table td {
    font-size: 14px;
}

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

.table-product-name {
    font-weight: 600;
    color: var(--primary-color);
}

.hidden {
    display: none !important;
}

/* Quiz Section */
.quiz-section {
    background: var(--bg-secondary);
}

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

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

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

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

.progress-text {
    font-size: 14px;
    color: var(--text-light);
}

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

.quiz-question h3 {
    font-size: 22px;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
}

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

.quiz-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
}

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

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(45, 90, 74, 0.1);
}

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

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

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

.quiz-results h3 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.quiz-recommendation {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    text-align: left;
}

.quiz-recommendation h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.quiz-recommendation p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.match-score {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Compare Section */
.compare-section {
    background: var(--bg-primary);
}

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

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

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

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

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

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

.plus-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

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

.slot-content h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.slot-content p {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.remove-slot {
    padding: 6px 12px;
    font-size: 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.remove-slot:hover {
    background: #D94A4A;
    border-color: #D94A4A;
    color: white;
}

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

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

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

.compare-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

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

.compare-table .highlight-best {
    background: rgba(45, 90, 74, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.product-selector-list {
    display: grid;
    gap: 12px;
}

.product-selector-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.product-selector-item:hover {
    background: var(--bg-tertiary);
}

.product-selector-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selector-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.selector-info span {
    font-size: 13px;
    color: var(--text-light);
}

.selector-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Guide Section */
.guide-section {
    background: var(--bg-secondary);
}

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

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

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

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

.guide-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.guide-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

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

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

.seo-content h2 {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.seo-content h3 {
    font-size: 22px;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

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

.seo-content ul {
    margin: 16px 0 24px 24px;
    list-style: disc;
}

.seo-content li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.seo-content strong {
    color: var(--text-primary);
}

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

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

.footer-brand .logo {
    margin-bottom: 16px;
}

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

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

.footer-links h4,
.footer-newsletter h4 {
    font-size: 16px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

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

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.newsletter-form .btn {
    padding: 12px 20px;
}

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

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.affiliate-disclosure {
    font-size: 12px !important;
    max-width: 700px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 0;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

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

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

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a {
        display: block;
        padding: 16px 0;
    }

    .hero-content h1 {
        font-size: 36px;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

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

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

    .filter-group select {
        width: 100%;
    }

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

    .section-header h2 {
        font-size: 28px;
    }

    .quiz-container {
        padding: 24px;
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .features-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

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

    section {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 28px;
    }

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

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

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

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

.toast.error {
    background: #D94A4A;
}

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