/* --- YENİ MODERN CSS (AŞAMA 4) --- */
:root {
    --primary-green: #3a823c; 
    --primary-green-dark: #2c662e;
    --primary-green-light: #e8f5e9;
    --primary-brown: #69442e; 
    --primary-brown-dark: #523523;
    --text-color: #333333;
    --text-muted: #666666;
    --bg-color: #fdfdfc; 
    --white: #ffffff;
    --border-color: #e5e0d8;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

/* Sayfa Açılış Animasyonu */
.fade-in-page {
    animation: pageFadeIn 0.6s ease-out;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Üst Duyuru Çubuğu */
.top-bar-container {
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    overflow: hidden;
    position: relative;
}
.announcement {
    display: none;
    animation: fadeSlide 4s infinite;
}
.announcement.active { display: block; }
@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* Main Header */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.header-logo { 
    flex: 0 0 auto; 
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.header-logo:hover { transform: scale(1.05); }
.header-logo img {
    max-height: 100px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    border: 3px solid var(--white);
}
.logo-placeholder {
    width: 100px; height: 100px; 
    background: var(--primary-green); color: white; 
    border-radius: var(--radius-full); display: flex; 
    align-items: center; justify-content: center; 
    font-weight: bold; text-align: center; 
    border: 3px solid white; box-shadow: var(--shadow-md);
}

/* Logo Tagline */
.logo-tagline {
    font-size: 12px;
    color: var(--primary-green);
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* Orta Kısım */
.header-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.social-icons {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}
.social-icons a {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-full);
    background: var(--bg-color); color: var(--primary-brown);
    font-size: 15px; text-decoration: none; transition: var(--transition);
}
.social-icons a:hover {
    background: var(--primary-green); color: var(--white);
    transform: translateY(-3px);
}

.search-form {
    display: flex; width: 100%; max-width: 600px;
    border: 2px solid var(--border-color); border-radius: var(--radius-full);
    overflow: hidden; background: var(--white); padding: 4px;
    transition: var(--transition);
}
.search-form:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px var(--primary-green-light);
}
.search-input-wrapper {
    flex: 1; display: flex; align-items: center; padding-left: 15px;
}
.search-input-wrapper i { color: var(--primary-green); font-size: 18px; }
.search-input {
    width: 100%; border: none; padding: 12px 15px; outline: none;
    font-family: 'Outfit', sans-serif; font-size: 15px;
}
.search-btn {
    background-color: var(--primary-brown); color: var(--white);
    border: none; padding: 0 35px; border-radius: var(--radius-full);
    font-weight: 600; font-size: 15px; cursor: pointer; transition: var(--transition);
}
.search-btn:hover { background-color: var(--primary-green); }

/* Sağ Kısım */
.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
}
.header-action-item {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--primary-brown);
    transition: var(--transition); padding: 8px; border-radius: var(--radius-md);
}
.header-action-item:hover {
    background: var(--primary-green-light);
}
.icon-circle {
    width: 45px; height: 45px; border-radius: var(--radius-full);
    background: var(--bg-color); display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--primary-green); transition: var(--transition);
    border: 1px solid var(--border-color);
}
.header-action-item:hover .icon-circle {
    background: var(--primary-green); color: var(--white); border-color: var(--primary-green);
}
.texts { display: flex; flex-direction: column; }
.title { font-weight: 700; font-size: 15px; color: var(--primary-brown); }
.subtitle { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top:2px; }
.contact-item .subtitle { color: var(--primary-green); font-weight: 700; }

.cart-icon-wrapper { position: relative; }
.cart-badge {
    position: absolute; top: -5px; right: -5px;
    background-color: #ef4444; color: white; width: 20px; height: 20px;
    border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: bold; border: 2px solid var(--white);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-brown);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    order: 99;
}
.mobile-menu-toggle:hover { background: var(--primary-green-light); }

/* Mobile header overlay (açılınca altta görünen drawer) */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999;
}
.mobile-drawer.open { display: block; }

.mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.mobile-drawer-panel {
    position: absolute;
    top: 0; right: 0;
    width: min(85vw, 320px);
    height: 100%;
    background: var(--white);
    padding: 0;
    overflow-y: auto;
    animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-drawer-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}
