/* Bediş 3D karakter katmanı – index_yeni2.php ve ürün sayfası ortak */
.bd-chef {
  position: fixed; left: 0; bottom: 0; z-index: 45; pointer-events: none;
  width: var(--bd-chef-w, clamp(220px, 22vw, 340px)); height: var(--bd-chef-h, min(72vh, 660px));
  opacity: 0; visibility: hidden;
}
.bd-chef-body { position: absolute; inset: 0; }
.bd-chef-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bd-chef-fallback {
  display: none; position: absolute; left: 50%; bottom: 2%; height: 86%; width: auto; max-width: none;
  transform: translateX(-50%); mix-blend-mode: multiply;
}
.bd-chef.is-fallback .bd-chef-canvas { display: none; }
.bd-chef.is-fallback .bd-chef-fallback { display: block; }
.bd-chef-shadow {
  position: absolute; left: 50%; bottom: 1.4%; width: 46%; height: 26px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(60, 40, 20, .28), rgba(60, 40, 20, 0)); border-radius: 50%;
}
.bd-chef-bubble {
  position: absolute; top: 3%; z-index: 2; width: clamp(200px, 19vw, 280px);
  padding: 16px 20px 18px; border-radius: 22px; background: #fff; color: var(--bd-ink, #1F1A14);
  box-shadow: 0 24px 50px -28px rgba(60, 35, 15, .55), 0 0 0 1px rgba(31, 26, 20, .06);
  opacity: 0; transform-origin: 0 100%;
}
.bd-chef-bubble::after {
  content: ""; position: absolute; bottom: -9px; width: 22px; height: 22px; background: #fff; border-radius: 0 0 6px 0;
  transform: rotate(45deg); box-shadow: 6px 6px 12px -8px rgba(60, 35, 15, .35);
}
.bd-chef[data-side="left"] .bd-chef-bubble { left: 66%; transform-origin: 0 100%; }
.bd-chef[data-side="left"] .bd-chef-bubble::after { left: 30px; }
.bd-chef[data-side="right"] .bd-chef-bubble { right: 66%; transform-origin: 100% 100%; }
.bd-chef[data-side="right"] .bd-chef-bubble::after { right: 30px; }
.bd-chef-name {
  display: block; margin-bottom: 4px; font-family: var(--font-hand); font-size: 1.25rem; line-height: 1; color: var(--bd-terra, #C45C3E);
}
.bd-chef-bubble p { margin: 0; font-family: var(--font-serif); font-size: clamp(1rem, 1.25vw, 1.18rem); line-height: 1.35; }
.bd-chef-bubble .bd-ch { display: inline-block; white-space: pre; }

@media (max-width: 959px) {
  .bd-chef { width: var(--bd-chef-w, clamp(130px, 34vw, 180px)); height: var(--bd-chef-h, min(40vh, 320px)); }
  .bd-chef-bubble {
    width: min(200px, 52vw);
    padding: 10px 12px 12px;
    top: auto;
    bottom: 72%;
    font-size: .9rem;
  }
  .bd-chef[data-side="left"] .bd-chef-bubble { left: auto; right: 8%; transform-origin: 100% 100%; }
  .bd-chef[data-side="right"] .bd-chef-bubble { right: auto; left: 8%; transform-origin: 0 100%; }
  .bd-chef[data-side="left"] .bd-chef-bubble::after { left: auto; right: 22px; }
  .bd-chef[data-side="right"] .bd-chef-bubble::after { right: auto; left: 22px; }
  .bd-chef-bubble p { font-size: .88rem; }
  .bd-hero .bd-chef-bubble { max-width: 46vw; }
}

/* Ürün sayfası: yorumlar bölümünde sağda durur, kartlar altında kalmaz. */
.bd-chef.is-review { left: auto; right: 2vw; transition: opacity .5s ease, transform 1.6s cubic-bezier(.45, 0, .25, 1); transform: translateX(calc(100% + 4vw)); }
.bd-chef.is-review.is-in { opacity: 1; transform: translateX(0); }
.bd-chef.is-review .bd-chef-bubble { transition: opacity .35s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); transform: scale(.85) translateY(12px); }
.bd-chef.is-review .bd-chef-bubble.is-on { opacity: 1; transform: none; }
@media (max-width: 899px) {
  body.has-sticky-buy .bd-chef.is-review { bottom: 64px; }
}
@media (min-width: 960px) {
  .reviews-block.has-bd-chef { padding-right: max(20px, calc((1180px - 100vw) / 2 + 2vw + clamp(220px, 22vw, 340px) + 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .bd-chef.is-review, .bd-chef.is-review .bd-chef-bubble { transition: opacity .3s ease; transform: none; }
}
