/* CSS Reset & Variables */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #e94560;
    --accent-light: #ff6b6b;
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --text-color: #333;
    --text-light: #666;
    --text-white: #fff;
    --bg-light: #f8f9fa;
    --bg-white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

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

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

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: var(--text-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

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

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

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary-color);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

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

.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(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>') repeat;
    background-size: 60px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Filters Section */
.filters-section {
    padding: 40px 20px 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 10px 12px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

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

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 180px;
}

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

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

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

/* Products Grid */
.products-section {
    padding: 20px 20px 60px;
}

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

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

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

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

.badge-premium {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary-color);
}

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

.badge-new {
    background: #4CAF50;
    color: var(--text-white);
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    font-size: 4rem;
    padding: 20px;
}

.product-info {
    padding: 1.5rem;
}

.product-brand {
    font-size: 0.875rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.product-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

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

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

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

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

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

.btn-compare {
    background: var(--bg-light);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-compare:hover,
.btn-compare.active {
    background: var(--secondary-color);
    color: var(--text-white);
    border-color: var(--secondary-color);
}

/* Products Table */
.products-table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

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

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

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

.products-table .product-name-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

/* Compare Section */
.compare-section {
    padding: 60px 20px;
    background: var(--bg-white);
}

.compare-intro {
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
}

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

.compare-slot {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compare-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-white);
    cursor: pointer;
}

.compare-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.compare-card.empty {
    border: 2px dashed var(--border-color);
    color: var(--text-light);
}

.compare-card.filled {
    border: 2px solid var(--accent-color);
    background: var(--bg-white);
}

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

.compare-card-brand {
    font-size: 0.875rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
}

.compare-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.compare-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 1rem 0;
}

.compare-table-container {
    margin-top: 2rem;
    overflow-x: auto;
}

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

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

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

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

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

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

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

.quiz-intro {
    text-align: center;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2.5rem;
    color: var(--text-color);
}

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

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    transition: width 0.3s ease;
    width: 20%;
}

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

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

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-option:hover {
    border-color: var(--accent-color);
    background: rgba(233, 69, 96, 0.05);
}

.quiz-option.selected {
    border-color: var(--accent-color);
    background: rgba(233, 69, 96, 0.1);
}

.quiz-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

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

.quiz-option.selected .quiz-option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quiz-result {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    color: var(--text-color);
}

.quiz-result-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.quiz-result h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.quiz-result-brand {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.quiz-result-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

#quiz-restart {
    margin-top: 1.5rem;
}

/* SEO Section */
.seo-section {
    padding: 80px 20px;
    background: var(--bg-light);
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
}

.seo-content h3 {
    margin-top: 2rem;
    color: var(--primary-color);
}

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

.seo-content em {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 60px 20px 20px;
}

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

.footer-brand .logo {
    color: var(--text-white);
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

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

.footer ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer ul a:hover {
    color: var(--accent-color);
}

.footer-disclaimer p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

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

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.7;
}

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

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

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .hero {
        padding: 60px 0;
    }

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

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

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

    .filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }

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

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

    .product-card {
        margin: 0 -5px;
    }

    .btn {
        padding: 12px 24px;
    }

    .quiz-container {
        padding: 1.5rem;
    }
}

/* 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(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Checkbox styling for compare */
.compare-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

/* No results state */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-results h3 {
    margin-bottom: 1rem;
    color: var(--text-light);
}
