/* ============================================================================
   ROVYOX — YERLEŞİM: header, Products mega menü, mobil menü, footer,
   çerez banner'ı, bildirim paneli, hesap menüsü, WhatsApp kutusu.
   REDESIGN.md adım 2.
   ========================================================================= */

/* ---- Logo varyantı: temaya göre otomatik ---------------------------------- */
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-on-light { display: none; }
  :root:not([data-theme]) .logo-on-dark { display: block; }
}
/* Tema ikonları: açıkta ay (koyuya geç), koyuda güneş */
.ic-sun { display: none; }
:root[data-theme="dark"] .ic-sun { display: block; }
:root[data-theme="dark"] .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .ic-sun { display: block; }
  :root:not([data-theme]) .ic-moon { display: none; }
}

/* ===========================================================================
   HEADER
   ======================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header.is-scrolled,
body.mega-open .site-header,
body.mnav-open .site-header {
  box-shadow: 0 6px 24px -18px rgba(11, 27, 31, .25);
}
.hd {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--hd-h);
}
.hd__logo { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: var(--r-sm); }
.hd__logo img { height: 36px; width: auto; }
.hd__logo:hover { text-decoration: none; }

/* Ketryx örneğine göre: büyük, sade bağlantılar; aktif sayfa header'ın alt
   kenarında kalın bir çizgiyle gösterilir. */
.hd__nav { display: flex; align-items: stretch; align-self: stretch; gap: clamp(.5rem, .2rem + 1vw, 1.75rem); margin-inline-start: clamp(1rem, .5rem + 2vw, 4rem); }
.hd__item { position: static; }
.hd__item { display: flex; }
.hd__link {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 100%; padding: 0 2px;
  border: 0; border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(.95rem, .8rem + .3vw, 1.2rem);
  font-weight: var(--fw-regular);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.hd__link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px;
  background: var(--accent); transform: scaleX(0); transition: transform var(--dur) var(--ease);
}
.hd__link:hover { color: var(--accent-ink); text-decoration: none; }
.hd__link.is-active::after, .hd__item.is-open .hd__link--menu::after { transform: scaleX(1); }
.hd__chev { transition: transform var(--dur) var(--ease); opacity: .7; }
.hd__item.is-open .hd__chev { transform: rotate(180deg); }
.hd__item.is-open .hd__link--menu { color: var(--ink); }
/* Header butonları: Ketryx'teki gibi büyük hap butonlar (çerçeveli giriş + dolu CTA) */
.site-header .hd__cta, .site-header .hd__signin { min-height: 48px; padding: 0 26px; border-radius: 999px; font-size: var(--fs-base); }
.site-header .hd__actions { gap: var(--sp-3); }
/* "Rovyox'u Önizle": dolu daire içinde oynat ikonu + kalın yazı (Ketryx "Preview" bağlantısı gibi) */
.hd__preview { display: inline-flex; align-items: center; gap: 8px; margin-inline-end: var(--sp-3); color: var(--ink); font-size: var(--fs-base); font-weight: var(--fw-semibold); white-space: nowrap; }
.hd__preview:hover { color: var(--accent-ink); text-decoration: none; }
.hd__preview-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
/* Üçgen optik olarak ortada: kutu merkezi ile ağırlık merkezi arasında dengelendi (viewBox içinde), ek kaydırma yok */
.hd__preview-ic svg { display: block; width: 16px; height: 16px; fill: currentColor; }

