/* CSS Reset & Variables */
:root {
    --primary: #8B5A2B;
    --primary-dark: #6B4423;
    --primary-light: #D4A574;
    --secondary: #2C3E50;
    --accent: #E8D4C4;
    --background: #FDFBF9;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #E5E5E5;
    --success: #27AE60;
    --warning: #F39C12;
    --error: #E74C3C;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

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

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

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

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

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}

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

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

.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: 2px;
    background: var(--text);
    transition: var(--transition);
}

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

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139,90,43,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--secondary);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

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

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

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

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Categories & Filter */
.categories {
    padding: 60px 0 30px;
}

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

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

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

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.view-toggle {
    display: flex;
    gap: 5px;
    background: var(--surface);
    padding: 5px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all var(--transition);
}

.view-btn:hover {
    color: var(--primary);
}

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

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

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

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

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

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

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

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

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

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent) 0%, #EDE4DC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-content {
    padding: 20px;
}

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

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: var(--warning);
    font-size: 0.9rem;
}

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

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

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

.btn-shop {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-align: center;
}

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

.btn-compare {
    padding: 12px 16px;
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-compare:hover {
    background: var(--accent);
}

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

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

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

.products-table th {
    background: var(--secondary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

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

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

.table-product-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, #EDE4DC 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.table-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-table-shop {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

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

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

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

.quiz-header {
    text-align: center;
    margin-bottom: 30px;
}

.quiz-header h2 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.quiz-header p {
    color: var(--text-light);
}

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

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

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

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    display: block;
}

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

.quiz-question h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-align: center;
    color: var(--secondary);
}

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

.quiz-option {
    padding: 18px 25px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
}

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

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

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

.option-text {
    font-weight: 500;
    color: var(--text);
}

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

.btn-quiz {
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-quiz-prev {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-quiz-prev:hover {
    border-color: var(--text);
}

.btn-quiz-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-quiz-next {
    background: var(--primary);
    color: white;
    border: none;
}

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

.btn-quiz-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quiz Result */
.quiz-result {
    text-align: center;
}

.result-header {
    margin-bottom: 30px;
}

.result-header h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.result-header p {
    color: var(--text-light);
}

.result-product {
    background: var(--accent);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 25px;
}

.result-product-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.result-product-name {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

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

.result-match {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

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

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

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

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

.add-compare-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: color var(--transition);
}

.add-compare-btn:hover {
    color: var(--primary);
}

.plus-icon {
    width: 50px;
    height: 50px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.compare-product-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.compare-product-name {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.remove-compare-btn {
    padding: 8px 16px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background var(--transition);
}

.remove-compare-btn:hover {
    background: #C0392B;
}

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

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

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

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

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

.compare-table tbody tr:hover {
    background: rgba(139, 90, 43, 0.05);
}

.compare-action-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background var(--transition);
}

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

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

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-close:hover {
    color: var(--text);
}

.modal-content h3 {
    margin-bottom: 25px;
    color: var(--secondary);
}

.modal-products {
    display: grid;
    gap: 15px;
}

.modal-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.modal-product:hover {
    border-color: var(--primary);
    background: var(--accent);
}

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

.modal-product-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.modal-product-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

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

.seo-content h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--secondary);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.seo-article {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.seo-article h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.seo-article p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.7;
}

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

.seo-features {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.seo-features h3 {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 25px;
    text-align: center;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 30px;
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 25px;
    color: var(--text-light);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.seo-cta {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--accent) 0%, #F5EDE5 100%);
    border-radius: var(--radius-md);
}

.seo-cta p {
    font-size: 1.1rem;
    color: var(--text);
    max-width: 700px;
    margin: 0 auto;
}

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

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

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

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

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

.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;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

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

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.affiliate-disclosure {
    font-size: 0.8rem !important;
    max-width: 700px;
    margin: 0 auto;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .seo-grid {
        grid-template-columns: 1fr;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .nav.active {
        display: flex;
    }

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

    .hero {
        padding: 50px 0 70px;
    }

    .hero-stats {
        gap: 30px;
    }

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

    .quiz-container {
        padding: 30px 20px;
    }

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

    .filter-bar {
        justify-content: center;
    }

    .filter-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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

    .btn {
        width: 100%;
    }

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

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

    .result-actions .btn {
        width: 100%;
    }
}

/* 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.15s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.25s; }
.product-card:nth-child(5) { animation-delay: 0.3s; }
.product-card:nth-child(6) { animation-delay: 0.35s; }
