/* #1052 Mobil / tablet / dizüstü / masaüstü uyumluluğu (yalnız yerleşim; renk, yazı tipi ve görünüm değişmez)
   Kapsam: sepet "kampanya (sepet altı)" sekmeleri ve ürün kartları, hak bilgisi, Satın Al sipariş tablosu.
   Geri alma: bu dosyayı ve header.tpl'deki tek <link> satırını kaldırmak yeterlidir. */

/* ---- 1) Sepet altı kampanya sekmeleri: telefon + tablet (<= 991px) ---- */
@media (max-width: 991.98px) {
    #divHediyeSecenekler .tab-nav li { max-width: 100%; box-sizing: border-box; }
    #divHediyeSecenekler .tab-nav li a { white-space: normal; word-break: break-word; }
    #divHediyeSecenekler .tabli { box-sizing: border-box; max-width: 100%; }
    #divHediyeSecenekler .kat-bilgi { line-height: 1.4; word-break: break-word; }

    /* başlık + arama kutusu alt alta, tam genişlik */
    #divHediyeSecenekler .most-selling-sepet .title .content,
    #divHediyeSecenekler .most-selling-sepet .title .search { float: none; width: 100%; box-sizing: border-box; }
    #divHediyeSecenekler .most-selling-sepet .title .search input { width: 100%; min-width: 0; box-sizing: border-box; }

    /* ürün kartları: ekrana göre otomatik sütun (sabit 12.7em genişlik yerine) */
    #divHediyeSecenekler .most-selling-sepet ul {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px;
        align-content: start; align-items: start; height: auto; max-height: 75vh; box-sizing: border-box;
    }
    #divHediyeSecenekler .most-selling-sepet ul li,
    #divHediyeSecenekler .most-selling-sepet ul li.kampanya-item {
        float: none; width: auto; min-width: 0; margin: 0; box-sizing: border-box; padding: .7em;
    }
    #divHediyeSecenekler .most-selling-sepet ul li .img { height: auto; min-height: 90px; }
    #divHediyeSecenekler .most-selling-sepet ul li img { max-width: 100%; height: auto; }
    #divHediyeSecenekler .most-selling-sepet .most-selling-sepet-title,
    #divHediyeSecenekler .most-selling-sepet .most-selling-sepet-brand { word-break: break-word; }
    #divHediyeSecenekler .most-selling-sepet .most-selling-sepet-price label { word-break: break-word; }
    #divHediyeSecenekler .most-selling-sepet .input-group { flex-wrap: wrap; }
}

/* ---- 2) Çok dar telefonlar (<= 359px): kartlar tek sütun ---- */
@media (max-width: 359.98px) {
    #divHediyeSecenekler .most-selling-sepet ul { grid-template-columns: 1fr; }
}

/* ---- 3) Satın Al: sipariş tablosu telefonda sayfayı yana taşırmasın (<= 575px) ---- */
@media (max-width: 575.98px) {
    .buying__box-body .col-md-8 { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .buying__box-body table.w-100 { font-size: 13px; }
    .buying__box-body table.w-100 th,
    .buying__box-body table.w-100 td { padding: 6px 3px; word-break: normal; overflow-wrap: normal; }
    .buying__box-body table.w-100 th { font-size: 12px; }
    .buying__box-body table.w-100 td { white-space: nowrap; }
    .buying__box-body table.w-100 td:nth-child(2),
    .buying__box-body table.w-100 th:nth-child(2) { white-space: normal; overflow-wrap: anywhere; min-width: 64px; }
    .buying__box-body table.w-100 th[style*="width"],
    .buying__box-body table.w-100 th[width],
    .buying__box-body table.w-100 td[width] { width: auto !important; }
}

/* ---- 4) Tablet dikey (576-991px): Satın Al tablosu kutuya sığsın ---- */
@media (min-width: 576px) and (max-width: 991.98px) {
    .buying__box-body .col-md-8 { max-width: 100%; overflow-x: auto; }
}
