.custom-gallery-buttons {
    text-align: center;
    margin: 20px 0;
    flex-wrap: wrap;
}
.custom-gallery-buttons button {
    padding: 8px 16px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 25px;
    background: #f9f9f9;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}
.custom-gallery-buttons button:hover,
.custom-gallery-buttons button.active {
    background: #ff6600;
    color: #fff;
    border-color: #ff6600;
}

.custom-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.custom-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s;
}
.custom-gallery-item img:hover {
    transform: scale(1.05);
}

.custom-gallery-pagination {
    text-align: center;
    margin: 20px 0;
}
.custom-gallery-pagination button {
    padding: 6px 12px;
    margin: 3px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}
.custom-gallery-pagination button:hover,
.custom-gallery-pagination button.active {
    background: #ff6600;
    color: #fff;
    border-color: #ff6600;
}

/* 手机端 */
@media (max-width: 600px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .custom-gallery-buttons button {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* 平板端 */
@media (min-width: 601px) and (max-width: 900px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 桌面端 */
@media (min-width: 901px) {
    .custom-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}
