/* Yavuz Plastik Stok v1.7.3 — hedefli ekran düzeltmesi
   Kural: genel DOM seçicisi yoktur. Yalnız katalog, POS ve hızlı arama etkilenir. */

/* KATALOG — masaüstünde 5, tablette 3, telefonda 2 ürün. */
body.ypbs-catalog-mode .catalog-page{
  min-height:100svh;
  background:#f4f7fa;
}
body.ypbs-catalog-mode .catalog-page>header{
  min-height:68px;
  padding:10px clamp(14px,3vw,42px);
}
body.ypbs-catalog-mode .catalog-hero{
  margin:14px clamp(14px,3vw,42px) 0;
  padding:22px clamp(20px,3vw,36px);
  border-radius:15px;
}
body.ypbs-catalog-mode .catalog-hero h1{
  margin:5px 0 3px;
  font-size:clamp(24px,2.5vw,34px);
  line-height:1.18;
}
body.ypbs-catalog-mode .catalog-hero p{
  margin:0;
  font-size:12px;
  line-height:1.5;
}
body.ypbs-catalog-mode .catalog-tools{
  display:grid;
  grid-template-columns:minmax(280px,1fr) minmax(180px,240px) auto;
  align-items:end;
  gap:10px;
  margin:12px clamp(14px,3vw,42px);
  padding:10px;
  border:1px solid #d5e0e9;
  border-radius:13px;
  background:#fff;
}
body.ypbs-catalog-mode .catalog-tools .search-field{
  min-width:0;
  min-height:46px;
  border:1px solid #cbd8e4;
  border-radius:11px;
  background:#fff;
  overflow:visible;
}
body.ypbs-catalog-mode .catalog-tools .search-field>span{
  left:13px;
  z-index:1;
  color:#0b63ce;
}
body.ypbs-catalog-mode .catalog-tools .search-field input{
  width:100%;
  min-height:44px;
  padding:10px 12px 10px 42px!important;
  border:0!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#173047!important;
  font-size:16px!important;
  line-height:1.35!important;
  outline:none!important;
  transform:none!important;
  -webkit-appearance:none;
  appearance:none;
}
body.ypbs-catalog-mode .catalog-tools .search-field:focus-within{
  border-color:#0b63ce;
  box-shadow:0 0 0 3px rgba(11,99,206,.12)!important;
}
body.ypbs-catalog-mode .catalog-category-select{
  min-width:0;
}
body.ypbs-catalog-mode .catalog-category-select select{
  min-height:44px;
  font-size:13px!important;
}
body.ypbs-catalog-mode .catalog-tools>strong{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  font-size:12px!important;
}
body.ypbs-catalog-mode .catalog-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 clamp(14px,3vw,42px) 28px!important;
}
body.ypbs-catalog-mode .catalog-grid article{
  min-width:0;
  padding:11px!important;
  border-radius:13px!important;
  content-visibility:visible!important;
  contain:none!important;
  contain-intrinsic-size:none!important;
}
body.ypbs-catalog-mode .catalog-product-mark{
  height:82px!important;
  margin-bottom:8px!important;
}
body.ypbs-catalog-mode .catalog-product-mark img{
  width:62px!important;
  height:62px!important;
}
body.ypbs-catalog-mode .catalog-grid article>small{
  min-height:14px;
  overflow:hidden;
  font-size:10.5px!important;
  line-height:1.35!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.ypbs-catalog-mode .catalog-grid h2{
  min-height:34px;
  margin:3px 0 1px!important;
  overflow:hidden;
  font-size:13px!important;
  line-height:1.35!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
body.ypbs-catalog-mode .catalog-grid article>p{
  min-height:14px;
  overflow:hidden;
  font-size:11px!important;
  line-height:1.35!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.ypbs-catalog-mode .catalog-grid article>div:nth-of-type(2){
  gap:6px;
  margin-top:9px!important;
}
body.ypbs-catalog-mode .catalog-grid article>div:nth-of-type(2) span{
  font-size:10.5px!important;
  white-space:nowrap;
}
body.ypbs-catalog-mode .catalog-grid article>div:nth-of-type(2) strong{
  overflow:hidden;
  font-size:13px!important;
  line-height:1.3!important;
  text-align:right;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.ypbs-catalog-mode .catalog-grid a{
  min-height:40px;
  align-items:center;
  margin-top:9px!important;
  padding:8px!important;
  font-size:12px!important;
}

/* POS — sağ sepet/ödeme alanını korur; yalnız ürün yoğunluğunu düzeltir. */
body.ypbs-panel-mode .pos-product-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px!important;
  padding:11px!important;
}
body.ypbs-panel-mode .pos-product-grid>button{
  min-width:0;
  min-height:138px;
  padding:10px!important;
  content-visibility:visible!important;
  contain:none!important;
  contain-intrinsic-size:none!important;
  transform:none!important;
}
body.ypbs-panel-mode .pos-product-grid>button>span{
  height:58px!important;
  margin-bottom:7px!important;
}
body.ypbs-panel-mode .pos-product-grid>button>span img{
  width:46px!important;
  height:46px!important;
}
body.ypbs-panel-mode .pos-product-grid>button>small{
  font-size:10.5px!important;
  line-height:1.3!important;
}
body.ypbs-panel-mode .pos-product-grid>button>strong{
  font-size:12px!important;
  line-height:1.35!important;
}
body.ypbs-panel-mode .pos-product-grid>button>p,
body.ypbs-panel-mode .pos-product-grid>button i{
  font-size:10.5px!important;
  line-height:1.35!important;
}
body.ypbs-panel-mode .pos-product-grid>button b{
  font-size:12px!important;
}
body.ypbs-panel-mode .pos-cart{
  visibility:visible!important;
  opacity:1!important;
}
body.ypbs-panel-mode .pos-checkout,
body.ypbs-panel-mode .pos-complete{
  visibility:visible!important;
  opacity:1!important;
}

/* HIZLI ARAMA — telefonda beyaz tam sayfa yerine görünür, kapatılabilir panel. */
body.ypbs-panel-mode .ypbs-command-backdrop[hidden]{
  display:none!important;
  pointer-events:none!important;
}
body.ypbs-panel-mode .ypbs-command-backdrop.is-open{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
body.ypbs-panel-mode .ypbs-command-modal{
  background:#fff!important;
  color:#173047!important;
}
body.ypbs-panel-mode .ypbs-command-modal>header,
body.ypbs-panel-mode .ypbs-command-results{
  visibility:visible!important;
  opacity:1!important;
}
body.ypbs-panel-mode .ypbs-command-modal>header input{
  color:#173047!important;
  background:#fff!important;
  -webkit-text-fill-color:#173047!important;
}

@media (min-width:768px) and (max-width:1180px){
  body.ypbs-catalog-mode .catalog-hero{display:none!important}
  body.ypbs-catalog-mode .catalog-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.ypbs-panel-mode .pos-product-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.ypbs-panel-mode .pos-product-grid>button{
    min-height:145px;
  }
}

@media (max-width:767px){
  body.ypbs-catalog-mode{
    padding-bottom:0!important;
  }
  body.ypbs-catalog-mode .catalog-page>header{
    min-height:58px;
    padding:8px 10px!important;
  }
  body.ypbs-catalog-mode .catalog-hero{
    display:none!important;
  }
  body.ypbs-catalog-mode .catalog-tools{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    margin:8px!important;
    padding:8px;
  }
  body.ypbs-catalog-mode .catalog-tools .search-field{
    grid-column:1/-1;
    min-height:48px;
  }
  body.ypbs-catalog-mode .catalog-category-select{
    min-width:0;
  }
  body.ypbs-catalog-mode .catalog-category-select select{
    width:100%;
    min-width:0;
    min-height:44px;
  }
  body.ypbs-catalog-mode .catalog-tools>strong{
    min-width:94px;
    min-height:44px;
    padding:7px 9px;
  }
  body.ypbs-catalog-mode .catalog-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin:0 8px 22px!important;
  }
  body.ypbs-catalog-mode .catalog-grid article{
    padding:9px!important;
  }
  body.ypbs-catalog-mode .catalog-product-mark{
    height:72px!important;
  }
  body.ypbs-catalog-mode .catalog-product-mark img{
    width:54px!important;
    height:54px!important;
  }
  body.ypbs-catalog-mode .catalog-grid h2{
    min-height:32px;
    font-size:11px!important;
  }
  body.ypbs-catalog-mode .catalog-grid article>div:nth-of-type(2){
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }
  body.ypbs-catalog-mode .catalog-grid article>div:nth-of-type(2) strong{
    width:100%;
    text-align:left;
  }
  body.ypbs-catalog-mode .catalog-pagination{
    margin:0 8px 18px!important;
  }

  body.ypbs-panel-mode .pos-product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding:9px!important;
  }
  body.ypbs-panel-mode .pos-product-grid>button{
    min-height:142px;
    padding:10px!important;
  }
  body.ypbs-panel-mode .pos-product-grid>button>span{
    height:58px!important;
  }
  body.ypbs-panel-mode .pos-products{
    order:1!important;
  }
  body.ypbs-panel-mode .pos-cart{
    order:2!important;
    position:static!important;
    min-height:auto!important;
  }
  body.ypbs-panel-mode .pos-checkout{
    padding:12px!important;
  }

  body.ypbs-panel-mode .ypbs-command-backdrop{
    place-items:start center!important;
    padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom))!important;
    background:rgba(0,15,35,.72)!important;
  }
  body.ypbs-panel-mode .ypbs-command-modal{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100svh - max(16px,env(safe-area-inset-top) + env(safe-area-inset-bottom)))!important;
    border:1px solid #c8d9e8!important;
    border-radius:15px!important;
    overflow:hidden!important;
  }
  body.ypbs-panel-mode .ypbs-command-modal>header{
    position:relative!important;
    z-index:2!important;
    flex:0 0 auto!important;
    min-height:62px!important;
    padding:8px!important;
    background:#fff!important;
  }
  body.ypbs-panel-mode .ypbs-command-modal>header input{
    min-height:46px!important;
    font-size:16px!important;
  }
  body.ypbs-panel-mode .ypbs-command-modal>header button{
    display:grid!important;
    place-items:center!important;
    width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }
  body.ypbs-panel-mode .ypbs-command-results{
    flex:1 1 auto!important;
    min-height:120px!important;
    max-height:calc(100svh - 78px)!important;
    overflow-y:auto!important;
    background:#fff!important;
  }
}

