/* ================================================= */
/* Temizlenmiş ve Düzeltilmiş Cenova AI Chat CSS      */
/* Düzenleyen: Gemini AI (Tüm düzeltmeler dahil)    */
/* ================================================= */

/* ===== 1. Global & Tema Ayarları ===== */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #E53935;
    --accent-hover: #C62828;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #C62828, #E53935);
    --message-user-bg: #E53935;
    --message-bot-bg: #2d2d2d;
    --primary-color-dark: #C62828; /* Hover vb. için koyu renk */

    /* ===== BURAYA YAPIŞTIRIN ===== */
    --message-bg-color: var(--bg-secondary);
    --hover-bg-color: var(--bg-tertiary);
    --border-color: var(--border);
    --text-color: var(--text-primary);
    --text-secondary-color: var(--text-secondary);
    --text-color-muted: var(--text-secondary);
    --link-color: #3498db;
    --border-color-soft: rgba(128, 128, 128, 0.2);
    --bg-color-soft: rgba(128, 128, 128, 0.05);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.05);
    --message-bot-bg: #f8f9fa;
    --primary-color-dark: #C62828;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
   
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* iOS'ta input odaklanmasında otomatik zoom'u engelle */
input, textarea, select, .input-field, .initial-input-field {
    font-size: 16px !important;
}

/* ===== 2. Ana Yerleşim (Layout) ===== */
.main-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    transition: left 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    z-index: 1000;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative; 
    transition: background-color 0.3s ease;
}

/* ===== 3. Kenar Çubuğu (Sidebar) ===== */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.3s ease;
}

.sidebar-header h2 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 16px;
}

.sidebar-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-menu {
    list-style: none;
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 6px;
}

.sidebar-menu button {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-menu button i {
    width: 18px;
    text-align: center;
}

.sidebar-theme-toggle-container {
    padding: 16px;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-theme-toggle {
    width: 100%;
    background: none;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--accent);
    border-color: var(--accent);
}

.whatsapp-button {
    width: 100%;
    background: #25D366;
    color: white;
    border: 1px solid #25D366;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.whatsapp-button:hover {
    background: #128C7E;
    border-color: #128C7E;
}

.whatsapp-button i {
    color: white !important;
    font-size: 16px;
}

/* ===== 4. Sohbet Alanı (Chat Area) ===== */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 18px;
}

.menu-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-start;
}

.bot-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.bot-status {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
    margin-left: 8px;
}

/* chat.css dosyasında bulun */
.chat-area {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* BU SATIRI EKLEYİN */
    overflow-x: hidden; /* Yatay kaydırmayı engellemek için eklendi */
}

/* ===== Dinamik ve Gizli Kaydırma Çubukları ===== */
.chat-area, .modal-scrollable-content {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.chat-area::-webkit-scrollbar,
.modal-scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.chat-area::-webkit-scrollbar-track,
.modal-scrollable-content::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb,
.modal-scrollable-content::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 4px;
    border: none;
    background-clip: padding-box;
}

.chat-area:hover::-webkit-scrollbar-thumb,
.modal-scrollable-content:hover::-webkit-scrollbar-thumb,
.chat-area.scrollbar-visible::-webkit-scrollbar-thumb {
    background-color: var(--accent);
}

/* ===== 5. Başlangıç Ekranı (Initial View) ===== */
.initial-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    padding: 20px 16px;
    width: 100%;
    box-sizing: border-box;
}

.initial-view.hidden {
    display: none !important;
}

.initial-view h1 {
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 20px;
    word-break: break-word;
}

.welcome-message {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 90%;
    word-break: break-word;
}

.initial-menu-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    overflow-x: auto;
    padding: 10px 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.initial-menu-buttons::-webkit-scrollbar {
    display: none;
}

.initial-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border: 2px solid transparent;
    color: var(--text-secondary);
    padding: 12px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    min-width: 120px;
    width: 120px;
    height: 80px;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow);
    flex-shrink: 0;
    white-space: normal;
}

.initial-menu-btn i {
    font-size: 22px;
    margin-bottom: 6px;
}

.initial-menu-btn:hover {
    transform: translateY(-2px) scale(1.01);
    color: var(--text-primary);
    border-color: var(--accent);
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.15);
}

