/* MM ACF Gallery Widget */

.mm-acf-gallery-wrapper {
    width: 100%;
}

/* ── Grid ── */
.mm-acf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* default — overridden by Elementor controls */
    gap: 8px;
}

/* ── Item ── */
.mm-acf-gallery-item {
    position: relative;
    overflow: hidden;
    display: block;
    /* aspect-ratio set by Elementor control, default 4/3 */
    aspect-ratio: 4 / 3;
}

/* Overlay pseudo-element (color controlled via Elementor selector) */
.mm-acf-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ── Image ── */
.mm-acf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* overridden by Elementor control */
    object-position: center center;
    display: block;
    transition: transform 0.35s ease;
}

/* ── Anchor wrapper (lightbox) ── */
.mm-acf-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Zoom class (applied when hover-zoom is on) ── */
/* Scale value overridden by Elementor selector */

/* ── Placeholder (editor only) ── */
.mm-acf-gallery-placeholder {
    padding: 20px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    color: #888;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
}

/* ── aspect-ratio normalization for Elementor select values ── */
.mm-acf-gallery-item[style*="aspect-ratio: auto"] {
    aspect-ratio: unset;
}
