.fpg-gallery-wrapper {
    position: relative;
    width: 100%;
}

/* Tabs danh mục dạng liền kề (All | Gallery) */
.fpg-filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.fpg-filter-nav {
    display: inline-flex;
    background: #000;
    overflow: hidden;
}

.fpg-filter-btn {
    border: none;
    background: #000;
    color: #fff;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 0;
}

.fpg-filter-btn.active,
.fpg-filter-btn:hover {
    background: #004b9a; /* Màu xanh nổi bật như nút All trong hình */
    color: #fff;
}

/* Hiển thị Grid ảnh không viền hoặc khoảng cách nhỏ */
.flatsome-gallery-grid .col-inner {
    padding: 4px;
}

.flatsome-gallery-grid .box-image {
    position: relative;
    overflow: hidden;
    background-color: #f4f4f4;
}

.flatsome-gallery-grid .box-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.flatsome-gallery-grid .image-zoom:hover .box-image img {
    transform: scale(1.05);
}

/* Phân trang bo góc như hình mẫu: [ « | 1 | 2 | 3 | » ] */
.fpg-pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.fpg-page-btn {
    background: #fff;
    color: #333;
    border: 1px solid #dcdcdc;
    border-right: none;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpg-page-btn:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.fpg-page-btn:last-child {
    border-right: 1px solid #dcdcdc;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.fpg-page-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.fpg-page-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Loading Spinner */
.fpg-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spin {
    width: 38px;
    height: 38px;
    border: 3px solid #ddd;
    border-top-color: #004b9a;
    border-radius: 50%;
    animation: fpg-rot 0.8s linear infinite;
}

@keyframes fpg-rot {
    to { transform: rotate(360deg); }
}