/*! El Gaucho Gallery | (c) 2026 Cyril Gautschi | Proprietary License */
/* Base */
.egd-gallery {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.egd-gallery *,
.egd-gallery *::before,
.egd-gallery *::after {
    box-sizing: border-box;
}

/* Grid — not for Masonry template (Masonry.js needs display:block) */
.egd-gallery:not(.egd-gallery--masonry) .egd-gallery__grid {
    display: grid;
    grid-template-columns: repeat(var(--egd-columns, 3), 1fr);
    gap: var(--egd-gutter, 16px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Item */
.egd-gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--egd-radius, 0);
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* Link wrapper */
.egd-gallery__item-link {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    line-height: 0;
    font-size: 0;
}

a.egd-gallery__item-link {
    cursor: pointer;
}

/* Image */
.egd-gallery__item-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Responsive — not for Masonry (has own responsive rules) */
@media (max-width: 991px) {
    .egd-gallery:not(.egd-gallery--masonry) .egd-gallery__grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 575px) {
    .egd-gallery:not(.egd-gallery--masonry) .egd-gallery__grid {
        grid-template-columns: 1fr !important;
    }
}
