/* =============================================================================
   MOBİL SİPARİŞ ÖZETİ BOTTOM BAR
   ============================================================================= */

@media (max-width: 991.98px) {

    /* Desktop sipariş özeti kartını gizle */
    #contactInfoContainer {
        display: none !important;
    }

    /* Mobil bottom bar container */
    #mobile-order-summary-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(0);
        transition: transform 0.3s ease-in-out;
    }

    /* Bottom bar gizli durumda */
    #mobile-order-summary-bar.hidden {
        transform: translateY(100%);
    }

    /* Bottom bar header (sadece toplam tutar) */
    #mobile-order-summary-header {
        padding: 1rem;
        background: #9b212e;
        color: #fff;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
    }

    #mobile-order-summary-header:hover {
        background: #7a1a24;
    }

    #mobile-order-summary-header .summary-title {
        font-weight: 600;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    #mobile-order-summary-header .summary-amount {
        font-weight: 700;
        font-size: 1.1rem;
    }

    #mobile-order-summary-header .summary-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transition: transform 0.3s ease;
    }

    #mobile-order-summary-bar.expanded #mobile-order-summary-header .summary-toggle {
        transform: rotate(180deg);
    }

    #mobile-order-summary-header .summary-toggle i {
        font-size: 1rem;
        color: #fff;
    }

    /* Bottom bar içerik (detaylar) */
    #mobile-order-summary-content {
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-in-out;
        background: #fff;
    }

    #mobile-order-summary-bar.expanded #mobile-order-summary-content {
        height: auto;
        overflow-y: auto;
    }

    #mobile-order-summary-content .summary-body {
        padding: 1.5rem;
    }

    #mobile-order-summary-content .summary-item {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
        color: #333;
    }

    #mobile-order-summary-content .summary-item:last-child {
        margin-bottom: 0;
    }

    #mobile-order-summary-content .summary-item strong {
        color: #9b212e;
        font-weight: 600;
    }

    #mobile-order-summary-content .summary-badge {
        display: inline-block;
        background: #9b212e;
        color: #fff;
        padding: 0.4em 0.75em;
        border-radius: 4px;
        font-size: 0.85rem;
        font-weight: 500;
        margin-top: 0.5rem;
        margin-right: 0.5rem;
    }

    /* Kargo seçeneği mobil bottom bar içinde */
    #mobile-order-summary-content #kargo-secim-container {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e0e0e0;
    }

    #mobile-order-summary-content #kargo-separator {
        display: none !important;
    }

    /* Body padding bottom - bottom bar için alan bırak */
    body {
        padding-bottom: 70px;
    }

    /* Sayfa yüklenirken bottom bar gizli - ARTIK GİZLEMİYORUZ */
    /* #mobile-order-summary-bar:not(.loaded) kuralı kaldırıldı */


    /* Bottom bar her zaman görünür (tutar 0 olsa bile) */
    #mobile-order-summary-bar,
    #mobile-order-summary-bar.hidden {
        transform: translateY(0) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 9999 !important;
        /* En üstte olduğundan emin ol */
    }

    /* Yatay scrollu engelle */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
}