/* Autopedya — satış verileri, rehber ve hesaplayıcı sayfaları (site_shell.py).
   fiyat.css'in değişkenleri ve bileşenleri (fp-*) üzerine yalnızca ek parçalar. */

/* Sayı kartları */
.rb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.rb-stat {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
}
.rb-stat .v {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text);
    white-space: nowrap;
}
.rb-stat .l {
    font-size: 0.64rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.rb-stat .d { font-size: 0.75rem; margin-top: 4px; color: var(--text-2); }

/* Sıra sütunu ve oran çubuğu */
.rb-rank { color: var(--text-3); font-variant-numeric: tabular-nums; width: 36px; }
.rb-bar {
    display: inline-block;
    height: 6px;
    border-radius: 3px;
    background: var(--red);
    vertical-align: middle;
    margin-left: 8px;
    min-width: 2px;
}
.rb-share { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0; }
.rb-muted { color: var(--text-3); }

/* Yatay dağılım çubukları (yakıt, kasa) */
.rb-dist { list-style: none; display: grid; gap: 10px; }
.rb-dist li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px; gap: 12px; align-items: center; font-size: 0.82rem; }
.rb-dist .track { background: var(--surface-2); border-radius: 4px; height: 10px; overflow: hidden; }
.rb-dist .fill { display: block; height: 100%; background: var(--red); border-radius: 4px; }
.rb-dist .val { text-align: right; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rb-dist .val b { color: var(--text); font-weight: 600; }
.rb-dist .sub { padding-left: 14px; color: var(--text-2); font-size: 0.78rem; }
.rb-dist .sub .fill { opacity: 0.55; }

/* Aylık sütun grafiği (iki yıl karşılaştırma) */
.rb-chart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.rb-chart svg { display: block; width: 100%; height: auto; }
.rb-chart .bar-cur { fill: var(--red); }
.rb-chart .bar-prev { fill: var(--text-3); opacity: 0.45; }
.rb-chart .grid { stroke: var(--border-hover); stroke-width: 1; stroke-dasharray: 3 4; }
.rb-chart text { fill: var(--text-3); font-size: 11px; font-family: 'Inter', sans-serif; }
.rb-legend { display: flex; gap: 16px; font-size: 0.75rem; color: var(--text-2); margin-top: 10px; flex-wrap: wrap; }
.rb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* Önceki / sonraki dönem */
.rb-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.rb-pager a {
    flex: 1 1 220px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
}
.rb-pager a:hover { border-color: var(--red); }
.rb-pager a span { display: block; font-size: 0.65rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.rb-pager a.next { text-align: right; }

/* Yıl / ay arşiv ızgarası */
.rb-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rb-months a, .rb-months span {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    font-size: 0.82rem;
}
.rb-months a:hover { border-color: var(--red); }
.rb-months small { display: block; color: var(--text-3); font-size: 0.72rem; margin-top: 2px; }
.rb-months span { color: var(--text-3); }

.fp-section details.rb-more { margin-top: 12px; }
.fp-section details.rb-more summary { cursor: pointer; font-size: 0.82rem; color: var(--text-2); padding: 6px 0; }

@media (max-width: 760px) {
    .rb-dist li { grid-template-columns: 1fr auto; }
    .rb-dist .track { grid-column: 1 / -1; order: 3; }
    .rb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rb-chart { padding: 10px; }
    .rb-chart text { font-size: 22px; }
    .rb-stat { padding: 10px 12px; }
    .rb-stat .v { font-size: 1.1rem; }
}

.rb-h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 20px 0 10px;
}
.rb-h3 a { color: var(--text); text-decoration: none; }
.rb-h3 a:hover { color: var(--red); }

/* Hesaplayıcı */
.rb-calc {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 24px;
    align-items: start;
}
.rb-form, .rb-result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}
.rb-form { display: grid; gap: 16px; }
.rb-field { display: grid; gap: 6px; border: 0; font-size: 0.82rem; color: var(--text-2); }
.rb-field legend { margin-bottom: 6px; }
.rb-field em { font-style: normal; color: var(--text-3); font-size: 0.72rem; }
.rb-field small { color: var(--text-3); font-size: 0.72rem; line-height: 1.5; }
.rb-field input[type=number], .rb-field select {
    width: 100%;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.95rem;
}
.rb-field input:focus, .rb-field select:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.rb-radio { display: flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; padding: 4px 0; }
.rb-radio input { accent-color: var(--red); }
.rb-result { position: sticky; top: 84px; font-size: 0.85rem; line-height: 1.6; color: var(--text-2); }
.rb-result p + p, .rb-result p + ul { margin-top: 10px; }
.rb-result-meta { font-size: 0.72rem; color: var(--text-3); margin-bottom: 12px; }
.rb-result-main { display: flex; flex-direction: column; margin-bottom: 10px; }
.rb-result-main .v { font-family: 'Space Grotesk', sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--red); line-height: 1.1; }
.rb-result-main .l { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); }
.rb-result b { color: var(--text); }
.rb-options { list-style: none; display: grid; gap: 6px; }
.rb-options li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.rb-note { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border-hover); border-radius: 8px; font-size: 0.8rem; }
.rb-src { margin: 8px 0 8px 18px; font-size: 0.8rem; line-height: 1.7; }
.rb-src a { color: var(--red); }

