/* ========================================
   DiningTable.au - Modern CSS Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #2C5530;
    --primary-light: #4A7C59;
    --primary-dark: #1E3A21;
    --secondary-color: #D4A574;
    --secondary-light: #E8C9A8;
    --accent-color: #8B7355;
    --background: #FAFAF8;
    --background-alt: #F5F3EF;
    --text-primary: #1A1A1A;
    --text-secondary: #5A5A5A;
    --text-muted: #8A8A8A;
    --white: #FFFFFF;
    --border-color: #E5E5E5;
    --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 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 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(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

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

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

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

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

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

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

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

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

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

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

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

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

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

.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-md);
    z-index: 999;
}

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

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 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 {
    max-width: 600px;
}

.hero h1 {
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

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

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

.hero-image-placeholder {
    width: 100%;
    max-width: 500px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.hero-image-placeholder svg {
    width: 100%;
    height: auto;
}

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

.section-header h2 {
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

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

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

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

.filter-select {
    padding: 10px 36px 10px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235A5A5A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: var(--transition);
}

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

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

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

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

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

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

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

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

.product-image {
    width: 100%;
    height: 220px;
    background: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image svg {
    width: 80%;
    height: 80%;
    opacity: 0.8;
}

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

.product-badge.popular {
    background: var(--secondary-color);
    color: var(--text-primary);
}

.product-info {
    padding: 20px;
}

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

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.spec-tag {
    padding: 4px 10px;
    background: var(--background-alt);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

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

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

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

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

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

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

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

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

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

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

.products-table .product-name-cell {
    font-weight: 500;
    color: var(--text-primary);
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results p {
    margin-bottom: 20px;
}

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

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

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

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

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

.plus-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: var(--background-alt);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--primary-color);
}

.compare-slot-filled {
    width: 100%;
    height: 100%;
    padding: 20px;
}

.remove-compare {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

.remove-compare:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: var(--white);
}

.compare-product-info {
    text-align: center;
}

.compare-product-info .product-name {
    font-size: 1rem;
    margin-bottom: 12px;
}

.compare-product-info .product-image {
    height: 150px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
}

/* Comparison Table */
.comparison-table-container {
    overflow-x: auto;
    margin-top: 40px;
}

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

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

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

.comparison-table th:first-child {
    text-align: left;
    background: var(--background-alt);
    color: var(--text-primary);
}

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

.comparison-table tbody tr:hover td {
    background: var(--background);
}

.comparison-table tbody tr:hover td:first-child {
    background: var(--background-alt);
}

/* Quiz Section */
.quiz-section {
    padding: 100px 0;
    background: var(--white);
}

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

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

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

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 20%;
}

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

.quiz-content {
    min-height: 300px;
}

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

.quiz-question h3 {
    font-size: 1.4rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.quiz-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

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

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(44, 85, 48, 0.05);
}

.quiz-option input {
    display: none;
}

.quiz-option-radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.quiz-option.selected .quiz-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
}

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

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

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

.quiz-results h3 {
    font-size: 1.8rem;
    margin-bottom: 32px;
    color: var(--primary-color);
}

.quiz-recommendations {
    display: grid;
    gap: 20px;
    margin-bottom: 32px;
}

.recommendation-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.recommendation-card .match-score {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.recommendation-card .product-name {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* Guide Section */
.guide-section {
    padding: 100px 0;
    background: var(--background-alt);
}

.guide-content {
    display: grid;
    gap: 32px;
}

.guide-article {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.guide-article h3 {
    margin-bottom: 16px;
    color: var(--primary-color);
}

.guide-article p {
    margin-bottom: 16px;
    line-height: 1.8;
}

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

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

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

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

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

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

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

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: var(--font-body);
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--white);
}

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

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

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

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

.modal-content {
    background: var(--white);
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--background-alt);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

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

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

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

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

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

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

    .hero-image {
        display: none;
    }

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

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

@media (max-width: 768px) {
    .nav {
        display: none;
    }

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

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

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

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

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

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

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

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

    .quiz-container {
        padding: 24px;
    }

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

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

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

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

    .guide-article {
        padding: 20px;
    }
}

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

.product-card {
    animation: fadeIn 0.4s ease forwards;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }

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

    .hero {
        padding: 40px 0;
        min-height: auto;
    }

    .products-section {
        padding: 40px 0;
    }
}
