.max-gallery {
    width: 100%;
}

.max-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.max-gallery__filters--left {
    justify-content: flex-start;
}

.max-gallery__filters--center {
    justify-content: center;
}

.max-gallery__filters--right {
    justify-content: flex-end;
}

.max-gallery__filter {
    border: 1px solid #d0d0d0;
    background: var(--max-filter-bg, #ffffff);
    color: var(--max-filter-text, #111111);
    border-color: var(--max-filter-border, #d0d0d0);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.max-gallery__filter.is-active,
.max-gallery__filter:hover {
    background: var(--max-filter-bg-active, #111111);
    color: var(--max-filter-text-active, #ffffff);
    border-color: var(--max-filter-border-active, #111111);
}

.max-gallery__grid {
    display: grid;
    grid-template-columns: repeat(var(--max-columns, 3), minmax(0, 1fr));
    gap: 12px;
}

.max-gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
}

.max-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: var(--max-image-fit, cover);
    object-position: var(--max-image-position, center);
    display: block;
    transition: transform 0.25s ease;
}

.max-gallery__item:hover img {
    transform: scale(1.04);
}

.max-gallery__item.is-hidden {
    display: none;
}

.max-gallery__link {
    display: block;
    width: 100%;
    height: 100%;
}

.max-gallery__pagination {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.max-gallery__pagination.is-visible {
    display: flex;
}

.max-gallery__pagination--left {
    justify-content: flex-start;
}

.max-gallery__pagination--center {
    justify-content: center;
}

.max-gallery__pagination--right {
    justify-content: flex-end;
}

.max-gallery__page-btn {
    border: 1px solid #d0d0d0;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.max-gallery__page-btn.is-active,
.max-gallery__page-btn:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.max-gallery__load-more {
    display: none;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.max-gallery__load-more.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.max-gallery__load-more-wrap {
    display: flex;
    margin-top: 16px;
}

.max-gallery__load-more-wrap--left {
    justify-content: flex-start;
}

.max-gallery__load-more-wrap--center {
    justify-content: center;
}

.max-gallery__load-more-wrap--right {
    justify-content: flex-end;
}

.max-gallery__load-more:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}
