/* CSS Variables */
:root {
    --color-primary: #722F37;
    --color-primary-dark: #5a252c;
    --color-primary-light: #8b3a44;
    --color-secondary: #D4A574;
    --color-secondary-light: #e8c9a8;
    --color-accent: #2C3E50;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-bg: #FAFAFA;
    --color-bg-alt: #F5F0EB;
    --color-white: #FFFFFF;
    --color-border: #E5E5E5;
    --color-success: #27AE60;
    --color-warning: #F39C12;
    --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);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
    --font-display: '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;
    font-size: 16px;
}

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

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

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

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

ul {
    list-style: none;
}

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    gap: 8px;
}

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

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

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

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

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

/* Header */
.header {
    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);
}

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

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

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

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

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 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: 8px;
}

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2C1810 0%, #4A2C2A 50%, #722F37 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 0 80px;
}

.hero h1 {
    color: var(--color-white);
    margin-bottom: 24px;
}

.hero .highlight {
    color: var(--color-secondary);
    display: block;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

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

.hero .btn-secondary {
    border-color: var(--color-white);
    color: var(--color-white);
}

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

/* Features Bar */
.features-bar {
    background: var(--color-white);
    padding: 32px 0;
    box-shadow: var(--shadow-sm);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

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

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

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

.section-header h2 {
    margin-bottom: 12px;
    color: var(--color-primary);
}

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

/* Products Section */
.products-section {
    padding: 80px 0;
    background: var(--color-bg);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

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

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

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

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

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

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

.view-btn svg {
    fill: var(--color-text-light);
}

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

.view-btn:hover svg,
.view-btn.active svg {
    fill: var(--color-white);
}

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

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

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

.product-image {
    height: 220px;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, #E8E0D8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '🍷';
    font-size: 5rem;
    opacity: 0.8;
}

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

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

.compare-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.product-content {
    padding: 24px;
}

.product-region {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.product-vintage {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

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

.stars {
    color: var(--color-secondary);
    font-size: 0.95rem;
    letter-spacing: 2px;
}

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

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.product-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.product-price span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-weight: 400;
}

.btn-buy {
    padding: 10px 20px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-buy:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

/* Products Table */
.products-table-container {
    overflow-x: auto;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

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

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

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

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

.hidden {
    display: none !important;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: var(--color-bg-alt);
}

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

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

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

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

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

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

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

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

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

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

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

.quiz-option.selected {
    border-color: var(--color-primary);
    background: rgba(114, 47, 55, 0.08);
}

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

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

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

.quiz-recommendation {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 32px;
}

.quiz-recommendation .product-card {
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
}

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

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

.compare-slot {
    position: relative;
}

.compare-select {
    width: 100%;
    padding: 16px 40px 16px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.compare-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.clear-slot {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text-light);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.clear-slot.visible {
    display: flex;
}

.clear-slot:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.compare-table-container {
    overflow-x: auto;
    margin-bottom: 24px;
}

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

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

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

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

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

.compare-table tbody tr:hover {
    background: var(--color-bg);
}

.compare-hint {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
}

/* About Section (SEO Content) */
.about-section {
    padding: 80px 0;
    background: var(--color-bg-alt);
}

.about-content h2 {
    text-align: center;
    margin-bottom: 48px;
    color: var(--color-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.about-text h3 {
    color: var(--color-primary);
    margin: 32px 0 16px;
    font-size: 1.35rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

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

.region-list {
    margin: 16px 0;
    padding-left: 20px;
}

.region-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: var(--color-text-light);
    line-height: 1.7;
}

.region-list li::before {
    content: '🍇';
    position: absolute;
    left: -5px;
    font-size: 0.9rem;
}

.region-list strong {
    color: var(--color-text);
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.info-card h4 {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.info-card ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card li {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-card strong {
    color: var(--color-text);
}

.flavour-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.flavour-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flavour-item span {
    min-width: 80px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.flavour-bar {
    flex: 1;
    height: 10px;
    background: var(--color-border);
    border-radius: 5px;
    overflow: hidden;
}

.flavour-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 5px;
}

/* Footer */
.footer {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    margin-bottom: 20px;
}

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

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

.footer-links h4,
.footer-newsletter h4 {
    color: var(--color-white);
    font-family: var(--font-display);
    margin-bottom: 20px;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    transition: color var(--transition);
}

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

.footer-newsletter p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.newsletter-form .btn {
    padding: 12px 20px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

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

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

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

    .about-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .info-card {
        flex: 1;
        min-width: 280px;
    }

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

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

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

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

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

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

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

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

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

    .quiz-container {
        padding: 28px;
    }

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

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

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

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

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