/* GidaVeri Faz 1 Fiyat — sayfa-spesifik stiller */

/* ===== Twemoji GLOBAL size cap (memory: feedback_twemoji_global.md) =====
   !important + max-width/height ZORUNLU. Aksi halde global img{max-width:100%}
   gibi reset CSS'leri SVG'leri konteyner genişliğine kadar şişirir. Geçmişte
   ResmiTatilVeri'de h3 içindeki 🏖️ 500px boyutunda render oldu — bu kural o
   olayın çözümüdür. */
img.emoji {
  height: 1em !important;
  width: 1em !important;
  max-width: 1em !important;
  max-height: 1em !important;
  margin: 0 .05em 0 .1em;
  vertical-align: -0.1em;
  display: inline-block;
}
/* Bayrak emoji (lang switcher) hafif daha büyük */
.flag-emoji img.emoji,
.lang-item img.emoji,
.pill-icon img.emoji {
  height: 1.05em !important;
  width: 1.05em !important;
  max-width: 1.05em !important;
  max-height: 1.05em !important;
}

/* ===== Pill button (toggle standardı: icon + text yan yana, mobile dahil) ===== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.pill-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent2);
  text-decoration: none;
}
.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}
/* Twemoji size cap — emoji'ler line-height ile büyümesin */
.pill-icon img.emoji,
.flag-emoji img.emoji {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0;
}
.pill-text {
  font-weight: 600;
  letter-spacing: .1px;
}
.pill-chevron {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Mobile: text gizlenmesin (FaizVeri pattern) — pill kompakt kalır */
@media (max-width: 540px) {
  .pill-btn { padding: 6px 10px; font-size: 12px; gap: 5px; }
  .pill-text { max-width: 8em; overflow: hidden; text-overflow: ellipsis; }
}

/* Lang dropdown pozisyonu (header'a göre düzenle) */
.lang-menu { position: relative; }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 180px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 60;
}
.lang-menu.open .lang-dropdown { display: block; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text);
  text-align: inherit;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
}
.lang-item:hover { background: var(--bg-hover); color: var(--accent); text-decoration: none; }
.lang-item.active { background: var(--bg-soft); color: var(--accent2); font-weight: 700; }
.lang-item .flag-emoji {
  display: inline-flex;
  width: 18px;
  height: 14px;
  align-items: center;
  justify-content: center;
}

/* Header genel — actions arası boşluk */
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-row { gap: 10px; }

/* Primary nav */
.primary-nav {
  display: none;
  gap: 4px;
  margin: 0 16px;
}
@media (min-width: 720px) {
  .primary-nav { display: flex; }
}
.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-link.active {
  background: var(--bg-soft);
  color: var(--accent2);
}
.lang-label {
  display: none;
}
@media (min-width: 540px) {
  .lang-label { display: inline; }
}

/* Hero */
.hero-fiyat, .hero-cat {
  padding: 32px 0 16px;
}

/* Section blocks */
.section-block { margin: 32px 0; }
.section-h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}
.section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.kaynak-pill {
  font-size: 12px;
}
.kaynak-pill a {
  background: var(--gov-bg);
  color: var(--gov);
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(29, 78, 216, .25);
}
html[data-theme="dark"] .kaynak-pill a { border-color: rgba(96, 165, 250, .35); }
.kaynak-pill a:hover { text-decoration: none; opacity: .85; }

/* Hero meta (date) */
.hero-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Footer column titles */
.footer-col-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.footer-source-line {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Top movers */
.movers-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .movers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .movers-grid { grid-template-columns: repeat(4, 1fr); } }

.mover-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all .15s;
}
.mover-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.mover-card.mover-up { border-left-color: var(--accent2); }
.mover-card.mover-down { border-left-color: var(--warn); }

.mover-name { font-weight: 700; font-size: 14px; }
.mover-price { display: flex; align-items: baseline; gap: 4px; font-size: 16px; }
.mover-price .price-min { font-weight: 800; color: var(--accent2); }
.mover-price .price-max { font-weight: 800; color: var(--text); }
.mover-price .price-sep { color: var(--text-muted); font-weight: 400; }
.mover-price .price-unit { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.mover-delta { font-size: 13px; font-weight: 700; }
.mover-up .mover-delta { color: var(--accent2); }
.mover-down .mover-delta { color: var(--warn); }

/* Filter bar */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .filter-bar { grid-template-columns: 2fr 1fr 1fr auto; align-items: center; }
}
.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Price table */
.price-table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.price-table thead th {
  background: var(--bg);
  color: var(--text-muted);
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.price-table thead th.num,
.price-table tbody td.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.price-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.price-table tbody tr:hover { background: var(--bg-hover); }
.price-table tbody tr:last-child { border-bottom: none; }
.price-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
}
.price-table .col-urun a {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.price-table .col-urun a:hover {
  color: var(--accent2);
  text-decoration: underline;
}
.price-table .col-min { color: var(--accent2); font-weight: 700; }
.price-table .col-max { color: var(--text); font-weight: 700; }

/* Delta */
.delta {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.delta-up { background: var(--bg-soft); color: var(--accent2); }
.delta-down { background: var(--warn-bg); color: var(--warn); }
.delta-flat { color: var(--text-muted); }

/* Small button */
.btn-sm {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent2); text-decoration: none; }

/* Categories grid */
.cat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  transition: all .15s;
}
.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}
.cat-icon { font-size: 28px; }
.cat-name { font-weight: 700; font-size: 16px; }
.cat-count { font-size: 13px; color: var(--text-muted); }

/* ===== Detail page ===== */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0;
  font-size: 14px;
}

.urun-detail {
  margin: 16px 0;
}
.urun-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}
.urun-header h1 {
  font-size: 28px;
  margin: 10px 0 6px;
  color: var(--text);
}
.price-headline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.price-headline .price-min {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent2);
}
.price-headline .price-max {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
}
.price-headline .price-sep { font-size: 24px; color: var(--text-muted); }
.price-headline .price-unit { font-size: 16px; color: var(--text-muted); }
.price-headline .price-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-inline-start: 12px;
}

.kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 16px;
}
@media (min-width: 720px) { .kpi-grid { grid-template-columns: repeat(5, 1fr); } }
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-up { color: var(--accent2); }
.kpi-down { color: var(--warn); }

.chart-block, .history-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 16px 0;
}
.chart-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.chart-tab {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.chart-tab:hover { border-color: var(--accent); color: var(--text); }
.chart-tab.active { background: var(--bg-soft); color: var(--accent2); border-color: var(--accent2); }
.chart-wrapper { position: relative; height: 280px; }

/* Share row + source */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.share-row a, .share-row button {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.share-row a:hover, .share-row button:hover {
  border-color: var(--accent);
  color: var(--accent2);
}

.data-source-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--gov-bg);
  color: var(--gov);
  border-radius: 8px;
  font-size: 12px;
}
html[data-theme="dark"] .data-source-note { color: var(--text); }

.badge { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.badge-cat { background: var(--bg-soft); color: var(--accent2); }
