/* =====================================================================
   SATKOM — Mobil ana sayfa (yalnızca ≤767 px)

   Amaç: ana sayfayı ~23 ekrandan ~5-6 ekrana indirmek ve asıl işleri
   (teklif, arama, telsiz tamiri) ilk ekrana almak. Masaüstü görünümü
   etkilenmez: dosya layout'ta media="(max-width: 767px)" ile yüklenir
   ve kurallar ayrıca aşağıdaki medya sorgusunun içindedir.

   Hedeflenen sınıflar views/front/home.php içindedir:
   .m-quick, .m-chips, .m-svcband (yalnızca mobil bloklar)
   .home-cats, .home-products, .home-solutions, .home-services,
   .home-projects, .home-brands, .home-refs, .home-blog
   ===================================================================== */
@media (max-width: 767px) {

  :root { --m-pad: 20px; }
  .m-only { display: block; }

  /* ---- Bölüm ritmi: daha az boşluk, kısa başlıklar ------------------ */
  body .home-cats, body .home-products, body .home-solutions, body .home-services,
  body .home-projects, body .home-brands, body .home-refs, body .home-blog,
  body .statband, body .cta-band { padding-block: 28px; }

  .home-cats .section-head, .home-products .section-head, .home-solutions .section-head,
  .home-services .section-head, .home-projects .section-head, .home-brands .section-head,
  .home-refs .section-head, .home-blog .section-head { margin-bottom: 14px; }

  .home-cats .section-head .lead, .home-products .section-head .lead, .home-solutions .section-head .lead,
  .home-services .section-head .lead, .home-projects .section-head .lead, .home-brands .section-head .lead,
  .home-refs .section-head .lead, .home-blog .section-head .lead { display: none; }

  .home-cats h2, .home-products h2, .home-solutions h2, .home-services h2,
  .home-projects h2, .home-brands h2, .home-refs h2, .home-blog h2 { font-size: 1.3rem; line-height: 1.25; margin: 0; }

  .home-cats .text-center.mt-8, .home-products .text-center.mt-8, .home-solutions .text-center.mt-8,
  .home-services .text-center.mt-8, .home-brands .text-center.mt-8, .home-refs .text-center.mt-8 { margin-top: 14px; }
  .home-cats .text-center .btn, .home-products .text-center .btn, .home-solutions .text-center .btn,
  .home-services .text-center .btn, .home-brands .text-center .btn, .home-refs .text-center .btn { width: 100%; }

  /* "Tümü" bağlantıları (başlık yanındaki düğmeler) küçülür */
  .home-projects .section-head--split, .home-blog .section-head--split {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  }
  .home-projects .section-head--split .btn, .home-blog .section-head--split .btn {
    min-height: 36px; padding: 6px 12px; font-size: 13px; flex: none;
  }

  /* ---- Hero: kısa, metin altta, düğmeler aşağıdaki karta taşındı ------ */
  .hero { --hero-min: 430px !important; }
  .hero__slide { align-items: end; }
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(10,36,64,.15) 0%, rgba(10,36,64,.55) 38%, rgba(10,36,64,.96) 100%) !important;
  }
  .hero__content { padding-block: 0 64px; }
  .hero__eyebrow { font-size: 11px; letter-spacing: .12em; margin-bottom: 8px; }
  .hero h1, .hero h2 { font-size: 1.65rem; line-height: 1.18; margin-bottom: 10px; }
  .hero p {
    font-size: .92rem; line-height: 1.5; margin-bottom: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .hero__actions { display: none; }
  .hero__dots { left: 20px; transform: none; bottom: 34px; }
  .hero__dot { width: 22px; }

  /* ---- Hızlı eylem kartı (hero'nun üstüne biner) -------------------- */
  .m-quick {
    position: relative; z-index: 5; margin: -22px var(--m-pad) 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 14px; background: #fff; border-radius: 18px;
    box-shadow: 0 10px 30px rgba(13,37,61,.14);
  }
  .m-quick .btn { min-height: 48px; padding-inline: 10px; font-weight: 700; border-radius: 12px; }
  .m-quick .m-quick__call { --btn-bg: var(--c-primary-50); --btn-fg: var(--c-primary-700); --btn-bd: var(--c-primary-50); }
  .m-quick > .btn:only-of-type { grid-column: 1 / -1; }
  .m-quick small { grid-column: 1 / -1; text-align: center; font-size: 12.5px; color: var(--c-muted); }
  .m-quick small b { color: #12805c; }

  /* ---- "Ne arıyorsunuz?" yatay çip şeridi --------------------------- */
  .m-chips { padding: 26px 0 0; }
  .m-chips .eyebrow { display: block; padding-inline: var(--m-pad); margin-bottom: 4px; }
  .m-chips__title { display: block; padding-inline: var(--m-pad); margin-bottom: 12px; font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--c-ink); }
  .m-chips__row {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--m-pad) 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .m-chips__row::-webkit-scrollbar { display: none; }
  .m-chip {
    flex: none; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 6px;
    background: #fff; border: 1px solid var(--c-line); border-radius: 40px;
    font-size: 13.5px; font-weight: 600; color: var(--c-primary-800); white-space: nowrap; text-decoration: none;
  }
  .m-chip:hover { text-decoration: none; color: var(--c-primary-700); }
  .m-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--c-primary-50); }
  .m-chip__ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary-50); color: var(--c-primary-600); }

  /* Ana sayfa H1 şeridi mobilde sıkışık */
  .home-intro { padding-top: 20px; }
  .home-intro__title { font-size: 1.2rem; }

  /* ---- Ortak: yatay kaydırmalı şerit ---------------------------------- */
  .home-products .grid--products,
  .home-solutions .grid,
  .home-projects .bento {
    display: flex !important; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--m-pad)); padding: 2px var(--m-pad) 8px; scroll-padding-inline: var(--m-pad);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .home-products .grid--products::-webkit-scrollbar,
  .home-solutions .grid::-webkit-scrollbar,
  .home-projects .bento::-webkit-scrollbar { display: none; }

  /* ---- Ürün grupları: 2 sütun, kısa kartlar, ilk 5 + "tümü" --------- */
  .home-cats .cattile-grid { gap: 10px; }
  .home-cats .cattile { min-height: 118px; padding: 14px; border-radius: 14px; }
  .home-cats .cattile__icon, .home-cats .cattile__arrow, .home-cats .cattile__body small { display: none; }
  .home-cats .cattile__body strong { font-size: .9rem; margin: 0; }
  .home-cats .cattile:nth-child(n+7) { display: none; }

  /* ---- Öne çıkan ürünler: yatay şerit --------------------------------- */
  .home-products .grid--products > * { flex: 0 0 64%; scroll-snap-align: start; }
  .home-products .pcard__specs, .home-products .pcard__text, .home-products .pcard__actions { display: none; }
  .home-products .pcard__media { aspect-ratio: 4 / 3; }
  .home-products .pcard__title { font-size: .9rem; }

  /* ---- Çözümler: görselli yatay kartlar ------------------------------ */
  .home-solutions .grid > * { flex: 0 0 80%; scroll-snap-align: start; }
  .home-solutions .showcase-card__media { aspect-ratio: 16 / 10; }
  .home-solutions .showcase-card__num { display: none; }
  .home-solutions .showcase-card__body { padding: 14px; }
  .home-solutions .showcase-card__body h3 { font-size: 1rem; margin: 0; }
  .home-solutions .showcase-card__body p, .home-solutions .showcase-card__cta { display: none; }

  /* ---- İstatistik: dört büyük kart yerine tek şerit ------------------- */
  .statband__inner { gap: 16px; }
  .statband h2 { font-size: 1.25rem; margin-bottom: 0; }
  .statband .lead, .statband__badges, .statband__text .btn { display: none; }
  .statband__grid { grid-template-columns: repeat(4, 1fr) !important; gap: 4px; }
  .statcard { padding: 10px 2px; text-align: center; background: transparent; border: 0; }
  .statcard__icon, .statcard__bar { display: none; }
  .statcard__num { font-size: 1.15rem; }
  .statcard__label { font-size: 9.5px; letter-spacing: .02em; margin: 4px 0 0; line-height: 1.25; }

  /* ---- Teknik servis: kompakt liste + ücretsiz tespit bandı ---------- */
  .m-svcband {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 11px 14px;
    border-radius: 12px; background: #e8f6ef; color: #0b5e43; font-size: 13px; font-weight: 700;
  }
  .m-svcband svg { flex: none; }
  .home-services .service-grid { gap: 0; border: 1px solid var(--c-line); border-radius: 16px; overflow: hidden; background: #fff; }
  .home-services .service-tile { align-items: center; padding: 13px 14px; border: 0; border-radius: 0; border-top: 1px solid var(--c-line); box-shadow: none; }
  .home-services .service-tile:first-child { border-top: 0; }
  .home-services .service-tile__icon { width: 38px; height: 38px; }
  .home-services .service-tile__icon svg { width: 20px; height: 20px; }
  .home-services .service-tile__body > span { display: none; }
  .home-services .service-tile__body strong { font-size: .92rem; }

  /* ---- Projeler: yatay görsel kartlar -------------------------------- */
  .home-projects .bento > * { flex: 0 0 80%; scroll-snap-align: start; min-height: 210px; }
  .home-projects .ptile__text { display: none; }
  .home-projects .ptile__title, .home-projects .ptile--lead .ptile__title { font-size: 1.02rem; margin: 0; }
  .home-projects .ptile__overlay { padding: 14px; }

  /* ---- Markalar ve referanslar: 4 sütun, ilk 8 logo ------------------ */
  .home-brands .logo-grid, .home-refs .logo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .home-brands .logo-grid__item, .home-refs .logo-grid__item { min-height: 56px; height: 56px; padding: 6px; aspect-ratio: auto; min-width: 0; }
  .home-brands .logo-grid__item:nth-child(n+9), .home-refs .logo-grid__item:nth-child(n+9) { display: none; }
  .home-brands .logo-grid__item img, .home-refs .logo-grid__item img { max-height: 40px; object-fit: contain; }

  /* ---- Blog: büyük kart kısaldı, yan listeden 3 yazı ----------------- */
  .home-blog .newsgrid { gap: 10px; }
  .home-blog .newslead { min-height: 190px; }
  .home-blog .newslead__text, .home-blog .newslead__cta { display: none; }
  .home-blog .newslead__overlay { padding: 14px; }
  .home-blog .newsitem:nth-child(n+3) { display: none; }

  /* ---- Kapanış CTA ---------------------------------------------------- */
  .cta-band h2 { font-size: 1.3rem; }
  .cta-band__list { display: none; }
  .cta-band .cluster { display: grid; gap: 10px; }
  .cta-band .cluster .btn { width: 100%; }
}

