/* ============================================
   Carpet Cleaner AU - Styles
   Modern, responsive design for Australian market
   ============================================ */

/* CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --danger: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    --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: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
    --font-sans: '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-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

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 20px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    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(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

.btn-amazon {
    background: #ff9900;
    color: #111;
    font-weight: 700;
}

.btn-amazon:hover {
    background: #e88b00;
    color: #111;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

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

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

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

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

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

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

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

.nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
}

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

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

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

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 50%, #f0fdf4 100%);
    text-align: center;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
}

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

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

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

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

/* Filter Section */
.filter-section {
    padding: 40px 0 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.filter-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.filter-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.filter-group select {
    padding: 10px 36px 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 140px;
}

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

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

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

.view-btn:hover {
    background: var(--border);
}

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

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

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

/* Product Card */
.product-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 1;
}

.product-badge.bestseller {
    background: var(--accent);
    color: #111;
}

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

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

.product-image {
    position: relative;
    padding: 20px;
    background: var(--bg-tertiary);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    border-radius: var(--radius);
}

.product-image-placeholder span {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.product-compare-check {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.product-compare-check:hover {
    background: white;
}

.product-compare-check input {
    cursor: pointer;
}

.product-content {
    padding: 20px;
}

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

.product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

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

.product-feature {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

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

.product-stars {
    color: var(--accent);
    font-size: 14px;
    letter-spacing: 1px;
}

.product-rating-value {
    font-weight: 600;
    font-size: 14px;
}

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

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.product-price-currency {
    font-size: 16px;
}

/* Products Table */
.products-table-wrapper {
    overflow-x: auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.products-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

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

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

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

.table-product-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.table-product-info h4 {
    font-weight: 600;
    margin-bottom: 2px;
}

.table-product-info span {
    font-size: 12px;
    color: var(--primary);
}

.table-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.table-price {
    font-weight: 700;
    font-size: 16px;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
}

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

.quiz-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

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

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

.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: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 20%;
}

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

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

.quiz-question h3 {
    font-size: 22px;
    margin-bottom: 24px;
}

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

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

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

.quiz-option.selected {
    border-color: var(--primary);
    background: #eef4ff;
}

.quiz-option input {
    display: none;
}

.quiz-option-radio {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

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

.quiz-option.selected .quiz-option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

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

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

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

.quiz-result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

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

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

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

.quiz-result-product h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

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

.quiz-result-product .product-price {
    margin-bottom: 16px;
}

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

.compare-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 12px;
}

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

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

.compare-slot {
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.compare-slot.has-product {
    border-style: solid;
    border-color: var(--primary);
}

.compare-select {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    cursor: pointer;
}

.compare-product-preview {
    margin-top: 16px;
    text-align: center;
}

.compare-product-preview .preview-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.compare-product-preview h4 {
    font-size: 14px;
    font-weight: 600;
}

.compare-product-preview .preview-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
    margin-top: 4px;
}

/* Compare Table */
.compare-table-wrapper {
    overflow-x: auto;
    background: var(--bg-primary);
    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 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

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

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
}

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

.compare-check {
    color: var(--secondary);
    font-size: 20px;
}

.compare-cross {
    color: var(--text-light);
    font-size: 20px;
}

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

.guide-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 48px;
}

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

.guide-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

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

.guide-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

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

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.seo-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
}

.seo-content p {
    margin-bottom: 20px;
}

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

.seo-content ul {
    margin-bottom: 20px;
    padding-left: 24px;
}

.seo-content li {
    margin-bottom: 12px;
}

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

.seo-content a {
    color: var(--primary);
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #111827;
    color: #e5e7eb;
    padding: 60px 0 24px;
}

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

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

.footer-brand p {
    color: #9ca3af;
    font-size: 14px;
}

.footer-links h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: white;
}

.footer-links a {
    display: block;
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
}

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

.footer-disclaimer h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: white;
}

.footer-disclaimer p {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.7;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #374151;
    text-align: center;
}

.footer-bottom p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .nav.active {
        display: flex;
    }

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

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

    .hero-stats {
        gap: 40px;
    }

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

    .filter-group {
        width: 100%;
    }

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

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

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

    .quiz-container {
        padding: 24px;
    }

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

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

    .quiz-nav .btn {
        max-width: 100%;
    }
}

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

.product-card {
    animation: fadeIn 0.4s ease-out;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }
.product-card:nth-child(7) { animation-delay: 0.6s; }
.product-card:nth-child(8) { animation-delay: 0.7s; }

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}
