/* TURKBUHAR Bilgi Merkezi — yalnız /rehber ve /sayfa/rehber-* sayfalarında yüklenir
   (layouts/storefront @stack('styles')). Global sınıflara (nb-ui-shell vb.) dokunmaz.
   Kart sütun sayısı ekran genişliğine değil, gerçek içerik alanına göre (container query)
   belirlenir — sol kategori menüsü açıkken de doğru çalışır. */

.bm {
  --bm-pink: #F50868;
  --bm-pink-d: #c80654;
  --bm-pink-t: #fff0f6;
  --bm-ink: #09090B;
  --bm-mut: #5f6068;
  --bm-line: #e7e7eb;
  --bm-bg: #f7f7f8;
  container: bm / inline-size;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 16px 64px;
  color: var(--bm-ink);
  box-sizing: border-box;
}
.bm *, .bm *::before, .bm *::after { box-sizing: border-box; }
@media (min-width: 768px) { .bm { padding: 26px 24px 72px; } }

/* Konum çubuğu */
.bm-crumb { font-size: 13px; color: var(--bm-mut); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bm-crumb a { color: var(--bm-mut); text-decoration: none; }
.bm-crumb a:hover { color: var(--bm-pink); text-decoration: underline; }
.bm-crumb span[aria-current] { color: var(--bm-ink); font-weight: 600; }

/* ---------- Bilgi merkezi üst bölüm ---------- */
.bm-hero {
  display: grid; gap: 18px; padding: 22px;
  border: 1px solid var(--bm-line); border-radius: 22px;
  background: radial-gradient(120% 140% at 100% 0%, #ffe3ef 0%, rgba(255,227,239,0) 55%), #fff;
}
@container bm (min-width: 860px) {
  .bm-hero { grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); padding: 32px; gap: 28px; align-items: stretch; }
}
.bm-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--bm-pink); text-transform: uppercase; }
.bm-h1 {
  margin: 0; font-family: var(--nb-font-display, 'Arial Narrow', sans-serif); font-weight: 900;
  font-size: clamp(28px, 4.4cqi, 46px); line-height: 1.05; letter-spacing: -.01em; text-transform: uppercase;
  overflow-wrap: anywhere;
}
.bm-lead { margin: 12px 0 0; font-size: 15.5px; line-height: 1.65; color: #34343b; max-width: 62ch; }
.bm-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.bm-stats li { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--bm-line); font-size: 13px; color: var(--bm-mut); }
.bm-stats b { font-size: 16px; color: var(--bm-ink); font-weight: 900; }

/* Hesaplayıcı kartı */
.bm-calc {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 20px; border-radius: 18px; background: var(--bm-ink); color: #fff; text-decoration: none;
  position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.bm-calc::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--bm-pink); opacity: .22; }
