/* CSS Variables */
:root {
    --color-primary: #1a1a1a;
    --color-secondary: #d4a574;
    --color-accent: #c9a86c;
    --color-background: #fafafa;
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #e0e0e0;
    --color-success: #4caf50;
    --color-warning: #ff9800;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

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

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

.logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

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

.nav-links a {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 8px 0;
}

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 60px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f0f0f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.1) 0%, transparent 60%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--color-primary);
}

.hero h1 .highlight {
    color: var(--color-secondary);
    position: relative;
}

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

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

.hero-features {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
    justify-content: center;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

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

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

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

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

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

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

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

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

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

.btn-accent:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

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

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* Products Section */
.products-section {
    background: var(--color-surface);
}

/* Filters */
.filters {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--color-background);
    border-radius: var(--radius-md);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

.view-btn {
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: var(--transition);
}

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

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

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

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

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

.product-image {
    height: 240px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    position: relative;
}

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

.product-badge.bestseller {
    background: #e91e63;
}

.product-badge.new {
    background: #4caf50;
}

.product-info {
    padding: 20px;
}

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

.product-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

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

.product-rating .stars {
    color: #ffc107;
}

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

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

.product-actions .btn {
    flex: 1;
    padding: 12px;
}

/* Product Table */
.product-table-wrapper {
    overflow-x: auto;
}

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

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

.product-table th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.product-table .product-thumb {
    width: 50px;
    height: 50px;
    background: var(--color-background);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.results-count {
    text-align: center;
    margin-top: 24px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Quiz Section */
.quiz-section {
    background: linear-gradient(135deg, var(--color-primary), #2a2a2a);
    color: white;
}

.quiz-section .section-header h2,
.quiz-section .section-header p {
    color: white;
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.quiz-question {
    animation: fadeIn 0.5s ease;
}

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

.quiz-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.quiz-progress-step {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: var(--transition);
}

.quiz-progress-step.active {
    background: var(--color-secondary);
}

.quiz-progress-step.completed {
    background: var(--color-success);
}

.quiz-question h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 24px;
}

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

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

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

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

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

.quiz-result {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.quiz-result h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.quiz-result p {
    margin-bottom: 24px;
    opacity: 0.9;
}

.quiz-recommendations {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.quiz-recommendation {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.quiz-recommendation .emoji {
    font-size: 40px;
}

.quiz-recommendation h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.quiz-recommendation p {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.8;
}

/* Compare Section */
.compare-section {
    background: var(--color-background);
}

.compare-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-empty {
    text-align: center;
    color: var(--color-text-muted);
}

.compare-empty p:first-child {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.compare-hint {
    font-size: 0.875rem;
}

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

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

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

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

.compare-table .row-header {
    background: var(--color-primary);
    color: white;
    text-align: left;
    font-weight: 500;
}

.compare-table .product-header {
    padding: 24px;
}

.compare-table .product-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.compare-table .product-title {
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: 8px;
}

.compare-table .remove-btn {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.compare-table .remove-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

#clearCompare {
    margin-top: 24px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* SEO Content Section */
.seo-section {
    background: var(--color-surface);
}

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

.seo-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.seo-content h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    color: var(--color-primary);
    margin-top: 32px;
    margin-bottom: 16px;
}

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

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

.seo-content li {
    list-style: disc;
    margin-bottom: 8px;
    color: var(--color-text-light);
    line-height: 1.8;
}

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

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

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

.footer-brand p {
    margin-top: 16px;
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.footer-links h4,
.footer-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.footer-info p {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.6;
}

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

.footer-bottom p {
    margin-bottom: 4px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-secondary);
    transform: translateY(-4px);
}

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

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

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

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

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

    .hero {
        padding: 120px 20px 60px;
        min-height: auto;
    }

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

    .hero-features {
        gap: 24px;
    }

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

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

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

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

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .quiz-container {
        padding: 24px;
    }

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

    .footer-links ul {
        align-items: center;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .seo-content h2 {
        font-size: 1.75rem;
    }

    .seo-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

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

    .compare-table th,
    .compare-table td {
        min-width: 140px;
        padding: 12px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
}

.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; }
.product-card:nth-child(7) { animation-delay: 0.4s; }
.product-card:nth-child(8) { animation-delay: 0.45s; }

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

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

.toast.success {
    background: var(--color-success);
}

.toast.warning {
    background: var(--color-warning);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Checkbox for Compare */
.compare-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.compare-checkbox:checked {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.compare-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}
