/* MAF Grid Builder Frontend v4.0 — Pure zoom, no reflow */
.maf-grid-wrap {
    box-sizing: border-box;
    overflow: hidden;
}
.maf-grid-inner {
    transform-origin: top left;
}
.maf-grid {
    display: grid;
    width: 100%;
}
.maf-cell {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    isolation: isolate;
}

/* Cell inner wrapper */
.maf-cell-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: top left;
    z-index: 5;
}

/* Full-cell images: override WordPress theme img styles */
.maf-cell > img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    display: block;
}

/* Group images: prevent theme overrides on sizing */
.maf-group img {
    max-width: none !important;
    max-height: none !important;
}

/* Groups */
.maf-group {
    z-index: 1;
    max-width: 100%;
    box-sizing: border-box;
}

/* Text items */
.maf-text {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}