.hd__actions { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }
.hd-icon {
  display: inline-grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 var(--sp-2);
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-soft);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.hd-icon:hover { background: var(--surface-2); color: var(--ink); }
.hd-icon--text { display: inline-flex; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: .03em; }
.hd-icon--ring { border-color: var(--line-strong); border-radius: var(--r-pill); width: 44px; height: 44px; }
.hd-icon--ring:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.hd__cta .hd__cta-short { display: none; }
.hd__burger { display: none; }
/* Başlıktaki dil seçici: küçük, çerçeveli hap */
.hd__actions .hd-lang .hd-icon { border: 1px solid var(--line); border-radius: 999px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.hd__actions .hd-lang .hd-icon:hover { border-color: var(--line-strong); }
.hd__burger .ic-close { display: none; }
body.mnav-open .hd__burger .ic-open { display: none; }
body.mnav-open .hd__burger .ic-close { display: block; }

/* Açılır panel (dil, hesap) */
.hd-drop { position: relative; }
.hd-drop__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 200px;
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
  z-index: var(--z-menu);
}
.hd-drop.is-open .hd-drop__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.lang-switch { display: grid; gap: 2px; }
.lang-switch button {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 40px; padding: 0 var(--sp-3);
  border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--ink-soft); font-size: var(--fs-sm); text-align: start;
}
.lang-switch button small { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--faint); }
.lang-switch button:hover { background: var(--surface-2); color: var(--ink); }
.lang-switch button.active,
.lang-switch button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: var(--fw-semibold); }
.lang-switch button.active small { color: var(--accent-ink); }

/* Hesap menüsü */
.acc-chip { display: flex; align-items: center; }
.acc-menu__btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 40px; padding: 0 var(--sp-2) 0 4px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
}
.acc-menu__btn:hover { border-color: var(--line-strong); }
.acc-menu__btn .ic { opacity: .6; }
.acc-menu__name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand-600), var(--brand-800));
  color: #fff; font-size: var(--fs-xs); font-weight: var(--fw-bold);
}
.acc-avatar--lg { width: 40px; height: 40px; font-size: var(--fs-sm); }
.acc-menu__panel { width: 270px; padding: var(--sp-3); }
.acc-menu__head { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-1) var(--sp-1) var(--sp-3); }
.acc-menu__head b { display: block; font-size: var(--fs-sm); line-height: 1.3; }
.acc-menu__head small { display: block; color: var(--muted); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-menu__plan { margin: 0 var(--sp-1) var(--sp-2); }
.acc-menu__link {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  min-height: 40px; padding: 0 var(--sp-2);
  border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--ink-soft); font-size: var(--fs-sm); text-align: start;
}
.acc-menu__link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.acc-menu__out { border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: var(--sp-2); padding-top: var(--sp-2); color: var(--danger); }
.acc-menu__out:hover { color: var(--danger); background: var(--danger-soft); }

/* Bildirim paneli */
.bell-wrap { position: relative; display: none; }
body.is-auth .bell-wrap { display: block; }
.bell-btn { position: relative; }
.bell-btn svg { width: 17px; height: 17px; }
.bell-badge {
  position: absolute; top: 5px; inset-inline-end: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: var(--fw-bold); line-height: 16px; text-align: center;
}
.bell-panel {
  display: none;
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  width: min(340px, calc(100vw - 32px)); max-height: 420px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3);
  z-index: var(--z-menu);
}
.bell-panel.show { display: block; animation: rx-pop var(--dur) var(--ease-out); }
.bell-panel__head { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); }
.bell-item { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-soft); }
.bell-item:last-child { border-bottom: 0; }
.bell-item b { color: var(--ink); }
.bell-meta { display: block; margin-top: 4px; font-size: var(--fs-2xs); color: var(--muted); }
.bell-tag { display: inline-block; margin-inline-end: 6px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.bell-empty { padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }

/* ===========================================================================
   PRODUCTS MEGA MENÜ
   ======================================================================== */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
}
.hd__item.is-open .mega { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
.mega__panel {
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(11, 27, 31, .35);
  /* Ekranın kalanını tamamen kaplar; kendi içinde ve arkadaki sayfada kaydırma olmaz */
  height: calc(100dvh - var(--hd-h)); overflow: hidden;
}
.mega__inner {
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--sp-8) var(--gutter);
  display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}
