/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --danger: #ef4444;
    --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: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --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;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
}

/* 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;
    gap: 8px;
}

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

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

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

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

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

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 16px 0;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--dark);
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

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

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

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--light);
}

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

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

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

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

/* Categories */
.categories {
    padding: 60px 0;
    margin-top: -40px;
}

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

.category-card {
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.category-card.active {
    background: var(--primary);
    color: var(--white);
}

.category-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

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

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

.category-card.active p {
    color: var(--primary-light);
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

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

.view-btn {
    padding: 10px 14px;
    background: var(--light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

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

/* Filters */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

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

.filter-group select {
    padding: 10px 16px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

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

.product-card {
    background: var(--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: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-bestseller {
    background: var(--accent);
    color: var(--white);
}

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

.badge-sale {
    background: var(--danger);
    color: var(--white);
}

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

.product-content {
    padding: 20px;
}

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

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-category {
    display: inline-block;
    padding: 4px 10px;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 12px;
}

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

.spec {
    font-size: 0.75rem;
    color: var(--gray);
}

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

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

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

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

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.product-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.875rem;
}

.compare-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--gray);
    cursor: pointer;
}

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

/* Product Table */
.product-table-container {
    overflow-x: auto;
}

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

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

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

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

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

.table-product-icon {
    font-size: 1.5rem;
}

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

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

.section-subtitle {
    color: var(--primary-light);
    margin-bottom: 40px;
}

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

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

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

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

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

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

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

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

.quiz-option {
    padding: 16px 20px;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 1rem;
}

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

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

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

.quiz-result h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

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

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

.quiz-result-reason {
    color: var(--gray);
    margin-bottom: 16px;
}

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

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

.compare-selector {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.compare-slot {
    position: relative;
}

.compare-select {
    padding: 14px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    min-width: 250px;
    background: var(--white);
    cursor: pointer;
}

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

.compare-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

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

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: left;
}

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

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

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

.compare-table .feature-name {
    font-weight: 600;
    background: var(--light);
}

.compare-table .highlight {
    background: rgba(99, 102, 241, 0.1);
}

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

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

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

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

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

.seo-article p {
    color: var(--gray);
    margin-bottom: 12px;
    font-size: 0.9375rem;
}

.seo-article p:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 60px 0 30px;
}

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

.footer-about p {
    margin-top: 16px;
    font-size: 0.875rem;
}

.footer-about .logo {
    color: var(--white);
}

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

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--dark-light);
    text-align: center;
    font-size: 0.875rem;
}

.affiliate-disclosure {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 1024px) {
    .category-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;
    }

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

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

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

    .category-card {
        padding: 20px 15px;
    }

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

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

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .compare-selector {
        flex-direction: column;
        align-items: center;
    }

    .compare-select {
        min-width: 100%;
    }

    .quiz-container {
        padding: 24px;
    }

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

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

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

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

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

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

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

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

.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; }

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

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

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

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