@media (max-width: 760px) {
    .rb-calc { grid-template-columns: 1fr; }
    .rb-result { position: static; }
}

/* Arama ve filtre */
.rb-toolbar { display: grid; gap: 12px; margin-bottom: 14px; }
.rb-search {
    width: 100%; max-width: 420px;
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border-hover); border-radius: 8px;
    padding: 10px 12px; font: inherit; font-size: 0.9rem;
}
.rb-filter { background: transparent; cursor: pointer; font: inherit; font-size: 0.75rem; }
.rb-filter.is-on { border-color: var(--red); color: var(--text); }
.rb-facts { list-style: none; display: grid; gap: 8px; font-size: 0.85rem; line-height: 1.6; color: var(--text-2); }
.rb-facts li { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.rb-facts b { color: var(--text); }

/* İkaz lambaları */
.rb-lights { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.rb-light {
    display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: start;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.rb-light-icon { width: 76px; height: 76px; border-radius: 12px; background: #111; display: flex; align-items: center; justify-content: center; }
.rb-light h3 { font-family: 'Space Grotesk', sans-serif; font-size: 0.98rem; font-weight: 700; }
.rb-light p { font-size: 0.82rem; line-height: 1.6; color: var(--text-2); margin-top: 6px; }
.rb-light p b { color: var(--text); font-weight: 600; }

/* Sözlük */
.rb-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rb-term { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; transition: border-color .15s; }
.rb-term h3 { font-family: 'Space Grotesk', sans-serif; font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; }
.rb-term h3 a { color: var(--text); text-decoration: none; }
/* Kartın tamamı başlıktaki bağlantıya gider */
.rb-term h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.rb-term:has(h3 a):hover { border-color: var(--red); }
.rb-term:has(h3 a):hover h3 a, .rb-term h3 a:focus-visible { color: var(--red); }
.rb-term p a { position: relative; z-index: 1; }
.rb-term p { font-size: 0.8rem; line-height: 1.55; color: var(--text-2); }
.rb-def { font-size: 1.05rem; color: var(--text); }

.rb-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rb-row3 input { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-hover); border-radius: 8px; padding: 10px 12px; font: inherit; }
.rb-field input[type=text] { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-hover); border-radius: 8px; padding: 10px 12px; font: inherit; }
.rb-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rb-plate { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; }
.rb-stars { color: var(--red); letter-spacing: 1px; white-space: nowrap; }

/* Haber kartları (kategori ve marka sayfaları) */
.rb-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rb-news { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.rb-news:hover { border-color: var(--red); transform: translateY(-2px); }
.rb-news-img { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.rb-news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-news-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.rb-news-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.92rem; line-height: 1.35; }

/* Site içi arama */
.rb-search-list { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rb-search-item {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 12px 16px; border-top: 1px solid var(--border); text-decoration: none; color: var(--text);
}
.rb-search-item:first-child { border-top: 0; }
.rb-search-item:hover { background: var(--surface); }
.rb-search-item:hover .rb-search-title { color: var(--red); }
.rb-search-title { font-size: 0.9rem; line-height: 1.5; }
.rb-search-item .fp-card-meta { flex: none; }
@media (max-width: 767px) { .rb-search-item { flex-direction: column; gap: 4px; } }
#search-results .rb-filter { margin-top: 12px; }

/* Satış tablolarında marka logosu */
.rb-brand { display: inline-flex; align-items: center; gap: 10px; }
.rb-brand .fp-brand-logo { width: 28px; height: 28px; flex: none; }
.rb-logo-gap { display: inline-block; width: 28px; height: 28px; flex: none; }

/* Euro NCAP tablosunda model görseli (arşivdeki şeffaf kesme görseller) */
.rb-ncap-model { display: flex; align-items: center; gap: 14px; }
.rb-ncap-model img, .rb-ncap-noimg { width: 96px; height: 50px; flex: none; object-fit: contain; }
.rb-ncap-noimg { display: inline-block; }
@media (max-width: 767px) { .rb-ncap-model img, .rb-ncap-noimg { width: 80px; height: 42px; } }

/* Videolar (YouTube; oynatıcı tıklanınca yüklenir) */
.rb-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rb-video-grid--short { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rb-video-sub { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; margin: 22px 0 10px; }
.rb-video { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rb-video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.rb-video--short .rb-video-frame { aspect-ratio: 9 / 16; }
.rb-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rb-video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.rb-video-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-video-icon {
    position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .7); border-radius: 10px; transition: background .15s;
}
.rb-video-icon::after {
    content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
    border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff;
}
.rb-video-play:hover .rb-video-icon, .rb-video-play:focus-visible .rb-video-icon { background: var(--red); }
.rb-video-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.rb-video-title { color: var(--text); text-decoration: none; font-size: 0.85rem; line-height: 1.45; font-weight: 600; }
.rb-video-title:hover { color: var(--red); }
@media (max-width: 767px) { .rb-video-grid--short { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Ehliyet deneme sınavı */
.rb-quiz { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin: 18px 0 8px; }
.rb-quiz-start h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.rb-quiz-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rb-quiz-facts li { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rb-quiz-facts b { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; color: var(--text); }
.rb-quiz-facts span { font-size: 0.72rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.rb-quiz-note { font-size: 0.82rem; color: var(--text-2); line-height: 1.6; margin: 8px 0 14px; }
.rb-quiz-btn {
    font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; border-radius: 9px; padding: 10px 16px;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border-hover);
}
.rb-quiz-btn:hover:not(:disabled) { border-color: var(--red); }
.rb-quiz-btn:disabled { opacity: .4; cursor: default; }
.rb-quiz-btn.is-primary { background: var(--red); border-color: var(--red); color: #fff; }
.rb-quiz-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; font-size: 0.8rem; color: var(--text-2); }
.rb-quiz-count { font-weight: 700; color: var(--text); }
.rb-quiz-timer { margin-left: auto; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text); background: var(--surface-2); padding: 4px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.rb-quiz-timer.is-low { color: var(--red); }
.rb-quiz-q { font-size: 1rem; line-height: 1.6; color: var(--text); font-weight: 600; margin-bottom: 12px; }
.rb-quiz-img { display: block; width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 10px; padding: 8px; margin: 0 0 14px; }
.rb-quiz-opts { display: grid; gap: 8px; }
.rb-quiz-opt {
    display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: 0.9rem; line-height: 1.5;
    padding: 12px 14px; border-radius: 10px; cursor: pointer; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border-hover);
}
.rb-quiz-opt:hover:not(:disabled) { border-color: var(--red); }
.rb-quiz-opt:disabled { cursor: default; }
.rb-quiz-letter { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; background: var(--surface-3); }
.rb-quiz-opt.is-sel { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.rb-quiz-opt.is-sel .rb-quiz-letter { background: var(--red); color: #fff; }
.rb-quiz-opt.is-ok { border-color: var(--green); background: var(--green-bg); box-shadow: none; }
.rb-quiz-opt.is-ok .rb-quiz-letter { background: var(--green); color: #000; }
.rb-quiz-opt.is-bad { border-color: var(--red); background: var(--red-glow); box-shadow: none; }
.rb-quiz-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 0.85rem; line-height: 1.6; background: var(--surface-2); }
.rb-quiz-feedback.is-ok { border-left: 3px solid var(--green); }
.rb-quiz-feedback.is-bad { border-left: 3px solid var(--red); }
.rb-quiz-verdict { font-weight: 700; margin-bottom: 4px; }
.rb-quiz-feedback.is-ok .rb-quiz-verdict { color: var(--green); }
.rb-quiz-feedback.is-bad .rb-quiz-verdict { color: var(--red); }
.rb-q-src { font-size: 0.75rem; color: var(--text-3); line-height: 1.55; margin-top: 6px; }
.rb-q-src a { color: var(--text-2); }
.rb-quiz-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rb-quiz-nav .is-primary { margin-left: auto; }
.rb-quiz-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.rb-quiz-pal { font: inherit; font-size: 0.72rem; height: 32px; border-radius: 7px; cursor: pointer; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.rb-quiz-pal.is-done { background: var(--surface-3); color: var(--text); }
.rb-quiz-pal.is-cur { border-color: var(--red); color: var(--text); }
.rb-quiz-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.rb-quiz-score b { font-family: 'Space Grotesk', sans-serif; font-size: 3rem; line-height: 1; color: var(--text); }
.rb-quiz-score span { font-size: 0.85rem; color: var(--text-2); }
.rb-quiz-badge { display: inline-block; margin: 12px 0; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 0.85rem; }
.rb-quiz-badge.is-ok { background: var(--green-bg); color: var(--green); }
.rb-quiz-badge.is-bad { background: var(--red-glow); color: var(--red); }
.rb-quiz-by { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rb-quiz-by-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); text-decoration: none; font-size: 0.82rem; }
.rb-quiz-by-row b { color: var(--text); }
.rb-quiz-review { list-style: decimal; padding-left: 22px; display: grid; gap: 14px; margin-top: 18px; }
.rb-quiz-rev { font-size: 0.85rem; line-height: 1.6; color: var(--text-2); }
.rb-quiz-rev .rb-quiz-q { font-size: 0.92rem; margin-bottom: 6px; }
.rb-quiz-rev-opts { list-style: none; display: grid; gap: 3px; margin: 4px 0 8px; }
.rb-quiz-rev-opts .is-ok { color: var(--green); font-weight: 600; }
.rb-quiz-rev-opts .is-bad { color: var(--red); }
@media (max-width: 767px) {
    .rb-quiz { padding: 16px; }
    .rb-quiz-facts { grid-template-columns: 1fr; }
    .rb-quiz-nav .rb-quiz-btn { flex: 1 1 auto; }
    .rb-quiz-nav .is-primary { margin-left: 0; }
}

/* Statik soru listesi (ders sayfaları) */
.rb-qlist { list-style: none; display: grid; gap: 12px; }
.rb-q { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.rb-q-text { font-size: 0.92rem; line-height: 1.6; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.rb-q-img { display: block; width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; margin-bottom: 8px; }
.rb-q-opts { padding-left: 22px; display: grid; gap: 3px; font-size: 0.85rem; color: var(--text-2); line-height: 1.55; }
.rb-q-ans { margin-top: 8px; font-size: 0.85rem; line-height: 1.6; color: var(--text-2); }
.rb-q-ans summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 0.8rem; }
.rb-q-ans[open] summary { margin-bottom: 6px; }
.rb-q-ans b { color: var(--green); }
.rb-credits { margin-top: 10px; font-size: 0.75rem; color: var(--text-3); }
.rb-credits summary { cursor: pointer; color: var(--text-2); }
.rb-credits ul { margin: 6px 0 0 18px; display: grid; gap: 2px; }
.rb-credits a { color: var(--text-2); }
.rb-q-group { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; margin: 18px 0 10px; color: var(--text); }
.rb-q-img[src^="/images/levha/"] { width: 96px; height: 96px; }
