/* ==========================================================================
   Kombiseti — Mobil hedefli responsive iyilestirmeler (B2C / dark tema)
   Bu dosya layout'taki inline <style> blogundan SONRA yuklenir; bu yuzden
   esit ozgullukte sonradan gelen kurallar kazanir. Sadece telefon/tablet
   genisliklerini hedefler, masaustu (>=992px) tasarimi DEGISMEZ.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Urun grid'i telefonda 2 KOLON (inline CSS bunu 1 kolona dusuruyordu)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .sales-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    /* One cikan / kategori grid'leri telefonda da 2 kolon dengeli dursun */
    .sales-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    /* Katalog (/urunler) kendi auto-fit minmax(220px) kuraliyla telefonda tek
       kolona dusuyordu; ayni ozgullukte sonradan yuklenip 2 kolona cekiyoruz. */
    .sales-catalog-main .sales-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Cok dar telefonlarda kartlari sadelestir: gorseli kucult, uzun aciklamayi
   ve ikincil "Detayli Incele" linkini gizle — mockup'taki sade kart gibi. */
@media (max-width: 575.98px) {
    .sales-product-card .sales-product-media img {
        height: 132px;
        padding: 12px;
    }

    .sales-product-body {
        padding: 0 12px 14px;
    }

    .sales-product-card h3 {
        font-size: 0.98rem;
        min-height: 2.6em;
        margin-bottom: 6px;
    }

    /* Telefonda yer kazanmak icin uzun ozet metni ve ikincil link gizlenir */
    .sales-product-card .sales-product-body > p,
    .sales-product-card .premium-product-link {
        display: none;
    }

    .sales-product-card .sales-product-price {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .sales-product-card .premium-product-bottom {
        margin-bottom: 10px;
    }

    .sales-product-card .btn-custom {
        min-height: 46px;
        padding: 0 12px;
        font-size: 0.92rem;
        border-radius: 14px;
    }

    .sales-product-actions {
        margin-top: 10px;
    }

    /* Badge satiri taşmasin */
    .sales-product-top {
        gap: 6px;
        margin-bottom: 8px;
    }
}

/* --------------------------------------------------------------------------
   2) Sayfa basligi / bolum bosluklarini telefon icin sikilastir
      (fixed navbar'i klerleyen 150px ust bosluk telefonda cok fazla)
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .sales-page-header {
        padding: 96px 0 18px;
    }

    .sales-section {
        padding: 22px 0 40px;
    }

    .sales-page-header-box {
        padding: 20px;
        border-radius: 22px;
    }

    .sales-section-head h2 {
        font-size: 1.5rem;
    }

    .home-section {
        padding-top: 104px;
        padding-bottom: 56px;
    }
}

/* --------------------------------------------------------------------------
   2b) URUN DETAY (/urun/{slug}) — mevcut alanlarin mobil cilasi
       show.blade.php telefonda ozellik listesini tek kolona zorluyordu;
       kisa etiketler icin 2 kolon daha okunakli ve kompakt.
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .sales-detail-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    /* Ilk ozellik (urun kodu) tam genislik kalsin, vurgulu dursun */
    .sales-detail-specs li:first-child {
        grid-column: span 2;
    }

    .sales-detail-specs li {
        min-height: 0;
        padding: 10px 12px;
    }
}

@media (max-width: 575.98px) {
    /* Fiyat + birim telefonda tasmasin */
    .sales-detail-price {
        flex-wrap: wrap;
        gap: 6px;
        margin: 14px 0;
    }

    .sales-detail-price strong {
        font-size: 2rem;
    }

    /* Sepete Ekle / ikincil aksiyon butonlari tam genislik, dokunma dostu */
    .sales-detail-form .btn-custom,
    .sales-detail-form .btn-outline-b2b,
    .sales-detail-actions .btn-custom,
    .sales-detail-actions .btn-outline-b2b {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   3) SABIT ALT NAVIGASYON CUBUGU (mobil) — tema ile uyumlu
      Partial: partials/mobile-bottom-nav.blade.php
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1046;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid rgba(15, 23, 42, 0.10);
        box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.10);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav__item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 52px;
        padding: 6px 2px;
        border-radius: 14px;
        color: #5b6172;
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-bottom-nav__item i {
        font-size: 19px;
        line-height: 1;
    }

    .mobile-bottom-nav__item.is-active {
        color: #000000;
        background: rgba(255, 211, 0, 0.20);
    }

    .mobile-bottom-nav__item:active {
        background: rgba(255, 211, 0, 0.28);
    }

    /* Sepet adet rozeti */
    .mobile-bottom-nav__badge {
        position: absolute;
        top: 4px;
        left: 50%;
        margin-left: 6px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: #20214F;
        color: #ffffff;
        font-size: 10px;
        font-weight: 800;
    }

    /* Icerigin alt nav arkasinda kalmamasi icin govdeye alt bosluk */
    body.has-mobile-bottom-nav {
        padding-bottom: 74px;
    }

    /* Yuzen butonlari alt nav'in ustune al */
    body.has-mobile-bottom-nav .scrollToTop,
    body.has-mobile-bottom-nav .back-to-top {
        bottom: 86px;
    }
}
