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

.mks-wrap *,
.mks-wrap *::before,
.mks-wrap *::after {
    box-sizing: border-box;
}

.mks-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: 0 0 24px;
    padding: 0;
}

@media (max-width: 768px) {
	.mks-filters {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 20px;
		margin: 0 0 24px;
		padding: 0;
	}
}

.mks-wrap .mks-filter-btn {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    color: #00aea9;
    border: 2px solid #00aea9;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 600;
    padding: 10px 22px;
    cursor: pointer;
    line-height: 1.2;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
    font-family: inherit;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.mks-wrap .mks-filter-btn:hover,
.mks-wrap .mks-filter-btn:focus-visible {
    background: #00aea9;
    color: #ffffff;
    border-color: #00aea9;
    outline: none;
}

.mks-wrap .mks-filter-btn.is-active {
    background: #00aea9;
    color: #ffffff;
    border-color: #00aea9;
}

/* Wrapper that hosts navigation arrows */
.mks-filters-wrapper {
    position: relative;
    margin: 0 0 24px;
}
.mks-filters-wrapper > .mks-filters {
    margin: 0;
}

/* Carousel mode for filters when they overflow */
.mks-filters-carousel {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    padding: 4px 12px;
    margin-left: -12px;
    margin-right: -12px;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

/* Navigation arrows */
.mks-filters-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #00aea9;
    background: #ffffff;
    color: #00aea9;
    font-size: 16px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 0;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.mks-filters-arrow:hover,
.mks-filters-arrow:focus-visible {
    background: #00aea9;
    color: #ffffff;
    outline: none;
}
.mks-filters-arrow-prev { left: -4px; }
.mks-filters-arrow-next { right: -4px; }

.mks-filters-wrapper.has-prev .mks-filters-arrow-prev { display: inline-flex; }
.mks-filters-wrapper.has-next .mks-filters-arrow-next { display: inline-flex; }

@media (max-width: 768px) {
    .mks-filters-arrow { display: none !important; }
}

.mks-filters-carousel::-webkit-scrollbar {
    display: none;
    height: 0;
}

.mks-filters-carousel.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.mks-filters-carousel.is-dragging .mks-filter-btn {
    pointer-events: none;
}

.mks-filters-carousel .mks-filter-btn {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

@media (max-width: 768px) {
    .mks-wrap .mks-filter-btn {
        font-size: 16px;
    }
}

.mks-grid {
    position: relative;
    width: 100%;
}

.mks-item {
    width: calc(100% / var(--mks-cols-pc, 4));
    padding: 12px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.mks-item-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 0;
    transition: border-color .2s ease;
    overflow: hidden;
    padding: 12px;
}

a.mks-item { cursor: pointer; }

a.mks-item:hover .mks-item-inner,
a.mks-item:focus-visible .mks-item-inner {
    border-color: #00aea9;
}

.mks-item-inner img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 1024px) {
    .mks-item { width: calc(100% / var(--mks-cols-tablet, 2)); }
}

@media (max-width: 768px) {
    .mks-item { width: calc(100% / var(--mks-cols-mobile, 2)); }
}

/* Shuffle helper */
.mks-grid.shuffle { overflow: visible; }