/* =====================================================================
   İnce ayar (v1.1): canlı görünümü onaylanan önizlemeye yaklaştırır
   ===================================================================== */
@media (max-width: 400px) { :root { --m-pad: 14px; } }

@media (max-width: 767px) {

  /* Başlık + "Tümü" düğmesi aynı satırda; tüm başlıklar sola yaslı */
  .home-projects .section-head--split, .home-blog .section-head--split { flex-wrap: nowrap; }
  .home-projects .section-head--split > div, .home-blog .section-head--split > div { flex: 1; min-width: 0; }
  .home-brands .section-head--center, .home-refs .section-head--center { margin-inline: 0; text-align: left; }

  /* Ürün grupları: beyaz kart + ürün görseli (önizlemedeki gibi) */
  .home-cats .cattile {
    min-height: 0; padding: 12px; gap: 8px; justify-content: flex-start;
    background: #fff; color: var(--c-primary-900); border: 1px solid var(--c-line);
  }
  .home-cats .cattile:hover { color: var(--c-primary-700); transform: none; }
  .home-cats .cattile__bg { position: static; height: 74px; object-fit: contain; opacity: 1; transform: none !important; }
  .home-cats .cattile__scrim { display: none; }
  .home-cats .cattile__bg { background: transparent; mix-blend-mode: multiply; }
  .home-cats .cattile__body strong { color: var(--c-primary-900); font-size: .86rem; line-height: 1.3; }

  /* Öne çıkan ürünler: daha kısa kart */
  .home-products .pcard__media { aspect-ratio: auto; height: 150px; }
  .home-products .pcard__media { overflow: hidden; display: block; }
  .home-products .pcard__media > a { display: block; width: 100%; height: 100%; }
  .home-products .pcard__media img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
  .home-products .pcard__body { padding: 12px; }
  .home-products .pcard__cat { font-size: 10px; }

  /* Çözümler: başlık görselin üstünde (önizlemedeki gibi) */
  .home-solutions .showcase-card { height: 210px; border: 0; color: #fff; }
  .home-solutions .showcase-card__media { position: absolute; inset: 0; aspect-ratio: auto; }
  .home-solutions .showcase-card__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(13,37,61,.92));
  }
  .home-solutions .showcase-card__body { position: absolute; left: 0; right: 0; bottom: 0; background: none; z-index: 1; }
  .home-solutions .showcase-card__body h3 a { color: #fff; }
  .home-solutions .showcase-card__body h3 { font-size: 1.02rem; line-height: 1.3; }
}


