/* ==========================================================================
   Fiyatlandırma — üç paket kartı (Basic / Plus / 360)
   İçerik burada sabit yazılıdır (iş kararı), API'den gelmez. Aylık/Yıllık
   geçişi main.js'de initBillingToggle() ile yönetilir: .fplan üzerindeki
   data-billing değeri değişince [data-monthly]/[data-yearly] bloklarının
   görünürlüğü aşağıdaki öznitelik seçicileriyle değişir.
   ========================================================================== */

.fplan {
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line-soft);
}

.fplan__inner {
  padding-top: 80px;
  padding-bottom: 80px;
}

.fplan__head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 44px;
}

.fplan__toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--white);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 4px;
}

.fplan__tab {
  padding: 10px 22px;
  border-radius: calc(var(--r-md) - 3px);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--muted-2);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.fplan__tab[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.fplan__tabSave {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #166534;
  background: #DCFCE7;
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

.fplan__vatNote {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-3);
}

.fplan__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.fplan3__card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 34px 30px;
  position: relative;
}

.fplan3__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Overrides the site-wide icon-collapse rule (see globals.css) — the 360
   badge icon is new UI, not part of that fidelity target. */
.fplan3__name-icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--indigo);
}

.fplan3__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 0;
  min-height: 44px;
  text-wrap: pretty;
}

.fplan3__ai {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--pink-tint);
  color: var(--indigo);
  font-size: 12px;
  font-weight: 700;
}

/* Overrides the site-wide icon-collapse rule (see globals.css) — this
   badge icon is new UI, not part of that fidelity target. */
.fplan3__ai-icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.fplan3__price {
  margin: 22px 0 0;
  text-align: left;
}

.fplan3__old {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted-3);
  text-decoration: line-through;
}

.fplan3__priceRow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.fplan3__now {
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.fplan3__unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}

.fplan3__badge--taksit {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11.5px;
  font-weight: 800;
  color: #166534;
  background: #DCFCE7;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}

.fplan3__quota {
  list-style: none;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.fplan3__quota li {
  font-size: 14px;
  color: var(--muted);
}

.fplan3__quota b {
  color: var(--ink);
  font-weight: 800;
}

.fplan3__ctaRow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.fplan3__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg-tint);
  color: var(--ink);
  border: 1.5px solid var(--line-2);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.fplan3__cta:hover {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
}

.fplan3__cta--buy {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
}

.fplan3__cta--buy:hover {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
}

.fplan3__cta-phone {
  width: 15px;
  height: 15px;
  flex: none;
}

.fplan__note {
  margin: 32px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted-3);
}

.fplan__compareRow {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

@property --fplanCompare-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.fplan__compareBtn {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  padding: 13px 26px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
}

/* Kenarda dönen mor/pembe ışık huzmesi — of-capraz kartlarıyla aynı teknik,
   burada hover'a bağlı değil, sürekli çalışır. */
.fplan__compareBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--fplanCompare-angle), transparent 0%, var(--pink-soft) 8%, var(--indigo) 16%, transparent 30%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: fplanCompare-spin 3.2s linear infinite;
}

@keyframes fplanCompare-spin {
  to { --fplanCompare-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .fplan__compareBtn::after { animation: none; }
}

.fplan__compareArrow {
  transition: transform .2s ease;
}

.fplan__compareBtn[aria-expanded="true"] .fplan__compareArrow {
  transform: rotate(180deg);
}

/* --- aylık/yıllık geçişi --- */
.fplan[data-billing="monthly"] [data-yearly] { display: none; }
.fplan[data-billing="yearly"] [data-monthly] { display: none; }

/* --- "Hemen Satın Al" paneli — sağdan kayarak açılır ---
   Gerçek satış: sepet → bilgiler + şifre + kart → e-posta kodu → ödeme
   (3D / SMS kodu) → başarı (bkz. initBuyDrawer, main.js). */
.fbuy {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
}

.fbuy[aria-hidden="false"] {
  visibility: visible;
}

.fbuy__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 16, 96, .45);
  opacity: 0;
  transition: opacity .25s ease;
}

