/* ============================================
   KnifeSharpener.au - Main Stylesheet
   Modern, Clean Design for Australian Market
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --accent-light: #fbbf24;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --section-padding: 5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

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

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

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

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    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(--gray-200);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
}

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

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-600);
    transition: color var(--transition-fast);
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all var(--transition-base);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--gray-200);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

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

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

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

.btn-accent {
    background: var(--accent);
    color: var(--gray-900);
}

.btn-accent:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, var(--gray-100) 100%);
    z-index: -2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 60%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    letter-spacing: 0.025em;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

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

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.hero-scroll a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.hero-scroll a:hover {
    color: var(--primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============================================
   Section Styling
   ============================================ */
section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
}

/* ============================================
   Products Section
   ============================================ */
.products {
    background: var(--gray-50);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

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

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

.view-toggle {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.view-btn {
    padding: 0.5rem;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--gray-600);
}

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

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

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

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

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

.list-view .product-card {
    flex-direction: row;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    z-index: 1;
}

.product-badge.best-seller {
    background: var(--accent);
    color: var(--gray-900);
}

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

.product-badge.budget-pick {
    background: var(--primary);
    color: var(--white);
}

.product-image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.list-view .product-image {
    width: 250px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.product-image-placeholder {
    font-size: 4rem;
    opacity: 0.8;
}

.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rating-stars {
    color: var(--accent);
    font-size: 0.875rem;
}

.rating-count {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.product-description {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.product-price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-compare {
    padding: 0.625rem;
    color: var(--gray-500);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

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

/* ============================================
   Quiz Section
   ============================================ */
.quiz {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
}

.quiz .section-badge {
    background: var(--accent);
    color: var(--gray-900);
}

.quiz .section-title {
    color: var(--white);
}

.quiz .section-subtitle {
    color: var(--gray-400);
}

.quiz-card {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    width: 20%;
}

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

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.quiz-options {
    display: grid;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.quiz-option.selected {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--accent);
}

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

.quiz-option-text {
    flex-grow: 1;
}

.quiz-option-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.quiz-option-text span {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.quiz-navigation .btn {
    min-width: 120px;
}

/* Quiz Result */
.quiz-result {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-subtitle {
    color: var(--gray-400);
    margin-bottom: 2rem;
}

.result-product {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-product-desc {
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.result-match {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--success);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

/* ============================================
   Compare Section
   ============================================ */
.compare {
    background: var(--white);
}

.compare-selector {
    margin-bottom: 2rem;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.compare-slot {
    min-height: 200px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

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

.compare-slot.filled {
    border-style: solid;
    border-color: var(--gray-200);
    background: var(--gray-50);
}

.add-compare-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.add-compare-btn:hover {
    color: var(--primary);
}

.compare-slot-content {
    padding: 1rem;
    text-align: center;
    width: 100%;
}

.compare-slot-image {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.compare-slot-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.compare-slot-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.remove-compare-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.remove-compare-btn:hover {
    background: var(--error);
    color: var(--white);
}

/* Compare Table */
.compare-table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

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

.compare-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

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

.compare-table td {
    color: var(--gray-700);
}

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

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

/* ============================================
   Guide Section
   ============================================ */
.guide {
    background: var(--gray-50);
}

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

.guide-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

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

.guide-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.guide-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.guide-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

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

/* ============================================
   SEO Content Section
   ============================================ */
.seo-content {
    background: var(--white);
    padding: var(--section-padding) 0;
}

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

.seo-wrapper h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.seo-wrapper h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 2rem 0 1rem;
}

.seo-wrapper p {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.seo-wrapper ul,
.seo-wrapper ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-wrapper li {
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    line-height: 1.7;
    list-style: disc;
}

.seo-wrapper ol li {
    list-style: decimal;
}

.seo-wrapper em {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
}

.newsletter-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form .btn {
    background: var(--accent);
    color: var(--gray-900);
}

.newsletter-form .btn:hover {
    background: var(--accent-light);
}

@media (max-width: 480px) {
    .newsletter-form {
        flex-direction: column;
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

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

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.affiliate-disclosure {
    color: var(--gray-500);
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

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

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    color: var(--gray-500);
    transition: color var(--transition-fast);
}

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

.modal-body {
    padding: 1.5rem;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.modal-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

.modal-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-products {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-product-item:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

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

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

.modal-product-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9375rem;
}

.modal-product-price {
    font-size: 0.875rem;
    color: var(--gray-500);
}

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

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

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 4rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem;
    }

    .hero {
        min-height: auto;
        padding: 7rem 1.5rem 3rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .hero-scroll {
        display: none;
    }

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

    .quiz-card {
        padding: 1.5rem;
    }

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

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .filter-tab {
        flex-shrink: 0;
    }

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