.mega__side { display: flex; flex-direction: column; padding-inline-end: var(--sp-10); border-inline-end: 1px solid var(--line); }
.mega__seg { align-self: flex-start; margin-bottom: var(--sp-4); }
.mega__tabs { display: flex; flex-direction: column; }
.mega__tab {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 60px; padding: 0; text-align: start;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--muted); font: inherit; font-size: clamp(1.05rem, .9rem + .35vw, 1.35rem); cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.mega__tab:hover, .mega__tab:focus-visible { color: var(--ink); text-decoration: none; }
.mega__tab.is-active { color: var(--accent-ink); font-weight: var(--fw-semibold); }
.mega__tab--link .ic { width: 22px; height: 22px; }
.mega__about { margin-top: var(--sp-6); }
.mega__about-t { display: block; font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + .7vw, 1.9rem); line-height: 1.2; color: var(--ink); }
.mega__about-d { margin-top: var(--sp-3); color: var(--ink-soft); font-size: var(--fs-base); line-height: 1.6; }
.mega__more { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-4); font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--ink); }
.mega__more:hover { color: var(--accent-ink); text-decoration: none; }
.mega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-8) var(--sp-10); align-content: start; padding-inline-start: var(--sp-12); }
.mega__item { display: flex; align-items: flex-start; gap: var(--sp-3); color: var(--ink); border-radius: var(--r-sm); }
.mega__item:hover, .mega__item:focus-visible { text-decoration: none; }
.mega__item:hover b, .mega__item.is-active b { color: var(--accent-ink); }
.mega__ic { width: 24px; height: 24px; margin-top: 2px; color: var(--accent-ink); flex: 0 0 auto; }
.mega__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mega__txt b { font-size: clamp(1rem, .9rem + .2vw, 1.15rem); font-weight: var(--fw-medium); line-height: 1.3; color: var(--ink); transition: color var(--dur-fast) var(--ease); }
.mega__txt small { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.55; }
@media (max-width: 1360px) { .mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===========================================================================
   MOBİL MENÜ
   ======================================================================== */
.mnav {
  position: fixed; inset: var(--hd-h) 0 0 0;
  z-index: var(--z-menu);
  display: flex; flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.mnav.is-in { opacity: 1; transform: none; }
.mnav__body { flex: 1; padding: var(--sp-3) var(--gutter); display: flex; flex-direction: column; }
.mnav__link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 54px; padding: 0 var(--sp-1);
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; font-weight: var(--fw-semibold);
  text-align: start; width: 100%; list-style: none; cursor: pointer;
}
.mnav__link::-webkit-details-marker { display: none; }
.mnav__link:hover { text-decoration: none; }
.mnav__link.is-active { color: var(--accent-ink); }
.mnav__link--sm { min-height: 46px; font-family: var(--font-sans); font-size: var(--fs-base); font-weight: var(--fw-medium); justify-content: flex-start; color: var(--ink-soft); }
.mnav__group[open] > summary .ic { transform: rotate(180deg); }
.mnav__group summary .ic { transition: transform var(--dur) var(--ease); }
.mnav__sub { padding: var(--sp-2) 0 var(--sp-4); border-bottom: 1px solid var(--line); }
.mnav__label { display: block; margin: var(--sp-3) var(--sp-1) var(--sp-1); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mnav__tools { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--sp-2); }
.mnav__tools a { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-2); border-radius: var(--r-sm); color: var(--ink-soft); font-size: var(--fs-sm); }
.mnav__tools a .ic { color: var(--accent-ink); }
.mnav__tools a:hover { background: var(--surface-2); text-decoration: none; }
.mnav__all { display: inline-flex; align-items: center; gap: 6px; margin: var(--sp-3) var(--sp-1) 0; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.mnav__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mnav__langs { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2); }
.mnav__langs button { min-width: 48px; height: 36px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.mnav__langs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.mnav__account { display: grid; gap: var(--sp-2); padding: var(--sp-4) 0; }
.mnav__user { display: flex; align-items: center; gap: var(--sp-3); padding-bottom: var(--sp-2); }
.mnav__user b { display: block; font-size: var(--fs-sm); }
.mnav__user small { color: var(--muted); }
.mnav__foot { position: sticky; bottom: 0; padding: var(--sp-3) var(--gutter) calc(var(--sp-3) + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }

/* ---- Header kırılımları --------------------------------------------------- */
/* Dil seçici başlığa eklendi: dar masaüstünde sığması için "Önizle" bağlantısı gizlenir */
@media (max-width: 1279px) { .hd__preview { display: none; } }
@media (min-width: 1025px) and (max-width: 1100px) { .hd__link { padding: 0 6px; } .site-header .hd__cta { padding: 0 16px; } .site-header .hd__actions { gap: var(--sp-2); } .acc-menu__name { display: none; } }
@media (max-width: 1180px) {
  .hd { gap: var(--sp-3); }
  .hd__nav { margin-inline-start: 0; }
  .hd__link { padding: 0 10px; }
}
@media (max-width: 1024px) {
  /* Dil seçimi mobilde menünün içinde (TR/EN/DE) */
  .hd__nav, .acc-chip, .hd__preview, .hd__actions .hd-lang { display: none; }
  .hd__burger { display: inline-grid; }
  .hd__actions { gap: var(--sp-1); }
  :root { --hd-h: 68px; }
  .site-header .hd__cta { min-height: 42px; padding: 0 18px; font-size: var(--fs-sm); }
}
@media (max-width: 480px) {
  .hd__cta, .site-header .hd__cta { min-height: 38px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
  .hd__cta .hd__cta-long { display: none; }
  .hd__cta .hd__cta-short { display: inline; }
  .hd__logo img { height: 26px; }
  .bell-wrap .hd-icon { min-width: 36px; }
}
@media (min-width: 1025px) { .mnav { display: none !important; } }

/* ===========================================================================
   FOOTER
   ======================================================================== */
.site-footer {
  position: relative; z-index: var(--z-content);
  margin-top: var(--section-y);
  padding-inline: var(--gutter);
}
.ft-card {
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(3rem, 2rem + 4vw, 8.5rem) clamp(1.5rem, 0.5rem + 6vw, 8.5rem) var(--sp-10);
  background: var(--surface);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 40px 40px 0 0;
}
.ft {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(0, 1fr));
  padding-bottom: var(--sp-8);
}
.ft__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-6); padding-inline-end: var(--sp-10); }
.ft__logo { display: inline-flex; }
.ft__logo img { height: 40px; width: auto; }
.ft__tagline { color: var(--ink-soft); font-size: var(--fs-base); max-width: 36ch; }
.ft__social { display: flex; gap: var(--sp-4); margin-top: auto; padding-top: var(--sp-10); }
.ft__icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent-ink); border-radius: var(--r); }
.ft__icon .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.ft__icon:hover { background: var(--accent-soft); text-decoration: none; }
.ft__col { padding-inline: clamp(1.25rem, 0.5rem + 2.5vw, 4.25rem); border-inline-start: 1px solid var(--line); }
.ft__h { margin-bottom: var(--sp-6); font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + .8vw, 1.75rem); font-weight: var(--fw-semibold); letter-spacing: -.015em; color: var(--accent-ink); }
.ft__col ul { list-style: none; display: grid; gap: 6px; }
.ft__col a { display: inline-flex; min-height: 24px; align-items: center; color: var(--accent-ink); font-size: var(--fs-base); }
.ft__col a:hover, .ft__bottom a:hover, .ft__linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.ft__bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: var(--fs-base);
}
.ft__bottom a, .ft__linkbtn { color: var(--accent-ink); }
.ft__linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
/* Dil ve tema seçicileri: header yerine footer'ın alt satırında, sağda */
.ft-prefs { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }
.ft-prefs .hd-icon { border: 1px solid var(--line); border-radius: 999px; height: 40px; }
@media (max-width: 640px) { .ft-prefs { margin-inline-start: 0; width: 100%; } }
@media (max-width: 1100px) {
  .ft { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--sp-10); }
  .ft__brand { grid-column: 1 / -1; padding-inline-end: 0; }
  .ft__social { padding-top: 0; }
  .ft__col:nth-child(2) { border-inline-start: 0; padding-inline-start: 0; }
}
@media (max-width: 640px) {
  .ft-card { border-radius: 24px 24px 0 0; }
  .ft { grid-template-columns: 1fr; row-gap: var(--sp-8); }
  .ft__col { border-inline-start: 0; padding-inline: 0; padding-top: var(--sp-6); border-top: 1px solid var(--line); }
  .ft__bottom { font-size: var(--fs-sm); }
}

