/* Accommodation detail (resources/views/frontend/pages/object). */

.dch-detail {
    --dch-text: #2b2540;
    --dch-muted: #6b6a7b;
    --dch-line: #e6e8ef;
    --dch-soft: #f4f7ff;
    --dch-accent: var(--main-color, #2563EB);
    --dch-ok: #16a34a;
    --dch-radius: 14px;
    padding: 28px 0 90px;
    color: var(--dch-text);
}
[x-cloak] { display: none !important; }
html.dch-noscroll { overflow: hidden; }

/* ---------- Compact page header (no stock photo) ---------- */
#common_banner.common_banner--compact {
    background-image: linear-gradient(120deg, #0b2f55 0%, #1d4ed8 100%);
    padding: 150px 0 16px;
}
.common_banner--compact .common_bannner_text { text-align: left; }
.common_banner--compact .common_bannner_text ul { margin: 0; justify-content: flex-start; }
.common_banner--compact .common_bannner_text ul li { font-size: 14px; }

/* ---------- Heading ---------- */
.dch-head h1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--dch-text);
    margin: 0 0 8px;
}
.dch-head__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 14px; font-size: 15px; }
.dch-head__meta a { color: var(--dch-muted); }
.dch-head__meta a:hover { color: var(--dch-accent); }
.dch-head__meta a i { color: var(--dch-accent); margin-right: 4px; }
.dch-head__cat { color: #f59e0b; letter-spacing: 1px; font-size: 14px; }
.dch-head__cat span { color: var(--dch-muted); letter-spacing: 0; margin-left: 4px; font-size: 13px; }

.dch-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.dch-chips li {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--dch-soft); color: #1e3a8a; font-size: 14px; line-height: 1.2;
}
.dch-chips li i { font-size: 11px; color: var(--dch-accent); }
.dch-chips--rooms li { background: #f6f7fb; color: var(--dch-text); }
.dch-chips--rooms b { font-weight: 600; color: var(--dch-muted); margin-left: 2px; }

/* ---------- Gallery ---------- */
.dch-gallery { margin-bottom: 18px; }
.dch-gallery__main { position: relative; border-radius: var(--dch-radius); overflow: hidden; background: #e9eef5; }
.dch-gallery__stage {
    display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0;
    background: #e9eef5; cursor: zoom-in;
}
.dch-gallery__stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dch-gallery__stage img.is-portrait { object-fit: contain; }
.dch-gallery__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .92); color: var(--dch-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18); display: grid; place-items: center;
}
.dch-gallery__nav:hover { background: #fff; color: var(--dch-accent); }
.dch-gallery__nav--prev { left: 12px; }
.dch-gallery__nav--next { right: 12px; }
.dch-gallery__count, .dch-gallery__all {
    position: absolute; bottom: 12px; border-radius: 999px;
    background: rgba(17, 24, 39, .72); color: #fff; font-size: 13px; padding: 6px 12px; border: 0;
}
.dch-gallery__count { left: 12px; }
/* "3 / 44 · Apartmán 1 - ložnice" (DET-Z26): a long caption is cut here, the viewer shows it whole */
.dch-gallery__count.has-caption { max-width: calc(100% - 200px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dch-gallery__caption::before { content: "·"; margin: 0 6px; }
.dch-gallery__all { right: 12px; background: #fff; color: var(--dch-text); font-weight: 600; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.dch-gallery__all i { color: var(--dch-accent); margin-right: 4px; }
.dch-gallery__thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 8px; }
.dch-gallery__thumb {
    position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
    aspect-ratio: 4 / 3; background: #e9eef5;
}
.dch-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dch-gallery__thumb.is-active { border-color: var(--dch-accent); }
.dch-gallery__more {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(17, 24, 39, .6); color: #fff; font-weight: 700; font-size: 16px;
}
:is(.dch-gallery__nav, .dch-gallery__all, .dch-gallery__thumb, .dch-gallery__stage):focus-visible,
:is(.dch-lightbox__nav, .dch-lightbox__close):focus-visible {
    outline: 3px solid #1d4ed8; outline-offset: 2px; box-shadow: 0 0 0 5px #fff;
}
/* the main photo fills a box that clips its content: draw the ring inside (GLOB-Z4) */
.dch-gallery__stage:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 5px #fff; }

/* Full-screen viewer (above the sticky navbar) */
.dch-lightbox {
    position: fixed; inset: 0; z-index: 2147483000;
    background: rgba(8, 12, 20, .95);
    display: flex; align-items: center; justify-content: center;
    touch-action: pan-y;
}
.dch-lightbox__img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 6px; user-select: none; }
/* Caption under the photo (DET-Z26); the photo leaves room for it */
.dch-lightbox__figure { margin: 0; text-align: center; }
.dch-lightbox__figure .dch-lightbox__img { max-height: 78vh; }
.dch-lightbox__caption { margin: 10px auto 0; max-width: 94vw; padding: 0 12px; color: #fff; font-size: 16px; line-height: 1.4; }
.dch-lightbox__bar {
    position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; color: #fff;
}
.dch-lightbox__count { font-size: 15px; font-weight: 600; }
.dch-lightbox__close, .dch-lightbox__nav {
    width: 48px; height: 48px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; display: grid; place-items: center;
}
.dch-lightbox__close:hover, .dch-lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.dch-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.dch-lightbox__nav--prev { left: 18px; }
.dch-lightbox__nav--next { right: 18px; }

/* ---------- Key facts ---------- */
.dch-facts {
    list-style: none; margin: 0 0 8px; padding: 16px; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 18px;
    border: 1px solid var(--dch-line); border-radius: var(--dch-radius); background: #fff;
}
.dch-facts li { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: start; }
.dch-facts i { grid-row: span 2; color: var(--dch-accent); font-size: 18px; margin-top: 3px; }
.dch-facts span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--dch-muted); }
.dch-facts strong { font-size: 15px; font-weight: 600; line-height: 1.35; }

/* ---------- Booking box ---------- */
.dch-side { position: sticky; top: 100px; }
.dch-book {
    background: #fff; border: 1px solid var(--dch-line); border-radius: 16px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .08); padding: 22px;
}
.d-lg-none > .dch-book { margin: 18px 0 8px; }
.dch-book__price { margin: 0; line-height: 1.1; color: var(--dch-muted); font-size: 15px; }
.dch-book__price strong { font-size: 34px; font-weight: 700; color: var(--dch-text); }
.dch-book__sub { margin: 6px 0 16px; font-size: 14px; color: var(--dch-muted); }
.dch-book__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.dch-book__select { margin-bottom: 12px; font-size: 14px; }
.dch-book__cta { width: 100%; padding: 14px 18px; font-size: 17px; font-weight: 600; border-radius: 10px; }
.dch-book__cta i { margin-right: 6px; }
.dch-book__trust { list-style: none; margin: 16px 0 0; padding: 0; }
.dch-book__trust li { display: flex; gap: 8px; font-size: 14px; color: var(--dch-text); padding: 3px 0; line-height: 1.4; }
.dch-book__trust i { color: var(--dch-ok); margin-top: 4px; font-size: 12px; }
.dch-book__help { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--dch-line); display: grid; gap: 4px; font-size: 14px; }
.dch-book__help span { color: var(--dch-muted); }
.dch-book__help a { color: var(--dch-text); font-weight: 600; }
.dch-book__help a:first-of-type { font-size: 20px; color: var(--dch-accent); }
.dch-book__help i { width: 20px; color: var(--dch-accent); }

