.grid-eyecatch-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-gap: 10px;
}

/* Masonryレイアウト用スタイル */
.grid-eyecatch-list.grid-masonry {
    display: block;
    column-count: 4;
    column-gap: 10px;
}

.grid-eyecatch-list.grid-masonry .grid-eyecatch-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 10px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.grid-eyecatch-list.grid-masonry .grid-eyecatch-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .grid-eyecatch-list.grid-masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .grid-eyecatch-list.grid-masonry {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .grid-eyecatch-list.grid-masonry {
        column-count: 1;
    }
}

.grid-eyecatch-item {
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.grid-eyecatch-item img {
    width: 100%;
    height: auto;
    display: block;
}

.grid-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.grid-overlay-image {
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.grid-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}
