/* Bosinver Cottage Gallery — Airbnb-style image grid */
.bosinver-airbnb-gallery {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #f7f4ee;
    color: #064653;
    font-family: "AmerTypeMdBTMedium", sans-serif;
}

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

.bosinver-airbnb-grid {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    aspect-ratio: 2.08 / 1;
    max-height: 540px;
    overflow: hidden;
}

.bosinver-airbnb-tile {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #e9e5dc;
    cursor: pointer;
    appearance: none;
}

.bosinver-airbnb-tile--1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.bosinver-airbnb-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform .28s ease;
}

.bosinver-airbnb-tile:hover img,
.bosinver-airbnb-tile:focus-visible img {
    transform: scale(1.035);
}

.bosinver-airbnb-tile:focus-visible,
.bosinver-airbnb-show-all:focus-visible,
.bosinver-airbnb-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.bosinver-airbnb-back:focus,
.bosinver-airbnb-back:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.bosinver-airbnb-back:focus-visible span {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.bosinver-airbnb-show-all {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid rgba(6, 70, 83, .32);
    border-radius: 0;
    background: rgba(255, 255, 255, .96);
    color: #064653;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    font-family: "AmerTypeMdBTMedium", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
}

.bosinver-airbnb-show-all svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    flex: 0 0 auto;
}

/* Sensible fallbacks while a cottage has fewer than five photos. */
.bosinver-airbnb-gallery--count-1 .bosinver-airbnb-grid {
    display: block;
    height: auto;
    aspect-ratio: 2.08 / 1;
    max-height: 540px;
}

.bosinver-airbnb-gallery--count-1 .bosinver-airbnb-tile--1 {
    width: 100%;
    height: 100%;
}

.bosinver-airbnb-gallery--count-2 .bosinver-airbnb-grid {
    grid-template-columns: 2fr 1fr;
}

.bosinver-airbnb-gallery--count-2 .bosinver-airbnb-tile--2 {
    grid-column: 2;
    grid-row: 1 / span 2;
}

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


/* Cottage essentials strip — clean Bosinver red text bar. */
.bosinver-cottage-essentials {
    --bosinver-facts-red: #cf4c5c;
    --bosinver-facts-offwhite: #fff4df;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    width: 100%;
    margin: 8px 0 0;
    padding: 0;
    background: var(--bosinver-facts-red);
    color: var(--bosinver-facts-offwhite);
    font-family: "AmerTypeMdBTMedium", sans-serif;
}

.bosinver-cottage-essential {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 68px;
    padding: 14px 22px;
    text-align: center;
}

.bosinver-cottage-essential__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    color: var(--bosinver-facts-offwhite);
}

.bosinver-cottage-essential__icon svg {
    display: block;
    width: 26px;
    height: 26px;
    fill: currentColor;
    stroke: none;
}

.bosinver-cottage-essential + .bosinver-cottage-essential::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 0;
    width: 1px;
    background: rgba(255, 244, 223, .32);
}

.bosinver-cottage-essential__text {
    color: var(--bosinver-facts-offwhite);
    font-family: "AmerTypeMdBTMedium", sans-serif;
    font-size: clamp(17px, 1.25vw, 20px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: .005em;
    text-transform: none;
}

@media (max-width: 767px) {
    .bosinver-cottage-essentials {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 7px;
    }

    .bosinver-cottage-essential {
        justify-content: flex-start;
        gap: 9px;
        min-height: 60px;
        padding: 12px 15px;
        text-align: left;
    }

    .bosinver-cottage-essential__icon {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }

    .bosinver-cottage-essential__icon svg {
        width: 22px;
        height: 22px;
    }

    .bosinver-cottage-essential + .bosinver-cottage-essential::before {
        display: none;
    }

    .bosinver-cottage-essential:nth-child(2n)::before {
        content: "";
        position: absolute;
        display: block;
        top: 12px;
        bottom: 12px;
        left: 0;
        width: 1px;
        background: rgba(255, 244, 223, .26);
    }

    .bosinver-cottage-essential:nth-child(n+3)::after {
        content: "";
        position: absolute;
        top: 0;
        right: 12px;
        left: 12px;
        height: 1px;
        background: rgba(255, 244, 223, .26);
    }

    .bosinver-cottage-essential__text {
        font-size: 15px;
        line-height: 1.05;
    }
}

/* Full-screen photo browser */
.bosinver-airbnb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    background: #fff;
    color: #064653;
    font-family: "AmerTypeMdBTMedium", sans-serif;
}

.bosinver-airbnb-lightbox.is-open {
    display: flex;
    flex-direction: column;
}

html.bosinver-gallery-open,
body.bosinver-gallery-open {
    overflow: hidden !important;
}

.bosinver-airbnb-lightbox__header {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex: 0 0 82px;
    min-height: 82px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(6, 70, 83, .12);
    background: rgba(255, 255, 255, .98);
}

.bosinver-airbnb-back,
.bosinver-airbnb-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #064653;
    font-family: "AmerTypeMdBTMedium", sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.bosinver-airbnb-back {
    justify-self: start;
    gap: 7px;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 8px 8px 8px 0 !important;
    background: transparent !important;
    color: #cf4c5c !important;
    font-family: "AmerTypeMdBTMedium", sans-serif !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}

.bosinver-airbnb-back svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bosinver-airbnb-count {
    justify-self: center;
    color: #064653;
    font-family: "AmerTypeMdBTMedium", sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .01em;
}

.bosinver-airbnb-close {
    justify-self: end;
    width: 42px;
    height: 42px;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    color: #064653 !important;
    font-family: "AmerTypeMdBTMedium", sans-serif !important;
    font-size: 31px;
    font-weight: 300;
    line-height: 1;
}

.bosinver-airbnb-lightbox__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.bosinver-airbnb-lightbox__images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: 1px;
    column-gap: 12px;
    row-gap: 12px;
    align-items: start;
    width: min(980px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 70px;
}

.bosinver-airbnb-lightbox__item {
    min-width: 0;
    margin: 0;
    align-self: start;
    background: transparent;
}

.bosinver-airbnb-lightbox__item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: transparent;
}

@media (max-width: 767px) {
    .bosinver-airbnb-grid {
        display: block;
        height: clamp(320px, 68vw, 520px);
        max-height: 520px;
        aspect-ratio: auto;
    }

    .bosinver-airbnb-tile {
        display: none;
    }

    .bosinver-airbnb-tile--1 {
        display: block;
        width: 100%;
        height: 100%;
    }

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

    .bosinver-airbnb-lightbox__header {
        flex-basis: 68px;
        min-height: 68px;
        padding: 0 13px;
    }

    .bosinver-airbnb-back {
        padding-left: 0;
    }

    .bosinver-airbnb-back span {
        display: none;
    }

    .bosinver-airbnb-lightbox__images {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        grid-auto-rows: auto;
        gap: 10px;
        width: 100%;
        padding: 10px 0 40px;
    }

    .bosinver-airbnb-lightbox__item {
        grid-column: 1;
        grid-row-end: auto !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bosinver-airbnb-tile img {
        transition: none;
    }
}
