/* ===== CSS Variables ===== */
:root {
    --primary-color: #e85d4c;
    --primary-dark: #d14a3a;
    --secondary-color: #4a7c59;
    --secondary-dark: #3d6649;
    --accent-color: #f4a261;
    --background: #fefefe;
    --background-alt: #faf8f5;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-light: #b2bec3;
    --border-color: #e9e5e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

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

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

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

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

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

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

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

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

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

.logo h1 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

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

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

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

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

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--background-alt) 0%, #fff5f3 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: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

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

.fruit-display {
    position: relative;
    width: 300px;
    height: 300px;
}

.fruit {
    position: absolute;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.fruit-1 { top: 10%; left: 20%; animation-delay: 0s; }
.fruit-2 { top: 5%; right: 25%; animation-delay: 0.5s; }
.fruit-3 { top: 30%; left: 5%; animation-delay: 1s; }
.fruit-4 { top: 25%; right: 10%; animation-delay: 1.5s; }
.fruit-5 { bottom: 30%; left: 15%; animation-delay: 2s; }
.fruit-6 { bottom: 35%; right: 20%; animation-delay: 2.5s; }

.platter {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
}

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

/* ===== View Toggle ===== */
.view-toggle-section {
    padding: 20px 0;
    background: var(--background);
}

.view-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.view-controls span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

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

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

.filter-btn {
    padding: 10px 20px;
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

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

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.product-image {
    height: 200px;
    background: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
}

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

.product-content {
    padding: 20px;
}

.product-category {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

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

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

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

.stars {
    color: #ffc107;
}

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

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

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

.compare-btn {
    background: var(--background-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

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

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

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

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

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

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

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

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

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

.hidden {
    display: none !important;
}

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

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

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

.quiz-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.quiz-start h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.quiz-start p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

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

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

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quiz-question h4 {
    font-size: 1.2rem;
    margin-bottom: 24px;
    text-align: center;
}

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

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

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

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

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

.results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

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

.recommended-product {
    background: var(--background-alt);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

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

.recommended-product h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

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

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

.compare-container {
    max-width: 900px;
    margin: 0 auto;
}

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

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

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

.compare-slot.filled {
    border-style: solid;
    cursor: default;
}

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

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

.slot-product {
    text-align: center;
    padding: 20px;
    width: 100%;
}

.slot-product .product-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.slot-product h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.slot-product .price {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.remove-slot {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

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

.compare-table-wrapper {
    margin-top: 30px;
    overflow-x: auto;
}

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

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

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

.compare-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--background-alt);
}

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

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-content h3 {
    margin-bottom: 20px;
}

.modal-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.modal-product-item:hover {
    background: #fff5f3;
}

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

.modal-product-item .info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.modal-product-item .info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.seo-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

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

.seo-content h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.seo-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

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

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

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 24px;
}

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

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

.footer-affiliate {
    flex-basis: 100%;
}

.footer-affiliate p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

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

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

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

    .fruit-display {
        width: 250px;
        height: 250px;
    }

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

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

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

    .hero {
        padding: 50px 0;
    }

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

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

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

    .quiz-container {
        padding: 24px;
    }

    .filter-bar {
        gap: 8px;
    }

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

    .products-table th,
    .products-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.75rem;
    }

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

    .product-actions {
        flex-direction: column;
    }

    .view-controls {
        justify-content: center;
    }
}
