/* CSS Variables */
:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --success: #28a745;
    --warning: #ffc107;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --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', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

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

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

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

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

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

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

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

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

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

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    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(--primary);
    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: 10px;
}

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

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #fff5f0 0%, #f0fffe 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

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

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

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 32px;
}

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

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.floating-snack {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

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

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-top: 8px;
}

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

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gray-light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--gray-light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

.filter-btn:hover:not(.active) {
    background: var(--gray);
    color: white;
}

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

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

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

.product-image {
    height: 180px;
    background: linear-gradient(135deg, var(--gray-light) 0%, #fff 100%);
    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: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-compare-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1rem;
}

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

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.1rem;
    margin: 8px 0;
    color: var(--dark);
}

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

.stars {
    color: var(--warning);
}

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

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-light);
    font-size: 0.875rem;
    color: var(--gray);
}

.product-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.product-link:hover {
    background: var(--primary-dark);
}

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

.products-table 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(--gray-light);
}

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

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

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

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

.hidden {
    display: none !important;
}

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

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

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

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

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

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

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

.quiz-question h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

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

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

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

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

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

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

.quiz-result-product {
    background: var(--gray-light);
    border-radius: var(--radius);
    padding: 32px;
    margin: 24px 0;
}

.quiz-result-emoji {
    font-size: 5rem;
    margin-bottom: 16px;
}

.quiz-result-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.quiz-actions {
    margin-top: 24px;
    text-align: center;
}

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

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

.compare-slot {
    background: var(--gray-light);
    border: 2px dashed var(--gray);
    border-radius: var(--radius);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.compare-slot:hover {
    border-color: var(--primary);
    background: #fff5f0;
}

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

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

.plus-icon {
    display: block;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 8px;
}

.slot-content {
    text-align: center;
    padding: 20px;
}

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

.slot-name {
    font-weight: 600;
    color: var(--dark);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: var(--transition);
}

.remove-btn:hover {
    background: var(--primary-dark);
}

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

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

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

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

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

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-light);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary);
    color: white;
}

.modal-search {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-light);
}

.modal-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.modal-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-products {
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.modal-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.modal-product-item:hover {
    background: var(--secondary);
    color: white;
}

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

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

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

.seo-content h2 {
    color: var(--dark);
    margin-bottom: 24px;
}

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

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

.seo-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.seo-content li {
    color: var(--gray);
    margin-bottom: 12px;
    line-height: 1.7;
}

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

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

.footer-brand p {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-brand .logo {
    color: white;
}

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

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

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

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

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

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.affiliate-disclosure {
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

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

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

    .hero-image {
        order: -1;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

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

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

    .quiz-container {
        padding: 24px;
    }

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

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

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

@media (max-width: 480px) {
    .snack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .floating-snack {
        font-size: 3rem;
    }

    .filter-bar {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

/* 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; }

/* Smooth scrolling offset for fixed header */
section[id] {
    scroll-margin-top: 90px;
}
