/*
 * Mobil ve tablet katmanı.
 * Sayfa hiçbir genişlikte yana kaymaz; sığmayan bloklar tek sütuna iner,
 * geniş tablolar kendi kutusu içinde kaydırılır. Diğer stil dosyalarından sonra yüklenir.
 */
html { overflow-x: hidden; }
body { max-width: 100%; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; overscroll-behavior-x: none; }
img, video, iframe, svg, canvas { max-width: 100%; }
.page-content img, .page-content video { height: auto; }
.page-content iframe { max-width: 100% !important; }
/* Uzun kelimeler ve bağlantılar satırı taşırmasın */
.page-content p, .page-content li, .page-content h1, .page-content h2, .page-content h3, .page-content td { overflow-wrap: break-word; }
/* Form alanları: iOS odaklanınca sayfayı büyütmesin (16px altı yazı büyütmeyi tetikler) */
@media (max-width: 1199px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}

/* Geniş sütun boşlukları (Bootstrap g-5) dar ekranda kenardan taşmasın */
@media (max-width: 1279px) { .row.g-5 { --bs-gutter-x: 1.5rem; } }

/* ------------------------------------------------------------ Tablet (≤ 991px) */
@media (max-width: 991px) {
  /* Footer sütun boşlukları ekran dışına taşmasın */
  .cms-footer .row.g-5 { --bs-gutter-y: 2rem; }

  /* Ürün sayfası */
  .csi-product-v3 .csi-p3-section-head { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  .csi-product-v3 .csi-p3-section-head > p { max-width: 640px; }
  .csi-product-v3 .csi-p3-two-col { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .csi-product-v3 .csi-p3-two-col > * { min-width: 0; }
  .csi-product-v3 .csi-p3-table-wrap { margin-right: 0 !important; max-width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

  /* Kurumsal kimlik */
  .brand-divider-title { display: block !important; }
  .brand-divider-title h3 { font-size: 28px !important; margin-bottom: 10px !important; }
  .brand-divider-title p { max-width: 100%; }
}

/* ------------------------------------------------------------ Telefon (≤ 767px) */
@media (max-width: 767px) {
  .container, .container-fluid { padding-left: 18px; padding-right: 18px; }
  .cms-footer .row.g-5 { --bs-gutter-x: 1rem; }
}

/* ------------------------------------------------- Ana sayfa: rakamlar telefonda 2 × 2 */
@media (max-width: 767px) {
  .csi-v7-stats .csi-v7-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 !important; }
  .csi-v7-stats .csi-v7-stat { padding: 20px 14px 22px !important; min-width: 0; border-left: 0 !important; border-top: 1px solid rgba(255,255,255,.14) !important; }
  .csi-v7-stats .csi-v7-stat:nth-child(even) { border-left: 1px solid rgba(255,255,255,.14) !important; }
  .csi-v7-stats .csi-v7-stat-icon { width: 34px !important; height: 34px !important; padding: 7px !important; margin-bottom: 12px !important; }
  .csi-v7-stats .csi-v8-ghost { font-size: 12px !important; top: 16px !important; right: 12px !important; }
  .csi-v7-stats .csi-v8-deger strong { font-size: 34px !important; }
  .csi-v7-stats .csi-v8-birim { font-size: 12px !important; }
  .csi-v7-stats .csi-v8-rule { margin: 10px 0 12px !important; }
  .csi-v7-stats .csi-v7-stat > span:not([class]) { font-size: 12px !important; line-height: 1.3 !important; }
  .csi-v7-stats .csi-v7-stat small { font-size: 11px !important; line-height: 1.4 !important; }
}

/* ------------------------------------------------- Ürün sayfası: telefon */
@media (max-width: 767px) {
  .csi-product-v3 .csi-p3-crumb { justify-content: flex-start !important; text-align: left !important; height: auto !important; min-height: 40px; padding: 8px 0; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .csi-product-v3 .csi-p3-crumb::-webkit-scrollbar { display: none; }
  .csi-product-v3 .csi-p3-crumb a, .csi-product-v3 .csi-p3-crumb b { flex: none; white-space: nowrap; }
  .csi-product-v3 .csi-p3-crumb b { max-width: 60vw; }
  /* Bölüm sekmeleri: rahat dokunulan düğmeler */
  .csi-product-v3 .csi-p3-nav > .csi-p3-shell { height: auto !important; padding: 8px 0 !important; }
  .csi-product-v3 .csi-p3-nav .csi-p3-tab-links { gap: 6px !important; height: auto !important; }
  .csi-product-v3 .csi-p3-nav .csi-p3-tab-links > a { justify-content: center; min-height: 40px; padding: 6px 8px !important; border: 1px solid var(--line, #dfe2e5); border-radius: 8px; background: #fff; font-size: 12px !important; line-height: 1.2; box-shadow: none !important; }
  .csi-product-v3 .csi-p3-nav .csi-p3-tab-links > a.active { border-color: var(--red, #d7161b); color: var(--red, #d7161b) !important; background: #fff5f5; }
  .csi-product-v3 .csi-p3-product-stage img { max-height: 340px; width: auto; margin-inline: auto; }
}

/* ------------------------------------------------- Ürünler sayfası: telefonda 2 sütunlu kompakt kartlar */
@media (max-width: 767px) {
  html body .cms-showcase-grid.cms-category-grid,
  html body .cms-showcase-grid.cms-product-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  html body .cms-showcase-grid > .cms-showcase-card { margin: 0 !important; width: auto !important; min-width: 0; border-radius: 12px !important; }
  html body .cms-showcase-grid .cms-showcase-media { aspect-ratio: 1 / 1 !important; height: auto !important; }
  html body .cms-category-grid .cms-category-tile .cms-category-tile-image { aspect-ratio: 1 / 1 !important; }
  html body .cms-showcase-grid .cms-showcase-media img { width: 100%; height: 100% !important; object-fit: cover; }
  html body .cms-product-grid .cms-showcase-media img { object-fit: contain !important; padding: 8px; }
  html body .cms-showcase-grid .cms-showcase-body { padding: 12px 12px 14px !important; gap: 4px; }
  html body .cms-showcase-grid .cms-showcase-body small { margin: 0 !important; font-size: 9px !important; letter-spacing: .06em; line-height: 1.3; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body .cms-showcase-grid .cms-showcase-body h2,
  html body .cms-showcase-grid .cms-showcase-body h3 { font-size: 15px !important; line-height: 1.15 !important; margin: 6px 0 8px !important; min-height: 0 !important; letter-spacing: 0 !important; overflow-wrap: anywhere; }
  html body .cms-showcase-grid .cms-showcase-body p { display: none !important; }
  html body .cms-showcase-grid .cms-showcase-body > span:last-child { min-height: 0 !important; height: auto !important; padding: 0 !important; background: none !important; color: var(--primary, #d7161b) !important; font-size: 12px !important; border: 0 !important; }
}