/* ===========================================================================
   ÇEREZ BANNER'I
   ======================================================================== */
.cookie-dim {
  position: fixed; inset: 0; z-index: calc(var(--z-toast) - 1);
  background: rgba(4, 14, 17, .55);
  opacity: 0; transition: opacity var(--dur-slow) var(--ease-out);
}
.cookie-dim.is-in { opacity: 1; }
.cookie {
  /* Ketryx örneğine göre: kenardan kenara şerit, 24px yan boşluk, metin tam
     genişlik; altta solda bağlantı, sağda sayfanın ~%60'ını kaplayan buton satırı. */
  position: fixed; inset-inline: 0; bottom: 0;
  z-index: var(--z-toast);
  background: var(--surface);
  padding: 32px 24px calc(22px + env(safe-area-inset-bottom));
  opacity: 0; transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.cookie.is-in { opacity: 1; transform: none; }
/* Seçenekler penceresi şeridin ve karartmanın üstünde açılır */
#cookieModal { z-index: calc(var(--z-toast) + 1); }
.cookie__x {
  position: absolute; top: 20px; inset-inline-end: 20px;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.cookie__x:hover { background: var(--surface-2); }
.cookie__x:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.cookie__x .ic { width: 22px; height: 22px; stroke-width: 2; }
.cookie__title { padding-inline-end: 48px; display: block; font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-bold); color: var(--ink); margin-bottom: 14px; }
.cookie__text { font-size: 14px; line-height: 1.35; color: var(--ink-soft); }
.cookie__bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); align-items: center; gap: var(--sp-6); margin-top: 46px; }
.cookie__links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; }
.cookie__links a, .cookie__link { color: var(--accent-ink); }
.cookie__link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.cookie__links a:hover, .cookie__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cookie__powered { display: block; margin-top: 30px; font-size: 11px; color: var(--muted); }
.cookie__actions { display: flex; gap: 12px; }
.cookie__btn {
  min-height: 40px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: var(--fw-semibold); cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cookie__btn--primary { flex: 1; border: 0; background: var(--accent); color: var(--on-accent); }
.cookie__btn--primary:hover { filter: brightness(1.06); }
.cookie__btn--ghost { flex: 0 0 auto; min-width: 160px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); }
.cookie__btn--ghost:hover { border-color: var(--accent-line); }
.cookie__btn:focus-visible { outline: none; box-shadow: var(--sh-focus); }
@media (max-width: 760px) {
  .cookie { padding: 24px 16px calc(20px + env(safe-area-inset-bottom)); }
  .cookie__bar { grid-template-columns: 1fr; margin-top: 20px; gap: 16px; }
  .cookie__actions { flex-direction: column-reverse; }
  .cookie__btn--ghost { min-width: 0; }
  .cookie__btn { min-height: var(--tap); }
  .cookie__powered { margin-top: 16px; }
  .cookie__x { top: 12px; inset-inline-end: 8px; width: 44px; height: 44px; }
  .cookie__text { max-height: 40vh; overflow-y: auto; }
}
.ck-opts { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.ck-opt {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  cursor: pointer;
}
.ck-opt b { display: block; font-size: var(--fs-sm); }
.ck-opt p { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.ck-opt--off { opacity: .6; cursor: default; }
/* Anahtar (switch) */
.switch { position: relative; flex: 0 0 auto; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line-strong); transition: background-color var(--dur) var(--ease); pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--dur) var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: var(--sh-focus); }
.switch input:disabled { cursor: not-allowed; }

