/* Yavuz Plastik StockOS v1.6.93
 * Son-yüklenen mobil/tablet runtime sözleşmesi.
 * Sayfa içindeki eski !important kuralların oluşturduğu çakışmaları
 * yalnız responsive görünüm katmanında çözer; veri/işlem motorlarına dokunmaz.
 */

:root{
  --mxso-v1693-bottom-nav:72px;
  --mxso-v1693-safe-bottom:env(safe-area-inset-bottom,0px);
}

/* 1. Genel yatay taşma güvenliği */
html,body{max-width:100%;}
html body.mxso-standalone,
html body.mxstockos-public-catalog-page{
  overflow-x:hidden!important;
}
html body :where(.mxso-wrap,.mxso-content,.mxso-main,.mxso-panel,.mxso-card,.mxso-sector-pos-main,.mxstockos-public-catalog-v145){
  min-width:0!important;
  max-width:100%!important;
}

/* 2. Koyu başlıklarda kontrast – ekran görüntülerindeki siyah yazı sorununu son katmanda kapat */
html body :where(
  .mxso-dashboard-movements-panel>.mxso-section-title,
  .mxso-section-title.mxso-blue-title,
  .mxso-pos-live-drawer>header,
  .mxso-pos-wa-drawer>header,
  .mxso-pos-stock-hero,
  .mxso-sector-pos-top,
  .mxso-sector-pos-top>div:first-child,
  .mxso-sector-pos-topcard,
  .mxso-v1594-main-hero,
  .mxso-v1596-ecosystem-hero
) :where(h1,h2,h3,h4,strong,b,span,p,small,em,label,button){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-shadow:none!important;
}
html body .mxso-dashboard-movements-panel>.mxso-section-title{
  background:linear-gradient(135deg,#082f70 0%,#126cef 100%)!important;
  border-color:rgba(255,255,255,.15)!important;
}

/* 3. Dashboard odak ikonları – kutu içinde kaybolan dashicons düzeltmesi */
html body .mxso-dashboard-focus-card>.dashicons,
html body .mxso-dashboard-focus-card>.dashicons::before,
html body .mxso-focus-mode-head>.dashicons,
html body .mxso-focus-mode-head>.dashicons::before{
  font-family:dashicons!important;
  font-style:normal!important;
  font-weight:400!important;
  font-variant:normal!important;
  text-transform:none!important;
  speak:never!important;
  -webkit-font-smoothing:antialiased!important;
  -moz-osx-font-smoothing:grayscale!important;
  color:#126cef!important;
  -webkit-text-fill-color:#126cef!important;
}
html body .mxso-dashboard-focus-card>.dashicons{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:visible!important;
}

/* 4. Rakam / KPI kartlarında satır taşması */
html body :where(
  .mxso-kpi,.mxso-kpi-card,.mxso-stat-card,
  .mxso-pos-stock-kpis article,
  .mxso-sector-total-box article,
  .mxso-online-report-v1568 article,
  .mxso-v1594-side-kpis article,
  .mxso-v1596-side-kpis article,
  .mxso-pos-live-kpis a
) :where(strong,b,.mxso-kpi-value){
  max-width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  line-height:1.08!important;
}

/* 5. Çoklu KPI yapıları: en az 5 kart olan listelerde web 5 / tablet 3 / mobil 2 */
@supports selector(:has(*)){
  html body :where(.mxso-kpi-grid,.mxso-scorecard-grid,.mxso-dashboard-summary-grid-v1588):has(>:nth-child(5)){
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:12px!important;
  }
}

/* Online rapor: açıklama ayrı satır, rakamlar 5'li */
html body .mxso-online-report-v1568{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
}
html body .mxso-online-report-v1568>div{
  grid-column:1/-1!important;
  min-width:0!important;
}

/* 6. POS ürün havuzu: web 5 / tablet 3 / mobil 2 */
html body.mxso-sector-terminal-shell .mxso-sector-product-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  align-content:start!important;
}
html body.mxso-sector-terminal-shell .mxso-sector-product-card{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}
html body.mxso-sector-terminal-shell .mxso-sector-product-card :where(strong,small,b){
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}

