/* GDI unified detail layout v5 — загружать последним на detail-страницах */
body.gdi-detail-unified .gdi-unified-grid-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.gdi-detail-unified .gdi-unified-grid-main {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.gdi-detail-unified .gdi-unified-grid-side {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

@media (min-width: 992px) {
    body.gdi-detail-unified .gdi-unified-grid-wrap {
        flex-wrap: nowrap !important;
    }

    body.gdi-detail-unified .gdi-unified-grid-main {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    body.gdi-detail-unified .gdi-unified-grid-side {
        flex: 0 0 380px !important;
        width: 380px !important;
        min-width: 380px !important;
        max-width: 380px !important;
    }

    body.gdi-detail-unified .gdi-unified-grid-side .sticky-sidebar {
        position: sticky !important;
        top: 16px !important;
    }
}

@media (max-width: 991px) {
    body.gdi-detail-unified .gdi-unified-grid-side {
        order: -1;
    }

    body.gdi-detail-unified .gdi-unified-grid-side .sticky-sidebar {
        position: static !important;
    }

    body.gdi-detail-unified.gdi-dex-has-mobile-bar {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}
