/* =====================================================
   MAISONTIQUE - Modern Beige Event Planning Website
   ===================================================== */

/* CSS Variables */
:root {
    --color-beige-light: #F5F1EB;
    --color-beige: #E8DFD4;
    --color-beige-dark: #D4C4B0;
    --color-cream: #FAF8F5;
    --color-taupe: #8B7355;
    --color-brown: #5C4A3D;
    --color-brown-dark: #3D3129;
    --color-gold: #C9A962;
    --color-gold-light: #E5D4A1;
    --color-white: #FFFFFF;
    --color-text: #3D3129;
    --color-text-light: #6B5B4F;

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, sans-serif;

    --shadow-sm: 0 2px 8px rgba(93, 74, 61, 0.08);
    --shadow-md: 0 4px 20px rgba(93, 74, 61, 0.12);
    --shadow-lg: 0 8px 40px rgba(93, 74, 61, 0.16);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --border-radius: 8px;
    --border-radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =====================================================
   LOADER / LAADSCHERM
   ===================================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-beige-light) 0%, var(--color-cream) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    animation: fadeInUp 1s ease forwards;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    display: block;
    letter-spacing: 0.1em;
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-taupe);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    margin: 2rem auto 0;
    border: 2px solid var(--color-beige-dark);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* =====================================================
   NAVIGATION
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    transition: color var(--transition-fast);
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-brown-dark);
    transition: all var(--transition-fast);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-beige-light) 0%, var(--color-beige) 50%, var(--color-beige-dark) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 169, 98, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 169, 98, 0.1) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(201,169,98,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 500;
    color: var(--color-brown-dark);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-taupe);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-taupe);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 2px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(10px); }
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--color-brown-dark);
    border: 1px solid var(--color-brown-dark);
}

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

.btn-full {
    width: 100%;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    padding: 6rem 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
}

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

/* =====================================================
   DIENSTEN SECTION
   ===================================================== */
.diensten {
    background: var(--color-white);
}

.diensten-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dienst-card {
    background: var(--color-cream);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

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

.dienst-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--color-gold);
}

.dienst-icon svg {
    width: 100%;
    height: 100%;
}

.dienst-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
}

.dienst-card p {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* =====================================================
   PORTFOLIO SECTION
   ===================================================== */
.portfolio {
    background: var(--color-beige-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 49, 41, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-overlay span {
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* =====================================================
   TRAKTATIES SECTION
   ===================================================== */
.traktaties {
    background: var(--color-white);
}

.traktaties-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.traktatie-main {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.traktatie-main img {
    width: 100%;
    height: auto;
    display: block;
}

.traktatie-info h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-beige);
}

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

.price-note {
    background: var(--color-beige-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.price-note p {
    margin: 0;
}

.price-note strong {
    font-size: 1.5rem;
    color: var(--color-brown-dark);
}

.small {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

.traktaties-examples {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.example-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.example-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.example-item:hover img {
    transform: scale(1.05);
}

/* =====================================================
   BESTELLEN SECTION
   ===================================================== */
.bestellen {
    background: linear-gradient(135deg, var(--color-beige-light) 0%, var(--color-cream) 100%);
}

.order-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.order-form {
    background: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-cream);
    border: 1px solid var(--color-beige-dark);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    accent-color: var(--color-gold);
}

.checkbox-label a {
    color: var(--color-gold);
    text-decoration: underline;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.info-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
}

.info-card ol,
.info-card ul {
    padding-left: 1.25rem;
    color: var(--color-text-light);
}

.info-card li {
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

/* =====================================================
   VOORWAARDEN SECTION
   ===================================================== */
.voorwaarden {
    background: var(--color-white);
}

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

.voorwaarden-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-beige);
}

.voorwaarden-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.voorwaarden-item h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
}

.voorwaarden-item ul {
    list-style: none;
}

.voorwaarden-item li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.voorwaarden-item li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-gold);
}

/* =====================================================
   CONTACT SECTION
   ===================================================== */
.contact {
    background: var(--color-beige-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.contact-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem;
    color: var(--color-gold);
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-card h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 0.75rem;
}

.contact-card a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-card a:hover {
    color: var(--color-gold);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--color-brown-dark);
    color: var(--color-beige-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 4rem;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--color-beige-dark);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-beige-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

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

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-beige-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: var(--color-gold);
    border-color: var(--color-gold);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--color-beige-dark);
}

/* =====================================================
   MODAL
   ===================================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(61, 49, 41, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 400px;
    margin: 1rem;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon.success {
    background: var(--color-beige-light);
    color: var(--color-gold);
}

.modal-icon svg {
    width: 40px;
    height: 40px;
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-brown-dark);
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* =====================================================
   FADE ANIMATIONS
   ===================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .traktaties-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .order-container {
        grid-template-columns: 1fr;
    }

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

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-cream);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right var(--transition-normal);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .order-form {
        padding: 2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .logo-text {
        font-size: 3rem;
    }
}

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

    .portfolio-grid,
    .traktaties-examples {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 1rem;
    }

    .btn {
        padding: 0.875rem 2rem;
    }
}

/* =====================================================
   AI CHAT WIDGET
   ===================================================== */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 5000;
    font-family: var(--font-body);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-brown-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(61, 49, 41, 0.3);
    transition: all var(--transition-normal);
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(61, 49, 41, 0.4);
}

.chat-toggle svg {
    width: 28px;
    height: 28px;
    color: var(--color-white);
    transition: all var(--transition-fast);
}

.chat-icon-close {
    display: none;
}

.chat-widget.open .chat-icon-open {
    display: none;
}

.chat-widget.open .chat-icon-close {
    display: block;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 520px;
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 48px rgba(61, 49, 41, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.open .chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: var(--color-brown-dark);
    color: var(--color-white);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-white);
}

.chat-header-title {
    font-size: 0.9375rem;
    font-weight: 500;
}

.chat-header-status {
    font-size: 0.75rem;
    color: var(--color-beige-dark);
}

.chat-close {
    background: none;
    border: none;
    color: var(--color-beige-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color var(--transition-fast);
}

.chat-close:hover {
    color: var(--color-white);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 300px;
    max-height: 350px;
    background: var(--color-cream);
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--color-beige-dark);
    border-radius: 2px;
}

.chat-message {
    display: flex;
    max-width: 85%;
    animation: chatFadeIn 0.3s ease;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.user .chat-bubble {
    background: var(--color-brown-dark);
    color: var(--color-white);
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
    background: var(--color-white);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
    align-items: center;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    background: var(--color-beige-dark);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

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

.chat-input-area {
    display: flex;
    padding: 0.75rem;
    gap: 0.5rem;
    background: var(--color-white);
    border-top: 1px solid var(--color-beige);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-beige-dark);
    border-radius: 24px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-cream);
    outline: none;
    transition: border-color var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--color-gold);
}

.chat-input::placeholder {
    color: var(--color-beige-dark);
}

.chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-brown-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.chat-send:hover {
    background: var(--color-brown);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send svg {
    width: 18px;
    height: 18px;
    color: var(--color-white);
}

/* Mobile chat */
@media (max-width: 480px) {
    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }

    .chat-window {
        width: calc(100vw - 2rem);
        max-height: 70vh;
        right: -0.5rem;
    }

    .chat-toggle {
        width: 52px;
        height: 52px;
    }

    .chat-toggle svg {
        width: 24px;
        height: 24px;
    }
}
