/* ==========================================================================
   MOBIL & TABLET UYUMLULUK KATMANI (en son yuklenir)
   ========================================================================== */

/* Yonetici cekmecesi kapaliyken golge sizmasin */
@media (max-width: 1024px) {
  .admin-sidebar { box-shadow: none !important; }
  body.admin-sidebar-mobile-open .admin-sidebar { box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45) !important; }
}

/* Ana sayfa tasarim araci */
@media (max-width: 900px) {
  .studio-top-bar { flex-wrap: wrap !important; padding: 14px !important; gap: 12px !important; }
  .studio-title-wrap { flex-wrap: wrap; gap: 8px; }
  .studio-title-wrap h2 { font-size: 1.15rem !important; }
  .studio-top-actions { flex-wrap: wrap !important; width: 100%; gap: 8px !important; }
  .studio-top-actions > button { flex: 1 1 calc(50% - 8px); justify-content: center; padding: 11px 10px !important; }
  .studio-top-actions > .studio-btn-save { flex: 1 1 100%; }

  .studio-inspector { flex-direction: column !important; }
  .studio-vertical-nav {
    width: 100% !important; flex-direction: row !important; overflow-x: auto; overflow-y: hidden;
    position: static !important; max-height: none !important; padding: 10px !important; gap: 6px !important;
    border-right: 0 !important; border-bottom: 1px solid #e2e8f0; -webkit-overflow-scrolling: touch;
  }
  .studio-vtab-btn { width: auto !important; flex: 0 0 auto; padding: 10px 14px !important; }
  .studio-vtab-btn:hover { transform: none; }
  .studio-vtab-btn.active { border-left: 1px solid #e2e8f0 !important; border-bottom: 3px solid var(--primary-red) !important; }
  .studio-tab-content { padding: 16px 12px !important; gap: 16px !important; }
  .studio-showcase-grid, .studio-brands-grid { grid-template-columns: 1fr !important; }
  .studio-pane-title { font-size: 1.05rem !important; }

  .hb-card-head { padding: 10px; }
  .hb-name-wrap { flex: 1 1 100%; order: 2; }
  .hb-actions { width: 100%; order: 3; }
  .hb-actions .hb-btn { flex: 1 1 auto; text-align: center; }
  .hb-card-body { padding: 12px; }
  .hb-hero-pick, .hb-add-wrap { padding: 12px; }
  .hb-picker { padding: 8px; }
  .hb-picker-box { max-height: 94vh; border-radius: 16px; }
  .hb-lib-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .hb-prow { flex-wrap: wrap; }

  /* Tam ekran onizleme ust cubugu */
  .studio-fs-header { flex-wrap: wrap; gap: 8px; padding: 8px 10px; height: auto; }
  .studio-fs-inert-badge { display: none; }
  .studio-device-controls { order: 3; width: 100%; justify-content: center; }
}

/* Genel: yatay tasma guvenligi ve dokunma hedefleri */
@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body { overflow-x: clip; }
  img, video, iframe { max-width: 100%; }
  .btn-primary, .btn-secondary, .form-control, select,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.qty-input):not(.cat-search-filter) {
    min-height: 40px;
  }
  .qty-btn, .qty-input, input[type="checkbox"], input[type="radio"], input[type="range"],
  .modal-close-btn, .lightbox-close, .chip-remove-btn, .cat-action-link, .hb-small, .admin-gallery-delete {
    min-height: 0 !important;
  }
  .admin-panel-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .quick-Access-grid {
    grid-template-columns: 1fr !important;
  }
  .data-table { font-size: .85rem; }
  .table-responsive, .table-wrap, [class*="table-container"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 768px) {
  .app-view .form-control, .app-view select, .app-view textarea, .app-view input[type=text], .app-view input[type=password], .app-view input[type=email], .app-view input[type=number] { max-width: 100%; box-sizing: border-box; }
  #view-integration, #view-settings, #view-integration > *, #view-integration form, #view-integration .form-group { max-width: 100%; box-sizing: border-box; min-width: 0; }
  #view-integration [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) { .settings-grid { grid-template-columns: minmax(0, 1fr) !important; } .settings-grid > * { min-width: 0; } }
@media (max-width: 768px) { .data-table-container { -webkit-overflow-scrolling: touch; } .data-table-container::before { content: "\2194  Tabloyu sa\00011Fa-sola kayd\000131r\000131n"; display: block; position: sticky; left: 0; width: 100%; box-sizing: border-box; padding: 6px 12px; font-size: .74rem; font-weight: 700; color: #64748b; background: #f8fafc; border-bottom: 1px solid #e2e8f0; } }
@media (max-width: 768px) { .data-table td { white-space: normal !important; max-width: 220px; word-break: break-word; } .data-table th { white-space: nowrap; } }
