.mep-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    margin: 20px 0;
}

.mep-wrapper.mep-layout-left {
    flex-direction: row;
}

.mep-wrapper.mep-layout-right {
    flex-direction: row-reverse;
}

.mep-gallery {
    position: relative;
    flex: 0 0 400px;
    max-width: 400px;
    box-sizing: border-box;
}

.mep-gallery-inner {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    width: 400px;
    height: 400px;
}

.mep-slide {
    display: none;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.mep-slide.mep-active {
    display: block;
}

.mep-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mep-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    padding: 0;
}

.mep-prev {
    left: 8px;
}

.mep-next {
    right: 8px;
}

.mep-content {
    flex: 1;
    min-width: 260px;
    box-sizing: border-box;
}

.mep-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.mep-description {
    font-size: 16px;
    line-height: 1.6;
}

.mep-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.mep-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
}

.mep-lightbox-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
}

.mep-lightbox-inner img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

@media (max-width: 768px) {
    .mep-wrapper,
    .mep-wrapper.mep-layout-left,
    .mep-wrapper.mep-layout-right {
        flex-direction: column;
    }

    .mep-gallery {
        max-width: 100%;
        flex: 0 0 auto;
    }

    .mep-gallery-inner {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}