.fbuy[aria-hidden="false"] .fbuy__backdrop {
  opacity: 1;
}

.fbuy__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--white);
  box-shadow: -24px 0 60px rgba(24, 29, 78, .18);
  padding: 30px 28px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.fbuy[aria-hidden="false"] .fbuy__panel {
  transform: translateX(0);
}

.fbuy__view {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* [hidden] üzerine display:flex yazmasak bile bu daha yüksek özgüllükte
   olduğu için tarayıcının varsayılan [hidden]{display:none} kuralını her
   zaman geçersiz kılardı — üç adımın üst üste bindiği bir hataydı. */
.fbuy__view[hidden] {
  display: none;
}

.fbuy__head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.fbuy__back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-tint);
  color: var(--ink);
  cursor: pointer;
  flex: none;
}

.fbuy__back svg {
  width: 16px;
  height: 16px;
}

.fbuy__head .fbuy__title {
  flex: 1;
}

.fbuy__head .fbuy__close {
  flex: none;
}

.fbuy__title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.fbuy__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-tint);
  color: var(--muted-2);
  cursor: pointer;
}

.fbuy__close svg {
  width: 14px;
  height: 14px;
}

.fbuy__item {
  margin-top: 26px;
  padding: 20px;
  background: var(--bg-tint);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
}

.fbuy__itemRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.fbuy__itemName {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.fbuy__itemPrice {
  font-size: 20px;
  font-weight: 800;
  color: var(--indigo);
  white-space: nowrap;
}

.fbuy__itemUnit {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted-2);
}

.fbuy__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 22px;
  padding: 15px 0;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--indigo);
  color: var(--white);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
}

.fbuy__ctaArrow {
  transition: transform .2s ease;
}

.fbuy__cta:hover .fbuy__ctaArrow {
  transform: translateX(3px);
}

.fbuy__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-3);
}

/* --- checkout formu (adım 2) --- */
.fbuy__miniItem {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--bg-tint);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.fbuy__miniItem b {
  color: var(--indigo);
  font-size: 16px;
}

.fbuy__form {
  display: flex;
  flex-direction: column;
  margin-top: 22px;
}

.fbuy__fieldGroup {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fbuy__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fbuy__field span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.fbuy__field input {
  background: var(--bg-tint);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 14.5px;
  color: var(--ink);
  width: 100%;
}

.fbuy__field input:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--white);
}

.fbuy__fieldRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fbuy__divider {
  height: 1px;
  background: var(--line-soft);
  margin: 22px 0;
}

.fbuy__payBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  padding: 15px 0;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--indigo);
  color: var(--white);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
}

.fbuy__payBtn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* --- tutar özeti, taksit, hata, 3D --- */
.fbuy__sum {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
}

.fbuy__sum div {
  display: flex;
  justify-content: space-between;
}

.fbuy__sumTotal {
  font-weight: 800;
  color: var(--ink);
  font-size: 15px;
}

.fbuy__field select {
  background: var(--bg-tint);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 14.5px;
  color: var(--ink);
  width: 100%;
}

.fbuy__error {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #d9214e;
}

.fbuy__link {
  margin-top: 14px;
  background: none;
  border: 0;
  color: var(--indigo);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.fbuy__link:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.fbuy__frame {
  width: 100%;
  flex: 1;
  min-height: 460px;
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--white);
}

/* --- başarı --- */
.fbuy__view[data-buy-view="success"] {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fbuy__successIcon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green-bright), var(--green));
  color: var(--white);
}

.fbuy__successIcon svg {
  width: 28px;
  height: 28px;
}

.fbuy__successTitle {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.fbuy__successText {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 30ch;
}

@media (max-width: 980px) {
  .fplan__grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .fplan__inner {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .fplan3__card { padding: 28px 24px; }
}