@media (max-width:390px){
  body.ypbs-catalog-mode .catalog-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    margin-left:6px!important;
    margin-right:6px!important;
  }
  body.ypbs-catalog-mode .catalog-grid article{
    padding:8px!important;
  }
  body.ypbs-panel-mode .pos-product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:7px!important;
  }
}

@media (prefers-reduced-motion:reduce){
  body.ypbs-catalog-mode .catalog-grid article,
  body.ypbs-panel-mode .pos-product-grid>button,
  body.ypbs-panel-mode .ypbs-command-backdrop,
  body.ypbs-panel-mode .ypbs-command-modal{
    animation:none!important;
    transition:none!important;
  }
}

/* v1.7.4 — mobilde sağda uzayan beyaz merkezi kayıt panelini kesin durdurur.
   Kaynak: enterprise-center.css mobil kuralı top + bottom değerlerini aynı anda veriyordu. */
@media (max-width:760px){
  .ypbs-sync-status{
    top:64px!important;
    right:8px!important;
    bottom:auto!important;
    left:auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:148px!important;
    height:auto!important;
    min-height:0!important;
    max-height:38px!important;
    overflow:hidden!important;
    padding:7px 8px!important;
    grid-template-columns:9px minmax(0,1fr)!important;
    align-items:center!important;
    border-radius:12px!important;
    pointer-events:auto!important;
  }
  .ypbs-sync-status .ypbs-sync-dot{
    grid-row:auto!important;
    width:9px!important;
    height:9px!important;
  }
  .ypbs-sync-status strong{
    display:block!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:8px!important;
    line-height:1.15!important;
  }
  .ypbs-sync-status small{display:none!important}
}
