/* ================================
   BestVacuum.au - Modern CSS
   ================================ */

/* CSS Variables */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F59E0B;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-gray: #F3F4F6;
    --border: #E5E7EB;
    --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.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul {
    list-style: none;
}

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

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

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

.section-subtitle {
    text-align: center;
    color: var(--text-medium);
    font-size: 1.125rem;
    margin-bottom: 48px;
}

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

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

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

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-dark);
}

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

.btn-buy {
    background: var(--secondary);
    color: white;
    width: 100%;
    padding: 12px 20px;
}

.btn-buy:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-buy-small {
    display: inline-block;
    padding: 8px 16px;
    background: var(--secondary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-buy-small:hover {
    background: var(--secondary-dark);
}

.btn-compare {
    width: 100%;
    padding: 10px 16px;
    margin-top: 8px;
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-medium);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    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;
}

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

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

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

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

.nav-list 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 {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

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

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    margin-bottom: 24px;
}

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

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

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

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

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

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

.hero-image {
    display: flex;
    justify-content: center;
}

.vacuum-showcase {
    position: relative;
}

.vacuum-card-hero {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    transform: rotate(3deg);
    transition: var(--transition);
}

.vacuum-card-hero:hover {
    transform: rotate(0deg) scale(1.05);
}

.badge-top {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.vacuum-icon {
    font-size: 6rem;
    margin-bottom: 16px;
}

.vacuum-card-hero h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.vacuum-card-hero p {
    color: var(--text-medium);
}

/* Categories Section */
.categories {
    padding: 80px 0;
    background: var(--bg-white);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.category-card {
    background: var(--bg-light);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.category-card h3 {
    margin-bottom: 8px;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

.filter-bar {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

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

.filter-group label {
    font-weight: 500;
    color: var(--text-medium);
}

.filter-group select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

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

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

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

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

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

.best-overall { background: var(--primary); color: white; }
.best-value { background: var(--secondary); color: white; }
.best-robot { background: #8B5CF6; color: white; }
.best-barrel { background: #EC4899; color: white; }
.best-pets { background: #F59E0B; color: white; }
.budget-pick { background: #06B6D4; color: white; }
.best-handheld { background: #6366F1; color: white; }

.product-image {
    background: var(--bg-light);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-content {
    padding: 24px;
}

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

.product-name {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

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

.rating-value {
    font-weight: 700;
    color: var(--text-dark);
}

.review-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.product-features {
    margin-bottom: 20px;
}

.product-features li {
    font-size: 0.875rem;
    color: var(--text-medium);
    padding: 4px 0;
}

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

.price-current {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-left: 4px;
}

/* Comparison Section */
.comparison {
    padding: 80px 0;
    background: var(--bg-white);
}

.comparison-controls {
    margin-bottom: 32px;
}

.selected-products {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.selected-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50px;
    font-weight: 500;
}

.remove-product {
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.empty-state {
    color: var(--text-light);
    font-style: italic;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-bottom: 48px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

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

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

.comparison-table tr:hover td {
    background: var(--bg-light);
}

.comparison-table.preset th {
    text-align: center;
}

.comparison-table.preset td {
    text-align: center;
}

.comparison-table.preset td:first-child {
    text-align: left;
    font-weight: 500;
}

.cta-row td {
    padding-top: 24px;
    border-bottom: none;
}

.preset-comparison {
    margin-top: 64px;
}

.preset-comparison h3 {
    text-align: center;
    margin-bottom: 24px;
}

.table-responsive {
    overflow-x: auto;
}

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

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

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

.quiz-header h2 {
    margin-bottom: 8px;
}

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

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

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

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

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

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.quiz-options {
    display: grid;
    gap: 16px;
}

.quiz-option {
    cursor: pointer;
}

.quiz-option input {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.quiz-option input:checked + .option-content {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

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

.option-icon {
    font-size: 2rem;
}

.option-text {
    font-weight: 600;
    flex-grow: 1;
}

.option-desc {
    display: block;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--text-light);
}

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

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

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

.quiz-results h3 {
    margin-bottom: 24px;
}

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

.result-card .product-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.result-card h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.result-card .result-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.result-card p {
    color: var(--text-medium);
    margin-bottom: 20px;
}

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

.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 64px;
}

.guide-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

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

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

.guide-card p {
    color: var(--text-medium);
    font-size: 0.9375rem;
    margin-bottom: 16px;
}

.guide-card ul {
    font-size: 0.875rem;
}

.guide-card li {
    padding: 6px 0;
    color: var(--text-medium);
}

.guide-tips {
    background: white;
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.guide-tips h3 {
    text-align: center;
    margin-bottom: 32px;
}

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

.tip {
    display: flex;
    gap: 20px;
}

.tip-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
}

.tip-content h4 {
    margin-bottom: 8px;
}

.tip-content p {
    color: var(--text-medium);
    font-size: 0.9375rem;
}

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

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

.seo-text {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-medium);
}

.seo-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

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

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

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

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

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

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

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

.footer-links a {
    display: block;
    padding: 6px 0;
    color: var(--text-light);
    font-size: 0.9375rem;
    transition: var(--transition);
}

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

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

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

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

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

    .hero-subtitle {
        margin: 0 auto 32px;
    }

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

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

    .hero-image {
        display: none;
    }

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

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

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

@media (max-width: 768px) {
    .nav {
        display: none;
    }

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

    .nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 24px;
        box-shadow: var(--shadow-lg);
    }

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

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

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

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

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

    .filter-bar {
        flex-direction: column;
    }

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

    .quiz-container {
        padding: 24px;
    }

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

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

    .guide-tips {
        padding: 24px;
    }

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

    .comparison-table {
        font-size: 0.8125rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
    }
}

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

    h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 12px 20px;
    }

    .quiz-navigation {
        flex-direction: column;
    }

    .quiz-navigation .btn {
        width: 100%;
    }
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .quiz,
    .footer,
    .filter-bar,
    .product-actions {
        display: none;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