.mobile-drawer-header span { font-weight: 700; font-size: 18px; }
.mobile-drawer-close {
    background: rgba(255,255,255,0.2);
    border: none; color: white; width: 34px; height: 34px;
    border-radius: var(--radius-full); cursor: pointer;
    font-size: 18px; display: flex; align-items: center; justify-content: center;
}

.mobile-drawer-body { padding: 20px; }

.mobile-search-form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--white);
    margin-bottom: 20px;
}
.mobile-search-form:focus-within { border-color: var(--primary-green); }
.mobile-search-form input {
    flex: 1; border: none; padding: 11px 15px;
    font-family: 'Outfit'; font-size: 14px; outline: none;
}
.mobile-search-form button {
    background: var(--primary-brown); color: white;
    border: none; padding: 0 18px; cursor: pointer;
    font-weight: 600; font-size: 13px;
}

.mobile-action-links { display: flex; flex-direction: column; gap: 5px; }
.mobile-action-link {
    display: flex; align-items: center; gap: 15px;
    padding: 14px 16px; border-radius: var(--radius-md);
    text-decoration: none; color: var(--text-color);
    font-weight: 500; font-size: 15px; transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}
.mobile-action-link:last-child { border-bottom: none; }
.mobile-action-link:hover { background: var(--primary-green-light); color: var(--primary-green-dark); }
.mobile-action-link .micon {
    width: 40px; height: 40px; border-radius: var(--radius-full);
    background: var(--primary-green-light); color: var(--primary-green);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    flex-shrink: 0;
}

.mobile-social-row {
    display: flex; gap: 10px; justify-content: center;
    padding: 20px 0; border-top: 1px solid var(--border-color); margin-top: 15px;
}
.mobile-social-row a {
    width: 38px; height: 38px; border-radius: var(--radius-full);
    background: var(--bg-color); color: var(--primary-brown);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; text-decoration: none;
    border: 1px solid var(--border-color); transition: var(--transition);
}
.mobile-social-row a:hover { background: var(--primary-green); color: white; }

/* --- RESPONSIVE TASARIM --- */
@media (max-width: 1024px) {
    .header-container { flex-wrap: wrap; }
    .header-middle { order: 3; width: 100%; max-width: 100%; margin-top: 15px; }
}

@media (max-width: 768px) {
    /* Header temizle — sadece logo + hamburger görünsün */
    .header-container {
        flex-wrap: nowrap;
        padding: 12px 16px;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }
    .header-middle { display: none !important; }
    .header-right { display: none !important; }
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .header-logo img, .logo-placeholder { height: 60px; width: 60px; max-height: 60px; }
    .logo-tagline { display: none; }
    .main-header { position: sticky; top: 0; z-index: 200; }
}

/* --- DASHBOARD (Hesabım) --- */
.dashboard-container {
    display: flex; max-width: 1200px; margin: 40px auto; gap: 30px; padding: 0 20px;
}
.dashboard-sidebar {
    width: 260px; background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 15px; border: 1px solid var(--border-color);
    height: fit-content; flex-shrink: 0;
}
.dashboard-sidebar a {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px; 
    color: var(--text-color); text-decoration: none; font-weight: 500; 
    transition: var(--transition); border-radius: var(--radius-md); margin-bottom: 5px;
}
.dashboard-sidebar a:hover, .dashboard-sidebar a.active {
    background: var(--primary-green-light); color: var(--primary-green-dark);
}
.dashboard-sidebar a i { font-size: 18px; width: 20px; text-align: center; color: var(--primary-green); }

.dashboard-content {
    flex: 1; background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 40px; border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-content h2 { margin-top: 0; color: var(--primary-brown); font-size: 24px; margin-bottom: 25px; }

/* Dashboard Mobil */
@media (max-width: 900px) {
    .dashboard-container { flex-direction: column; }
    .dashboard-sidebar { width: 100%; display: flex; overflow-x: auto; padding: 10px; }
    .dashboard-sidebar a { flex: 0 0 auto; margin-bottom: 0; margin-right: 10px; }
    .dashboard-sidebar hr { display: none; }
    .dashboard-content { padding: 25px 20px; }
}

/* Buttons */
.btn {
    padding: 12px 24px; border: none; border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 15px;
    cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--primary-green); color: var(--white); }
