/* Telefon görünüşü (iPhone, Samsung və digər telefonlar). Bütün qaydalar yalnız dar ekranda işləyir, kompüter görünüşünə toxunmur.
   Hamısından sonra yüklənir (templates/layout/base.php), ona görə köhnə mobil qaydaları burada üstələnir. */

/* Seçim pəncərəsində telefonda aşağıda yapışan "Sifarişi tamamla" (machine-info.php) — kompüterdə görünmür */
.mi-pick-next { display: none; }

@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
  a, button, summary { -webkit-tap-highlight-color: rgb(255 194 14 / .25); }

  /* ---------- Üst zolaq və header ---------- */
  /* Üst zolaq səhifə ilə birlikdə yuxarı gedir; ekranın başında yalnız header qalır (telefonda yer azdır) */
  .sm-top { position: relative; height: 36px; font-size: 12.5px; }
  .sm-top-in { height: 36px; gap: 10px; }
  .sm-top-num { padding-left: 8px; }
  .sm-hdr { top: 0; }
  .sm-hdr .hdr-in { min-height: 60px; gap: 8px; }
  .sm-logo img { height: 36px; }
  .sm-acts { gap: 6px; }
  .sm-lang > summary { min-height: 42px; padding: 0 6px; }
  .sm-hdr .sm-btn { min-height: 42px; padding: 0 13px; font-size: 13px; }
  .sm-burger { width: 44px; height: 42px; border-radius: 8px; }
  /* açılan menyu: bir sütun, iri toxunma sahəsi */
  .sm-nav { padding: 8px 16px 16px; max-height: calc(100dvh - 60px); overflow-y: auto; }
  .sm-hdr .hdr-in.open .sm-nav { grid-template-columns: 1fr; gap: 6px; }
  .sm-nav a { display: flex; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 10px; font-size: 16px; }
  .sm-lang-menu { width: 190px; }
  .sm-lang-menu a { min-height: 46px; font-size: 14px; }

  /* ---------- Ana səhifə: ilk ekran ---------- */
  .sm-hero-shade { background: linear-gradient(180deg, rgb(12 13 12 / .30) 0%, rgb(12 13 12 / .55) 40%, rgb(12 13 12 / .88) 100%); }
  .sm-hero-in { padding: 84px 0 22px; }
  .sm-hero-h { font-size: clamp(31px, 8.6vw, 40px); line-height: 1.08; letter-spacing: -0.03em; }
  .sm-hero-lead { margin-top: 14px; font-size: 15.5px; line-height: 1.55; }
  .sm-finder { margin-bottom: 16px; border-radius: 16px; }
  /* kateqoriya dairələri: iki sıra, yana sürüşür, kartın kənarına qədər */
  .sm-finder-cats { padding: 18px 0 14px; }
  .sm-finder-cats .sm-finder-t { padding-inline: 16px; font-size: 15px; }
  .sm-finder-list { margin-top: 14px; grid-auto-columns: 82px; gap: 14px 4px; padding: 2px 16px 6px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
  .sm-finder-list::-webkit-scrollbar { display: none; }
  .sm-finder-list button { scroll-snap-align: start; gap: 7px; }
  .sm-fc-ring { width: 68px; }
  .sm-fc-t { font-size: 12px; line-height: 1.25; }
  /* əlaqə: loqo header-də var, burada iki nömrə yan-yana düymə, altında e-poçt */
  .sm-finder-act.sm-fa { gap: 10px; padding: 14px 16px 16px; }
  .sm-fa-logo { display: none; }
  .sm-fa-tels { grid-template-columns: 1fr 1fr; justify-items: stretch; gap: 8px; padding-top: 0; border-top: 0; }
  .sm-fa-tels p { grid-column: 1 / -1; margin: 0; text-align: center; }
  .sm-fa-tels a { display: flex; align-items: center; justify-content: center; width: auto; min-height: 48px; padding: 0 6px; border: 1px solid var(--sm-line, #E3E5E1); border-radius: 10px; font-size: clamp(13px, 3.7vw, 15px); }
  .sm-fa-mail { font-size: 14px; }

  /* ---------- Ana səhifə: texnika parkı ---------- */
  .sm-park > .sm-in { padding-block: 40px 56px; }
  .sm-h2 { font-size: clamp(26px, 7.4vw, 32px); }
  .sm-lead { margin-top: 10px; font-size: 15.5px; }
  /* kateqoriyalar bir sətirdə yana sürüşür (əvvəl 6-7 sətrə yayılırdı) */
  .sm-chips { flex-wrap: nowrap; overflow-x: auto; margin: 20px -16px 0; padding: 0 16px 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .sm-chips::-webkit-scrollbar { display: none; }
  .sm-chips button { min-height: 42px; font-size: 13.5px; white-space: nowrap; }
  .sm-chips { margin-top: 24px; padding: 14px 16px; }
  .sm-chips + .sm-fleet { margin-top: 20px; }
  .sm-fleet { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  /* yığcam kart: şəkil solda, ad və əsas rəqəm sağda, göstəricilər və düymələr altda */
  .sm-mc { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border-radius: 14px; }
  .sm-mc-body { display: contents; }
  .sm-mc .sm-mc-stage { grid-column: 1; grid-row: 1; height: auto; min-height: 118px; margin: 10px 0 0 10px; padding: 0; border-radius: 10px; }
  .sm-mc-stage img { top: 8px; left: 8px; width: calc(100% - 16px); height: calc(100% - 16px); filter: drop-shadow(0 10px 8px rgb(30 30 20 / .18)); }
  .sm-mc-stage img.photo { top: 0; left: 0; width: 100%; height: 100%; }
  .sm-mc-top { grid-column: 2; grid-row: 1; flex-direction: column; justify-content: center; gap: 8px; margin: 10px 12px 0; padding-bottom: 10px; }
  .sm-mc-kind { font-size: 12px; }
  .sm-mc h3 { font-size: 17px; line-height: 1.25; }
  .sm-mc-big { grid-template-columns: auto auto 1fr; text-align: left; }
  .sm-mc-big b { font-size: 28px; }
  .sm-mc-big span { font-size: 13px; }
  .sm-mc-big small { grid-column: 1 / -1; justify-self: start; max-width: none; margin-top: 2px; font-size: 11.5px; }
  .sm-mc dl { grid-column: 1 / -1; margin: 10px 12px 0; font-size: 13.5px; }
  .sm-mc .sm-mc-top + dl, .sm-mc .sm-mc-top + dl.sm-mc-rows { margin: 4px 12px 0; }
  .sm-mc-act { grid-column: 1 / -1; margin: 0; padding: 12px; }
  .sm-mc-top + .sm-mc-act { padding-top: 12px; }
  .sm-mc-act .sm-btn { min-height: 46px; padding: 0 14px; font-size: 14px; }

  /* İşinizə görə seçin (bento): telefonda böyük plitə yuxarıda, qalanları iki sütunda */
  .sm-works { margin-top: 22px; }
  .sm-bento { grid-template-rows: 190px repeat(2, 150px); gap: 8px; }
  .sm-bento button { border-radius: 16px; }
  .sm-bento-tx { left: 12px; right: 12px; bottom: 12px; }
  .sm-bento b { font-size: 15px; }
  .sm-bento button:first-child b { font-size: 22px; }
  .sm-bento small { display: none; }
  .sm-bento button:first-child small { display: block; }
  .sm-done-sec > .sm-in { padding-block: 24px 48px; }
  .sm-done { gap: 12px; margin-top: 18px; }
  .sm-done article { border-radius: 18px; }
  .sm-done img { height: 200px; }
  .sm-done article > div { padding: 16px 18px 20px; }
  .sm-done h3 { font-size: 18px; }
  .sm-done p { font-size: 14.5px; }

    /* partnyorlar və sarı zolaq */
  .sm-partners-in { padding: 20px 0 18px; }
  .sm-partners-track { gap: 32px; padding-right: 32px; }
  .sm-cta-in { gap: 18px; padding: 36px 0 40px; }
  .sm-cta h2 { font-size: 24px; }
  .sm-cta p { margin-top: 8px; font-size: 15px; }
  .sm-cta-nums { width: 100%; grid-auto-flow: row; }
  .sm-cta-nums a { justify-content: center; min-height: 54px; font-size: 17px; }

  /* ---------- Daxili səhifələrin başlığı (video + iri söz) ---------- */
  .phero.phero.phero-compact { min-height: 190px; }
  .phero.phero.phero-compact .phero-in { padding-bottom: 18px; }
  .phero .page-title { font-size: min(12vw, 60px) !important; }

  /* ---------- Texnikalar ---------- */
  .cx { --cx-w: calc(100% - 32px); --cx-top: 60px; padding-bottom: 64px; }
  html:has(.cx) { scroll-padding-top: 124px; }
  .cx-head { padding-block: 22px 14px; }
  .cx-sub { font-size: 15px; line-height: 1.55; }
  .cx-chips-in { width: 100%; padding: 10px 16px; }
  .cx-chips a { min-height: 42px; font-size: 13.5px; }
  .cx-cat { padding-block: 30px 4px; }
  .cx-cat.sm-sand { margin-block: 22px; padding-block: 34px 26px; }
  .cx-chead { margin-bottom: 14px; padding-bottom: 10px; }
  .cx-chead h2 { font-size: 22px; }
  .cx-chead span { font-size: 13px; }
  .cx-list { gap: 14px; }
  .cx-card { border-radius: 16px; }
  .cx-img { aspect-ratio: 16 / 10; }
  .cx-img img { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
  .cx-img img.photo { inset: 0; width: 100%; height: 100%; }
  .cx-info { gap: 12px; padding: 16px 16px 18px; }
  .cx-top { gap: 12px; padding-bottom: 12px; }
  .cx-kind { font-size: 13px; }
  .cx-id h3 { font-size: 20px; }
  .cx-big b { font-size: 32px; }
  .cx-big span { font-size: 14px; }
  .cx-big small { font-size: 11.5px; }
  .cx-rows div { padding: 8px 0; font-size: 14px; }
  .cx-act { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding-top: 2px; }
  .cx-btn { min-height: 48px; padding: 0 16px; font-size: 14.5px; }
  .cx-jump-in { width: calc(100% - 32px); min-height: 48px; }
  .cx-jump-btn { min-height: 44px; }
  .cx-jump-list { width: 100%; max-height: 62vh; grid-template-columns: 1fr; }
  .cx-jump-list a { min-height: 44px; align-items: center; }

  /* ---------- Haqqımızda ---------- */
  .ab { --ab-w: calc(100% - 32px); padding-block: 28px 64px; }
  .ab-state { gap: 20px; }
  .ab-lead { font-size: 22px; line-height: 1.35; }
  .ab-p { font-size: 15px; line-height: 1.65; }
  .ab-side { gap: 16px; padding-top: 0; }
  .ab-btn { width: 100%; justify-content: center; }
  /* foto kartları: mətn şəklin üstündə yox, altında (tünd kart) — uzun mətn telefonda oxunaqlı qalır */
  .ab-trio { gap: 12px; margin-top: 32px; }
  .ab-main, .ab-photo { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: var(--sm-ink, #1D1F1E); }
  .ab-main img, .ab-photo img { position: relative; inset: auto; height: 220px; }
  .ab-main figcaption, .ab-photo p { position: static; padding: 16px 18px 20px; background: none; font-size: 14.5px; line-height: 1.6; color: #E4E2DC; }
  .ab-stack { gap: 12px; }
  .ab-dark { border-radius: 18px; }
  .ab-dark img { height: 180px; }
  .ab-dark > div { padding: 0 18px 20px; }
  .ab-goals { margin-top: 44px; padding-block: 40px; }
  .ab-h2 { font-size: 26px; }
  .ab-two { gap: 14px; margin-top: 16px; }
  .ab-partners { margin-top: 0; padding-top: 32px; }
  .ab-logos { gap: 18px 26px; margin-top: 22px; }
  .ab-logos img { height: 20px; max-width: 96px; }

  /* ---------- Əlaqə ---------- */
  .contact.contact { gap: 32px; padding-block: 32px 44px; }
  .contact .info { gap: 18px; }
  .contact .h-l, .block .h-l { font-size: clamp(30px, 9vw, 40px); }
  .contact .item { gap: 14px; padding: 16px 4px; }
  .contact .item:hover { padding-left: 4px; }
  .contact .item .ico { width: 44px; height: 44px; border-radius: 12px; }
  .contact .item a[href] { font-size: 17px; overflow-wrap: anywhere; }
  .contact .cform { gap: 22px; padding: 26px 18px 0; border-radius: 22px; }
  .contact .cform::before { left: 18px; right: 18px; }
  .cform .fld input[name], .cform .fld textarea[name] { font-size: 17px; }
  .contact .cform .send { height: 64px; margin-inline: -18px; padding-inline: 18px; font-size: 22px; }
  .contact .cform .send svg { width: 28px; height: 28px; }
  .mapwrap.mapwrap { padding-bottom: 64px; }
  .mapwrap .map { height: 280px; border-radius: 22px; }
  .mapwrap .pin-label { padding: 8px 12px; font-size: 12px; }

  /* ---------- Qalereya ---------- */
  .block.block { gap: 8px; padding-block: 36px 12px; }
  .block.block.last { padding-bottom: 64px; }
  .block .section-head { margin-bottom: 14px; padding-bottom: 12px; }
  .mosaic.mosaic { grid-auto-rows: 150px; gap: 8px; }
  .mosaic .tile { border-radius: 14px; }
  .lb .lb-btn { width: 48px; height: 48px; font-size: 26px; }
  .lb .lb-prev, .lb .lb-next { top: auto; bottom: max(20px, env(safe-area-inset-bottom)); transform: none; }
  .lb .lb-prev { left: 20px; }
  .lb .lb-next { right: 20px; }
  .lb .lb-close { top: 16px; right: 16px; }
  .lb.lb img[id] { max-width: 100vw; max-height: 78vh; border-radius: 0; }

  /* ---------- Footer ---------- */
  .ftr.ftr { padding: 48px 20px 24px; }
  .ftr .ftr-in { gap: 36px; }
  .ftr .ftr-cols { gap: 30px; }
  .ftr .ftr-links { gap: 14px 28px; }
  .ftr .ftr-links a { font-size: 17px; }
  .ftr .ftr-contact a.big { font-size: 19px; }
  .ftr .ftr-bottom { flex-direction: column; gap: 6px; font-size: 13px; }

  /* ---------- Pəncərələr: telefonda aşağıdan çıxan tam enli vərəq ---------- */
  .mi, .qr { width: 100%; max-width: 100%; max-height: calc(100dvh - 8px); margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .mi.mi-picking { width: 100%; height: calc(100dvh - 8px); }
  /* bağla düyməsi sürüşəndə də yuxarıda qalır */
  .mi-close, .mi.mi-picking .mi-close { position: sticky; top: 10px; right: auto; display: grid; margin: 10px 10px -52px auto; z-index: 5; background: rgb(255 255 255 / .94); }
  .mi-stage { height: 230px; padding: 24px; }
  .mi-body { padding: 20px 16px 24px; }
  .mi.mi-photo .mi-stage { height: 230px; }
  .mi.mi-photo .mi-body { padding: 20px 16px 24px; }
  .mi-name { font-size: 26px; }
  .mi-desc { font-size: 14.5px; }
  .mi-specs div { font-size: 14px; }
  .mi-rent { min-height: 52px; }
  .mi-nums { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mi-nums a { min-height: 50px; padding: 0 6px; font-size: clamp(13px, 3.6vw, 15px); }
  .mi-nums svg { display: none; }
  .qr-form { gap: 16px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .qr-title { padding-right: 8px; font-size: 21px; }
  .qr-grid { grid-template-columns: 1fr; gap: 12px; }
  .qr-f input, .qr-f textarea { font-size: 16px; }
  .qr-send, .qr-wa { min-height: 54px; }
  /* seçilən texnikalar: say düymələri barmaqla rahat basılsın */
  .qr-items-list .qty button, .qr-items-list .drop { width: 38px; height: 38px; }
  .qr-items-list .nm { font-size: 13.5px; }
  .qr-items-list img { width: 40px; }
  /* aşağı zolaq açıq olanda səhifənin sonu onun altında qalmasın */
  .qr-bar { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); justify-content: space-between; padding: 8px 8px 8px 16px; transform: none; font-size: 14px; animation-name: qr-bar-up; }
  .qr-bar-go { min-height: 46px; padding: 0 16px; }
  body:has(.qr-bar:not([hidden])) .ftr { padding-bottom: 96px; }
}

@keyframes qr-bar-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Seçim ekranı (header-dəki "İcarə sorğusu"): bir sütunda siyahı, altında forma. Bütün pəncərə bir yerdə sürüşür. */
@media (max-width: 860px) {
  .mi-pick { height: auto; max-height: none; overflow: visible; }
  .mi-pick-detail { overflow: visible; }
  .mi-pick-t { padding-right: 64px; }
  .mi-pick-search input { font-size: 16px; }   /* iPhone 16px-dən kiçik yazıda ekranı böyüdür */
  .mi-pick-it { min-height: 62px; }
  .mi-pd-img { height: 210px; }
  .mi-pd-head { flex-wrap: wrap; }
  .mi-pd-head .mi-pd-add { width: 100%; min-height: 50px; }
  /* aşağıda yapışan düymə: neçə texnika seçilib, basanda formaya keçir */
  .mi-pick-next { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 58px; padding: 0 18px calc(env(safe-area-inset-bottom)); border: 0; background: #1D1F1E; color: #FFFFFF; font: 600 15px 'Poppins', 'Segoe UI', sans-serif; cursor: pointer; box-shadow: 0 -10px 24px rgb(20 20 10 / .12); }
  .mi-pick-next[hidden] { display: none; }
  .mi-pick-next b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-left: auto; padding: 0 7px; border-radius: 999px; background: #FFC20E; color: #1D1F1E; font-size: 13px; }
  .mi-pick-next svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}

/* Kiçik telefonlar (360px və daha dar, məs. bəzi Samsung modelləri) */
@media (max-width: 400px) {
  .sm-logo img { height: 32px; }
  .sm-hdr .sm-btn { padding: 0 10px; font-size: 12.5px; }
  .sm-lang > summary { padding: 0 4px; }
  .sm-mc h3 { font-size: 16px; }
  .sm-mc-big b { font-size: 25px; }
  .cx-act { grid-template-columns: 1fr auto; }
  .cx-act .cx-rent { grid-column: 1 / -1; }
}

@media (max-width: 760px) { .sm-bento em { top: 10px; left: 12px; } .sm-bento em i { font-size: 30px; } .sm-bento button:first-child em i { font-size: 40px; } .sm-bento em span { font-size: 11.5px; } }

/* Telefonda yığcam kart: WhatsApp dairəsi şəklin sol yuxarı küncündə (sağda ad və rəqəm var) */
@media (max-width: 760px) {
  .sm-mc > .mc-wa { top: 16px; right: auto; left: 16px; width: 34px; min-height: 34px; height: 34px; }
  .sm-mc > .mc-wa svg { width: 17px; height: 17px; }
  .cx-crumbs { font-size: 12.5px; }
  .cx-others { padding-top: 36px; }
}
@media (max-width: 760px) {
  .sm-mc > .mc-wa { width: 28px; min-height: 28px; height: 28px; }
  .sm-mc > .mc-wa svg { width: 14px; height: 14px; }
  .cx-act .mc-wa { width: 34px; min-height: 34px; height: 34px; }
}
@media (max-width: 760px) { .cx-act .mc-wa { width: 48px; min-height: 48px; height: auto; } }

/* Telefonda aşağıda daim görünən zəng və WhatsApp zolağı (base.php). Kompüterdə gizlidir. */
.sm-callbar { display: none; }
@media (max-width: 720px) {
  .sm-callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgb(255 255 255 / .96); border-top: 1px solid #E3E5E1; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-family: 'Poppins', 'Segoe UI', sans-serif; }
  .sm-callbar a { display: flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none; }
  .sm-callbar svg { width: 20px; height: 20px; flex: none; }
  .sm-cb-call { background: #1D1F1E; color: #FFFFFF; }
  .sm-cb-call svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
  .sm-cb-wa { background: #25D366; color: #FFFFFF; }
  .sm-cb-wa svg { width: 20px; height: 20px; fill: currentColor; }
  .sm-callbar .sm-cb-wa:hover { background: #1EBE5A; }
  .sm-callbar a:active { transform: scale(.98); }
  /* zolaq səhifənin sonunu örtməsin; seçilən texnikalar zolağı onun üstündə dursun */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .qr-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media print { .sm-callbar { display: none !important; } }