.bm-calc:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(245,8,104,.6); }
.bm-calc:focus-visible { outline: 3px solid var(--bm-pink); outline-offset: 3px; }
.bm-calc-top { display: flex; gap: 12px; align-items: flex-start; position: relative; z-index: 1; }
.bm-calc-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--bm-pink); display: grid; place-items: center; }
.bm-calc-t { display: block; font-size: 17px; font-weight: 800; line-height: 1.25; }
.bm-calc-d { display: block; font-size: 13.5px; line-height: 1.55; color: #d6d6dc; margin-top: 4px; }
.bm-calc-cta { position: relative; z-index: 1; font-size: 13.5px; font-weight: 800; color: #fff; }
.bm-calc-cta span { color: var(--bm-pink); }

/* Arama */
.bm-tools { margin: 22px 0 0; }
.bm-search { position: relative; }
.bm-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bm-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--bm-mut); pointer-events: none; }
.bm-search input {
  width: 100%; height: 56px; padding: 0 52px 0 50px; font: inherit; font-size: 16px; color: var(--bm-ink);
  border: 1.5px solid #d9d9df; border-radius: 16px; background: #fff; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease; -webkit-appearance: none; appearance: none;
}
.bm-search input::placeholder { color: #8a8b93; }
.bm-search input:focus { border-color: var(--bm-pink); box-shadow: 0 0 0 4px rgba(245,8,104,.14); }
.bm-search input::-webkit-search-cancel-button { display: none; }
.bm-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--bm-bg); color: var(--bm-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.bm-clear[hidden] { display: none; }

/* Kategori düğmeleri — mobilde yatay kaydırılır, genişte satıra sarılır */
.bm-chips { display: flex; gap: 8px; margin: 14px 0 0; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@container bm (min-width: 760px) { .bm-chips { flex-wrap: wrap; overflow: visible; padding-bottom: 0; } }
.bm-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--bm-ink); white-space: nowrap;
  background: #fff; border: 1px solid #d9d9df; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bm-chip:hover { border-color: var(--bm-ink); }
.bm-chip:focus-visible { outline: 3px solid rgba(245,8,104,.35); outline-offset: 2px; }
.bm-chip small { font-size: 11.5px; font-weight: 800; color: var(--bm-mut); background: var(--bm-bg); border-radius: 999px; padding: 1px 7px; }
.bm-chip[aria-pressed="true"] { background: var(--bm-ink); border-color: var(--bm-ink); color: #fff; }
.bm-chip[aria-pressed="true"] small { background: var(--bm-pink); color: #fff; }
.bm-chip .bm-ico { color: var(--bm-pink); }
.bm-chip[aria-pressed="true"] .bm-ico { color: #fff; }

.bm-count { margin: 16px 2px 0; font-size: 13.5px; color: var(--bm-mut); min-height: 20px; }
.bm-count b { color: var(--bm-ink); }
.bm-empty { margin: 18px 0 0; padding: 32px 20px; text-align: center; border: 1.5px dashed #d9d9df; border-radius: 18px; background: #fff; }
.bm-empty[hidden] { display: none; }
.bm-empty strong { display: block; font-size: 17px; margin-bottom: 6px; }
.bm-empty p { margin: 0 0 14px; color: var(--bm-mut); font-size: 14px; }
.bm-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--bm-ink); background: var(--bm-ink); color: #fff; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; text-decoration: none; }
.bm-btn--ghost { background: #fff; color: var(--bm-ink); }

/* Bölümler ve kart ızgarası */
.bm-sec { margin: 30px 0 0; }
.bm-sec[hidden] { display: none; }
.bm-sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 20px; font-weight: 900; line-height: 1.2; }
.bm-sec-h .bm-ico { width: 20px; height: 20px; color: var(--bm-pink); flex: 0 0 auto; }
.bm-sec-h small { font-size: 13px; font-weight: 700; color: var(--bm-mut); }
.bm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@container bm (min-width: 560px) { .bm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@container bm (min-width: 840px) { .bm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

/* Rehber kartı — tamamı tıklanabilir */
.bm-card {
  display: flex; flex-direction: column; min-width: 0; height: 100%;
  padding: 18px; border: 1px solid var(--bm-line); border-radius: 18px; background: #fff;
  color: var(--bm-ink); text-decoration: none; box-shadow: 0 1px 2px rgba(9,9,11,.04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bm-card[hidden] { display: none; }
.bm-card:hover { border-color: rgba(245,8,104,.55); box-shadow: 0 12px 28px -18px rgba(245,8,104,.55); transform: translateY(-2px); }
.bm-card:focus-visible { outline: 3px solid var(--bm-pink); outline-offset: 2px; }
.bm-card-media { margin: -18px -18px 14px; aspect-ratio: 16 / 9; border-radius: 18px 18px 0 0; overflow: hidden; background: var(--bm-bg); }
.bm-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bm-pink-t); color: var(--bm-pink-d); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.bm-tag .bm-ico { width: 14px; height: 14px; }
.bm-card-t { margin: 12px 0 0; font-size: 17px; font-weight: 800; line-height: 1.32; overflow-wrap: anywhere; }
.bm-card-d { margin: 8px 0 0; flex: 1 1 auto; font-size: 14px; line-height: 1.55; color: #4a4a52; }
.bm-card-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bm-line); }
.bm-meta { font-size: 12px; color: var(--bm-mut); }
.bm-read { font-size: 13px; font-weight: 800; color: var(--bm-pink); white-space: nowrap; }
.bm-card:hover .bm-read { text-decoration: underline; }

/* ---------- Rehber detay ---------- */
.bm-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 800px; margin: 0 auto; }
@container bm (min-width: 1000px) {
  .bm-doc { max-width: none; grid-template-columns: minmax(0, 740px) 230px; justify-content: center; gap: 36px; }
}
.bm-dochead { margin: 0 0 22px; }
.bm-dochead .bm-h1 { margin-top: 12px; font-size: clamp(28px, 3.6cqi, 42px); text-transform: none; line-height: 1.12; }
.bm-docmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; font-size: 13px; color: var(--bm-mut); }
.bm-docmeta span { display: inline-flex; align-items: center; gap: 6px; }

/* İçindekiler */
.bm-toc { display: none; }
@container bm (min-width: 1000px) {
  .bm-toc { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; padding: 16px; border: 1px solid var(--bm-line); border-radius: 16px; background: #fff; }
  .bm-toc-m { display: none; }
}
.bm-toc-t { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bm-mut); }
.bm-toc ol, .bm-toc-m ol { list-style: none; margin: 0; padding: 0; }
.bm-toc a, .bm-toc-m a { display: block; padding: 6px 10px; border-left: 2px solid var(--bm-line); font-size: 13.5px; line-height: 1.4; color: #3a3a41; text-decoration: none; }
.bm-toc a:hover, .bm-toc-m a:hover { color: var(--bm-pink); }
.bm-toc a.is-active { border-left-color: var(--bm-pink); color: var(--bm-ink); font-weight: 700; background: var(--bm-pink-t); }
.bm-toc-m { margin: 0 0 22px; border: 1px solid var(--bm-line); border-radius: 14px; background: #fff; }
.bm-toc-m summary { cursor: pointer; padding: 14px 16px; font-weight: 800; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.bm-toc-m summary::-webkit-details-marker { display: none; }
.bm-toc-m summary::after { content: "+"; font-size: 20px; color: var(--bm-pink); line-height: 1; }
.bm-toc-m[open] summary::after { content: "−"; }
.bm-toc-m ol { padding: 0 12px 12px; }

/* Yazı tipografisi */
.bm-prose { min-width: 0; font-size: 16.5px; line-height: 1.75; color: #26262b; overflow-wrap: anywhere; }
.bm-prose > :first-child { margin-top: 0; }
.bm-prose h2 { margin: 38px 0 12px; font-size: 23px; line-height: 1.25; font-weight: 900; color: var(--bm-ink); scroll-margin-top: 100px; }
.bm-prose h3 { margin: 26px 0 8px; font-size: 18.5px; line-height: 1.3; font-weight: 800; color: var(--bm-ink); scroll-margin-top: 100px; }
.bm-prose p { margin: 0 0 16px; }
.bm-prose ul, .bm-prose ol { margin: 0 0 18px; padding-left: 24px; }
.bm-prose li { margin: 6px 0; padding-left: 2px; }
.bm-prose li::marker { color: var(--bm-pink); font-weight: 800; }
.bm-prose a { color: var(--bm-pink-d); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.bm-prose a:hover { color: var(--bm-pink); }
.bm-prose strong { color: var(--bm-ink); }
.bm-prose img { max-width: 100%; height: auto; }
.bm-prose code { font-size: .9em; background: var(--bm-bg); padding: 1px 5px; border-radius: 5px; }

/* Tablolar — her tablo yatay kaydırılabilir kapsayıcıda (GuideCatalog::prepare) */
.bm-prose .tbl { margin: 8px 0 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--bm-line); border-radius: 14px; background: #fff; }
.bm-prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.bm-prose th { text-align: left; background: var(--bm-bg); font-weight: 800; color: var(--bm-ink); padding: 11px 14px; border-bottom: 1px solid var(--bm-line); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.bm-prose td { padding: 11px 14px; border-bottom: 1px solid var(--bm-line); vertical-align: top; overflow-wrap: normal; word-break: normal; min-width: 110px; }
.bm-prose td:first-child { font-weight: 700; color: var(--bm-ink); }
.bm-prose tr:last-child td { border-bottom: 0; }
.bm-prose tbody tr:nth-child(even) td { background: #fcfcfd; }

/* Özet ve bilgi kutuları */
.bm-prose .ozet { position: relative; margin: 0 0 26px; padding: 18px 20px 18px 22px; border-radius: 16px; background: var(--bm-pink-t); border: 1px solid #ffd3e5; }
.bm-prose .ozet::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--bm-pink); }
.bm-prose .ozet p:last-child, .bm-prose .ozet ul:last-child { margin-bottom: 0; }
.bm-prose .not { margin: 0 0 18px; padding: 14px 16px 14px 46px; position: relative; border-radius: 14px; background: #f4f6fb; border: 1px solid #e1e6f2; font-size: 15px; line-height: 1.6; }
.bm-prose .not::before { content: "i"; position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--bm-ink); color: #fff; font: 800 13px/22px Georgia, serif; text-align: center; }

/* Canlı ürün kutuları (App\Support\GuideProducts) */
.gp-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 6px 0 22px; }
.bm-prose a.gp-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--bm-line); border-radius: 14px; padding: 9px; background: #fff; color: var(--bm-ink); text-decoration: none; font-weight: 400; transition: border-color .15s ease, box-shadow .15s ease; }
.bm-prose a.gp-card:hover { border-color: rgba(245,8,104,.55); box-shadow: 0 8px 20px -14px rgba(245,8,104,.6); }
.gp-card img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--bm-bg); flex: 0 0 48px; margin: 0; }
.gp-body { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.gp-name { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gp-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; line-height: 1.2; }
.gp-price { font-weight: 800; }
.gp-stock { color: #166534; background: #dcfce7; border-radius: 99px; padding: 1px 7px; font-weight: 700; }
.gp-out { opacity: .6; } .gp-out .gp-stock { color: #991b1b; background: #fee2e2; }

/* Özet kart görseli, ilgili rehberler, dönüş */
.bm-figure { margin: 28px 0 0; padding: 18px; text-align: center; border: 1px solid var(--bm-line); border-radius: 16px; background: #fff; }
.bm-figure img { max-width: 380px; width: 100%; height: auto; border-radius: 12px; }
.bm-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--bm-mut); }
.bm-related { margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--bm-line); }
.bm-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; font-weight: 800; color: var(--bm-ink); text-decoration: none; }
.bm-back:hover { color: var(--bm-pink); }

/* Dar içerik alanı (mobil): üst bölümü sıkılaştır — arama alanı ilk ekranda görünsün. */
@container bm (max-width: 559px) {
  .bm-hero { padding: 18px; gap: 14px; border-radius: 18px; }
  .bm-lead { font-size: 14.5px; line-height: 1.6; margin-top: 10px; }
  .bm-stats { margin-top: 12px; gap: 6px; }
  .bm-stats li { padding: 5px 10px; font-size: 12px; }
  .bm-stats b { font-size: 14px; }
  .bm-calc { padding: 14px 16px; gap: 10px; flex-direction: row; align-items: center; }
  .bm-calc-ico { flex-basis: 38px; width: 38px; height: 38px; }
  .bm-calc-d { display: none; }
  .bm-calc-t { font-size: 15px; }
  .bm-calc-cta { font-size: 0; }
  .bm-calc-cta span { font-size: 22px; }
  .bm-tools { margin-top: 16px; }
  .bm-search input { height: 52px; font-size: 16px; }
}
