.dg-gallery-wrap {
    padding: 3rem 0;
}

/* ── Masonry ── */
.dg-masonry {
    columns: 4;
    column-gap: 16px;
}

@media (max-width:992px) {
    .dg-masonry {
        columns: 2;
    }
}

@media (max-width:576px) {
    .dg-masonry {
        columns: 1;
    }
}

.dg-masonry .dg-item {
    break-inside: avoid;
    margin-bottom: 16px;
}

/* ── Square grid ── */
.dg-square {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width:992px) {
    .dg-square {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:576px) {
    .dg-square {
        grid-template-columns: 1fr;
    }
}

.dg-square .dg-item {
    aspect-ratio: 1/1;
}

.dg-square .dg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* ── Item card ── */
.dg-item {
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s, opacity .3s;
}

.dg-item:hover {
    transform: translateY(-3px);
}

.dg-item.is-hidden {
    display: none;
}

.dg-item img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.dg-item img[loading="lazy"] {
    opacity: 0;
    transition: opacity .4s;
}

.dg-item img.dg-loaded {
    opacity: 1;
}

/* ── Hover overlay ── */
.dg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    border-radius: 12px;
    opacity: 0;
    transition: opacity .22s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
}

.dg-item:hover .dg-overlay {
    opacity: 1;
}

/* ── Badges ── */
.dg-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, .88);
    color: #111;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dg-video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, .9);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Title ── */
.dg-item-title {
    font-size: 13px;
    color: #555;
    padding: 6px 4px 0;
    text-align: center;
}

.dg-square .dg-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    margin: 0;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 0 0 12px 12px;
}

/* ── Filter buttons ── */
.dg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.75rem;
}

.dg-filter-btn {
    font-size: 13px;
    padding: 5px 18px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all .18s;
}

.dg-filter-btn:hover {
    background: #f1f5f9;
}

.dg-filter-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ── Load more ── */
.dg-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.dg-load-more-btn {
    min-width: 140px;
    padding: 10px 28px;
    border-radius: 24px;
    border: 2px solid #111;
    background: transparent;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s, transform .15s;
    letter-spacing: .02em;
}

.dg-load-more-btn:hover {
    background: #111;
    color: #fff;
    transform: translateY(-1px);
}

.dg-load-more-btn:active {
    transform: scale(.97);
}

.dg-load-more-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* ── Swiper strip ── */
.dg-swiper-strip {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.dg-swiper-strip .swiper {
    border-radius: 12px;
    overflow: hidden;
}

.dg-swiper-strip .swiper-slide img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* ── Standalone slider ── */
.dg-slider-wrap {
    margin: 1rem 0;
}

.dg-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .6));
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 0 0 12px 12px;
    pointer-events: none;
}

/* ── Slider video wrap ── */
.dg-slide-video-wrap {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.dg-slide-video-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.dg-slide-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background .2s;
}

.dg-slide-video-wrap:hover .dg-slide-play-overlay {
    background: rgba(0, 0, 0, 0.45);
}

.dg-slide-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    color: #fff;
    transition: transform .2s;
    -webkit-transition: transform .2s;
    -moz-transition: transform .2s;
    -ms-transition: transform .2s;
    -o-transition: transform .2s;
}

.dg-slide-video-wrap:hover .dg-slide-play-btn {
    transform: scale(1.1);
}

/* ── Gallery item play icon ── */
.dg-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    color: #fff;
    pointer-events: none;
    transition: background .18s, transform .18s;
}

.dg-item:hover .dg-play-icon {
    background: rgba(220, 38, 38, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
}
/* ── Thumbs gallery ── */
.mgs-thumbs-wrap { margin: 1rem 0; }

.mgs-main-swiper { border-radius: 12px; overflow: hidden; position: relative; }
.mgs-main-swiper .swiper-slide { position: relative; }
.mgs-main-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mgs-slide-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    cursor: zoom-in;
}
.mgs-main-slide:hover .mgs-slide-overlay { background: rgba(0,0,0,0.3); }

.mgs-zoom-icon, .mgs-play-btn {
    opacity: 0;
    transition: opacity .2s;
    color: #fff;
}
.mgs-main-slide:hover .mgs-zoom-icon,
.mgs-main-slide:hover .mgs-play-btn { opacity: 1; }

.mgs-play-btn {
    width: 52px; height: 52px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding-left: 3px;
    transition: background .2s, opacity .2s;
}
.mgs-main-slide:hover .mgs-play-btn { background: rgba(220,38,38,0.85); }

.mgs-slide-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 8px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff; font-size: 13px; font-weight: 500;
    border-radius: 0 0 12px 12px;
    pointer-events: none;
}

.mgs-counter {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,0.5); color: #fff;
    font-size: 12px; padding: 3px 10px;
    border-radius: 20px; z-index: 10;
    pointer-events: none;
}

.mgs-thumbs-swiper { margin-top: 10px; }
.mgs-thumb-slide {
    height: 72px; border-radius: 8px;
    overflow: hidden; opacity: 0.5;
    transition: opacity .2s;
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box;
}
.mgs-thumb-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mgs-thumb-slide.swiper-slide-thumb-active { opacity: 1; border-color: #2563eb; }

.mgs-thumbs-nav {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.mgs-thumbs-nav-left { display: flex; gap: 8px; }

.mgs-nav-btn {
    width: 36px; height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff; color: #111;
    cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.mgs-nav-btn:hover { background: #f1f5f9; }

.mgs-open-all-btn {
    padding: 0 14px; height: 36px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff; color: #555;
    cursor: pointer; font-size: 13px;
    transition: background .15s;
}
.mgs-open-all-btn:hover { background: #f1f5f9; }