/* =============================================
   MAXWINTER Brick Gallery – Frontend & Editor
   ============================================= */

.brick-gallery-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* Jede Zeile ist ein Flexbox-Container */
.brick-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* 4er-Zeile: gleichmäßig aufgeteilt */
.brick-row--4 .brick-item {
    flex: 1;
    width: calc(25% - var(--brick-gap, 12px));
    max-width: calc(25% - var(--brick-gap, 12px));
}

/* 3er-Zeile: gleichmäßig aufgeteilt, aber mit Offset-Effekt via padding */
.brick-row--3 {
    padding-left: calc((100% + var(--brick-gap, 12px)) / 8);
    padding-right: calc((100% + var(--brick-gap, 12px)) / 8);
}

.brick-row--3 .brick-item {
    flex: 1;
    width: calc(33.333% - var(--brick-gap, 12px));
    max-width: calc(33.333% - var(--brick-gap, 12px));
}

/* Einzelnes Bild-Element */
.brick-item {
    position: relative;
    overflow: hidden;
    margin: 0;
    aspect-ratio: 3 / 2;
    background: #e8e8e8;
}

.brick-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.brick-item:hover img {
    transform: scale(1.03);
}

/* ===========================
   Editor-spezifisch
   =========================== */

.brick-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.brick-item:hover .brick-remove-btn {
    opacity: 1;
}