/* Ürün Asistanı (kas-). Tailwind'e bağımlı değil; anasayfa renkleriyle uyumlu (kırmızı #d30f0f). */
.kas { --kas-kirmizi: #d30f0f; --kas-koyu: #0f172a; --kas-soluk: #64748b; --kas-cizgi: #e2e8f0; font-family: inherit; }
.kas-ac {
  position: fixed; right: 18px; bottom: 18px; z-index: 35;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 14px;
  background: var(--kas-kirmizi); color: #fff; font: inherit; font-size: 14px; font-weight: 800;
  box-shadow: 0 10px 24px -8px rgba(211, 15, 15, .55), 0 2px 6px rgba(15, 23, 42, .2); cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.kas-ac:hover { transform: translateY(-2px); }
.kas-ac svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
/* Bot ikonu: beyaz daire içinde kırmızı robot yüzü; gözler arada bir kırpar */
.kas-ac-ikon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-left: -4px; border-radius: 10px; background: #fff; color: var(--kas-kirmizi); box-shadow: 0 2px 6px rgba(15, 23, 42, .25); }
.kas-ac-ikon svg { width: 21px; height: 21px; }
.kas-ac-ikon .kas-goz { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center; animation: kas-kirp 4s infinite; }
@keyframes kas-kirp { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .kas-ac-ikon .kas-goz { animation: none; } }
.kas.acik .kas-ac { display: none; }

/* Sanal asistan (17 Kasım): yuvarlak fotoğraf + yeşil "çevrimiçi" noktası; düğmede iki satır yazı */
/* Düğme biraz küçültüldü (17 Kasım, kullanıcı isteği): 52 → 46 px yükseklik, fotoğraf 34 px, yazı 13 px */
.kas-ac { min-height: 46px; padding: 0 14px 0 6px; font-size: 13px; border-radius: 13px; }
.kas-ac .kas-avatar { width: 34px; height: 34px; }
.kas-ac .kas-cevrimici-nokta { width: 11px; height: 11px; }
.kas-ac .kas-ac-yazi small { font-size: 10.5px; }
.kas-avatar { position: relative; flex: none; width: 40px; height: 40px; }
.kas-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .3); }
.kas-cevrimici-nokta {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px;
  border: 2px solid #fff; border-radius: 50%; background: #22c55e;
}
.kas-cevrimici-nokta::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; background: #22c55e;
  animation: kas-nabiz 2.2s ease-out infinite; z-index: -1;
}
@keyframes kas-nabiz { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.kas-ac-yazi { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.kas-ac-yazi small { margin-top: 2px; font-size: 11px; font-weight: 600; opacity: .9; }
.kas-bas-kimlik { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kas-avatar-bas img { border-color: rgba(255, 255, 255, .85); }
.kas-durum { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; opacity: .95; }
.kas-durum i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(74, 222, 128, .3); }
@media (prefers-reduced-motion: reduce) { .kas-cevrimici-nokta::after { animation: none; display: none; } }

.kas-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 38;
  display: flex; flex-direction: column;
  width: 380px; height: min(620px, calc(100vh - 36px)); height: min(620px, calc(100dvh - 36px));
  border: 1px solid var(--kas-cizgi); border-radius: 18px; background: #fff; color: var(--kas-koyu);
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .35); overflow: hidden;
}
.kas-panel[hidden] { display: none; }
.kas-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--kas-kirmizi); color: #fff; }
.kas-bas strong { display: block; font-size: 15px; }
.kas-bas small { display: block; opacity: .85; font-size: 11px; font-weight: 600; }
.kas-kapat { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.kas-kapat:hover { background: rgba(255, 255, 255, .3); }
.kas-bas-arac { display: flex; align-items: center; gap: 6px; }
.kas-ses { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; }
.kas-ses:hover { background: rgba(255, 255, 255, .3); }
.kas-ses svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kas-ses .kas-ses-kapali { display: none; }
.kas-ses[aria-pressed="false"] .kas-ses-acik { display: none; }
.kas-ses[aria-pressed="false"] .kas-ses-kapali { display: block; }

.kas-akis { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; background: #f8fafc; overscroll-behavior: contain; }
.kas-balon { max-width: 88%; margin: 0 0 8px; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.kas-balon.asistan { background: #fff; border: 1px solid var(--kas-cizgi); border-top-left-radius: 4px; }
.kas-balon.musteri { margin-left: auto; background: var(--kas-koyu); color: #fff; border-top-right-radius: 4px; }
.kas-balon.hata { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.kas-tekrar { display: block; margin-top: 8px; padding: 6px 12px; border: 1px solid #fca5a5; border-radius: 10px; background: #fff; color: #b91c1c; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.kas-tekrar:hover { background: #fee2e2; }
.kas-yaziyor { display: inline-flex; gap: 4px; padding: 12px 14px; }
.kas-yaziyor i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: kas-zipla 1s infinite ease-in-out; }
.kas-yaziyor i:nth-child(2) { animation-delay: .15s; }
.kas-yaziyor i:nth-child(3) { animation-delay: .3s; }
.kas-yaziyor.uzun { flex-wrap: wrap; align-items: center; }
.kas-bekle { flex-basis: 100%; margin-top: 6px; color: #64748b; font-size: 12.5px; font-style: italic; }
@keyframes kas-zipla { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kas-yaziyor i { animation: none; } .kas-ac { transition: none; } }

/* Ürün kartları (fiyat/stok yok) */
.kas-kartlar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.kas-kart {
  display: flex; flex-direction: column; min-width: 0; padding: 8px; border: 1px solid var(--kas-cizgi); border-radius: 12px;
  background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.kas-kart:hover { border-color: var(--kas-kirmizi); box-shadow: 0 4px 12px -6px rgba(211, 15, 15, .4); }
.kas-kart-gorsel { position: relative; display: grid; place-items: center; height: 72px; margin-bottom: 6px; }
.kas-kart-gorsel img { max-width: 100%; max-height: 72px; object-fit: contain; }
.kas-kart-gorsel span { color: #94a3b8; font-size: 11px; }
.kas-rozet { position: absolute; top: 0; left: 0; padding: 1px 6px; border-radius: 999px; background: var(--kas-kirmizi); color: #fff; font-size: 9px; font-weight: 800; }
.kas-rozet.yeni { left: auto; right: 0; background: #16a34a; }
.kas-kart-marka { color: var(--kas-kirmizi); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.kas-kart-ad { margin: 1px 0 2px; font-size: 12px; font-weight: 750; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kas-kart-oz { color: var(--kas-soluk); font-size: 11px; line-height: 1.3; }
.kas-kart-koli { margin-top: auto; padding-top: 4px; color: #1e293b; font-size: 10.5px; font-weight: 700; }
.kas-kart-git { margin-top: 4px; color: var(--kas-kirmizi); font-size: 11px; font-weight: 800; }

/* İletişim kartı (19 Kasım): asistan "bilmiyorum" yerine adres / telefon / WhatsApp gösterir */
.kas-ilt { max-width: 88%; margin: 0 0 10px; padding: 10px; border: 1px solid var(--kas-cizgi); border-left: 3px solid var(--kas-kirmizi); border-radius: 12px; background: #fff; }
.kas-ilt-bas { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 800; }
.kas-ilt-satir { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 9px; color: inherit; text-decoration: none; transition: background .15s; }
.kas-ilt-satir + .kas-ilt-satir { margin-top: 2px; }
a.kas-ilt-satir:hover, a.kas-ilt-satir:focus-visible { background: #fef2f2; }
.kas-ilt-etiket { color: var(--kas-soluk); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.kas-ilt-deger { font-size: 13.5px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.kas-ilt-satir.tel .kas-ilt-deger { color: var(--kas-kirmizi); }
.kas-ilt-satir.wa .kas-ilt-etiket { color: #059669; }
.kas-ilt-satir.wa .kas-ilt-deger { color: #047857; }
.kas-ilt-satir.adres .kas-ilt-etiket { color: #0284c7; }

.kas-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--kas-cizgi); background: #fff; }
.kas-form textarea {
  flex: 1; min-width: 0; max-height: 96px; min-height: 42px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 12px;
  font: inherit; font-size: 16px; line-height: 1.35; resize: none; color: var(--kas-koyu);
}
.kas-form textarea:focus { border-color: var(--kas-kirmizi); outline: 0; box-shadow: 0 0 0 3px rgba(211, 15, 15, .15); }
.kas-gonder { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: var(--kas-kirmizi); color: #fff; line-height: 0; cursor: pointer; }
.kas-gonder:disabled { opacity: .45; cursor: not-allowed; }
.kas-gonder svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: translateX(-1px); }
.kas-gonder:not(:disabled):hover { background: #b91c1c; }
.kas-tuzak { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.kas-not { margin: 0; padding: 0 12px 10px; background: #fff; color: #94a3b8; font-size: 10.5px; }

@media (max-width: 640px) {
  .kas-ac { right: 12px; bottom: 12px; min-height: 44px; padding: 0 12px 0 6px; font-size: 12.5px; }
  /* Telefonda tam ekran; yükseklik ve üst konum JS ile görünen alana (klavye hariç) göre ayarlanır */
  .kas-panel {
    top: 0; right: 0; left: 0; bottom: auto; width: auto;
    height: 100vh; height: 100dvh; border: 0; border-radius: 0; z-index: 70;
  }
  .kas-bas { padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
  .kas-form { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .kas-not { display: none; }
  .kas-kart-gorsel { height: 64px; }
  html.kas-kilit, html.kas-kilit body { overflow: hidden; overscroll-behavior: none; }
}