/* Filtre / sayaç rozeti: 0 sayısı metnin üstüne binmesin */
html body.mxso-sector-terminal-shell .mxso-sector-product-groups{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
html body.mxso-sector-terminal-shell .mxso-sector-product-groups button[data-pos-group]{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-width:max-content!important;
  white-space:nowrap!important;
}
html body.mxso-sector-terminal-shell .mxso-sector-product-groups button[data-pos-group] small{
  position:static!important;
  transform:none!important;
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:22px!important;
  width:auto!important;
  height:22px!important;
  padding:0 6px!important;
  margin:0!important;
  border-radius:999px!important;
  line-height:1!important;
}

/* 7. Canlı sipariş ve WhatsApp: başlık/ayarlar çakışmasın */
html body.mxso-sector-terminal-shell .mxso-pos-live-drawer>header,
html body.mxso-sector-terminal-shell .mxso-pos-wa-drawer>header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:10px!important;
}
html body.mxso-sector-terminal-shell .mxso-pos-live-head-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  min-width:0!important;
  flex-wrap:wrap!important;
}
html body.mxso-sector-terminal-shell .mxso-pos-live-head-actions :where(button,select){
  min-width:0!important;
  max-width:100%!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body.mxso-sector-terminal-shell .mxso-pos-live-sound-mode option,
html body.mxso-sector-terminal-shell .mxso-pos-live-sound-repeat option{
  color:#071b3a!important;
  -webkit-text-fill-color:#071b3a!important;
}

/* Mobil/touch ortamında rail/sidebar tooltipleri kapat; dokunmada ekranda asılı kalmasın. */
@media (hover:none),(pointer:coarse){
  html body .mxso-sector-pos-rail a[data-title]::after,
  html body .mxso-sector-pos-rail a[data-title]::before,
  html body .mxso-nav-link::after,
  html body .mxso-nav-link::before{
    display:none!important;
    content:none!important;
  }
}

/* 8. Tablet */
@media (min-width:761px) and (max-width:1180px){
  @supports selector(:has(*)){
    html body :where(.mxso-kpi-grid,.mxso-scorecard-grid,.mxso-dashboard-summary-grid-v1588):has(>:nth-child(5)){
      grid-template-columns:repeat(3,minmax(0,1fr))!important;
      gap:10px!important;
    }
  }
  html body .mxso-online-report-v1568{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  html body.mxso-sector-terminal-shell .mxso-sector-product-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

/* 9. Telefon */
@media (max-width:760px){
  html body.mxso-standalone:not(.mxso-sector-terminal-shell){
    padding-bottom:calc(var(--mxso-v1693-bottom-nav) + var(--mxso-v1693-safe-bottom))!important;
    scroll-padding-bottom:calc(var(--mxso-v1693-bottom-nav) + 24px + var(--mxso-v1693-safe-bottom))!important;
  }
  html body.mxso-standalone:not(.mxso-sector-terminal-shell) .mxso-content{
    padding-bottom:calc(var(--mxso-v1693-bottom-nav) + 24px + var(--mxso-v1693-safe-bottom))!important;
  }

  html body .mxso-dashboard-focus-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  html body .mxso-dashboard-focus-card{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:8px!important;
    row-gap:2px!important;
    min-height:84px!important;
    padding:10px!important;
    align-items:center!important;
  }
  html body .mxso-dashboard-focus-card>.dashicons{
    grid-row:1/span 2!important;
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    font-size:18px!important;
  }
  html body .mxso-dashboard-focus-card strong{
    font-size:12.5px!important;
    line-height:1.2!important;
  }
  html body .mxso-dashboard-focus-card small{
    font-size:10.5px!important;
    line-height:1.25!important;
  }

  @supports selector(:has(*)){
    html body :where(.mxso-kpi-grid,.mxso-scorecard-grid,.mxso-dashboard-summary-grid-v1588):has(>:nth-child(5)){
      grid-template-columns:repeat(2,minmax(0,1fr))!important;
      gap:8px!important;
    }
  }
  html body .mxso-online-report-v1568{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  html body .mxso-online-report-v1568>div{grid-column:1/-1!important;}

  html body .mxso-pos-stock-kpis{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  html body .mxso-pos-stock-kpis article{
    min-height:112px!important;
    padding:12px!important;
    border-radius:16px!important;
  }
  html body .mxso-pos-stock-kpis article span{font-size:9.5px!important;}
  html body .mxso-pos-stock-kpis article strong{font-size:20px!important;}
  html body .mxso-pos-stock-kpis article small{font-size:10px!important;}

  html body.mxso-sector-terminal-shell .mxso-sector-product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding:6px 4px 36px!important;
  }

  /* POS canlı drawer: tam genişlik, alt menünün üstünde */
  html body.mxso-sector-terminal-shell .mxso-pos-live-drawer,
  html body.mxso-sector-terminal-shell .mxso-pos-wa-drawer{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    top:auto!important;
    bottom:calc(82px + var(--mxso-v1693-safe-bottom))!important;
    width:auto!important;
    max-width:none!important;
    height:auto!important;
    max-height:62dvh!important;
    border:1px solid #dbe7f4!important;
    border-radius:20px!important;
    overflow:auto!important;
    box-shadow:0 22px 56px rgba(7,27,58,.24)!important;
  }
  html body.mxso-sector-terminal-shell .mxso-pos-live-drawer>header,
  html body.mxso-sector-terminal-shell .mxso-pos-wa-drawer>header{
    grid-template-columns:1fr!important;
    padding:12px!important;
  }
  html body.mxso-sector-terminal-shell .mxso-pos-live-head-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,.8fr) 42px!important;
    width:100%!important;
    gap:5px!important;
  }
  html body.mxso-sector-terminal-shell .mxso-pos-live-head-actions :where(button,select){
    width:100%!important;
    min-width:0!important;
    height:38px!important;
    padding-inline:5px!important;
    font-size:10px!important;
  }
  html body.mxso-sector-terminal-shell .mxso-pos-live-head-actions button[data-live-close]{
    font-size:21px!important;
  }

  /* Canlı ve WA tetikleyicileri iki köşede; orta içeriği kapatmaz */
  html body.mxso-sector-terminal-shell .mxso-pos-live-hub-v140{
    position:fixed!important;
    right:8px!important;
    left:auto!important;
    top:auto!important;
    bottom:calc(82px + var(--mxso-v1693-safe-bottom))!important;
    width:54px!important;
    height:54px!important;
    z-index:10070!important;
  }
  html body.mxso-sector-terminal-shell .mxso-pos-live-toggle{
    width:54px!important;
    min-width:54px!important;
    height:54px!important;
    min-height:54px!important;
    border-radius:17px!important;
  }
  html body.mxso-sector-terminal-shell .mxso-pos-wa-tab{
    position:fixed!important;
    left:8px!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(82px + var(--mxso-v1693-safe-bottom))!important;
    min-width:54px!important;
    width:auto!important;
    height:54px!important;
    min-height:54px!important;
    padding:6px 10px!important;
    border-radius:17px!important;
    transform:none!important;
    writing-mode:horizontal-tb!important;
    text-orientation:initial!important;
    flex-direction:row!important;
    z-index:10071!important;
  }

  /* Sabit alt navigasyona temas eden diğer yüzen butonları yukarı al */
  html body.mxso-standalone:not(.mxso-sector-terminal-shell) .mxso-floating-quick-toggle{
    bottom:calc(82px + var(--mxso-v1693-safe-bottom))!important;
  }
}

/* 10. Katalog: gerçek hero görselini görünür tut; mobil/tablette boş lacivert blok oluşturma */
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-hero{
  overflow:hidden!important;
  background:#071b3a!important;
}
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual{
  position:relative!important;
  display:block!important;
  overflow:hidden!important;
  background:#071b3a!important;
}
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual>img{
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center!important;
  opacity:1!important;
  visibility:visible!important;
}
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy{
  z-index:2!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:linear-gradient(90deg,rgba(3,20,47,.94) 0%,rgba(3,20,47,.76) 54%,rgba(3,20,47,.08) 100%)!important;
}
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy :where(small,strong,em,b,i){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
@media (min-width:761px) and (max-width:1180px){
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual{
    min-height:260px!important;
    aspect-ratio:2048/682!important;
  }
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy{
    display:flex!important;
    position:absolute!important;
    inset:0!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:flex-start!important;
    padding:24px!important;
  }
}
@media (max-width:760px){
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual{
    min-height:205px!important;
    aspect-ratio:auto!important;
  }
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy{
    display:flex!important;
    position:absolute!important;
    inset:0!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:flex-start!important;
    gap:5px!important;
    padding:16px!important;
  }
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy strong{
    max-width:86%!important;
    font-size:20px!important;
    line-height:1.14!important;
  }
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy em{
    max-width:82%!important;
    font-size:11px!important;
    line-height:1.4!important;
  }
}

/* 11. Katalog ürün kartları: web 5 / tablet 3 / mobil 2 */
html body.mxstockos-public-catalog-page .mxstockos-public-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
}
@media (min-width:761px) and (max-width:1180px){
  html body.mxstockos-public-catalog-page .mxstockos-public-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
  }
  html body .mxso-pos-stock-kpis{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media (max-width:760px){
  html body.mxstockos-public-catalog-page .mxstockos-public-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
}

/* 12. Genel rakamsal kart sözleşmesi: kart adedine göre kesin 2 / 3 / 5 */
@supports selector(:has(*)){
  @media (min-width:1181px){
    html body :where(.mxso-kpi-grid,.mxso-scorecard-grid,.mxso-dashboard-summary-grid-v1588,.mxso-stats-grid):has(>:nth-child(5)){
      grid-template-columns:repeat(5,minmax(0,1fr))!important;
    }
  }
  @media (min-width:761px) and (max-width:1180px){
    html body :where(.mxso-kpi-grid,.mxso-scorecard-grid,.mxso-dashboard-summary-grid-v1588,.mxso-stats-grid):has(>:nth-child(3)){
      display:grid!important;
      grid-template-columns:repeat(3,minmax(0,1fr))!important;
      gap:10px!important;
    }
  }
  @media (max-width:760px){
    html body :where(.mxso-kpi-grid,.mxso-scorecard-grid,.mxso-dashboard-summary-grid-v1588,.mxso-stats-grid):has(>:nth-child(2)){
      display:grid!important;
      grid-template-columns:repeat(2,minmax(0,1fr))!important;
      gap:8px!important;
    }
  }
}

/* 13. Katalog hero içinde canlı katalog ürünlerinden ilk görsel */
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual>img.mxstockos-yavuz-catalog-background{
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
}
html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual>img.mxstockos-yavuz-catalog-featured-product{
  display:block!important;
  position:absolute!important;
  z-index:1!important;
  right:3.5%!important;
  bottom:4%!important;
  left:auto!important;
  top:auto!important;
  width:min(26%,270px)!important;
  height:82%!important;
  max-width:270px!important;
  max-height:82%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  opacity:.98!important;
  visibility:visible!important;
  filter:drop-shadow(0 18px 24px rgba(0,0,0,.24))!important;
  background:transparent!important;
  pointer-events:none!important;
}
@media (min-width:761px) and (max-width:1180px){
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual>img.mxstockos-yavuz-catalog-featured-product{
    right:2%!important;
    width:30%!important;
    height:80%!important;
  }
}
@media (max-width:760px){
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual>img.mxstockos-yavuz-catalog-background{
    object-position:57% center!important;
  }
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-visual>img.mxstockos-yavuz-catalog-featured-product{
    right:-2%!important;
    bottom:2%!important;
    width:42%!important;
    height:72%!important;
    opacity:.92!important;
  }
  html body.mxstockos-public-catalog-page .mxstockos-yavuz-catalog-mobile-copy{
    padding-right:35%!important;
  }
}