/* ---------- Sections ---------- */
.dch-section { margin-top: 44px; }
.dch-h2 { font-size: 26px; line-height: 1.25; font-weight: 700; color: var(--dch-text); margin: 0 0 12px; }
.dch-section__lead { color: var(--dch-muted); font-size: 15px; margin: -4px 0 16px; }
.dch-dot { margin: 0 6px; color: #c0c3cf; }

.dch-collapse.is-collapsed { max-height: 520px; overflow: hidden; position: relative; }
.dch-collapse.is-collapsed::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.dch-more {
    margin-top: 10px; border: 1px solid var(--dch-line); background: #fff; color: var(--dch-accent);
    font-weight: 600; font-size: 15px; padding: 9px 16px; border-radius: 10px;
}
.dch-more:hover { border-color: var(--dch-accent); }
.dch-more i { font-size: 12px; margin-left: 4px; }

/* ---------- Units ---------- */
.dch-unit {
    border: 1px solid var(--dch-line); border-radius: var(--dch-radius); padding: 20px; margin-bottom: 16px; background: #fff;
}
.dch-unit__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.dch-unit__head h3 { font-size: 20px; font-weight: 700; margin: 0 0 4px; color: var(--dch-text); }
.dch-unit__meta { margin: 0; color: var(--dch-muted); font-size: 14px; }
.dch-unit__meta i { color: var(--dch-accent); margin-right: 4px; }
.dch-unit__price { text-align: right; white-space: nowrap; color: var(--dch-muted); font-size: 14px; line-height: 1.2; }
.dch-unit__price strong { font-size: 24px; color: var(--dch-text); }
.dch-unit__price small { display: block; margin-top: 4px; font-size: 13px; }
.dch-unit__ask { font-size: 16px !important; }
.dch-unit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 4px 0 12px; align-items: start; }
.dch-unit__seasons { width: 100%; border-collapse: collapse; font-size: 14px; caption-side: top; }
.dch-unit__seasons caption, .dch-unit__terms-title {
    padding: 0 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--dch-muted); text-align: left;
}
.dch-unit__seasons th, .dch-unit__seasons td { padding: 7px 0; border-bottom: 1px solid var(--dch-line); }
.dch-unit__seasons th { font-weight: 400; color: var(--dch-text); }
.dch-unit__seasons td { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.dch-unit__terms-title { margin: 0; }
.dch-unit__terms-title ~ .dch-unit__terms-title { margin-top: 10px; }
.dch-unit__in, .dch-unit__out { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.dch-unit__in li, .dch-unit__out li { padding: 3px 0 3px 22px; position: relative; color: var(--dch-text); }
.dch-unit__in li::before { content: "✓"; position: absolute; left: 2px; color: var(--dch-ok); font-weight: 700; }
.dch-unit__out li::before { content: "€"; position: absolute; left: 3px; color: #d97706; font-weight: 700; }
.dch-unit__note { font-size: 14px; color: #92400e; background: #fffbeb; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.dch-unit__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.dch-unit__foot .btn { padding: 11px 18px; font-weight: 600; border-radius: 10px; }
.dch-unit__rooms summary { cursor: pointer; color: var(--dch-accent); font-weight: 600; font-size: 14px; }
.dch-unit__rooms dl { margin: 10px 0 0; font-size: 14px; }
.dch-unit__rooms dt { font-weight: 600; margin-top: 6px; }
.dch-unit__rooms dd { margin: 0; color: var(--dch-muted); }

/* ---------- How booking works ---------- */
.dch-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dch-steps li { background: var(--dch-soft); border-radius: var(--dch-radius); padding: 18px; }
.dch-steps__n {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--dch-accent); color: #fff; font-weight: 700; margin-bottom: 10px;
}
.dch-steps strong { display: block; font-size: 16px; margin-bottom: 4px; }
.dch-steps p { font-size: 14px; line-height: 1.5; color: #4b4a5c; margin: 0; }
.dch-steps a { color: var(--dch-accent); text-decoration: underline; }

/* ---------- Beaches, amenities ---------- */
.dch-beach { display: grid; grid-template-columns: 170px 1fr; gap: 16px; border: 1px solid var(--dch-line); border-radius: var(--dch-radius); padding: 12px; margin-bottom: 12px; }
.dch-beach img { width: 100%; height: 100%; max-height: 150px; object-fit: cover; border-radius: 10px; }
.dch-beach h3 { font-size: 18px; font-weight: 700; margin: 2px 0 4px; }
.dch-beach h3 a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dch-trips { margin: 12px 0 0; font-size: 15px; }
.dch-trips i { color: var(--dch-muted); margin-right: 4px; }
.dch-trips a { text-decoration: underline; text-underline-offset: 3px; }
.dch-beach__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--dch-muted); margin: 0 0 6px; }
.dch-beach__meta i { color: var(--dch-accent); }

.dch-amenities { columns: 3 220px; column-gap: 28px; }
.dch-amenities.is-collapsed { max-height: 420px; overflow: hidden; position: relative; }
.dch-amenities.is-collapsed::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.dch-amenities__group { break-inside: avoid; margin-bottom: 18px; }
.dch-amenities__group h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.dch-amenities__group ul { list-style: none; padding: 0; margin: 0; }
.dch-amenities__group li { font-size: 14px; padding: 3px 0; display: flex; gap: 8px; color: var(--dch-text); }
.dch-amenities__group li i { color: var(--dch-ok); font-size: 11px; margin-top: 5px; }
.dch-amenities__group li span { color: var(--dch-muted); }

/* ---------- Map ---------- */
.dch-map { border-radius: var(--dch-radius); overflow: hidden; border: 1px solid var(--dch-line); }
.dch-map__canvas { height: 400px; }
.dch-map__placeholder {
    width: 100%; height: 300px; border: 0; display: grid; place-content: center; gap: 8px; justify-items: center;
    background:
        linear-gradient(rgba(244, 247, 255, .85), rgba(244, 247, 255, .85)),
        repeating-linear-gradient(45deg, #dbe4f3 0 2px, transparent 2px 22px),
        repeating-linear-gradient(-45deg, #dbe4f3 0 2px, transparent 2px 22px);
    color: var(--dch-accent); font-weight: 600; font-size: 16px;
}
.dch-map__placeholder i { font-size: 34px; }
.dch-map__note { font-size: 12px; color: #8a8a99; margin: 8px 0 0; }

/* ---------- Mobile bar ---------- */
.dch-mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: #fff; box-shadow: 0 -6px 20px rgba(17, 24, 39, .12);
}
.dch-mbar__price { flex: 1; color: var(--dch-muted); font-size: 13px; line-height: 1.1; }
.dch-mbar__price strong { font-size: 22px; color: #2b2540; }
.dch-mbar__call {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid #e6e8ef; color: var(--main-color, #2563EB); font-size: 18px;
}
.dch-mbar__cta { padding: 12px 18px; font-weight: 600; border-radius: 10px; white-space: nowrap; }

/* ---------- Booking window: Saturdays (stays are mostly Saturday to Saturday) ---------- */
.bk .bk-day.bk-sat { box-shadow: inset 0 -4px 0 #2563EB; }
.bk .bk-sat-legend { background: #fff; box-shadow: inset 0 -4px 0 #2563EB; }

/* ---------- Responsive ---------- */
/* The .g-xl-5 row pulls 24px out on each side, the theme's container pads only 12px:
   without this the page scrolls sideways by 12px on wide screens (DET-Z4) */
@media (min-width: 1200px) {
    .dch-detail > .container { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 991.98px) {
    .dch-detail { padding-bottom: 110px; }
    .dch-head h1 { font-size: 28px; }
    .dch-steps { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    #common_banner.common_banner--compact { padding: 14px 0 12px; }
    .dch-gallery__main { border-radius: 0; margin: 0 -12px; }
    .dch-gallery__stage { aspect-ratio: 4 / 3; }
    .dch-gallery__thumbs { display: none; }
    .dch-gallery__nav { width: 38px; height: 38px; }
    .dch-lightbox__nav { display: none; }
    .dch-unit__head { flex-direction: column; }
    .dch-unit__price { text-align: left; }
    .dch-unit__grid { grid-template-columns: 1fr; }
    .dch-unit__foot .btn { width: 100%; }
    .dch-beach { grid-template-columns: 1fr; }
    .dch-beach img { max-height: 180px; }
    .dch-h2 { font-size: 22px; }
    .modal-content.bk { --bk-cell: 32px; } /* larger tap targets; beats booker.css, loaded later */
}
