/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f472b6;
    --secondary-dark: #ec4899;
    --accent: #fbbf24;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border: #e2e8f0;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --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 -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

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

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

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

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

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

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

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

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

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

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

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    display: none;
    font-size: 0.75rem;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .logo-tagline {
        display: block;
    }
}

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

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

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

.nav a: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);
    transition: var(--transition);
}

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

    .nav.active {
        display: block;
    }

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

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

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

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

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.hero-card {
    background: white;
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

.hero-emoji {
    font-size: 6rem;
    display: block;
    margin-bottom: 16px;
}

.hero-card p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-content p {
        max-width: 100%;
    }

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

    .hero-visual {
        order: -1;
    }

    .hero-card {
        padding: 40px;
    }

    .hero-emoji {
        font-size: 4rem;
    }
}

/* Features Bar */
.features-bar {
    background: white;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.features-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-light);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Section Titles */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter Section */
.filter-section {
    padding: 60px 0 30px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

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

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

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

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

.view-btn {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn svg {
    fill: var(--text-light);
}

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

.view-btn.active svg, .view-btn:hover svg {
    fill: white;
}

/* Products Section */
.products-section {
    padding: 30px 0 60px;
}

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

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

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

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #f0f4ff, #fce7f3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.product-badge.new {
    background: var(--success);
}

.product-content {
    padding: 20px;
}

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

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

.product-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

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

.product-tag {
    background: var(--background);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-light);
}

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

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

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

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

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

.compare-btn {
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px !important;
    flex: 0 !important;
}

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

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

/* Products Table */
.products-table-wrapper {
    overflow-x: auto;
}

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

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

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

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

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

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

.table-compare-btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.quiz-progress {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 32px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.quiz-step h3 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 32px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.quiz-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: center;
}

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

.quiz-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(244, 114, 182, 0.1));
}

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

.quiz-option span:not(.option-icon) {
    font-weight: 600;
}

.quiz-option small {
    font-size: 0.75rem;
    color: var(--text-light);
}

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

.quiz-results h3 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.results-content {
    margin-bottom: 32px;
}

.result-product {
    background: var(--background);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.result-product .product-emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

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

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

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

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

.compare-slot {
    min-height: 300px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.slot-placeholder {
    text-align: center;
    color: var(--text-light);
}

.slot-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.slot-content {
    padding: 24px;
    text-align: center;
    width: 100%;
}

.slot-content .product-emoji {
    font-size: 4rem;
    margin-bottom: 12px;
}

.slot-content h4 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.slot-content .remove-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}

.slot-content .remove-btn:hover {
    background: #dc2626;
}

.compare-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}

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

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

.compare-table tr td:first-child {
    background: var(--background);
    font-weight: 600;
    min-width: 140px;
}

#clear-compare {
    display: block;
    margin: 0 auto;
}

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

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

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

.category-card {
    background: white;
    padding: 32px 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

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

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

.category-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

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

/* Guide Section */
.guide-section {
    padding: 80px 0;
    background: white;
}

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

.guide-card {
    background: var(--background);
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
}

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

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

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

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #fce7f3 100%);
}

.seo-section h2 {
    font-size: 2rem;
    margin-bottom: 32px;
    text-align: center;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.seo-content p {
    margin-bottom: 16px;
    color: var(--text-light);
    line-height: 1.8;
}

.seo-content p:last-child {
    margin-bottom: 0;
    font-size: 0.875rem;
}

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

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo h3 {
    font-size: 1.5rem;
}

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

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

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: var(--text-lighter);
    font-size: 0.9375rem;
}

.footer-col ul a:hover {
    color: white;
}

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

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

.affiliate-disclosure {
    font-size: 0.75rem !important;
    opacity: 0.7;
}

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

@media (max-width: 568px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 24px;
}

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

    .hero {
        padding: 60px 0;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9375rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

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

    .filter-group {
        width: 100%;
    }

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

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

    .quiz-container {
        padding: 24px;
    }

    .quiz-options {
        grid-template-columns: 1fr 1fr;
    }

    .seo-content {
        padding: 24px;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-card:hover .product-badge {
    animation: pulse 1s ease infinite;
}

/* Print Styles */
@media print {
    .header, .hero-buttons, .filters, .quiz-section, .compare-section, .footer {
        display: none;
    }

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