/* ============================================
   Best Beanie Australia - Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --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 -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    color: white;
}

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

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

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--secondary);
}

.btn-accent:hover {
    transform: translateY(-2px);
    color: var(--secondary);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
}

/* 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(--border);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

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

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

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

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

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

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

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

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

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--background) 100%);
    overflow: hidden;
}

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

.hero-content {
    max-width: 560px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 20px 0 32px;
}

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

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

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

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

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

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

.beanie-showcase {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
}

.beanie-card {
    position: absolute;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: float 3s ease-in-out infinite;
}

.beanie-card.featured {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 48px;
}

.beanie-emoji {
    font-size: 6rem;
}

.beanie-card span {
    font-weight: 600;
    color: var(--text-secondary);
}

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

/* Section Styles */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-header p {
    color: var(--text-secondary);
    margin-top: 12px;
}

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

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

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

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

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
}

.view-btn {
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

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

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

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

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    position: relative;
}

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

.product-image {
    position: relative;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.product-emoji {
    font-size: 5rem;
}

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

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

.product-compare-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary);
}

.product-info {
    padding: 20px;
}

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

.product-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 8px 0;
    color: var(--text-primary);
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

.feature-tag {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: var(--background);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

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

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

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

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

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

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

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

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

.products-table .product-emoji-sm {
    font-size: 2rem;
}

.products-table .rating-stars {
    color: var(--accent);
}

/* Hidden class */
.hidden {
    display: none !important;
}

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

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

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

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

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

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

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

.quiz-question h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.quiz-question p {
    color: var(--text-secondary);
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quiz-option {
    padding: 20px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.quiz-option-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.quiz-option-text {
    font-weight: 600;
    color: var(--text-primary);
}

.quiz-option-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

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

.quiz-result h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.quiz-result-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

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

.quiz-result-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.quiz-result-match {
    display: inline-block;
    padding: 8px 16px;
    background: var(--success);
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
    margin-bottom: 16px;
}

/* Compare Section */
.compare-section {
    padding: 80px 0;
}

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

.compare-slot {
    position: relative;
}

.compare-select {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

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

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

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

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

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

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

.compare-table tbody tr:hover {
    background: var(--background);
}

.compare-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.compare-product-emoji {
    font-size: 2.5rem;
}

.compare-product-name {
    font-weight: 600;
}

.compare-check {
    color: var(--success);
}

.compare-cross {
    color: var(--error);
}

/* Guide Section */
.guide-section {
    padding: 80px 0;
    background: var(--surface);
}

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

.guide-card {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition-slow);
}

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

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

.guide-card h3 {
    margin-bottom: 16px;
    color: var(--primary);
}

.guide-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.guide-card p:last-child {
    margin-bottom: 0;
}

.guide-card strong {
    color: var(--text-primary);
}

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
}

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

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

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

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

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

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

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

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

.footer-brand .logo .highlight {
    color: var(--primary-light);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.footer-column h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 6px 0;
    transition: var(--transition);
}

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

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

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

.affiliate-disclosure {
    font-size: 0.75rem !important;
    max-width: 600px;
    margin: 0 auto;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

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

    .hero-content {
        max-width: 100%;
    }

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

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

    .hero-visual {
        display: none;
    }

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

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav.active {
        display: flex;
    }

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

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

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

    .quiz-options {
        grid-template-columns: 1fr;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

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

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }

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

    .quiz-container {
        padding: 24px;
    }

    .guide-card {
        padding: 24px;
    }
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

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

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

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