.btn-primary:hover { background: var(--primary-green-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* --- SAYFA KENARI PARALLAX GÖRSELLERİ --- */
.site-parallax-left {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: -1;
    width: 250px;
    pointer-events: none;
    opacity: 0.9;
}
.site-parallax-right {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: -1;
    width: 250px;
    pointer-events: none;
    opacity: 0.9;
}
@media (max-width: 1400px) {
    .site-parallax-left, .site-parallax-right {
        display: none;
    }
}

/* --- SITE FOOTER CSS --- */
.site-footer {
    position: relative;
    background: url('https://images.unsplash.com/photo-1500937386664-56d1dfef3854?auto=format&fit=crop&q=80&w=1920') center/cover no-repeat;
    color: #f3f4f6;
    padding: 100px 0 60px;
    margin-top: 80px;
    font-family: 'Outfit', sans-serif;
    overflow: visible;
    z-index: 10;
}
.footer-torn-divider {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 42px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 40" preserveAspectRatio="none"><path d="M0,40 L1200,40 L1200,0 L1180,12 L1160,2 L1140,15 L1120,6 L1100,14 L1080,4 L1060,16 L1040,5 L1020,13 L1000,3 L980,14 L960,4 L940,12 L920,3 L900,11 L880,2 L860,14 L840,4 L820,12 L800,3 L780,11 L760,2 L740,13 L720,4 L700,11 L680,3 L660,15 L640,4 L620,11 L600,2 L580,12 L560,2 L540,13 L520,4 L500,11 L480,3 L460,13 L440,4 L420,12 L400,2 L380,11 L360,3 L340,13 L320,4 L300,11 L280,2 L260,13 L240,4 L220,11 L200,2 L180,13 L160,4 L140,11 L120,3 L100,12 L80,3 L60,11 L40,2 L20,11 L0,0 Z" fill="%231b2612"/></svg>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 5;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0; right: 0; bottom: 0;
    background: rgba(27, 38, 18, 0.88);
    z-index: 1;
}
.footer-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    padding-bottom: 40px;
}
.footer-col h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    border-bottom: 1px dotted rgba(255,255,255,0.2);
    padding-bottom: 10px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 12px;
}
.footer-col ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}
.footer-col ul li a:hover {
    color: #6cb038;
    padding-left: 5px;
}
.footer-phone-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.footer-phone-box i {
    font-size: 28px;
    color: #6cb038;
    transform: rotate(-10deg);
}
.footer-phone-box span {
    display: block;
    font-size: 13px;
    color: #94a3b8;
}
.footer-phone-box strong {
    font-size: 18px;
    color: #ffffff;
}
.app-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
}
.app-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.app-btn img {
    transition: var(--transition);
    border-radius: 6px;
}
.app-btn img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.footer-middle-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding: 40px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    align-items: center;
}
.footer-newsletter h3, .footer-socials-box h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    color: #ffffff;
}
.footer-newsletter p, .footer-socials-box p {
    font-size: 14px;
    color: #cbd5e1;
    margin-top: 0;
    margin-bottom: 20px;
}
.partner-link-container {
    margin-bottom: 15px;
}
.partner-link {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.partner-link:hover {
    color: #6cb038;
}
.newsletter-form {
    display: flex;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: 5px;
}
.newsletter-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}
.newsletter-form button {
    background: #6cb038;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 25px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.newsletter-form button:hover {
    background: #5a942e;
}

