/* Genel mobil düzeltmeleri: yana kaydırma yok, formlar ve tablolar dar ekrana sığar. Site, mağaza paneli ve yönetim paneli ortak. */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, canvas, svg { max-width: 100%; }
img { height: auto; }
pre, code { white-space: pre-wrap; word-break: break-word; }

@media (max-width: 991px) {
  .container, .container-fluid { max-width: 100%; padding-left: 14px; padding-right: 14px; }
  .row { margin-left: -6px; margin-right: -6px; }
  .row > [class*="col"] { padding-left: 6px; padding-right: 6px; }
  [style*="min-width"] { min-width: 0 !important; }
  .d-flex > *, .row > * { min-width: 0; }
}

@media (max-width: 767px) {
  body { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
  h1 { font-size: 22px; } h2 { font-size: 20px; } h3 { font-size: 18px; } h4 { font-size: 17px; } h5 { font-size: 15px; }
  input, select, textarea, .form-control, .form-select { font-size: 16px !important; max-width: 100%; }
  .btn, button[type=submit] { min-height: 42px; }
  .modal-dialog { margin: 8px; max-width: calc(100% - 16px); }
  .dropdown-menu { max-width: calc(100vw - 24px); }
  .btn-group, .btn-toolbar { flex-wrap: wrap; }
  .d-flex.justify-content-between { flex-wrap: wrap; }
  [style*="white-space: nowrap"], .text-nowrap { white-space: normal !important; }

  /* Tablolar: satırlar kart olur (JS her hücreye data-label ekler) */
  table.mobil-kart { display: block; width: 100%; border: 0; }
  table.mobil-kart thead { display: none; }
  table.mobil-kart tbody, table.mobil-kart tfoot { display: block; width: 100%; }
  table.mobil-kart tr { display: block; margin: 0 0 12px; padding: 4px 12px; border: 1px solid #e3e7ee; border-radius: 10px; background: #fff; }
  table.mobil-kart td, table.mobil-kart th { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; width: 100% !important; padding: 8px 0 !important; border: 0 !important; border-bottom: 1px solid #f0f2f6 !important; text-align: right; }
  table.mobil-kart td:last-child { border-bottom: 0 !important; }
  table.mobil-kart td::before { content: attr(data-label); flex: 0 0 38%; max-width: 45%; text-align: left; font-weight: 700; font-size: 12px; color: #6b778c; text-transform: uppercase; letter-spacing: .03em; }
  table.mobil-kart td[data-label=""]::before, table.mobil-kart td:not([data-label])::before { display: none; }
  table.mobil-kart td[data-label=""], table.mobil-kart td:not([data-label]) { justify-content: flex-end; }
}

/* Mobil arama: kategori listesi ve öneri paneli kutunun dışına taşabilsin (kırpılmasın) */
@media (max-width: 991px) {
  form.kbArama, .kbHeaderOrta { overflow: visible !important; }
  form.kbArama { position: relative; }
  form.kbArama .kbKategoriMenusu { max-width: calc(100vw - 28px); z-index: 10060; }
  form.kbArama input { min-width: 0; }
}

/* Mobil arama çubuğu: kategori kutusu gizlenir (kategoriler çipler ve menüde), arama alanı tam genişlik ve rahat dokunulur */
@media (max-width: 575px) {
  .search.kbArama { height: 46px; border-width: 1.5px; }
  .search.kbArama .searchKategori { display: none !important; }
  .search.kbArama .searchArama { width: auto; flex: 1 1 auto; }
  .search.kbArama .searchArama > input { font-size: 16px; padding: 0 14px; }
  form.kbArama .kbAraButon { padding: 0 18px; }
  form.kbArama .kbAraButon span { display: none; }
  .kb-kart-bilgi { padding: 0 6px; }
  .kb-kart-bilgi .s { font-size: 11px; }
  .kb-rozet { width: 20px; height: 20px; font-size: 10px; }
  .sh-ozet { grid-template-columns: repeat(2, 1fr); }
}

/* Mobil alt gezinme çubuğu */
.kbAltNav { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: 62px; }
  .kbAltNav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: #fff; border-top: 1px solid #e3e7ee; box-shadow: 0 -2px 10px rgba(29,36,51,.08); padding-bottom: env(safe-area-inset-bottom); }
  .kbAltNav a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 7px 2px 6px; color: #6b7280; text-decoration: none; font-size: 11px; position: relative; }
  .kbAltNav a i { font-size: 19px; color: #6b7280; }
  .kbAltNav a.aktif, .kbAltNav a.aktif i { color: #E3101D; }
  .kbAltNav .rozet { position: absolute; top: 3px; left: calc(50% + 6px); background: #E3101D; color: #fff; font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 10px; font-weight: 700; }
}