/* =====================================================================
   v1.2: footer, alt menü, bülten, kategori ve ürün görselleri
   (Bu bölüm tüm sayfalarda geçerlidir: footer ve alt menü her sayfada var)
   ===================================================================== */
@media (max-width: 767px) {

  /* ---- Footer: kompakt, iki sütun ------------------------------------ */
  .site-footer { padding-top: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding-bottom: 20px; }
  .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-grid > div:first-child p { margin-top: 10px !important; font-size: 13px !important; line-height: 1.55; }
  .footer-grid > div:first-child .social { margin-top: 12px !important; }
  .footer-logo { height: 32px; }
  .site-footer h3 { font-size: 11.5px; margin-bottom: 8px; }
  .footer-list { font-size: 13px; }
  .footer-list li + li { margin-top: 0; }
  .site-footer .footer-list a { display: block; padding-block: 6px; line-height: 1.35; }
  .footer-contact { gap: 10px; font-size: 13px; }
  .site-footer nav ul { gap: 4px 14px !important; }
  .site-footer nav a { display: inline-block; padding-block: 4px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 14px; }

  /* ---- Bülten: e-posta ve "Abone Ol" aynı satırda --------------------- */
  .newsletter-band { padding-block: 28px; }
  .newsletter-band h2 { font-size: 1.15rem; }
  .newsletter-band form { flex-wrap: wrap; gap: 8px; }
  .newsletter-band .input { flex: 1 1 0; min-width: 0; min-height: 48px; }
  .newsletter-band form .btn { flex: none; min-height: 48px; padding-inline: 14px; }

  /* ---- Alt menü: önizlemedeki gibi (yazılı, "Teklif Al" ayrık kutu) --- */
  :root { --mbar-h: 66px; }
  .mbar { padding: 6px 6px env(safe-area-inset-bottom, 0px); align-items: center; }
  .mbar__item { min-height: 54px; border-radius: 12px; font-size: 11px; gap: 3px; }
  .mbar__item span { white-space: nowrap; }
  .mbar__item--primary { margin-inline: 4px; }
  .mbar__item--wa svg { color: #1fa855; }

  /* ---- Ürün grupları: görsel kartın üstünü tamamen kaplar ------------- */
  .home-cats .cattile { padding: 0; gap: 0; overflow: hidden; }
  .home-cats .cattile__bg {
    width: 100%; height: 112px; object-fit: cover; object-position: center;
    mix-blend-mode: normal; background: #fff; border-bottom: 1px solid var(--c-line);
  }
  .home-cats .cattile__body { padding: 10px 12px 12px; }

  /* ---- Öne çıkan ürünler: görsel alanı beyaz, görsel büyük ------------ */
  .home-products .pcard__media, .home-products .pcard__media > a { background: #fff; }
  .home-products .pcard__media { height: 170px; }
  .home-products .pcard__media img { padding: 4px; background: #fff; }
}

/* =====================================================================
   v1.3: ürün listesi filtreleri ve referans sektörleri (tüm sayfalar)
   ===================================================================== */
@media (max-width: 767px) {

  .sidebar-layout { gap: 16px; }

  /* Kategoriler: yana kaydırılan düğmeler */
  .filter-panel--cats { padding: 0; border: 0; background: none; }
  .filter-panel--cats > h3 { display: none; }
  .filter-panel--cats > .cat-list {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--m-pad)); padding: 2px var(--m-pad) 6px;
  }
  .filter-panel--cats > .cat-list::-webkit-scrollbar { display: none; }
  /* Alt kategoriler de şeride dahil: liste öğeleri düzleşir, her bağlantı bir düğme olur */
  .filter-panel--cats > .cat-list > li, .filter-panel--cats .cat-list__sub { display: contents; }
  .filter-panel--cats .cat-list a { flex: none; }
  .filter-panel--cats .cat-list a {
    display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
    border: 1px solid var(--c-line); border-radius: 40px; background: #fff;
    font-size: 13.5px; font-weight: 600; white-space: nowrap;
  }
  .filter-panel--cats .cat-list a.is-active { background: var(--c-primary-600); border-color: var(--c-primary-600); color: #fff; }
  .filter-panel--cats .cat-list__count { padding: 0 6px; font-size: 11px; }

  /* Marka + stok: katlanır kutu */
  .m-filtre { display: block; }
  .m-filtre > summary {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
    border: 1px solid var(--c-line); border-radius: 12px; background: #fff; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--c-primary-700); list-style: none;
  }
  .m-filtre > summary::-webkit-details-marker { display: none; }
  .m-filtre[open] > summary { margin-bottom: 12px; border-color: var(--c-primary-300); }
  .m-filtre .filter-panel { padding: 14px; }
  .m-filtre .filter-panel + .filter-panel { margin-top: 10px; }

  /* Yan yardım kartı telefonda gereksiz (alt çağrı kutusu aynı işi görüyor) */
  .sidebar-layout > aside .contact-card { display: none; }

  /* Referanslar ve diğer çip filtreleri: tek satır, yana kaydırılır */
  .filter-chips {
    flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--m-pad)); padding: 2px var(--m-pad) 6px;
  }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-chips > * { flex: none; white-space: nowrap; }
  .reffilter { gap: 12px; }
}