.initial-menu-btn.selected {
    border-color: var(--accent);
    background-color: rgba(229, 57, 53, 0.08);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.initial-menu-btn.selected i {
    color: var(--accent);
    transform: scale(1.05);
}

.initial-input-container {
    position: relative;
    width: 100%;
    max-width: 850px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.initial-input-field {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.initial-send-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 16px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.initial-send-button:hover {
    background: var(--accent-hover);
}

.initial-send-button i {
    font-size: 16px;
    color: white;
}

/* chat.css dosyasında bulun ve DEĞİŞTİRİN */
.chat-messages {
    display: none;
    /* flex: 1;  <-- BU SATIRI SİLİN VEYA YORUMA ALIN */
    /* overflow-y: auto; <-- BU SATIRI SİLİN VEYA YORUMA ALIN */
    padding: 20px;
    scroll-behavior: smooth;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}
.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    animation: fadeInUp 0.3s ease;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.bot-avatar-small i, .user-avatar i {
    color: #fff;
    font-size: 14px;
}

.user-avatar {
    background: var(--accent);
}

.message-content {
    flex-grow: 0;
    width: -moz-fit-content;
    width: fit-content;
    max-width: calc(100% - 44px);
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.6;
    word-wrap: break-word;
    font-size: 15px;
    min-width: 40px;
    overflow-wrap: break-word;
    word-break: normal;
    overflow: hidden;
}

.bot-message-container {
    position: relative;
    min-width: 0;
}

.bot-message {
    background: var(--message-bot-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.user-message {
    background: var(--message-user-bg);
    color: white;
}

/* Yazıyor... Göstergesi */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    animation: fadeInUp 0.3s ease;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--message-bot-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }


/* ===== 7. Sohbet Kontrolleri (Input Alanı) ===== */
.chat-controls {
    display: none;
    padding: 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.quick-replies {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-replies button {
    padding: 8px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.quick-replies button:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.input-area {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    resize: none;
    min-height: 48px;
    max-height: 120px;
}

.input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.input-field::placeholder {
    color: var(--text-secondary);
}

.send-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    height: 48px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px var(--shadow);
}

.send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.1);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* ===== 8. Zenginleştirilmiş İçerik Stilleri (Markdown, Kartlar vb.) ===== */
.bot-message p { margin: 10px 0; line-height: 1.6; }
.bot-message ul, .bot-message ol { margin: 15px 0; padding-left: 25px; }
.bot-message li { margin: 8px 0; line-height: 1.5; }
.bot-message h1, .bot-message h2, .bot-message h3 { margin-top: 20px; margin-bottom: 10px; }
.bot-message code { font-family: 'Courier New', monospace; background-color: rgba(0,0,0,0.1); padding: 2px 4px; border-radius: 4px; }
.bot-message a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}
.bot-message a:hover {
    border-bottom-color: var(--accent-hover);
    color: var(--accent-hover);
}
#chatMessages .message.bot .message-content img {
    width: auto; /* DÜZELTİLMİŞ SATIR */
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 8px !important;
    margin: 10px 0 !important;
    object-fit: contain;
}

.table-container {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
}
.md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.md-table th, .md-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.md-table th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
}
.md-table tr:last-child td { border-bottom: none; }

.bot-message pre {
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bot-message pre code {
    padding: 0;
    background: none;
    white-space: pre-wrap;
}

.responsive-video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    margin: 10px 0;
    border-radius: 8px;
}
.responsive-video-container iframe,
.responsive-video-container video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

.message-card {
    width: 100%;
    max-width: 100%; /* DÜZELTME: Kart taşmasını önler */
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    transition: all 0.2s ease-in-out;
}
.message-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.document-card {
    display: flex; align-items: center; padding: 15px; gap: 15px;
}
.document-card .document-preview-icon {
    flex-shrink: 0; font-size: 38px; color: var(--accent); width: 40px; text-align: center;
}
.document-card .document-card-content {
    flex-grow: 1; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
}
.document-card .document-card-title {
    margin: 0; font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.document-card .document-card-link {
    display: inline-block; align-self: flex-start; text-decoration: none; font-weight: 500; color: white; background-color: var(--accent); padding: 8px 16px; border-radius: 8px; font-size: 14px; transition: background-color 0.2s ease;
}
.document-card .document-card-link:hover {
    background-color: var(--accent-hover);
}
.document-card .document-card-link .fa-external-link-alt {
    margin-left: 6px; font-size: 12px;
}

.youtube-preview-card .youtube-thumbnail {
    position: relative; width: 100%; padding-bottom: 56.25%; background-size: cover; background-position: center;
}
.youtube-preview-card .play-overlay-link {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, 0.4); transition: background-color 0.3s ease;
}
.youtube-preview-card .play-overlay-link:hover { background-color: rgba(0, 0, 0, 0.6); }
.youtube-preview-card .play-overlay {
    color: #ffffff; font-size: 48px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); transition: transform 0.3s ease;
}
.youtube-preview-card .play-overlay-link:hover .play-overlay { transform: scale(1.1); }
.youtube-preview-card .youtube-info { padding: 12px 15px; border-top: 1px solid var(--border); }
.youtube-preview-card .youtube-info h4 { margin: 0 0 10px 0; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.youtube-preview-card .youtube-link {
    display: inline-flex; align-items: center; text-decoration: none; color: #fff; background-color: #ff0000; padding: 8px 12px; border-radius: 20px; font-weight: 500; font-size: 13px; gap: 6px; transition: background-color 0.2s ease;
}
.youtube-preview-card .youtube-link:hover { background-color: #cc0000; }


/* ===== 9. Modallar ve Yardımcı Pencereler ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px var(--shadow);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-close-btn {
    position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 24px; width: 32px; height: 32px; line-height: 32px; text-align: center; border-radius: 50%; transition: all 0.3s ease; z-index: 10;
}
.modal-close-btn:hover {
    background: var(--bg-tertiary); color: var(--text-primary); transform: scale(1.1);
}

.modal-content h2 {
    color: var(--text-primary); font-size: 20px; font-weight: 600; text-align: center; padding: 24px 32px 16px 32px; border-bottom: 1px solid var(--border);
}
.modal-scrollable-content {
    padding: 20px 32px 32px 32px; overflow-y: auto; flex-grow: 1; max-height: calc(80vh - 80px);
}
#supportRequestForm {
    display: flex; flex-direction: column; gap: 16px;
}
#supportRequestForm label {
    color: var(--text-primary); font-weight: 500; margin-bottom: 8px; display: block;
}
#supportRequestForm input, #supportRequestForm textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); font-size: 14px; outline: none; transition: all 0.3s ease;
}
#supportRequestForm input:focus, #supportRequestForm textarea:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}
#supportRequestForm textarea { resize: vertical; min-height: 80px; }
.modal-send-button {
    background: var(--gradient-primary); color: white; border: none; border-radius: 8px; padding: 12px 20px; cursor: pointer; font-size: 15px; font-weight: 500; transition: all 0.2s ease; margin-top: 8px;
}
.modal-send-button:hover {
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}
.modal-message {
    margin-top: 12px; padding: 12px; border-radius: 8px; text-align: center; font-weight: 500;
}
.modal-message.success { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.modal-message.error { background: rgba(248, 113, 113, 0.1); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }

.analysis-modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s ease;
}
.analysis-modal.active { display: block; opacity: 1; }
.analysis-modal-content {
    background-color: #2d3748; color: #e2e8f0; margin: 5% auto; border: 1px solid #4a5568; width: 85%; max-width: 1200px; border-radius: 10px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; height: 80vh;
}
.analysis-modal-header {
    padding: 15px 25px; border-bottom: 1px solid #4a5568; display: flex; justify-content: space-between; align-items: center;
}
.analysis-modal-header h3 { margin: 0; font-size: 1.2em; }
.analysis-modal-body { display: flex; flex-grow: 1; overflow: hidden; }
.analysis-sidebar {
    flex: 0 0 280px; border-right: 1px solid #4a5568; padding: 15px; overflow-y: auto; background-color: #1a202c;
}
.analysis-main-content { flex-grow: 1; padding: 25px; overflow-y: auto; }
.analysis-category-item {
    display: block; width: 100%; padding: 12px 15px; background-color: transparent; border: 1px solid transparent; color: #a0aec0; text-align: left; cursor: pointer; font-size: 15px; border-radius: 6px; margin-bottom: 5px; transition: all 0.2s ease;
}
.analysis-category-item:hover { background-color: #2d3748; color: #fff; }
.analysis-category-item.active { background-color: var(--accent); color: #fff; font-weight: bold; border-color: var(--accent); }
.analysis-main-content .placeholder {
    display: flex; justify-content: center; align-items: center; height: 100%; font-size: 1.1em; color: #718096;
}

/* ===== 10. Yardımcı Stiller & Butonlar ===== */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 999; display: none; backdrop-filter: blur(2px);
}
.overlay.active { display: block; }

.scroll-to-bottom-button {
    position: absolute;
    bottom: 125px; 
    right: 30px; 
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.2s ease;
    z-index: 100;
}
.scroll-to-bottom-button.active { display: flex; }
.scroll-to-bottom-button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.scroll-to-bottom-button i { font-size: 20px; }

.message-actions { display: flex; gap: 8px; margin-top: 8px; opacity: 0; transition: opacity 0.3s ease; }
.message.bot:hover .message-actions { opacity: 1; }
.action-btn {
    background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary); padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; transition: all 0.2s ease;
}
.action-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.action-btn:active { transform: scale(0.95); }

.progress-update-container { width: 100%; padding: 5px 15px; box-sizing: border-box; margin-bottom: 5px; }
.progress-wrapper { background-color: var(--bg-tertiary); border-radius: 8px; padding: 12px; width: 100%; max-width: 400px; margin: 0 auto; border: 1px solid var(--border); }
.progress-container { background-color: var(--border); border-radius: 5px; height: 10px; }
.progress-bar { height: 10px; background-color: var(--accent); border-radius: 5px; width: 0%; transition: width 0.4s ease-in-out; }
.progress-text { font-size: 11px; color: var(--text-secondary); margin-top: 6px; text-align: left; }
.progress-bar.error { background-color: #ef4444; }
.progress-bar.success { background-color: #22c55e; }

.spec-table {
    width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; background-color: var(--message-bot-bg); border-radius: 8px; overflow: hidden;
}
.spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child strong { color: var(--text-secondary); text-transform: capitalize; }
.spec-table td:last-child { color: var(--text-primary); font-weight: 500; }

.action-button {
    background-color: var(--accent); color: white; border: none; border-radius: 6px; padding: 10px 15px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color 0.2s; margin-top: 5px;
}
.action-button:hover { background-color: var(--accent-hover); }

.typewriter-cursor {
    display: inline-block; width: 2px; height: 1.2em; background: var(--accent); margin-left: 2px; animation: blink 1s infinite; vertical-align: text-bottom;
}


/* ===== 11. Animasyonlar (@keyframes) ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalSlideIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
@keyframes typingAnimation { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-8px); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }


/* ===== 12. Duyarlı Tasarım (Responsive) ===== */
@media (max-width: 992px) {
    .menu-toggle, .sidebar-close-btn { display: block; }
    .sidebar { position: fixed; left: -320px; width: 320px; z-index: 1001; }
    .sidebar.active { left: 0; box-shadow: 0 0 20px rgba(0,0,0,0.2); }
}

@media (max-width: 768px) {
    body { height: 100vh; height: 100dvh; } /* DÜZELTME: .chat-container kaldırıldı */
    .chat-header { padding: 12px 16px; box-shadow: 0 2px 10px var(--shadow); }
    .chat-messages { display: block; flex: 1; overflow-y: auto; padding: 12px; }
    .initial-view { padding: 15px 10px; }
    .initial-view h1 { font-size: 2rem; }
    .welcome-message { font-size: 1rem; margin-bottom: 25px; }
    .initial-menu-buttons { gap: 8px; padding: 10px 8px; justify-content: center; }
    .initial-menu-btn { min-width: 90px; width: 90px; height: 65px; font-size: 11px; padding: 8px 4px; }
    .initial-menu-btn i { font-size: 18px; margin-bottom: 3px; }
    .initial-input-container { max-width: calc(100% - 20px); margin: 15px auto; }
    .initial-input-field { padding: 12px 15px; font-size: 14px; }
    .message-content { max-width: calc(100% - 44px); padding: 10px 14px; font-size: 15px; }
    .chat-controls { display: block; padding: 12px 16px; }
    .input-field { min-height: 48px; }
    .scroll-to-bottom-button { bottom: 115px; right: 15px; width: 36px; height: 36px; }
    .modal-content h2 { font-size: 18px; padding: 20px 24px 14px 24px; }
    .modal-scrollable-content { padding: 16px 24px 24px 24px; max-height: calc(80vh - 70px); }
}

@media (max-width: 480px) {
    .header-center .bot-name { font-size: 16px; }
    .initial-view h1 { font-size: 1.7rem; }
    .welcome-message { font-size: 0.9rem; }
    .quick-replies { 
        justify-content: flex-start;
        padding-bottom: 8px; 
        flex-wrap: wrap; /* DÜZELTME: Butonların alt satıra inmesini sağlar */
    }
    .quick-replies button { flex-shrink: 0; }
    .chat-controls { padding: 10px; }
    .input-field { min-height: 44px; }
    .send-button { height: 44px; }
    .initial-menu-buttons { gap: 6px; padding: 8px 5px; }
    .initial-menu-btn { min-width: 80px; width: 80px; height: 60px; font-size: 10px; padding: 6px 3px; }
    .initial-menu-btn i { font-size: 16px; margin-bottom: 2px; }
    .scroll-to-bottom-button { bottom: 110px; right: 12px; width: 32px; height: 32px; }
    .scroll-to-bottom-button i { font-size: 16px; }
}

.sidebar.active { z-index: 1002; }

/* ============================================= */
/* İnatçı Geniş Balonlar İçin Kararlı Çözüm    */
/* ============================================= */
.message.bot .message-content {
    width: -moz-fit-content !important;
    width: fit-content !important;
}
/* Bu CSS kodunu ana stil dosyanıza (örn: style.css) ekleyin */

/* Bot mesajı taşıyıcısına göreceli konumlandırma veriyoruz ki butonlar buna göre hizalansın */
.bot-message-container {
    position: relative;
    width: 100%;
}

/* Mesajın hemen altında görünecek butonların taşıyıcısı */
.in-chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px; /* Mesaj metni ile arasında boşluk bırakır */
    padding-top: 10px;
    border-top: 1px solid var(--border-color); /* Üstüne ince bir ayırıcı çizgi */
    width: 100%;
}

/* Butonların kendisi için stil (mevcut .quick-reply-btn stilinizi kullanır) */
/* Eğer .quick-reply-btn stiliniz varsa bu kısım zaten çalışacaktır. Yoksa aşağıdaki gibi ekleyebilirsiniz. */
.quick-reply-btn {
    background-color: var(--quick-reply-bg);
    color: var(--quick-reply-text);
    border: 1px solid var(--quick-reply-border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.quick-reply-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
/* chat.css dosyasının sonuna ekleyin */

.bot-message-content .in-chat-buttons { /* Daha spesifik olması için .bot-message-content içine aldık */
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.in-chat-button {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
}

.in-chat-button:hover {
    background-color: var(--accent);
    color: #fff;
}

.in-chat-button:disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 0.7;
}

.in-chat-button:disabled:hover {
    background-color: var(--bg-tertiary); /* Hover efektini iptal et */
    color: var(--text-secondary);
}
/* chat.css dosyanızın uygun bir yerine ekleyin */

.in-chat-button.selected {
    background-color: var(--accent);
    color: white;
    font-weight: 500;
    border-color: var(--accent-hover);
}

/* Seçili butonun üzerine gelince renginin değişmemesi için */
.in-chat-button.selected:hover {
    background-color: var(--accent-hover);
}

/* Buton metninin başına bir "tik" ikonu ekleyelim */
.in-chat-button.selected::before {
    content: '✔ ';
    margin-right: 5px;
}
/* ============================================= */
/* ===== FİLTRE MODALI TASARIM GÜNCELLEMESİ ==== */
/* ============================================= */

/* Modalın genel yapısı */
#filterModal .modal-content {
    max-width: 650px;
    max-height: 85vh;
}

#filterModal .modal-footer {
    flex-shrink: 0;
    padding: 16px 32px;
    border-top: 1px solid var(--border);
    background-color: var(--bg-secondary); /* Koyu temada daha iyi durur */
    text-align: right;
}

/* Filtre grupları */
.filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Grup başlıkları */
.filter-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Seçeneklerin sıralanacağı alan */
.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

/* Standart checkbox'ı gizle */
.filter-checkbox {
    display: none;
}

/* Checkbox etiketini (yazıyı) modern bir butona çevir */
.filter-label {
    display: block;
    padding: 10px 15px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

/* Butonun üzerine gelince */
.filter-label:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Checkbox seçildiğinde butonun alacağı stil */
.filter-checkbox:checked + .filter-label {
    background-color: var(--accent);
    border-color: var(--accent-hover);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    transform: translateY(-2px);
}

/* Seçili butona "tik" ikonu ekle */
.filter-checkbox:checked + .filter-label::before {
    content: '✔';
    margin-right: 6px;
    font-weight: bold;
}
/* admin/css/chat.css dosyasının sonuna ekle */

.product-cards-container {
    display: flex;
    overflow-x: auto; /* Yatayda kaydırma */
    padding: 10px 5px;
    margin-top: 10px;
    -webkit-overflow-scrolling: touch; /* Mobil cihazlarda akıcı kaydırma */
    scrollbar-width: thin; /* Firefox için kaydırma çubuğu */
    scrollbar-color: #555 #333; /* Firefox için kaydırma çubuğu rengi */
}

/* Chrome, Edge, Safari için kaydırma çubuğu stilleri */
.product-cards-container::-webkit-scrollbar {
    height: 8px;
}
.product-cards-container::-webkit-scrollbar-track {
    background: #2e2e2e;
    border-radius: 4px;
}
.product-cards-container::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
    border: 2px solid #2e2e2e;
}

.product-card {
    flex: 0 0 160px; /* Kartların genişliği sabit, esnemeyecek */
    margin-right: 15px;
    border-radius: 12px;
    background-color: var(--sidebar-bg-color, #2a2a2a);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.product-card-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Resmin orantısını bozmadan kaplamasını sağlar */
}

.product-card-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-color, #f0f0f0);
}

.product-card-spec {
    margin: 0;
    font-size: 0.85em;
    color: #a0a0a0;
}
.product-cards-container {
        display: flex;
        gap: 15px; /* KARTLAR ARASI BOŞLUK ARTIRILDI */
        overflow-x: auto;
        padding: 10px 15px; /* KENARLARA DA PADDING EKLENDİ */
        margin-top: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        /* Kaydırma çubuğunun daha iyi görünmesi için */
        scrollbar-color: #555 #333; 
    }
    .product-card {
        flex: 0 0 200px; /* KART GENİŞLİĞİ ARTIRILDI (160px -> 200px) */
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        background-color: var(--message-bg-color);
        box-shadow: 0 4px 6px rgba(0,0,0,0.08); /* Gölge belirginleştirildi */
        display: flex;
        flex-direction: column;
        transition: transform 0.2s ease; /* Üzerine gelince efekt için */
    }
    .product-card:hover {
        transform: translateY(-3px); /* Üzerine gelince hafifçe yukarı kalksın */
    }
    .product-card-image {
        width: 100%;
        height: 120px; /* RESİM ALANI YÜKSEKLİĞİ ARTIRILDI (100px -> 120px) */
        background-color: #f0f0f0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .product-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .product-card-info {
        padding: 15px; /* KART İÇİ PADDING ARTIRILDI (10px -> 15px) */
        text-align: center;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .product-card-title {
        font-size: 15px; /* Yazı boyutu büyütüldü */
        font-weight: 500;
        margin: 0 0 5px 0;
        color: var(--text-color);
    }
    .product-card-spec {
        font-size: 13px; /* Yazı boyutu büyütüldü */
        margin: 0;
        color: var(--text-color-light);
    }
    /* Bu CSS kodunu index.php'deki <style> bloğunun içine, en sona ekleyin */

.product-card-info {
    /* Butonun altta kalması için info alanını esnek hale getiriyoruz */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #D32F2F; /* Arka plan rengi kırmızı olarak değiştirildi */
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.product-card-button:hover {
    background-color: #B71C1C; /* Üzerine gelince rengi koyu kırmızı olarak değiştirildi */
}
/* Sadece Koyu Mod için Kart Kenarlığı */
[data-theme="dark"] .product-card {
    border: 1px solid #444; /* Koyu tema için görünür bir kenarlık rengi */
}
/* Bu CSS kodunu index.php'deki <style> bloğunun içine, en sona ekleyin */

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Popüler Ürün Kartları Stili */
.popular-products-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.popular-product-card {
    width: 150px;
    padding: 15px;
    background-color: var(--message-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Animasyon için başlangıçta gizli */
    opacity: 0;
    transform: translateY(20px);
}

.popular-product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.popular-product-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.popular-product-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.popular-product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: var(--text-color);
}

/* Model Yazma Uyarısı ve Animasyonlu Oklar */
.scroll-prompt-container {
    text-align: center;
    padding: 20px;
    color: var(--text-color-light);
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.scroll-prompt-arrows i {
    font-size: 20px;
    margin: 0 5px;
    animation: bounce 2s infinite;
}

.scroll-prompt-arrows i:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-prompt-arrows i:nth-child(3) {
    animation-delay: 0.4s;
}
/* Bu CSS kodunu index.php'deki <style> bloğunun içine, en sona ekleyin */

/* Ürün Detay Ana Konteyner */
.product-detail-container {
    background-color: var(--message-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    animation: fadeInUp 0.5s ease forwards;
}

.product-main-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.product-main-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.product-main-header h2 {
    margin: 0;
    color: var(--text-color);
}

/* Özellik İkonları Grid */
.feature-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.feature-icon-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    background-color: var(--bg-color);
}
[data-theme="dark"] .feature-icon-item {
     background-color: #2c2c2e; /* Koyu modda daha iyi bir kontrast için */
}


.icon-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.feature-icon-svg {
    width: 48px;
    height: 48px;
}

.icon-tags {
    font-size: 12px;
    color: var(--text-color-light);
    background-color: var(--message-bg-color);
    padding: 4px 8px;
    border-radius: 6px;
}

.icon-body h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-color);
}

.icon-body p {
    margin: 0;
    font-size: 13px;
    color: var(--text-color-light);
    line-height: 1.5;
}

/* Sekmeler (Tabs) */
.product-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

.tab-link {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-color-light);
    position: relative;
    bottom: -2px;
}

.tab-link.active {
    color: #007bff;
    font-weight: 500;
    border-bottom: 2px solid #007bff;
}

.tab-pane {
    display: none;
    animation: fadeInUp 0.3s ease;
}

.tab-pane.active {
    display: block;
}

.tab-pane ul {
    list-style-type: none;
    padding-left: 0;
}
.tab-pane ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color-soft);
    font-size: 14px;
}
.tab-pane ul li:last-child {
    border-bottom: none;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table td {
    padding: 10px;
    border: 1px solid var(--border-color-soft);
    font-size: 14px;
}

.spec-table tr:nth-child(odd) {
    background-color: var(--bg-color-soft);
}

.product-external-link {
    text-align: center;
    margin-top: 25px;
}
.product-external-link a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.product-external-link a:hover {
    background-color: #218838;
}
/* index.php'deki <style> bloğunda ".feature-icon-img" kuralını silip,
   YERİNE bu yeni kodu ve koyu mod kuralını ekleyin */

.feature-icon-fa {
    font-size: 24px; /* İkon boyutu */
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff; /* İkon rengi */
}

[data-theme="dark"] .feature-icon-fa {
    color: #0a84ff; /* Koyu temada daha parlak bir mavi */
}
/* Bu CSS kodunu index.php'deki <style> bloğunun içine, en sona ekleyin */

.feature-icon-item.disabled {
    opacity: 0.4;
    filter: grayscale(80%);
}

.feature-icon-item.disabled .icon-body h3 {
    text-decoration: line-through;
    color: var(--text-color-light);
}
/* Bu CSS bloğunu index.php'deki <style> etiketinin içine,
   ÜRÜN DETAY SAYFASIYLA İLGİLİ ESKİ STİLLERİN YERİNE YAPIŞTIRIN */

/* --- 1. Resim için Zoom Efekti Animasyonu --- */
@keyframes zoomInEffect {
    from {
        transform: scale(1.05);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ürün Detay Ana Konteyner */
.product-detail-container {
    background-color: var(--message-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    animation: fadeInUp 0.5s ease forwards;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); /* Her modda geçerli gölge */
}
[data-theme="dark"] .product-detail-container {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}


.product-main-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color-soft);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.product-main-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    margin-bottom: 15px;
    animation: zoomInEffect 0.7s ease-out forwards; /* Animasyonu uygula */
}

.product-main-header h2 {
    margin: 0;
    color: var(--text-color);
}

/* --- 2. Açık Mod için Kartlara Gölge ve Kenarlık --- */
.feature-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.feature-icon-item {
    border: 1px solid var(--border-color-soft); /* Her modda yumuşak bir kenarlık */
    border-radius: 12px;
    padding: 15px;
    background-color: var(--bg-color-soft);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Her modda yumuşak gölge */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-icon-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .feature-icon-item {
     background-color: #2c2c2e;
     border-color: #444;
}

/* --- 3. Daha Modern Sekme (Tab) Tasarımı --- */
.product-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-link {
    padding: 10px 18px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-link:hover {
    color: var(--text-color);
}

.tab-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
}
[data-theme="dark"] .tab-link.active {
    color: #0a84ff;
    border-bottom-color: #0a84ff;
}

/* --- Geri kalan stiller aynı, sadece okunurluk için düzenlendi --- */
.icon-header { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.feature-icon-fa { font-size: 24px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: #007bff; }
[data-theme="dark"] .feature-icon-fa { color: #0a84ff; }
.icon-tags { font-size: 12px; color: var(--text-color-light); background-color: var(--message-bg-color); padding: 4px 8px; border-radius: 6px; }
.icon-body h3 { margin: 0 0 5px 0; font-size: 16px; color: var(--text-color); }
.icon-body p { margin: 0; font-size: 13px; color: var(--text-color-light); line-height: 1.5; }
.tab-pane { display: none; animation: fadeInUp 0.3s ease; }
.tab-pane.active { display: block; }
.tab-pane ul { list-style-type: none; padding-left: 0; }
.tab-pane ul li { padding: 8px 0; border-bottom: 1px solid var(--border-color-soft); font-size: 14px; }
.tab-pane ul li:last-child { border-bottom: none; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 10px; border: 1px solid var(--border-color-soft); font-size: 14px; }
.spec-table tr:nth-child(odd) { background-color: var(--bg-color-soft); }
.product-external-link { text-align: center; margin-top: 25px; }
.product-external-link a { display: inline-block; padding: 10px 20px; background-color: #28a745; color: #fff; text-decoration: none; border-radius: 8px; transition: background-color 0.2s; }
.product-external-link a:hover { background-color: #218838; }
.feature-icon-item.disabled { opacity: 0.4; filter: grayscale(80%); }
.feature-icon-item.disabled .icon-body h3 { text-decoration: line-through; color: var(--text-color-light); }
/* ======================================================= */
/* === DÜZELTİLMİŞ v3 PROFESYONEL ÜRÜN KARŞILAŞTIRMA TASARIMI === */
/* ======================================================= */

/* Kartların tamamını içeren ve hizalayan ana konteyner */
.comparison-card-container {
    display: grid;
    /* Kartların sayısına göre sütunları otomatik ayarla */
    /* En az 240px genişliğinde, en fazla 1fr (kalan alan) olacak şekilde esnek sütunlar oluşturur */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; /* Kartlar arasındaki boşluk */
    padding-top: 10px;
}

/* Her bir ürün kartının genel stili (DÜZELTİLDİ) */
.comparison-product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--bg-secondary);
    overflow: hidden; /* Dışarı taşmaları engeller */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Koyu temada gölgeyi biraz daha belirgin yapalım (DÜZELTİLDİ) */
[data-theme="dark"] .comparison-product-card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Kartın üzerine gelince hafifçe yukarı kalkma ve gölge efekti (DÜZELTİLDİ) */
.comparison-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
[data-theme="dark"] .comparison-product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}


/* Kartın üst kısmı: Görsel ve Model Adı */
.comparison-product-card .product-card-header {
    padding: 20px 15px;
    text-align: center;
    background-color: var(--bg-tertiary); /* Başlığı gövdeden ayırmak için farklı bir arka plan */
    border-bottom: 1px solid var(--border);
}
/* Görseli saran ve boyutu sabitleyen yeni konteyner */
.comparison-product-card .comparison-image-container {
    height: 150px; /* Tüm konteynerler için sabit yükseklik */
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) inset;
}

/* Konteyner içindeki asıl görselin stili */
.comparison-product-card .comparison-image-container .product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
}
.comparison-product-card .product-model-name {
    font-size: 17px;
    font-weight: 600; /* Kalın ve okunaklı */
    color: var(--text-primary);
    display: block;
}

/* Kartın gövdesi: Özellik listesi */
.comparison-product-card .product-card-body {
    padding: 0;
    flex-grow: 1; /* Kart yüksekliğini eşitlemek için esneklik ver */
}

/* Her bir özellik satırı (Label + Value) */
.comparison-product-card .feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 15px; /* Daha ferah bir görünüm için padding artırıldı */
    border-top: 1px solid var(--border);
    transition: background-color 0.2s ease; /* Hover efekti için geçiş */
}

/* İlk satırın üst çizgisini kaldır */
.comparison-product-card .product-card-body .feature-row:first-child {
    border-top: none;
}

/* Zebra Deseni: Okunabilirliği artırmak için her tekil satıra farklı arka plan */
.comparison-product-card .feature-row:nth-child(odd) {
    background-color: rgba(0,0,0,0.02);
}
[data-theme="dark"] .comparison-product-card .feature-row:nth-child(odd) {
    background-color: rgba(255,255,255,0.02);
}

/* Bir özellik satırının üzerine gelindiğinde arka planını belirginleştir */
.comparison-product-card .feature-row:hover {
    background-color: rgba(229, 57, 53, 0.1); /* Ana vurgu renginin %10 opaklığı */
}

/* Özellik adı (sol taraf) */
.comparison-product-card .feature-label {
    font-size: 13px;
    color: var(--text-secondary); /* Daha az önemli olduğu için ikincil renk */
}

/* Özellik değeri (sağ taraf) */
.comparison-product-card .feature-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 400;
    text-align: right;
}

/* Farklı olan özellik satırlarının stilini belirle */
.comparison-product-card .feature-row.is-different {
    /* Farklı olan satıra dikkat çekmek için soluna bir çizgi ekleyelim */
    border-left: 3px solid var(--accent);
    padding-left: 12px; /* Çizgi için yer aç */
}

.comparison-product-card .feature-row.is-different .feature-label {
    color: var(--text-primary); /* Etiketi daha görünür yap */
}
.comparison-product-card .feature-row.is-different .feature-value {
    color: var(--accent); /* Vurgu rengi */
    font-weight: 700; /* Kalın */
}
/* Karşılaştırma Kartı İçindeki "Ürüne Git" Butonu */
a.comparison-product-button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: var(--accent);
    color: #ffffff; 
    text-decoration: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 400;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Butonun üzerine gelince rengi koyulaşsın ve hafifçe yukarı kalksın */
a.comparison-product-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    color: #ffffff;
}
.comparison-card-container {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Gerekirse yatay kaydır */
    padding: 10px 0;
}

.comparison-card-container > div {
    flex: 0 0 260px; /* Sabit genişlik */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
}
/* ================================================================ */
/* === YAN YANA SIRALAMA İÇİN NİHAİ REVİZE EDİLMİŞ ÇÖZÜM KODU === */
/* ================================================================ */

/* BÖLÜM 1: Karşılaştırma tablosunu içeren sohbet balonunu !important ile tam genişletir */
.message-content.bot-message:has(.comparison-card-container) {
    
    /* İnatçı "fit-content !important" kuralını ezmek için !important kullanıyoruz */
    width: 100% !important; 
    max-width: 100% !important; 
    
    /* Balonun arka planını ve kenarlığını kaldırarak şeffaf bir taşıyıcıya dönüştür */
    background: transparent;
    border: none;
    padding: 0;
}

/* BÖLÜM 2: Masaüstü için Grid ve Kart Stilleri (Değişiklik yok) */
.comparison-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Diğer kart stilleri... (Bu bölüm bir öncekiyle aynı, bütünlük için burada) */
.comparison-product-card .product-card-header { padding: 20px 15px; text-align: center; background-color: var(--bg-tertiary); border-bottom: 1px solid var(--border); }
.comparison-product-card .comparison-image-container { height: 150px; width: 100%; background-color: #ffffff; border-radius: 8px; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; padding: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05) inset; }
.comparison-product-card .product-model-name { font-size: 17px; font-weight: 600; color: var(--text-primary); display: block; }
a.comparison-product-button { font-size: 14px; padding: 8px 16px; }
.comparison-product-card .feature-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 15px; border-top: 1px solid var(--border); }
.comparison-product-card .feature-label { font-size: 14px; color: var(--text-secondary); }
.comparison-product-card .feature-value { font-size: 15px; color: var(--text-primary); font-weight: 500; text-align: right; }
.comparison-product-card .feature-row.is-different { border-left: 3px solid var(--accent); padding-left: 12px; }


/* BÖLÜM 3: Mobil için Kompakt ve Yan Yana Görünüm (Değişiklik yok) */
@media (max-width: 768px) {
  .comparison-card-container { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .comparison-product-card .product-card-header { padding: 12px 10px; }
  .comparison-product-card .comparison-image-container { height: 100px; margin-bottom: 10px; }
  .comparison-product-card .product-model-name { font-size: 15px; }
  a.comparison-product-button { font-size: 13px; padding: 7px 12px; }
  .comparison-product-card .feature-row { padding: 10px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .comparison-product-card .feature-label { font-size: 12px; }
  .comparison-product-card .feature-value { font-size: 14px; font-weight: 600; text-align: left; }
  .comparison-product-card .feature-row.is-different { border-left-width: 3px; padding-left: 8px; }
}
/* ====================================================== */
/* === MOBİL UYUMLU VE MODERN KART TASARIMI (YENİ) === */
/* ====================================================== */

/* --- 1. Kartları Taşıyan Ana Konteyner --- */
.product-cards-container {
  display: grid; /* Kartları Flexbox yerine Grid ile hizala */
  /* Bu sihirli satır mobil uyumluluğu otomatik yapar: */
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; /* Kartlar arasındaki boşluk */
  padding: 10px 0;
  width: 100%;
}

/* --- 2. Tek Bir Ürün Kartının Stilleri --- */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--message-bg-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column; /* İçerikleri dikeyde hizala */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* --- 3. Kart Resim Alanı ve Eksik Resim Stili --- */
.product-card-image {
  background-color: #f0f2f5; /* Resim yoksa görünecek arkaplan */
  width: 100%;
  aspect-ratio: 4 / 3; /* Tüm resim alanlarının oranını eşitle */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Resim olmadığında ortaya bir ikon koyalım */
.product-card-image::before {
  content: '\f030'; /* FontAwesome kamera ikonu */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 36px;
  color: #d1d5db;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Resmin tamamının görünmesini sağla */
  position: absolute;
  top: 0; left: 0;
  background-color: white; /* Resimlerin arkası beyaz olsun */
}

/* --- 4. Kart Bilgi ve Buton Alanı --- */
.product-card-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Bu alanın kalan tüm boşluğu kaplamasını sağla */
  justify-content: space-between; /* İçerikleri üste ve alta yasla */
  text-align: center;
}

.product-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 4px 0;
}

.product-card-spec {
  font-size: 12px;
  color: var(--text-color-muted);
  margin: 0 0 10px 0;
}

.product-card-button {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background-color: #d32f2f; /* Kırmızı renk */
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  transition: background-color 0.2s ease;
}

.product-card-button:hover {
  background-color: #b71c1c; /* Koyu kırmızı */
}

/* --- 5. "Diğer Cihazlar" Listesinin Mobil Uyumu --- */
.message-content .chat-text-list {
  max-width: 450px; /* Listenin çok genişlemesini engelle */
  width: 100%;
  box-sizing: border-box;
}
/* ====================================================== */
/* === "DİĞER CİHAZLAR" LİSTESİ İÇİN GELİŞMİŞ STİL === */
/* ====================================================== */

/* Liste (ul) elemanının kendisi (Bu zaten olmalı) */
.chat-text-list ul {
  list-style: none; /* Varsayılan madde imlerini kaldır */
  padding: 0;
  margin: 0;
}

/* Her bir liste satırı (li) */
.chat-text-list li {
  padding: 10px 0 10px 20px; /* Sola özel madde imi için boşluk bırak */
  color: var(--text-color);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  position: relative; /* Madde imini konumlandırmak için gerekli */
}

/* Her satırın başına CSS ile özel madde imi ekleyelim */
.chat-text-list li::before {
  content: '■'; /* Unicode kare karakteri */
  position: absolute;
  left: 0;
  top: 10px;
  color: #a0a0a0; /* Daha yumuşak bir renk */
  font-size: 12px;
}

/* Son liste elemanının altındaki çizgiyi kaldır */
.chat-text-list li:last-child {
  border-bottom: none;
  padding-bottom: 5px; /* Alt boşluğu biraz azalt */
}

/* Liste içindeki linkler (a) - KIRMIZI yerine MAVİ */
.chat-text-list li a {
  color: var(--link-color, #3498db); /* Temel link rengi (mavi) */
  text-decoration: none;
  font-weight: 600; /* Yazıyı biraz daha belirgin yap */
  transition: color 0.2s ease;
}

/* Linklerin üzerine gelindiğinde */
.chat-text-list li a:hover {
  text-decoration: underline;
}
/* Yeni Detaylı Buton Stilleri */

.in-chat-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 15px;
}

.in-chat-button-detailed {
  /* Varsayılan buton stillerini sıfırla */
  background: var(--message-bg-color);
  border: 1px solid var(--border-color);
  padding: 15px;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px; /* Başlık ve açıklama arası boşluk */
  transition: all 0.2s ease-in-out;
  font-family: inherit; /* Ana fontu kullan */
}

.in-chat-button-detailed:hover {
  border-color: #007bff;
  background-color: var(--hover-bg-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.in-chat-button-detailed .button-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  pointer-events: none; /* İçindeki yazıların tıklamayı engellememesi için */
}

.in-chat-button-detailed .button-description {
  font-size: 13px;
  color: var(--text-secondary-color);
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
}
