/*==============================================================================
  Ürün detay — mobilde sabit "Adet + Sepete Ekle" çubuğu
  ----------------------------------------------------------------------------
  Yalnızca <= 991.98px'te devreye girer. Masaüstü görünüm değişmez.

  Yaklaşım: yeni bir buton KOPYALANMADI. Sayfadaki mevcut .product-buy-row
  öğesi olduğu gibi ekranın altına sabitlendi. Böylece:
    - add-to-cart JS'i (data-product-id, adet okuma) aynen çalışır
    - varyasyon/fiyat güncellemeleri tek yerde kalır
    - iki farklı adet kutusu arasında senkron sorunu oluşmaz

  Not: .product-buy-row, .qty-plus-minus, .add-to-cart, #productQuantity
  sınıf/id'leri JS tarafından kullanılıyor — değiştirilmemeli.
==============================================================================*/

@media (max-width: 991.98px) {

  .gi-single-product .single-pro-content .gi-single-qty .product-buy-row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;

    display: grid !important;
    grid-template-columns: minmax(112px, .85fr) minmax(150px, 1.15fr);
    align-items: center;
    gap: 10px !important;

    width: 100%;
    margin: 0 !important;
    /* iPhone alt cubugu icin guvenli alan */
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));

    background: #fff;
    border-top: 1px solid #e8eaed;
    box-shadow: 0 -4px 18px rgba(16, 24, 40, .10);
  }

  /* "Kendin Tasarla" varsa alt satira tam genislikte gecsin */
  .gi-single-product .product-buy-row > .gi-single-cart + .gi-single-cart {
    grid-column: 1 / -1;
  }

  /* Sabit cubuk sayfa sonundaki icerigi ortmesin.
     Yukseklik: ~62px cubuk + guvenli alan. Iki butonlu (Kendin Tasarla)
     durumda satir artiyor; bu yuzden govdeye biraz fazladan bosluk. */
  body.has-sticky-buy {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.has-sticky-buy.has-design-btn {
    padding-bottom: calc(134px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Cubuk icindeki alanlar tam genislik */
  .gi-single-product .product-buy-row .qty-plus-minus,
  .gi-single-product .product-buy-row .gi-single-cart,
  .gi-single-product .single-pro-content .gi-single-qty .product-buy-row .gi-single-cart .gi-btn-1 {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
  }

  .gi-single-product .single-pro-content .gi-single-qty .product-buy-row .qty-plus-minus {
    display: flex;
    align-items: center;
    height: 44px;
    border: 1px solid #e8eaed;
    border-radius: 999px;
    background: #f7f8fa;
    overflow: hidden;
  }

  .gi-single-product .single-pro-content .gi-single-qty .product-buy-row .qty-plus-minus input.qty-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    outline: none;
  }

  .gi-single-product .single-pro-content .gi-single-qty .product-buy-row .qty-plus-minus .ms_qtybtn {
    flex: 0 0 34px;
    width: 34px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    user-select: none;
  }

  .gi-single-product .single-pro-content .gi-single-qty .product-buy-row .gi-single-cart .gi-btn-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  /* Sepet cekmecesi/mobil menu acikken cubuk onlerine gecmesin */
  body.gi-menu-open-lock .gi-single-product .product-buy-row { z-index: 1000; }
}