/* Modal ek boyutu */
.rx-modal--wide { width: min(640px, 100%); }
.pw-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--sp-3); border-radius: var(--r); background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.pw-feats { margin: var(--sp-2) 0 0; }
#paywallModal .rx-modal__title { margin-bottom: var(--sp-2); }
#paywallModal #accountWrap { margin-top: var(--sp-2); }
@media (max-width: 560px) {
  .rx-overlay { padding: 0; place-items: end stretch; }
  .rx-modal { width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom)); }
}

/* ===========================================================================
   BİLDİRİM (toast) — app.js notify()
   ======================================================================== */
#toastHost { position: fixed; top: calc(var(--hd-h) + 12px); inset-inline-end: var(--sp-4); z-index: var(--z-toast); display: grid; gap: var(--sp-2); width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: var(--r); box-shadow: var(--sh-3);
  font-size: var(--fs-sm); line-height: 1.5;
  animation: rx-pop var(--dur) var(--ease-out);
}
.toast--success { border-inline-start-color: var(--ok); }
.toast--error { border-inline-start-color: var(--danger); }
.toast--warn { border-inline-start-color: var(--warn); }
.toast__ic { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; fill: currentColor; color: var(--accent-ink); }
.toast--success .toast__ic { color: var(--ok); } .toast--warn .toast__ic { color: var(--warn); } .toast--error .toast__ic { color: var(--danger); }
.toast__msg { flex: 1; }
.toast__link { display: inline-block; margin-top: 6px; font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: 3px; }
.toast__x { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; margin: -3px -6px 0 0; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--muted); }
.toast__x:hover { background: var(--surface-2); color: var(--ink); }
.toast__x .bi, .toast__x svg { width: 14px; height: 14px; }
.toast { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.toast.out { opacity: 0; transform: translateY(-6px); }
.wa-fab .bi { width: 28px; height: 28px; fill: currentColor; }
.wa-head .bi { width: 20px; height: 20px; fill: currentColor; }
.wa-send .bi { width: 18px; height: 18px; fill: currentColor; }
.wa-x .bi { width: 16px; height: 16px; }

/* ===========================================================================
   WHATSAPP KUTUSU
   ======================================================================== */
#waWidget { position: fixed; inset-inline-end: var(--sp-5); bottom: var(--sp-5); z-index: calc(var(--z-toast) - 1); }
.wa-fab {
  width: 54px; height: 54px; border-radius: 50%;
  border: 0; background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px -8px rgba(37, 211, 102, .55), var(--sh-2);
  transition: transform var(--dur) var(--ease);
}
.wa-fab:hover { transform: scale(1.05); }
.wa-fab svg { width: 28px; height: 28px; }
.wa-panel {
  position: absolute; bottom: 68px; inset-inline-end: 0;
  width: min(340px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3);
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.wa-panel.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.wa-head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); background: #075E54; color: #fff; }
.wa-head b { display: block; font-size: var(--fs-sm); }
.wa-head span { display: block; font-size: var(--fs-xs); opacity: .85; }
.wa-ic { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.wa-ic svg { width: 18px; height: 18px; }
.wa-x { margin-inline-start: auto; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: #fff; display: grid; place-items: center; }
.wa-x:hover { background: rgba(255,255,255,.14); }
.wa-x svg { width: 16px; height: 16px; }
.wa-body { padding: var(--sp-4); display: grid; gap: var(--sp-3); }
.wa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-chip { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-soft); font-size: var(--fs-xs); }
.wa-chip:hover { border-color: #25D366; color: var(--ink); }
#waMsg { width: 100%; min-height: 84px; padding: var(--sp-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); resize: vertical; }
#waMsg:focus { outline: none; border-color: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,.22); }
.wa-send { min-height: var(--tap); border: 0; border-radius: var(--r-sm); background: #25D366; color: #fff; font-weight: var(--fw-semibold); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); }
.wa-send:hover { filter: brightness(.95); }
.wa-send svg { width: 18px; height: 18px; }
.wa-note { font-size: var(--fs-2xs); color: var(--muted); text-align: center; }
@media (max-width: 560px) { #waWidget { inset-inline-end: var(--sp-4); bottom: var(--sp-4); } .wa-fab { width: 50px; height: 50px; } }
body.mnav-open #waWidget, body:has(.cookie.is-in) #waWidget { opacity: 0; pointer-events: none; }
