/* ==========================================
   CheapLaptop.au - Main Stylesheet
   Modern, responsive design for Australian market
   ========================================== */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --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 -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

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

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

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

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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.nav {
    display: flex;
    align-items: center;
    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);
}

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

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 12px 0;
        width: 100%;
    }

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

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

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

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

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 32px;
    }
}

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

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

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.products-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--radius);
}

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

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

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: transparent;
    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(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

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

.product-badge.best-value {
    background: var(--secondary);
    color: white;
}

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

.product-image {
    height: 200px;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-size: 4rem;
}

.product-content {
    padding: 20px;
}

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

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

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

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

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

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

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

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

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

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

.compare-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
}

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

/* Products Table */
.products-table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

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

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

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

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

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

.products-table .product-name {
    font-weight: 500;
}

.products-table .product-brand-small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.products-table .price {
    font-weight: 600;
    color: var(--primary);
}

.hidden {
    display: none !important;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.quiz-section .section-header h2 {
    color: white;
}

.quiz-section .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 40px;
    backdrop-filter: blur(10px);
}

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

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-light);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.quiz-question h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

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

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

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

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

.quiz-option-text {
    font-weight: 500;
}

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

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

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

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

.quiz-result-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.quiz-result-card {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    padding: 24px;
    border-radius: var(--radius);
    text-align: left;
    display: flex;
    gap: 16px;
    align-items: center;
}

.quiz-result-emoji {
    font-size: 3rem;
}

.quiz-result-info h4 {
    margin-bottom: 4px;
}

.quiz-result-info .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.quiz-result-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

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

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

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

.compare-slot {
    position: relative;
}

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

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

.compare-clear {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--text-muted);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.compare-clear:hover {
    background: #ef4444;
}

.compare-table-container {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

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

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

.compare-table th {
    background: var(--background);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.compare-table th:first-child {
    text-align: left;
}

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

.compare-table .product-header {
    background: var(--surface);
    vertical-align: top;
}

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

.compare-table .product-header-emoji {
    font-size: 3rem;
}

.compare-table .product-header-name {
    font-weight: 600;
    font-size: 1rem;
}

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

.compare-table .highlight-cell {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
    font-weight: 600;
}

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

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

.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

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

.seo-block {
    padding: 24px;
    background: var(--background);
    border-radius: var(--radius);
}

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

.seo-block p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.seo-summary {
    padding: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    color: white;
}

.seo-summary p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 24px;
}

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

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

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

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

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

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

@media (max-width: 600px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.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: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.affiliate-disclosure {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

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

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

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
