/*
 * befcrm.com — kampanya (yılbaşı indirimi): popup, sağ altta WhatsApp düğmesinin üstünde canlı balon, fiyatlar şeridi,
 * plan kartındaki "İlk ödeme" satırı. Görünüm partials/promo.php, davranış js/promo.js. Belirteçler site.css'ten (--t-*,
 * --ink*, --line, --sh-*); yılbaşı vurgusu sıcak altın + mercan. Animasyonlar "hareketi azalt"tan bağımsız açık (site kararı).
 * Balon konumu: .wa-fab (site.css) mobilde 48×48, sağ/alt 16px; ≥720px yükseklik 48, sağ/alt 24px → balon 12px boşlukla
 * üstünde (mobil alt 76px, masaüstü alt 84px). Canlı destek düğmesi (.lc, WhatsApp'ın üstünde) varsa balon bir kat daha
 * yukarıda (mobil 136px, masaüstü 144px). İkisi de yoksa balon en altta durur.
 */
.pm, .pm-ribbon, .plan__promo {
  --pm-ind: var(--t-500, #e60000);
  --pm-ind-2: var(--t-700, #b00000);
  --pm-ink: var(--t-ink, #121214);
  --pm-gold: #f5b82e;
  --pm-gold-2: #ffd978;
  --pm-red: #ef5a3c;
}

/* ============================================================ Balon */
.pm-bubble {
  position: fixed; z-index: 81; right: 11px; bottom: 16px;
  width: 58px; height: 58px; padding: 0; margin: 0; border: 0; border-radius: 50%;
  background: none; color: #fff; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0; visibility: hidden; transform: scale(.35); pointer-events: none;
  transition: opacity .25s, transform .5s cubic-bezier(.34, 1.56, .64, 1), visibility 0s .5s;
}
.pm-bubble.is-on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .25s, transform .55s cubic-bezier(.34, 1.56, .64, 1), visibility 0s; }
.wa-fab ~ .pm .pm-bubble, .lc ~ .pm .pm-bubble { bottom: 76px; }
/* WhatsApp + canlı destek (partials/livechat.php, 48px hap, 12px aralık) üst üste: balon bir kat daha yukarıda */
.wa-fab ~ .lc ~ .pm .pm-bubble { bottom: 136px; }
@media (min-width: 720px) {
  .pm-bubble { right: 24px; bottom: 24px; }
  .wa-fab ~ .pm .pm-bubble, .lc ~ .pm .pm-bubble { bottom: 84px; }
  .wa-fab ~ .lc ~ .pm .pm-bubble { bottom: 144px; }
}
/* WhatsApp düğmesi solda (sağdan sola düzen) ise balon da solda (promo.js .pm--start ekler) */
.pm--start .pm-bubble { right: auto; left: 11px; }
@media (min-width: 720px) { .pm--start .pm-bubble { left: 24px; } }
/* Mobil menü açıkken (site.js html.is-locked) ve dar ekranda çerez bandı açıkken gizli — WhatsApp düğmesiyle aynı */
html.is-locked .pm-bubble { display: none; }
@media (max-width: 639px) { .cookie.is-on ~ .pm .pm-bubble { opacity: 0; visibility: hidden; pointer-events: none; } }
.pm-bubble:focus-visible { outline: 3px solid var(--pm-ind); outline-offset: 4px; }

.pm-bubble__hop { position: absolute; inset: 0; animation: pm-hop 6.4s cubic-bezier(.3, .7, .4, 1) 2.2s infinite; }
.pm-bubble__core {
  position: absolute; inset: 0; z-index: 1; border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 1px;
  background:
    radial-gradient(90% 90% at 30% 18%, rgba(255, 255, 255, .34) 0, rgba(255, 255, 255, 0) 52%),
    linear-gradient(150deg, color-mix(in srgb, var(--pm-ind) 82%, #fff) 0%, var(--pm-ind) 42%, var(--pm-ind-2) 100%);
  box-shadow: 0 0 0 2px var(--pm-gold), 0 0 0 4px rgba(255, 255, 255, .9), 0 14px 28px -10px color-mix(in srgb, var(--pm-ind-2) 75%, transparent), 0 3px 8px rgba(15, 15, 18, .18);
  animation: pm-float 3.6s ease-in-out infinite;
  transition: transform .2s var(--ease, ease);
}
.pm-bubble:hover .pm-bubble__core { transform: scale(1.06); }
.pm-bubble:active .pm-bubble__core { transform: scale(.96); }
.pm-bubble__gift { width: 15px; height: 15px; color: var(--pm-gold-2); stroke-width: 2.2; margin-bottom: -1px; }
.pm-bubble__pct { display: block; font-size: 1rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: #fff; }
.pm-bubble__ring { position: absolute; inset: 0; border-radius: 50%; }
.pm-bubble__ring::before, .pm-bubble__ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--pm-gold); opacity: 0;
  animation: pm-ring 2.6s cubic-bezier(.2, .6, .35, 1) infinite;
}
.pm-bubble__ring::after { border-color: color-mix(in srgb, var(--pm-ind) 55%, #fff); animation-delay: 1.3s; }
.pm-bubble__spark { position: absolute; z-index: 2; top: -5px; right: -4px; width: 18px; height: 18px; display: grid; place-items: center; color: var(--pm-gold); filter: drop-shadow(0 1px 2px rgba(120, 70, 0, .35)); animation: pm-twinkle 2.8s ease-in-out infinite; }
.pm-bubble__spark .ic { width: 16px; height: 16px; fill: var(--pm-gold-2); stroke: var(--pm-gold); stroke-width: 1.5; }
.pm-bubble__dot { position: absolute; z-index: 2; left: 2px; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--pm-red); box-shadow: 0 0 0 2px #fff; animation: pm-twinkle 2.8s ease-in-out 1.4s infinite; }

/* Masaüstü etiket: üzerine gelince / odakta (ve balon ilk belirdiğinde kısa süre: .is-peek) */
.pm-bubble__tip {
  position: absolute; z-index: 3; right: calc(100% + 14px); top: 50%;
  padding: 8px 13px; border-radius: 999px; background: var(--ink, #0f0f12); color: #fff;
  font-size: .8125rem; font-weight: 650; line-height: 1; white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(15, 15, 18, .5);
  opacity: 0; transform: translate(8px, -50%); pointer-events: none;
  transition: opacity .2s, transform .3s var(--ease, ease);
  display: none;
}
.pm-bubble__tip::after { content: ""; position: absolute; top: 50%; right: -4px; width: 9px; height: 9px; background: inherit; border-radius: 2px; transform: translateY(-50%) rotate(45deg); }
.pm--start .pm-bubble__tip { right: auto; left: calc(100% + 14px); transform: translate(-8px, -50%); }
.pm--start .pm-bubble__tip::after { right: auto; left: -4px; }
@media (hover: hover) and (min-width: 720px) {
  .pm-bubble__tip { display: block; }
  .pm-bubble:hover .pm-bubble__tip, .pm-bubble:focus-visible .pm-bubble__tip, .pm-bubble.is-peek .pm-bubble__tip { opacity: 1; transform: translate(0, -50%); }
}

@keyframes pm-ring { 0% { transform: scale(1); opacity: .8; } 75%, 100% { transform: scale(1.55); opacity: 0; } }
@keyframes pm-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes pm-twinkle { 0%, 100% { transform: scale(.55) rotate(0deg); opacity: .45; } 50% { transform: scale(1.12) rotate(28deg); opacity: 1; } }
@keyframes pm-hop {
  0%, 78%, 100% { transform: none; }
  82% { transform: translateY(-9px) rotate(-6deg); }
  86% { transform: translateY(0) rotate(0) scale(1.04, .96); }
  90% { transform: translateY(-4px) rotate(4deg); }
  94% { transform: translateY(0) rotate(0); }
}
/* Balon belirirken (popup kapanınca içine "uçar") */
.pm-bubble.is-pop .pm-bubble__core { animation: pm-pop .6s cubic-bezier(.34, 1.56, .64, 1), pm-float 3.6s ease-in-out .6s infinite; }
@keyframes pm-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* ============================================================ Popup */
html.pm-locked, html.pm-locked body { overflow: hidden; }
.pm-dlg {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.pm-dlg__scrim { position: absolute; inset: 0; background: rgba(15, 15, 18, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .35s; }
.pm-dlg.is-open .pm-dlg__scrim { opacity: 1; }
.pm-card {
  position: relative; z-index: 1; width: min(440px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: auto; overscroll-behavior: contain;
  border-radius: 26px; background: var(--bg, #fff); color: var(--ink, #0f0f12);
  box-shadow: 0 44px 90px -34px rgba(15, 15, 18, .6), 0 14px 32px -18px rgba(15, 15, 18, .32);
  outline: 0; transform-origin: 50% 50%;
}
.pm-card:focus-visible { box-shadow: 0 0 0 3px var(--pm-gold), 0 44px 90px -34px rgba(15, 15, 18, .6); }
/* Balona uçarken içerik solar, kart balon renginde daire olur (promo.js) */
.pm-card.is-fly { overflow: hidden; background: var(--pm-ind); }
.pm-card.is-fly > * { opacity: 0; transition: opacity .12s; }

.pm-card__x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s, transform .2s;
}
.pm-card__x:hover { background: rgba(255, 255, 255, .3); transform: rotate(90deg); }
.pm-card__x:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pm-card__x .ic { width: 18px; height: 18px; stroke-width: 2.4; }

.pm-card__art {
  position: relative; overflow: hidden; height: 156px;
  display: grid; place-items: center; align-content: center; gap: 6px;
  background:
    radial-gradient(55% 85% at 12% 0%, rgba(245, 184, 46, .42), rgba(245, 184, 46, 0) 70%),
    radial-gradient(60% 90% at 100% 100%, rgba(239, 90, 60, .38), rgba(239, 90, 60, 0) 70%),
    linear-gradient(135deg, var(--pm-ind) 0%, var(--pm-ind-2) 100%);
  color: #fff; text-align: center;
}
.pm-card__pct { position: relative; z-index: 1; font-size: 4rem; font-weight: 700; line-height: .95; letter-spacing: -.05em; text-shadow: 0 8px 28px rgba(15, 15, 18, .35); }
.pm-card__off { position: relative; z-index: 1; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pm-gold-2); }
.pm-card__gift {
  position: absolute; z-index: 1; top: 18px; left: 20px; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: var(--pm-gold-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  animation: pm-sway 3.2s ease-in-out infinite; transform-origin: 50% 80%;
}
.pm-card__gift .ic { width: 22px; height: 22px; stroke-width: 2; }
@keyframes pm-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg) translateY(-2px); } }

/* Konfeti (dekor) */
.pm-conf { position: absolute; inset: 0; pointer-events: none; }
.pm-conf i { position: absolute; top: -14px; width: 7px; height: 11px; border-radius: 2px; background: var(--pm-gold-2); opacity: .9; animation: pm-fall 5.6s linear infinite; }
.pm-conf i:nth-child(3n) { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.pm-conf i:nth-child(3n+1) { background: var(--pm-red); }
.pm-conf i:nth-child(1) { left: 6%; animation-delay: -.4s; animation-duration: 6.2s; }
.pm-conf i:nth-child(2) { left: 15%; animation-delay: -2.6s; }
.pm-conf i:nth-child(3) { left: 24%; animation-delay: -1.2s; animation-duration: 4.8s; }
.pm-conf i:nth-child(4) { left: 33%; animation-delay: -3.9s; animation-duration: 6.6s; }
.pm-conf i:nth-child(5) { left: 42%; animation-delay: -.9s; }
.pm-conf i:nth-child(6) { left: 51%; animation-delay: -4.6s; animation-duration: 5.1s; }
.pm-conf i:nth-child(7) { left: 60%; animation-delay: -2.1s; animation-duration: 6.9s; }
.pm-conf i:nth-child(8) { left: 69%; animation-delay: -3.3s; }
.pm-conf i:nth-child(9) { left: 77%; animation-delay: -.2s; animation-duration: 5s; }
.pm-conf i:nth-child(10) { left: 85%; animation-delay: -5s; animation-duration: 6.3s; }
.pm-conf i:nth-child(11) { left: 92%; animation-delay: -1.7s; }
.pm-conf i:nth-child(12) { left: 97%; animation-delay: -3.6s; animation-duration: 4.6s; }
@keyframes pm-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(10px, 95px, 0) rotate(200deg); }
  100% { transform: translate3d(-6px, 190px, 0) rotate(400deg); }
}

.pm-card__body { display: grid; gap: 12px; padding: 22px 24px 20px; }
.pm-card__kicker { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: .8125rem; font-weight: 700; letter-spacing: .01em; color: var(--pm-ind-2); }
.pm-card__kicker .ic { width: 15px; height: 15px; color: #d08a00; }
.pm-card__title { margin: 0; font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.75rem); font-weight: 650; line-height: 1.15; letter-spacing: -.025em; color: var(--ink, #0f0f12); }
.pm-card__text { margin: 0; font-size: var(--fs-sm, .9375rem); line-height: 1.55; color: var(--ink-2, #3f3f46); }

.pm-count { margin-top: 2px; }
.pm-count__h { margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-3, #5f5f68); }
.pm-count__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pm-count__grid li {
  display: grid; justify-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 14px;
  background: var(--t-50, #fef5f5); border: 1px solid color-mix(in srgb, var(--pm-ind) 16%, transparent);
}
.pm-count__grid b { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--pm-ink); }
.pm-count__grid b.is-tick { animation: pm-tick .32s cubic-bezier(.3, .7, .4, 1); }
.pm-count__grid span { font-size: .6875rem; font-weight: 600; color: var(--ink-3, #5f5f68); }
@keyframes pm-tick { 0% { transform: translateY(-5px); opacity: .25; } 100% { transform: none; opacity: 1; } }

.pm-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pm-card__cta { flex: 1 1 200px; }
.pm-card__later { flex: 0 1 auto; }
.pm-card__fine { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .75rem; color: var(--ink-3, #5f5f68); }
.pm-card__fine .ic { flex: none; width: 14px; height: 14px; }

@media (max-width: 400px) {
  .pm-card { border-radius: 22px; }
  .pm-card__art { height: 128px; }
  .pm-card__pct { font-size: 3.3rem; }
  .pm-card__gift { top: 14px; left: 14px; width: 38px; height: 38px; }
  .pm-card__body { padding: 18px 18px 16px; gap: 10px; }
  .pm-count__grid { gap: 6px; }
  .pm-count__grid b { font-size: 1.25rem; }
  .pm-card__actions .btn { flex: 1 1 100%; }
}
@media (max-height: 640px) {
  .pm-card__art { height: 108px; }
  .pm-card__pct { font-size: 3rem; }
}
@media print { .pm { display: none !important; } }

/* ============================================================ Fiyatlar şeridi + plan kartı "İlk ödeme" satırı */
.pm-ribbon {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px;
  width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 7px 16px 7px 7px; border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pm-gold) 22%, #fff) 0%, #fff 70%);
  border: 1px solid color-mix(in srgb, var(--pm-gold) 50%, var(--line, #e6e6e1));
  box-shadow: 0 1px 2px rgba(15, 15, 18, .05), 0 10px 24px -18px rgba(120, 70, 0, .45);
  font-size: var(--fs-sm, .9375rem); line-height: 1.35; color: var(--ink, #0f0f12); text-align: center;
}
.pm-ribbon__ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pm-ind); color: var(--pm-gold-2); box-shadow: 0 0 0 2px var(--pm-gold); }
.pm-ribbon__ic .ic { width: 16px; height: 16px; }
.pm-ribbon b { font-weight: 700; }
.pm-ribbon__days { font-weight: 650; color: var(--pm-ind-2); white-space: nowrap; }
@media (max-width: 559px) { .pm-ribbon { border-radius: 18px; padding: 8px 12px 8px 8px; text-align: left; justify-content: flex-start; } }

.plan__promo {
  display: flex; align-items: flex-start; gap: 7px; margin: 10px 0 0; padding: 7px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--pm-gold) 16%, #fff); border: 1px solid color-mix(in srgb, var(--pm-gold) 38%, transparent);
  font-size: .8125rem; line-height: 1.4; color: var(--ink-2, #3f3f46);
}
.plan__promo .ic { flex: none; width: 15px; height: 15px; margin-top: 1px; color: #c26a00; }
.plan__promo b { font-weight: 700; color: var(--ink, #0f0f12); font-variant-numeric: tabular-nums; white-space: nowrap; }
