/* Golden Records 1.2.7: repair REAL Gutenberg markup (including legacy
 * wp-block-group__inner-container wrappers), not just the editor preview.
 * The previous contacts root was erroneously a two-column grid. When WP
 * emitted an inner wrapper, its TWO row groups became the grid's two cells;
 * each row was itself a grid, making the cards only ~25% page width.
 * Grid wrappers in About and Delivery suffered the same nesting problem.
 */
body.gr-site main.gr-editorial,
body.gr-site main.gr-editorial > .gr-editorial-content,
body.gr-site main.gr-editorial .gr-editorial-content > :is(.gr-about,.gr-contacts,.gr-delivery),
body.gr-site main.gr-editorial :is(.gr-about,.gr-contacts,.gr-delivery) {
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    box-sizing:border-box!important;
}
/* The topmost Gutenberg group may also have an inner container. Keep it
 * a full-width block; do not turn the entire page into a CSS grid. */
body.gr-site main.gr-editorial :is(.gr-about,.gr-contacts,.gr-delivery) > .wp-block-group__inner-container {
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
}
/* In older WordPress/Gutenberg the actual grid items are grandchildren,
 * behind the generated inner container. Flatten only the grid's immediate
 * generated wrapper, NEVER the wrappers of the visual cards themselves. */
body.gr-site main.gr-editorial .gr-about :is(
    .founder-section,.manifesto-grid,.standards-3col,.service-2col,
    .priv-grid,.club-tg-grid
) > .wp-block-group__inner-container,
body.gr-site main.gr-editorial .gr-delivery :is(
    .delivery-hero,.pack-grid-4,.carriers-3col,.geo-grid-4,.pay-grid-4
) > .wp-block-group__inner-container {
    display:contents!important;
}
/* CONTACTS: main wrapper is a vertical flow. Only its FIRST ROW is a
 * two-column grid. The requisites and the large map are separate full-width
 * sections below it. This works whether inner containers exist or not. */
body.gr-site main.gr-editorial .gr-contacts {
    display:block!important;
    grid-template-columns:none!important;
    width:100%!important;
    max-width:none!important;
}
body.gr-site main.gr-editorial .gr-contacts .contacts-top-grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    gap:clamp(16px,2.6vw,32px)!important;
    margin:0 0 clamp(20px,3vw,36px)!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
}
body.gr-site main.gr-editorial .gr-contacts .contacts-top-grid > .wp-block-group__inner-container {
    display:contents!important;
}
body.gr-site main.gr-editorial .gr-contacts .contacts-top-grid :is(.salon-info-card,.contact-form-card) {
    grid-column:auto!important;
    grid-row:auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%;
    margin:0!important;
}
body.gr-site main.gr-editorial .gr-contacts .contacts-bottom-grid {
    display:flex!important;
    flex-direction:column!important;
    grid-template-columns:none!important;
    align-items:stretch!important;
    gap:clamp(20px,3vw,36px)!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
}
body.gr-site main.gr-editorial .gr-contacts .contacts-bottom-grid > .wp-block-group__inner-container {
    display:contents!important;
}
body.gr-site main.gr-editorial .gr-contacts .contacts-bottom-grid :is(.requisites-card,.gr-contact-embed) {
    grid-column:auto!important;
    grid-row:auto!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    flex:none!important;
}
body.gr-site main.gr-editorial .gr-contacts .gr-contact-embed iframe {
    width:100%!important;
    max-width:100%!important;
    height:clamp(360px,42vw,540px)!important;
    display:block!important;
}
/* All card-like groups can contain a second Gutenberg inner wrapper. */
body.gr-site main.gr-editorial :is(.gr-about,.gr-contacts,.gr-delivery) :is(
    .wp-block-group__inner-container,.wp-block-group,.wp-block-columns,section
) {min-width:0;box-sizing:border-box;}
@media (max-width:760px) {
    body.gr-site main.gr-editorial .gr-contacts .contacts-top-grid {
        grid-template-columns:minmax(0,1fr)!important;
    }
    body.gr-site main.gr-editorial .gr-contacts .contacts-top-grid :is(.salon-info-card,.contact-form-card) {
        min-height:0!important;
    }
}
