.smjestaj-gallery-shell {
    --smjestaj-gallery-gap: 16px;
    --smjestaj-gallery-radius: 8px;
    --smjestaj-gallery-loadmore-columns: 2;
    --smjestaj-gallery-airbnb-aspect: 16 / 7;
    margin: 25px 0;
}

.smjestaj-frontend-gallery {
    margin: 0;
}

.smjestaj-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--smjestaj-gallery-radius);
    background: #f3f4f6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.smjestaj-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    color: inherit;
}

.smjestaj-gallery-item a:focus-visible,
.smjestaj-airbnb-show-all:focus-visible,
.smjestaj-gallery-loadmore-btn:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

.smjestaj-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.smjestaj-gallery-item:hover img,
.smjestaj-gallery-item:focus-within img {
    transform: scale(1.025);
}

.smjestaj-gallery-fancybox-enabled .smjestaj-gallery-item a {
    cursor: zoom-in;
}

.smjestaj-gallery-fancybox-links {
    display: none;
}

.smjestaj-gallery-airbnb {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(160px, 1fr));
    gap: calc(var(--smjestaj-gallery-gap) / 2);
    aspect-ratio: var(--smjestaj-gallery-airbnb-aspect);
    overflow: hidden;
    border-radius: calc(var(--smjestaj-gallery-radius) + 4px);
    background: #f3f4f6;
}

.smjestaj-gallery-airbnb .smjestaj-gallery-item {
    min-height: 0;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.smjestaj-gallery-airbnb .smjestaj-gallery-item-primary {
    grid-row: span 2;
}

.smjestaj-gallery-airbnb.smjestaj-gallery-count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    aspect-ratio: 16 / 9;
}

.smjestaj-gallery-airbnb.smjestaj-gallery-count-1 .smjestaj-gallery-item-primary {
    grid-row: auto;
}

.smjestaj-gallery-airbnb.smjestaj-gallery-count-2 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
}

.smjestaj-gallery-airbnb.smjestaj-gallery-count-2 .smjestaj-gallery-item-primary {
    grid-row: auto;
}

.smjestaj-gallery-airbnb.smjestaj-gallery-count-3 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(150px, 1fr));
}

.smjestaj-gallery-airbnb.smjestaj-gallery-count-4 .smjestaj-gallery-item:nth-child(4) {
    grid-column: span 2;
}

.smjestaj-airbnb-show-all {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 5;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid rgba(0,0,0,0.75);
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.smjestaj-airbnb-show-all:hover {
    background: #f7f7f7;
}

.smjestaj-airbnb-show-all[hidden] {
    display: none;
}

.smjestaj-airbnb-all-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(var(--smjestaj-gallery-gap) / 2);
    margin-top: calc(var(--smjestaj-gallery-gap) / 2);
}

.smjestaj-airbnb-all-photos[hidden] {
    display: none;
}

.smjestaj-airbnb-all-photos .smjestaj-gallery-item {
    aspect-ratio: 4 / 3;
    box-shadow: none;
}

.smjestaj-gallery-loadmore {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--smjestaj-gallery-gap);
    align-items: start;
}

.smjestaj-gallery-columns-1 .smjestaj-gallery-loadmore {
    grid-template-columns: 1fr;
}

.smjestaj-gallery-columns-2 .smjestaj-gallery-loadmore {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.smjestaj-gallery-columns-3 .smjestaj-gallery-loadmore {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.smjestaj-gallery-columns-4 .smjestaj-gallery-loadmore {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.smjestaj-gallery-loadmore .smjestaj-gallery-item {
    aspect-ratio: var(--smjestaj-gallery-ratio, 4 / 3);
    min-height: 0;
}

.smjestaj-gallery-loadmore .smjestaj-gallery-item.is-hidden {
    display: none;
}

.smjestaj-gallery-loadmore-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.smjestaj-gallery-loadmore-btn {
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid #111;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.smjestaj-gallery-loadmore-btn:hover {
    background: #333;
}

.smjestaj-gallery-loadmore-btn[hidden] {
    display: none;
}

.smjestaj-gallery-palms {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 432px;
    gap: var(--smjestaj-gallery-gap);
    align-items: stretch;
}

.smjestaj-gallery-palms .smjestaj-gallery-item {
    min-height: 0;
    height: 100%;
    box-shadow: none;
}

.smjestaj-gallery-palms .smjestaj-gallery-item:nth-child(3),
.smjestaj-gallery-palms .smjestaj-gallery-item:nth-child(4),
.smjestaj-gallery-palms .smjestaj-gallery-item:nth-child(9),
.smjestaj-gallery-palms .smjestaj-gallery-item:nth-child(10) {
    grid-column: span 2;
}

@media (max-width: 960px) {
    .smjestaj-gallery-palms {
        grid-auto-rows: 340px;
    }
}

@media (max-width: 720px) {
    .smjestaj-gallery-airbnb {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        aspect-ratio: auto;
    }

    .smjestaj-gallery-airbnb .smjestaj-gallery-item {
        aspect-ratio: 1 / 1;
    }

    .smjestaj-gallery-airbnb .smjestaj-gallery-item-primary {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 16 / 10;
    }

    .smjestaj-gallery-airbnb.smjestaj-gallery-count-1,
    .smjestaj-gallery-airbnb.smjestaj-gallery-count-2,
    .smjestaj-gallery-airbnb.smjestaj-gallery-count-3 {
        grid-template-columns: 1fr;
    }

    .smjestaj-gallery-airbnb.smjestaj-gallery-count-4 .smjestaj-gallery-item:nth-child(4) {
        grid-column: auto;
    }

    .smjestaj-airbnb-show-all {
        right: 12px;
        bottom: 12px;
        min-height: 38px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .smjestaj-airbnb-all-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .smjestaj-gallery-loadmore {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .smjestaj-gallery-loadmore .smjestaj-gallery-item {
        grid-column: auto !important;
        aspect-ratio: 4 / 3;
    }

    .smjestaj-gallery-palms {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 14px;
    }

    .smjestaj-gallery-palms .smjestaj-gallery-item {
        grid-column: auto !important;
        aspect-ratio: 4 / 3;
    }
}