.footer-social-icons {
    display: flex;
    gap: 12px;
}
.footer-social-icons a {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b2612;
    font-size: 18px;
    transition: var(--transition);
    text-decoration: none;
}
.footer-social-icons a:hover {
    background: #6cb038;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108,176,56,0.4);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0 60px;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-copyright {
    font-size: 13px;
    color: #94a3b8;
}
.footer-payment-logos {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #cbd5e1;
    font-size: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.payment-logo {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 0.5px;
}
.payment-logo.bonus { color: #84cc16; }
.payment-logo.maximum { color: #ec4899; }
.payment-logo.world { color: #3b82f6; }
.payment-logo.axess { color: #eab308; }
.payment-logo.cardfinans { color: #06b6d4; }

.footer-partners-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}
.footer-partners-box {
    background: #ffffff;
    color: #6cb038;
    padding: 12px 35px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    letter-spacing: 0.5px;
}

/* Float WhatsApp Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    text-decoration: none;
}
.whatsapp-float-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

/* RESPONSIVE FOOTER */
@media (max-width: 992px) {
    .footer-top-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .footer-middle-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-partners-container {
        display: none; /* Mobilde taşmasın */
    }
}
@media (max-width: 576px) {
    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px 0 40px;
    }
    .footer-payment-logos {
        gap: 10px;
        font-size: 18px;
    }
    .payment-logo {
        font-size: 9px;
    }
    .ai-float-btn {
        width: 54px;
        height: 54px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
    .ai-chat-window {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 90px;
        max-height: 75vh;
    }
}

/* ===========================
   AI CHATBOT WIDGET
   =========================== */
.ai-chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Float Button */
.ai-float-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3a823c 0%, #2c662e 50%, #1a4a1c 100%);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(58,130,60,0.45), 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    animation: aiFloatPulse 3s infinite;
    flex-shrink: 0;
}
.ai-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(58,130,60,0.55), 0 4px 12px rgba(0,0,0,0.2);
}
@keyframes aiFloatPulse {
    0%,100% { box-shadow: 0 8px 32px rgba(58,130,60,0.45), 0 0 0 0 rgba(58,130,60,0.4); }
    50% { box-shadow: 0 8px 32px rgba(58,130,60,0.45), 0 0 0 12px rgba(58,130,60,0); }
}

.ai-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ai-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    animation: badgePop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* Chat Window */
.ai-chat-window {
    width: 360px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(58,130,60,0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 520px;
    
    /* Hidden by default */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    transform-origin: bottom right;
}
.ai-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chat Header */
.ai-chat-header {
    background: linear-gradient(135deg, #2c662e 0%, #3a823c 100%);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.ai-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ai-avatar-pulse {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    position: relative;
    flex-shrink: 0;
}
.ai-avatar-pulse::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    animation: avatarRing 2s ease-in-out infinite;
}
@keyframes avatarRing {
    0%,100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.15); opacity: 0.2; }
}
.ai-chat-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}
.ai-chat-status {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.ai-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #86efac;
    animation: statusBlink 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes statusBlink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
.ai-chat-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s;
}
.ai-chat-close-btn:hover {
    background: rgba(255,255,255,0.28);
}

/* Messages area */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8faf8;
    min-height: 240px;
    max-height: 320px;
    scroll-behavior: smooth;
}
.ai-chat-messages::-webkit-scrollbar { width: 4px; }
.ai-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: #c8e6c9; border-radius: 99px; }

/* Message rows */
.ai-chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
}
.ai-chat-msg.visible {
    opacity: 1;
    transform: translateY(0);
}
/* First message visible immediately */
.ai-chat-msg:first-child {
    opacity: 1;
    transform: none;
}
.ai-chat-msg.user-msg {
    flex-direction: row-reverse;
}

.ai-msg-avatar, .user-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.ai-msg-avatar {
    background: linear-gradient(135deg, #3a823c, #2c662e);
    color: #fff;
}
.user-msg-avatar {
    background: linear-gradient(135deg, #64748b, #475569);
    color: #fff;
}

.ai-msg-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.55;
    word-break: break-word;
}
.ai-msg .ai-msg-bubble {
    background: #fff;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.user-msg .ai-msg-bubble {
    background: linear-gradient(135deg, #3a823c, #2c662e);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(58,130,60,0.25);
}

/* Typing Indicator */
.ai-typing-indicator {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 0 14px 12px;
    background: #f8faf8;
    flex-shrink: 0;
}
.ai-typing-dots {
    background: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
    display: flex;
    gap: 5px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.ai-typing-dots span {
    width: 7px;
    height: 7px;
    background: #3a823c;
    border-radius: 50%;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
    0%,80%,100% { transform: translateY(0); opacity: 0.4; }
    40%          { transform: translateY(-7px); opacity: 1; }
}

/* Input Area */
.ai-chat-input-area {
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #e8f5e9;
    flex-shrink: 0;
}
.ai-chat-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ai-chat-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid #d1e8d2;
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8faf8;
    color: #2d3748;
    font-family: inherit;
}
.ai-chat-form input:focus {
    border-color: #3a823c;
    background: #fff;
}
.ai-chat-form input:disabled {
    opacity: 0.6;
}
.ai-chat-form button[type="submit"] {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3a823c, #2c662e);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.ai-chat-form button[type="submit"]:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(58,130,60,0.4);
}
.ai-chat-form button[type="submit"]:disabled {
    opacity: 0.5;
    transform: none;
    cursor: not-allowed;
}

