/* ===== CSS Variables ===== */
:root {
    --primary-red: #C41E3A;
    --primary-red-dark: #9B1B30;
    --primary-gold: #D4AF37;
    --primary-gold-light: #F4E4BA;
    --bg-cream: #FDF8F3;
    --bg-white: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-medium: #4A4A4A;
    --text-light: #6B6B6B;
    --border-color: #E5E5E5;
    --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: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-family: 'Noto Serif', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

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

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

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

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-dark);
}

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

.logo-text {
    font-family: 'Noto Serif', serif;
    font-size: 1.25rem;
    font-weight: 700;
}

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

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

.nav-list a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    transition: var(--transition);
}

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

.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(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--primary-gold-light) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

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

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

.hero-content .highlight {
    color: var(--primary-red);
    position: relative;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.hero-emoji-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.float-emoji {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ===== Categories & Filters ===== */
.categories {
    padding: 60px 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 32px;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

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

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

/* ===== Products Grid ===== */
.products-section {
    padding: 20px 0 60px;
}

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

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-gold));
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover::before {
    opacity: 1;
}

.product-emoji {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
    text-align: center;
}

.product-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-gold-light);
    color: var(--primary-red-dark);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

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

.product-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--primary-gold);
}

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

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

.btn-compare {
    background: var(--bg-cream);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 0.875rem;
}

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

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

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

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    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(--primary-red);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

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

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

.products-table .product-name-cell span:first-child {
    font-size: 1.5rem;
}

.table-compare-btn {
    padding: 6px 12px;
    background: var(--bg-cream);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.table-compare-btn:hover {
    background: var(--primary-gold-light);
}

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

/* ===== Quiz Section ===== */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
}

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

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

.quiz-header h2 {
    color: var(--text-dark);
    margin-bottom: 12px;
}

.quiz-header p {
    color: var(--text-light);
}

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

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

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

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

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

.quiz-question h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

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

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

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

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

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

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

.quiz-results h3 {
    margin-bottom: 24px;
    color: var(--text-dark);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.result-card {
    background: var(--bg-cream);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.result-card .product-emoji {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.result-card .product-name {
    font-size: 1rem;
    margin-bottom: 12px;
}

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

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

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

.compare-slot:hover {
    border-color: var(--primary-red);
}

.compare-slot.filled {
    border-style: solid;
    border-color: var(--primary-gold);
    background: var(--bg-white);
    cursor: default;
}

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

.compare-slot .product-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.compare-slot .product-name {
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 12px;
}

.compare-slot .remove-btn {
    padding: 6px 12px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.compare-slot .remove-btn:hover {
    background: var(--primary-red-dark);
}

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

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-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(--bg-cream);
    font-weight: 600;
}

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

.compare-table tr:last-child td {
    border-bottom: none;
}

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

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

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

.seo-content h2 {
    color: var(--primary-red);
    margin-bottom: 24px;
    text-align: center;
}

.seo-content h3 {
    color: var(--text-dark);
    margin: 32px 0 16px;
}

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

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

.footer-content {
    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: 0.9rem;
}

.footer-links h4,
.footer-info h4 {
    color: var(--primary-gold);
    margin-bottom: 16px;
    font-size: 1rem;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.6;
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

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

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

.modal-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.modal-product-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-cream);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

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

.modal-product-btn span:first-child {
    font-size: 1.5rem;
}

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

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

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

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

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

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

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

    .nav.active {
        display: block;
    }

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

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

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-emoji-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .float-emoji {
        font-size: 2.5rem;
    }

    .quiz-container {
        padding: 24px;
    }

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

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

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

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

    .category-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

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

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

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