/* ==========================================================================
   Resort.ba — marketplace UI (mobile-first)
   Ucitava se samo iz _Layout.cshtml, poslije site.css. Admin se ne dira.
   Tokeni su dokumentovani u /docs/design-system.md
   ========================================================================== */

:root {
    --ink: #0d2b35;
    --ink-soft: #4a6169;
    --gold: #cba332;
    --gold-hover: #b8912a;
    --gold-soft: rgba(203, 163, 50, .14);
    --surface: #ffffff;
    --surface-alt: #f7f7f5;
    --line: #ebebeb;
    --border-strong: #d6d6d6;
    --page: #ffffff;
    --page-alt: #f7f7f5;
    --header-bg: rgba(255, 255, 255, .96);
    --footer-bg: #0d2b35;
    --text-body: #26404a;
    --hover: #ececea;
    --hover-soft: #fbfaf6;
    --sk-a: #f1f1ef;
    --sk-b: #e8e8e5;
    --sk-c: #eeeeec;
    --fill: #0d2b35;
    --on-fill: #ffffff;
    --on-gold: #0d2b35;
    --gold-text: #8a6a0b;
    color-scheme: light;

    --r-card: 16px;
    --r-control: 12px;
    --r-pill: 999px;

    --shadow-1: 0 1px 2px rgba(13, 43, 53, .06), 0 2px 8px rgba(13, 43, 53, .06);
    --shadow-2: 0 6px 24px rgba(13, 43, 53, .14);

    --header-h: 56px;
    --tabbar-h: 62px;

    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 992px) {
    :root { --header-h: 68px; }
}

body {
    font-family: var(--font);
    color: var(--ink);
    background-color: var(--page);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .fw-bold { letter-spacing: -.01em; }

a { color: inherit; }

/* ---------- Buttons ---------- */
.btn-brand,
.btn-ink,
.btn-ghost {
    border-radius: var(--r-control);
    font-weight: 600;
    padding: .7rem 1.25rem;
    min-height: 44px;
    border: 1px solid transparent;
    transition: background-color .15s, border-color .15s, transform .1s;
}
.btn-brand { background: var(--gold); color: var(--ink); }
.btn-brand:hover, .btn-brand:focus { background: var(--gold-hover); color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover, .btn-ink:focus { background: #14404f; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover, .btn-ghost:focus { border-color: var(--ink); color: var(--ink); }
.btn-brand:active, .btn-ink:active, .btn-ghost:active { transform: scale(.98); }

.btn:focus-visible, .nav-link:focus-visible, a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- Desktop header ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--header-bg);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
    height: var(--header-h);
}
.site-nav .nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-nav .brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.site-nav .brand span { color: var(--gold); }
.site-nav .nav-links { display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.site-nav .nav-links > li { position: relative; }
.site-nav .nav-link {
    font-weight: 600;
    color: var(--ink);
    padding: .5rem .85rem;
    border-radius: var(--r-pill);
}
.site-nav .nav-link:hover, .site-nav .nav-link.active { background: var(--surface-alt); color: var(--ink); }
.site-nav .nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: .5rem; }
.site-nav .icon-btn { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink); font-size: 1.15rem; }
.site-nav .icon-btn:hover { background: var(--surface-alt); }
.site-nav .dropdown-menu { border: 0; border-radius: var(--r-card); box-shadow: var(--shadow-2); padding: .5rem; }
.site-nav .dropdown-item { border-radius: 10px; padding: .55rem .85rem; font-weight: 500; }
.site-nav .dropdown-item.active, .site-nav .dropdown-item:active { background: var(--gold-soft); color: var(--ink); }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: .3rem .75rem .3rem .5rem; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.user-chip:hover { box-shadow: var(--shadow-1); color: var(--ink); }

/* ---------- Mobile top bar + tab bar ---------- */
.m-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--header-bg);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.m-topbar .brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.m-topbar .brand span { color: var(--gold); }
.m-topbar .icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; font-size: 1.2rem; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }

.m-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(13, 43, 53, .06);
}
.m-tabbar .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: .68rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    min-width: 0;
}
.m-tabbar .tab i { font-size: 1.35rem; line-height: 1; }
.m-tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.m-tabbar .tab.active { color: var(--ink); }
.m-tabbar .tab.active i { color: var(--gold); }

@media (max-width: 991.98px) {
    body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Sheets (offcanvas -> bottom sheet on phones) ---------- */
.offcanvas.sheet { border: 0; }
.offcanvas.sheet .offcanvas-header { border-bottom: 1px solid var(--line); }
.offcanvas.sheet .offcanvas-title { font-weight: 700; }
@media (max-width: 575.98px) {
    .offcanvas.sheet.offcanvas-end,
    .offcanvas.sheet.offcanvas-start {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }
    .offcanvas.sheet::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: #d0d0d0;
        margin: 8px auto 0;
    }
}
.offcanvas-bottom.sheet { border-radius: 20px 20px 0 0; height: auto; max-height: 90vh; padding-bottom: env(safe-area-inset-bottom); }
.offcanvas-bottom.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: #d0d0d0; margin: 8px auto 0; }

.sheet-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem .25rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    min-height: 52px;
}
.sheet-link i { font-size: 1.2rem; width: 28px; text-align: center; color: var(--ink-soft); }
.sheet-link:hover { color: var(--ink); background: var(--surface-alt); }
.sheet-section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-soft); margin: 1.25rem 0 .5rem; }
.option-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.option-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
}
.option-pill:hover { border-color: var(--ink); color: var(--ink); }
.option-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Page container ---------- */
main.site-main > section.container { margin-top: 1rem !important; margin-bottom: 2rem !important; }
@media (min-width: 992px) {
    main.site-main > section.container { margin-top: 1.5rem !important; margin-bottom: 3rem !important; }
}

/* ---------- Listing head, search pill, chips ---------- */
.listing-head { margin-bottom: .75rem; }
.listing-head h1 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .15rem; }
.listing-head p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
@media (min-width: 768px) {
    .listing-head h1 { font-size: 1.75rem; }
    .listing-head p { font-size: 1rem; }
}

.search-sticky {
    position: sticky;
    top: var(--header-h);
    z-index: 1020;
    background: var(--page);
    padding: .5rem 0 .6rem;
    margin-inline: -12px;
    padding-inline: 12px;
}
.search-pill {
    display: flex;
    align-items: center;
    gap: .25rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-1);
    padding: 5px 5px 5px 16px;
    max-width: 720px;
    margin-inline: auto;
}
.search-pill:focus-within { border-color: var(--ink); box-shadow: var(--shadow-2); }
.search-pill > i.lead-icon { color: var(--ink-soft); font-size: 1.05rem; }
.search-pill input[type=text] {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    padding: .55rem .5rem;
    color: var(--ink);
}
.search-pill input[type=text]::placeholder { color: var(--ink-soft); font-weight: 500; }
.search-pill .pill-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex: 0 0 auto;
}
.search-pill .pill-btn.go { background: var(--gold); color: var(--ink); }
.search-pill .pill-btn.go:hover { background: var(--gold-hover); }
.search-pill .pill-btn.filter { background: var(--surface-alt); color: var(--ink); }
.search-pill .pill-btn.filter:hover { background: var(--hover); }

.category-rail {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: .25rem 0 .75rem;
    margin-inline: -12px;
    padding-inline: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
}
.category-rail::-webkit-scrollbar { display: none; }
.category-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    min-width: 64px;
    padding: .35rem .25rem .5rem;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.category-item i { font-size: 1.5rem; line-height: 1; }
.category-item:hover { color: var(--ink); }
.category-item.active { color: var(--ink); border-bottom-color: var(--ink); }

.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.toolbar-row .count { color: var(--ink-soft); font-size: .9rem; font-weight: 500; }
.pill-control {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: .875rem;
    padding: .45rem .9rem;
    min-height: 40px;
}
.pill-control:hover, .pill-control:focus { border-color: var(--ink); color: var(--ink); }
.dropdown-menu .dropdown-item.active { background: var(--gold-soft); color: var(--ink); }

/* ---------- Listing card ---------- */
.listing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem 1.25rem;
}
@media (min-width: 576px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .listing-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem 1.5rem; } }

.listing-card { position: relative; display: block; color: var(--ink); text-decoration: none; }
.listing-card:hover { color: var(--ink); }
.listing-media {
    position: relative;
    border-radius: var(--r-card);
    overflow: hidden;
    background: var(--surface-alt);
    aspect-ratio: 4 / 3;
}
.listing-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.listing-card:hover .listing-media img { transform: scale(1.04); }
.listing-badges {
    position: absolute;
    top: 10px;
    inset-inline: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .4rem;
    pointer-events: none;
}
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--header-bg);
    color: var(--ink);
    font-size: .75rem;
    font-weight: 700;
    padding: .3rem .65rem;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-1);
}
.badge-pill.gold { background: var(--gold); }
.badge-pill i { color: #1d78c1; font-size: .9rem; }
.listing-body { padding: .7rem .15rem 0; }
.listing-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 .15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-loc { color: var(--ink-soft); font-size: .875rem; margin: 0 0 .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-price { font-weight: 800; font-size: 1rem; margin: 0; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.empty-state i { font-size: 2.5rem; color: var(--gold); }

/* ---------- Pagination ---------- */
.pagination { gap: .35rem; justify-content: center; flex-wrap: wrap; }
.pagination .page-link {
    border: 1px solid var(--line);
    border-radius: var(--r-pill) !important;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-weight: 600;
}
.pagination .page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #dfe7ea; padding: 2.5rem 0 1.5rem; }
.site-footer a { color: #dfe7ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h5 { color: var(--gold); font-size: .95rem; font-weight: 700; margin-bottom: .75rem; }
.site-footer .footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.site-footer .social a { font-size: 1.4rem; margin-inline-end: 1rem; }
.site-footer .copy { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 1.5rem; padding-top: 1rem; text-align: center; font-size: .85rem; color: #9fb1b7; }
@media (max-width: 767.98px) {
    .site-footer { padding-top: 1.75rem; }
}

/* ---------- Cookie banner / app banner ---------- */
.app-banner {
    display: none;
    align-items: center;
    gap: .75rem;
    padding: .6rem 16px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
}
.app-banner.show { display: flex; }
.app-banner img { width: 36px; height: 36px; border-radius: 9px; }
.app-banner .txt { flex: 1; min-width: 0; font-size: .82rem; line-height: 1.25; font-weight: 600; }
.app-banner .btn { padding: .35rem .9rem; min-height: 36px; font-size: .82rem; }
.app-banner .close-x { border: 0; background: none; font-size: 1.1rem; color: var(--ink-soft); width: 32px; height: 32px; }
@media (min-width: 992px) { .app-banner.show { display: none; } }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 37%, var(--sk-a) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   v1.1 — ispravke i dodaci
   ========================================================================== */

/* Sheet: prikaz mora pobijediti "skriveni" transform (ranije se nije otvarao na mobilnom) */
@media (max-width: 575.98px) {
    .offcanvas.sheet.offcanvas-end.show:not(.hiding),
    .offcanvas.sheet.offcanvas-end.showing,
    .offcanvas.sheet.offcanvas-start.show:not(.hiding),
    .offcanvas.sheet.offcanvas-start.showing {
        transform: none;
    }
}

/* Kategorije: razmak od ivice na mobilnom, centrirano na desktopu */
.category-rail { padding-inline: 16px; }
@media (min-width: 768px) {
    .category-rail {
        margin-inline: 0;
        padding-inline: 0;
        justify-content: safe center;
    }
}

/* Chips filteri */
.chips-row {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: .1rem 16px .25rem;
    margin-inline: -12px;
    -webkit-overflow-scrolling: touch;
}
.chips-row::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    .chips-row { margin-inline: 0; padding-inline: 0; justify-content: safe center; }
}
.chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: .85rem;
    padding: .4rem .85rem;
    min-height: 38px;
    white-space: nowrap;
    cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip.has-value { border-color: var(--ink); background: var(--surface-alt); }
.chip.removable { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.removable i { font-size: .8rem; }
.chip.clear-all { border-style: dashed; color: var(--ink-soft); }
.active-filters { margin-top: .5rem; }
.active-filters:empty { display: none; }

/* Toolbar: broj rezultata + prekidac Lista/Mapa */
.toolbar-row .count { font-weight: 600; color: var(--ink); }
.view-toggle { display: none; border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 3px; background: var(--surface); }
.view-toggle button { border: 0; background: transparent; border-radius: var(--r-pill); font-weight: 600; font-size: .85rem; padding: .35rem .9rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: .35rem; }
.view-toggle button.active { background: var(--ink); color: #fff; }
@media (min-width: 992px) { .view-toggle { display: inline-flex; } }

.map-fab {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
    z-index: 1025;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: var(--r-pill);
    padding: .7rem 1.2rem;
    font-weight: 700;
    box-shadow: var(--shadow-2);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
@media (min-width: 992px) { .map-fab { display: none; } }

/* Lista + mapa */
.listing-layout { display: block; }
.map-pane { display: none; }
.listing-layout.map-on .map-pane { display: block; }
#listingMap { width: 100%; height: 100%; border-radius: var(--r-card); background: var(--surface-alt); }
.map-pane { height: calc(100vh - var(--header-h) - var(--tabbar-h) - 150px); min-height: 360px; }
.listing-layout.map-on .list-pane { display: none; }
@media (min-width: 992px) {
    .listing-layout.map-on { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
    .listing-layout.map-on .list-pane { display: block; }
    .listing-layout.map-on .listing-grid { grid-template-columns: repeat(2, 1fr); }
    .listing-layout.map-on .map-pane { position: sticky; top: calc(var(--header-h) + 72px); height: calc(100vh - var(--header-h) - 96px); }
}
.price-marker { background: transparent; border: 0; }
.price-marker span {
    display: inline-block;
    transform: translate(-50%, -50%);
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
    font-size: .78rem;
    padding: .25rem .6rem;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-2);
    white-space: nowrap;
    border: 1px solid var(--line);
}
.price-marker.active span { background: var(--ink); color: #fff; }
.map-popup { width: 210px; }
.map-popup img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; }
.map-popup b { display: block; margin-top: .4rem; line-height: 1.25; }
.map-popup small { color: var(--ink-soft); }
.leaflet-popup-content-wrapper { border-radius: var(--r-card); }
.leaflet-popup-content { margin: 10px; }

/* Ucitaj vise */
.load-more-wrap { text-align: center; margin-top: 2rem; }
.load-more-wrap .btn { min-width: 200px; }

/* Skeleton i slike */
.listing-media img { opacity: 0; transition: opacity .35s ease, transform .35s ease; }
.listing-media img.loaded { opacity: 1; }
.listing-card.sk .listing-media { background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 37%, var(--sk-a) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
.listing-card.sk .line { height: 12px; border-radius: 6px; margin-top: .55rem; background: var(--sk-c); }
.listing-card.sk .line.w60 { width: 60%; }
.listing-card.sk .line.w40 { width: 40%; }
.listing-media.skeleton { background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 37%, var(--sk-a) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }

/* Prazno stanje */
.empty-state { grid-column: 1 / -1; padding: 3rem 1rem 4rem; }
.empty-state svg { width: 120px; height: 120px; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.25rem; font-weight: 800; color: var(--ink); }

/* scroll-snap ne smije zalijepiti prvu kategoriju uz ivicu */
.category-rail { scroll-padding-inline: 16px; }
@media (min-width: 768px) { .category-rail { scroll-padding-inline: 0; } }

/* Dugme pretrage u filter sheet-u uvijek vidljivo */
.offcanvas.sheet .offcanvas-body > .d-grid {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    padding: .75rem 0;
    margin-top: 1rem !important;
}

/* ==========================================================================
   Filter sheet (moderni dijalog)
   ========================================================================== */
.filter-sheet { --bs-offcanvas-width: min(480px, 100vw); }
.filter-sheet .offcanvas-header { padding: 1rem 1.25rem; }
.filter-sheet .offcanvas-body { padding: 0 1.25rem; }
@media (max-width: 575.98px) {
    .offcanvas.sheet.filter-sheet { height: 92vh; max-height: 92vh; }
}
.fs-section { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.fs-section:last-child { border-bottom: 0; }
.fs-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 .9rem; color: var(--ink); }
.fs-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Datumi: sazetak + veliki kalendar */
.range-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.rs-box { border: 1.5px solid var(--border-strong); border-radius: var(--r-control); padding: .55rem .85rem; transition: border-color .15s; }
.rs-box small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ink-soft); }
.rs-box b { font-size: 1rem; font-weight: 700; }
.rs-box.on { border-color: var(--ink); }

.rcal { user-select: none; }
.rcal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.rcal-title { font-weight: 800; font-size: 1.05rem; text-transform: capitalize; }
.rcal-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.rcal-nav:hover:not(:disabled) { border-color: var(--ink); }
.rcal-nav:disabled { opacity: .35; }
[dir="rtl"] .rcal-nav i { transform: scaleX(-1); }
.rcal-week, .rcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.rcal-week span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--ink-soft); padding: .35rem 0; text-transform: uppercase; }
.rcal-grid { row-gap: 3px; }
.rcal-day {
    height: 48px;
    border: 0;
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    position: relative;
    border-radius: 0;
}
.rcal-day:hover:not(:disabled):not(.start):not(.end) { background: var(--surface-alt); border-radius: 999px; }
.rcal-day.past { color: #bdbdbd; text-decoration: line-through; cursor: not-allowed; }
.rcal-day.today { font-weight: 800; box-shadow: inset 0 -3px 0 var(--gold); }
.rcal-day.mid { background: var(--gold-soft); }
.rcal-day.start, .rcal-day.end { background: var(--ink); color: #fff; box-shadow: none; }
.rcal-day.start { border-radius: 999px 0 0 999px; }
.rcal-day.end { border-radius: 0 999px 999px 0; }
.rcal-day.start.solo { border-radius: 999px; }
[dir="rtl"] .rcal-day.start { border-radius: 0 999px 999px 0; }
[dir="rtl"] .rcal-day.end { border-radius: 999px 0 0 999px; }
[dir="rtl"] .rcal-day.start.solo { border-radius: 999px; }

/* Steperi za goste */
.stepper-row { display: flex; align-items: center; justify-content: space-between; padding: .55rem 0; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: .9rem; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.stepper button:hover:not(:disabled) { border-color: var(--ink); }
.stepper button:disabled { opacity: .35; }
.stepper .val { min-width: 1.6rem; text-align: center; font-weight: 800; font-size: 1.1rem; }

/* Select i polja */
.fs-select {
    width: 100%;
    height: 54px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-control);
    padding: 0 1rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--surface);
}
.fs-select:focus { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 3px var(--gold-soft); }
.fs-range { display: flex; align-items: center; gap: .6rem; }
.fs-range > i { color: var(--ink-soft); }
.fs-field { flex: 1; display: block; border: 1.5px solid var(--border-strong); border-radius: var(--r-control); padding: .45rem .85rem .35rem; background: var(--surface); }
.fs-field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.fs-field span { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.fs-field input { width: 100%; border: 0; outline: 0; padding: 0; font-size: 1.1rem; font-weight: 700; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.fs-field input::-webkit-outer-spin-button, .fs-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Pilule (checkbox / radio) */
.pick-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick { position: relative; margin: 0; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.pick span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .5rem 1.1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-pill);
    font-weight: 600;
    background: var(--surface);
    transition: background-color .15s, border-color .15s, color .15s;
}
.pick input:hover + span { border-color: var(--ink); }
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pick-numbers .pick span { min-width: 56px; }

/* Footer sheet-a */
.sheet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.25rem calc(.85rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.btn-link-plain { border: 0; background: none; padding: .5rem 0; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sheet-footer .btn-brand { min-width: 160px; }

/* Grad: pretrazivi izbornik */
.city-picker { position: relative; }
.city-trigger {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 0 1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-control);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: 1rem;
    text-align: start;
}
.city-trigger:hover, .city-picker.open .city-trigger { border-color: var(--ink); }
.city-picker.open .city-trigger { box-shadow: 0 0 0 3px var(--gold-soft); }
.city-trigger > i:first-child { color: var(--gold); font-size: 1.15rem; }
.city-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-label.is-empty { color: var(--ink-soft); font-weight: 500; }
.city-clear { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-alt); font-size: .7rem; }
.city-clear:hover { background: var(--hover); }
.city-clear[hidden] { display: none; }
.city-caret { color: var(--ink-soft); transition: transform .2s; }
.city-picker.open .city-caret { transform: rotate(180deg); }

.city-panel {
    margin-top: .5rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow-2);
    overflow: hidden;
}
.city-panel[hidden] { display: none; }
.city-search { display: flex; align-items: center; gap: .6rem; padding: .35rem 1rem; border-bottom: 1px solid var(--line); }
.city-search i { color: var(--ink-soft); }
.city-search input { flex: 1; border: 0; outline: 0; height: 46px; font-size: 1rem; font-weight: 500; background: transparent; color: var(--ink); }
.city-list { list-style: none; margin: 0; padding: .35rem; max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.city-list li { padding: .8rem .85rem; border-radius: 10px; font-weight: 600; cursor: pointer; }
.city-list li[hidden] { display: none; }
.city-list li:hover { background: var(--surface-alt); }
.city-list li.selected { background: var(--gold-soft); position: relative; }
.city-list li.selected::after { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; inset-inline-end: .85rem; color: var(--ink); }
.city-empty { padding: 1.2rem; text-align: center; color: var(--ink-soft); font-weight: 600; }
.city-empty[hidden] { display: none; }

/* Mobilni: prikaz u 2 kolone (sprema se u localStorage, default je 1 kolona) */
.density-toggle { width: 40px; padding: 0; justify-content: center; }
@media (max-width: 575.98px) {
    html:not(.grid-1) .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem .7rem; }
    html:not(.grid-1) .listing-media { aspect-ratio: 1 / 1; border-radius: 14px; }
    html:not(.grid-1) .listing-body { padding-top: .5rem; }
    html:not(.grid-1) .listing-title { font-size: .875rem; }
    html:not(.grid-1) .listing-loc { font-size: .75rem; }
    html:not(.grid-1) .listing-price { font-size: .875rem; }
    html:not(.grid-1) .badge-pill { font-size: .65rem; padding: .2rem .5rem; }
    html:not(.grid-1) .listing-badges { top: 7px; inset-inline: 7px; }
}

/* ==========================================================================
   Detalji oglasa
   ========================================================================== */
.details-page { padding-bottom: 5.5rem; }
@media (min-width: 992px) { .details-page { padding-bottom: 0; } }

/* Galerija: mobilni swipe */
.dg-mobile { position: relative; margin: -1rem -12px 0; }
.dg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dg-track::-webkit-scrollbar { display: none; }
.dg-slide { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: center; background: var(--surface-alt); cursor: pointer; }
.dg-count { position: absolute; inset-inline-end: 12px; bottom: 12px; background: rgba(13, 43, 53, .78); color: #fff; font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: var(--r-pill); }

/* Galerija: desktop mreza */
.dg-desktop { position: relative; }
.dg-grid { display: grid; gap: 8px; border-radius: 20px; overflow: hidden; height: min(480px, 54vh); }
.dg-grid img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; background: var(--surface-alt); transition: filter .2s; }
.dg-grid img:hover { filter: brightness(.92); }
.dg-n1 { grid-template-columns: 1fr; }
.dg-n2 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(var(--rows), 1fr); }
.dg-n2 img:first-child { grid-row: 1 / -1; }
.dg-n5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.dg-n5 img:first-child { grid-row: 1 / -1; }
.dg-all {
    position: absolute;
    inset-inline-end: 16px;
    bottom: 16px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--r-control);
    padding: .5rem .9rem;
    font-weight: 700;
    font-size: .875rem;
    box-shadow: var(--shadow-1);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.dg-all:hover { background: var(--surface-alt); }
.dg-empty img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; }
@media (max-width: 991.98px) { .dg-empty { margin: -1rem -12px 0; } .dg-empty img { border-radius: 0; aspect-ratio: 4 / 3; } }

/* Naslov i osnovne informacije */
.d-heading { font-size: 1.5rem; font-weight: 800; line-height: 1.25; margin: 1.25rem 0 .35rem; }
@media (min-width: 992px) { .d-heading { font-size: 2rem; margin-top: 1.75rem; } }
.d-location { color: var(--ink-soft); font-weight: 500; margin: 0 0 .75rem; }
.d-location i { color: var(--gold); }
.d-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.d-badges .badge-pill { box-shadow: none; border: 1px solid var(--line); }
.d-badges .badge-pill.gold { border-color: var(--gold); }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: .9rem 0; font-weight: 700; }
.facts i { color: var(--gold); margin-inline-end: .3rem; }

/* Sekcije */
.d-section { padding: 1.6rem 0; border-top: 1px solid var(--line); }
.d-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 1rem; }
.d-text { font-size: 1.02rem; line-height: 1.7; color: var(--text-body); margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 1rem; }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.feature i { font-size: 1.35rem; color: var(--ink); width: 28px; text-align: center; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1rem; }
@media (min-width: 768px) { .fact-grid { grid-template-columns: repeat(3, 1fr); } }
.fact { display: flex; align-items: center; gap: .75rem; }
.fact > i { font-size: 1.3rem; color: var(--gold); width: 28px; text-align: center; }
.fact small { display: block; color: var(--ink-soft); font-size: .78rem; }
.fact b { font-weight: 700; }
#propertyMap { height: 340px; border-radius: var(--r-card); box-shadow: var(--shadow-1); }

/* Kutija za rezervaciju */
@media (min-width: 992px) {
    .book-sticky { position: sticky; top: calc(var(--header-h) + 20px); }
}
.details-page .price-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; box-shadow: var(--shadow-2); }
.price-head { font-size: 1.5rem; font-weight: 800; margin: 0 0 1.1rem; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.details-page .form-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ink-soft); margin-bottom: .3rem; }
.details-page .price-box .form-control { height: 52px; border: 1.5px solid var(--border-strong); border-radius: var(--r-control); font-weight: 600; }
.details-page .price-box .form-control:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.details-page .guest-counter { border: 1.5px solid var(--border-strong); border-radius: var(--r-control); padding: .35rem 1rem; background: var(--surface); }
.gc-row { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; }
.gc-row + .gc-row { border-top: 1px solid var(--line); }
.gc-ctl { display: inline-flex; align-items: center; gap: .85rem; }
.gc-ctl .btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.gc-ctl .btn:hover { border-color: var(--ink); }
.gc-ctl span { min-width: 1.5rem; text-align: center; font-weight: 800; font-size: 1.05rem; }
.contact-line { display: flex; align-items: center; gap: .7rem; background: var(--surface-alt); padding: .8rem 1rem; border-radius: var(--r-control); font-weight: 600; }
.contact-line i { color: var(--gold); font-size: 1.2rem; }

/* Jedinice */
.unit-list { display: grid; gap: .75rem; }
.unit-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.unit-card:hover { border-color: var(--ink); box-shadow: var(--shadow-1); color: var(--ink); }
.unit-card b { display: block; }
.unit-card small { color: var(--ink-soft); }
.unit-price { font-weight: 800; white-space: nowrap; background: var(--gold-soft); padding: .3rem .7rem; border-radius: var(--r-pill); }

/* Mobilna traka (cijena + akcija) iznad donje navigacije */
.book-bar {
    position: fixed;
    inset-inline: 0;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    z-index: 1025;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem 16px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(13, 43, 53, .08);
    transition: transform .25s ease;
}
.book-bar.is-hidden { transform: translateY(calc(100% + var(--tabbar-h))); }
.book-bar .bb-price { min-width: 0; }
.book-bar .bb-price b { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.2; }
.book-bar .bb-price small { color: var(--ink-soft); font-weight: 600; }
.book-bar .btn { white-space: nowrap; padding-inline: 1.4rem; }
#bookingBox { scroll-margin-top: calc(var(--header-h) + 12px); }
.d-heading { margin-top: .9rem; }
.d-location { font-size: .95rem; }
@media (min-width: 992px) { .d-heading { margin-top: 1.5rem; } .d-location { font-size: 1rem; } }

/* ==========================================================================
   Detalji: opis, datumi, poruka (v1.2)
   ========================================================================== */
.d-clamp { max-height: 11.5em; overflow: hidden; position: relative; }
.d-clamp.is-clamped::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3.2em; background: linear-gradient(to bottom, transparent, var(--page)); pointer-events: none; }
.d-clamp.expanded { max-height: none; }
.d-more { margin-top: .6rem; border: 0; background: none; padding: .35rem 0; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.d-more[hidden] { display: none; }

.date-trigger { cursor: pointer; margin-bottom: .6rem; }
.date-trigger .rs-box { position: relative; }
.date-trigger.open .rs-box, .date-trigger:hover .rs-box { border-color: var(--ink); }
.rcal-wrap { margin-bottom: .6rem; padding: .6rem .35rem 0; border: 1.5px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.rcal-wrap[hidden] { display: none; }
.rcal-wrap .rcal { padding-bottom: .5rem; }
#checkAvailabilityBtn { min-height: 52px; }
#availability-status:empty { display: none; }

/* Poruka u stilu chat aplikacije */
.chat-modal .modal-content { border: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-2); }
.chat-head { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-avatar { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(135deg, var(--gold), #e2c46a); color: var(--ink); font-weight: 800; font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center; }
.chat-avatar.lg { width: 76px; height: 76px; font-size: 2rem; }
.chat-title { min-width: 0; flex: 1; line-height: 1.25; }
.chat-title b { display: block; font-size: 1.02rem; }
.chat-title small { display: block; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.chat-close:hover { background: var(--hover); }
.chat-body { flex: 1; overflow-y: auto; padding: 1.25rem 1rem; min-height: 220px; background: var(--page-alt); display: flex; flex-direction: column; }
.chat-intro { text-align: center; padding: 1rem 0 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.chat-intro small { color: var(--ink-soft); }
#chatThread { display: flex; flex-direction: column; gap: .35rem; margin-top: auto; }
.msg-bubble { max-width: 82%; padding: .6rem .95rem; border-radius: 20px; line-height: 1.4; word-break: break-word; white-space: pre-wrap; animation: msgIn .25s ease; }
.msg-bubble.out { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg-bubble.out i { margin-inline-start: .4rem; color: var(--gold); font-size: .95rem; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.chat-note { text-align: center; font-size: .85rem; font-weight: 600; padding: .5rem 0 0; }
.chat-note.ok { color: #1c7a4b; }
.chat-note.err { color: #b3261e; }
.chat-composer { display: flex; align-items: flex-end; gap: .6rem; padding: .75rem .85rem calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.chat-composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: var(--surface-alt); border-radius: 22px; padding: .7rem 1.1rem; line-height: 1.4; max-height: 120px; font-size: 1rem; color: var(--ink); }
.chat-composer textarea:focus { box-shadow: 0 0 0 2px var(--gold-soft); }
.chat-send { width: 46px; height: 46px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--gold); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: transform .1s, opacity .15s; }
.chat-send:hover:not(:disabled) { background: var(--gold-hover); }
.chat-send:active:not(:disabled) { transform: scale(.94); }
.chat-send:disabled { opacity: .4; }
@media (max-width: 575.98px) {
    .chat-modal .modal-dialog { margin: 0; min-height: 100%; align-items: flex-end; max-width: none; }
    .chat-modal .modal-content { border-radius: 22px 22px 0 0; max-height: 88vh; }
    .chat-modal.fade .modal-dialog { transform: translateY(100%); }
    .chat-modal.show .modal-dialog { transform: none; }
}

/* Aktivnosti: kategorije s fotografijama */
.photo-rail .category-item { min-width: 76px; gap: .4rem; }
.photo-rail .thumb { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: var(--surface-alt); border: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, transform .15s; }
.photo-rail .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-rail .thumb-all i { font-size: 1.5rem; color: var(--ink); }
.photo-rail .category-item:hover .thumb { transform: translateY(-1px); }
.photo-rail .category-item.active .thumb { border-color: var(--gold); }
.photo-rail .category-item.active { border-bottom-color: transparent; }
.photo-rail .category-item span:last-child { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   Sadrzajne stranice (Postani domacin, Krediti, Kontakt, Verifikacija, Uslovi...)
   Vrijedi samo unutar javnog layouta (main.site-main); admin se ne dira.
   ========================================================================== */

main.site-main .text-resort-color { color: var(--gold-text) !important; }
main.site-main .btn.bg-resort-color {
    background: var(--gold) !important;
    color: var(--ink) !important;
    border: 1px solid var(--gold);
    border-radius: var(--r-control);
    font-weight: 700;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
main.site-main .btn.bg-resort-color:hover { background: var(--gold-hover) !important; border-color: var(--gold-hover); }
main.site-main .btn-outline-resort-color {
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-control);
    font-weight: 700;
}
main.site-main .btn-outline-resort-color:hover, main.site-main .btn-outline-resort-color:focus { border-color: var(--ink); color: var(--ink); background: var(--surface); }
main.site-main .btn-lg { min-height: 54px; }

main.site-main .card { border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); height: auto; overflow: visible; }
main.site-main .card:hover { transform: none; }
main.site-main .listing-card:hover { transform: none; }

main.site-main .form-control, main.site-main .form-select {
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-control);
    min-height: 48px;
    font-weight: 500;
}
main.site-main .form-control-lg { min-height: 54px; font-size: 1rem; }
main.site-main .form-control:focus, main.site-main .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-soft); }
main.site-main textarea.form-control { min-height: 140px; }
main.site-main .form-label { font-weight: 700; font-size: .85rem; color: var(--ink); }

.content-page h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.25; }
.content-page h2 { font-size: 1.35rem; font-weight: 800; }
@media (min-width: 768px) { .content-page h1 { font-size: 2.3rem; } .content-page h2 { font-size: 1.7rem; } }
.content-page .lead { font-size: 1.05rem; line-height: 1.65; }

/* koraci */
.steps-list { counter-reset: step; }
.steps-list li {
    counter-increment: step;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    background: var(--surface-alt);
    border-radius: var(--r-control);
    margin-bottom: .6rem !important;
    line-height: 1.5;
}
.steps-list li > i { display: none; }
.steps-list li::before {
    content: counter(step);
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: .05rem;
}

/* paketi */
.pricing-card { padding: .5rem; }
.pricing-card .card-title { letter-spacing: .08em; color: var(--ink-soft); font-size: .9rem; }
.pricing-card .display-6 { font-size: 1.9rem; }
.pricing-card.featured { border: 2px solid var(--gold); box-shadow: var(--shadow-2); position: relative; }
.pricing-card.featured::before {
    content: "\F586"; /* bi-star-fill */
    font-family: "bootstrap-icons";
    position: absolute;
    top: -14px;
    inset-inline-end: 18px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* tabele */
.table-card { border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; overflow: hidden; }
.table-card .table { margin: 0; }
.table-card .table > :not(caption) > * > * { padding: .85rem 1rem; border-width: 0 0 1px; border-color: var(--line); }
.table-card .table thead th { background: var(--surface-alt); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.table-card .table tbody tr:last-child > * { border-bottom: 0; }
.table-card .table > :not(caption) > * > *:first-child { text-align: start; }

/* kontakt */
.contact-card .bg-warning.bg-opacity-25 { background: var(--gold-soft) !important; }
.contact-card .text-warning { color: var(--gold-text) !important; }

/* tekstualne stranice (privatnost, uslovi, verifikacija) */
.prose { max-width: 860px; margin-inline: auto; }
.prose h2 { font-weight: 800; margin-bottom: 1rem; }
.prose h5 { font-weight: 800; margin-top: 1.75rem; font-size: 1.1rem; }
.prose p, .prose li { line-height: 1.75; color: var(--text-body); }
.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose a { color: var(--gold-text); font-weight: 600; }

/* status stranice (greska, potvrde) */
.status-page { max-width: 520px; margin: 3rem auto; text-align: center; padding: 0 .5rem; }
.status-page h1 { font-size: 1.5rem; font-weight: 800; margin: 1.25rem 0 .6rem; }
.status-page p { color: var(--ink-soft); line-height: 1.6; margin-bottom: 1.5rem; }
.status-page p a { color: var(--gold-text); font-weight: 700; }
.status-icon { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-soft); color: var(--gold-text); font-size: 2.2rem; }
.status-icon.ok { background: #e3f4ea; color: #1c7a4b; }
.status-page .btn { margin-top: .75rem; min-width: 200px; }

/* koraci: broj je apsolutno pozicioniran, pa tekst i linkovi teku normalno u jednom bloku */
.steps-list li { display: block; position: relative; padding-inline-start: 3.2rem; min-height: 3rem; }
.steps-list li::before { position: absolute; inset-inline-start: .95rem; top: .9rem; margin-top: 0; }

/* desktop navigacija: "Postani domacin" se ne lomi u dva reda na uzim ekranima */
.site-nav .nav-end .btn, .site-nav .nav-link { white-space: nowrap; }
@media (max-width: 1199.98px) { .site-nav .nav-links .nav-link { padding-inline: .6rem; } .site-nav .nav-inner { gap: 1rem; } }

/* ==========================================================================
   Pocetna: popularne destinacije i istaknuti smjestaji
   ========================================================================== */
.home-section { margin: 0 0 1.75rem; }
.hs-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .85rem; }
.hs-head h2 { font-size: 1.2rem; font-weight: 800; margin: 0; }
@media (min-width: 768px) { .hs-head h2 { font-size: 1.45rem; } }

.rail {
    display: flex;
    gap: .85rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-inline: -12px;
    padding: .25rem 16px .5rem;
    scroll-padding-inline: 16px;
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .rail { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }

.dest-card {
    position: relative;
    flex: 0 0 auto;
    width: 150px;
    aspect-ratio: 3 / 4;
    border-radius: var(--r-card);
    overflow: hidden;
    scroll-snap-align: start;
    background: var(--surface-alt);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-1);
}
@media (min-width: 768px) { .dest-card { width: 200px; } }
.dest-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.dest-card:hover img { transform: scale(1.05); }
.dest-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 43, 53, .78) 0%, rgba(13, 43, 53, 0) 55%); }
.dest-info { position: absolute; inset-inline: 12px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; line-height: 1.25; }
.dest-info b { font-size: 1.02rem; font-weight: 800; }
.dest-info small { opacity: .88; font-weight: 600; font-size: .78rem; }
.dest-card:hover { color: #fff; }


/* plutajuce dugme Mapa/Lista pokazuje se tek kad je lista smjestaja na ekranu */
.map-fab { opacity: 0; pointer-events: none; transition: opacity .2s; }
.map-fab.show { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   TAMNA TEMA
   <html data-theme="dark"> postavlja rani skript + theme.js (svijetla / tamna / sistem).
   Tokeni se mijenjaju ovdje; ispod su samo komponente koje su "napunjene" tamnom
   bojom (fill) ili zlatom i zato trebaju obrnut tekst.
   ========================================================================== */
html[data-theme="dark"] {
    --ink: #e8eef0;
    --ink-soft: #9fb1b7;
    --gold-soft: rgba(203, 163, 50, .2);
    --gold-text: #e2c46a;
    --surface: #15262d;
    --surface-alt: #1d333c;
    --line: #27414b;
    --border-strong: #3b5661;
    --page: #0f1c22;
    --page-alt: #0b1519;
    --header-bg: rgba(15, 28, 34, .94);
    --footer-bg: #0a161b;
    --text-body: #cdd9dd;
    --hover: #24404a;
    --hover-soft: #1a2f37;
    --sk-a: #1d333c;
    --sk-b: #27414b;
    --sk-c: #203841;
    --fill: #e8eef0;
    --on-fill: #0d2b35;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .3);
    --shadow-2: 0 6px 24px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

/* "ink" popune (aktivna stanja) u tamnoj: svijetla popuna, tamni tekst */
html[data-theme="dark"] .btn-ink,
html[data-theme="dark"] .option-pill.active,
html[data-theme="dark"] .pagination .page-item.active .page-link,
html[data-theme="dark"] .chip.removable,
html[data-theme="dark"] .view-toggle button.active,
html[data-theme="dark"] .map-fab,
html[data-theme="dark"] .price-marker.active span,
html[data-theme="dark"] .rcal-day.start,
html[data-theme="dark"] .rcal-day.end,
html[data-theme="dark"] .pick input:checked + span,
html[data-theme="dark"] .msg-bubble.out,
html[data-theme="dark"] .steps-list li::before {
    background: var(--fill);
    border-color: var(--fill);
    color: var(--on-fill);
}
html[data-theme="dark"] .btn-ink:hover, html[data-theme="dark"] .btn-ink:focus { background: #ffffff; color: var(--on-fill); }
html[data-theme="dark"] .msg-bubble.out i { color: #b8912a; }
html[data-theme="dark"] .dg-count { background: rgba(0, 0, 0, .7); }

/* zlatne popune: tekst uvijek taman */
html[data-theme="dark"] .btn-brand,
html[data-theme="dark"] .btn-brand:hover,
html[data-theme="dark"] .btn-brand:focus,
html[data-theme="dark"] .search-pill .pill-btn.go,
html[data-theme="dark"] .chat-send,
html[data-theme="dark"] .chat-avatar,
html[data-theme="dark"] .badge-pill.gold,
html[data-theme="dark"] main.site-main .btn.bg-resort-color,
html[data-theme="dark"] .pricing-card.featured::before {
    color: var(--on-gold) !important;
}

/* kartice, polja, dijalozi */
html[data-theme="dark"] .badge-pill { background: rgba(21, 38, 45, .94); }
html[data-theme="dark"] .badge-pill.gold { background: var(--gold); }
html[data-theme="dark"] .search-pill { background: var(--surface); }
html[data-theme="dark"] .search-pill:focus-within { border-color: var(--ink-soft); }
html[data-theme="dark"] .fs-select, html[data-theme="dark"] .city-trigger { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .pick span, html[data-theme="dark"] .option-pill { background: var(--surface); }
html[data-theme="dark"] .pick input:checked + span, html[data-theme="dark"] .option-pill.active { background: var(--fill); }
html[data-theme="dark"] .rcal-day.mid { background: var(--gold-soft); }
html[data-theme="dark"] .rcal-day.past { color: #5d747d; }
html[data-theme="dark"] .status-icon.ok { background: rgba(28, 122, 75, .22); color: #6fd3a0; }
html[data-theme="dark"] .chat-note.ok { color: #6fd3a0; }
html[data-theme="dark"] .chat-note.err { color: #ff9a92; }
html[data-theme="dark"] .listing-media img { filter: brightness(.94); }
html[data-theme="dark"] .empty-state svg circle:first-child { fill: var(--surface-alt); }
html[data-theme="dark"] .empty-state svg path:first-of-type { fill: var(--surface); stroke: var(--ink); }
html[data-theme="dark"] .empty-state svg circle:nth-of-type(2) { fill: var(--surface); }
html[data-theme="dark"] .offcanvas, html[data-theme="dark"] .modal-content, html[data-theme="dark"] .dropdown-menu { background-color: var(--surface); color: var(--ink); }
html[data-theme="dark"] .offcanvas.sheet::before, html[data-theme="dark"] .offcanvas-bottom.sheet::before { background: #3b5661; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select { background-color: var(--surface); color: var(--ink); }
html[data-theme="dark"] .form-control::placeholder { color: var(--ink-soft); }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme="dark"] .text-muted { color: var(--ink-soft) !important; }
html[data-theme="dark"] .bg-white, html[data-theme="dark"] .bg-light { background-color: var(--surface) !important; }
html[data-theme="dark"] .text-dark { color: var(--ink) !important; }
html[data-theme="dark"] .table { --bs-table-color: var(--ink); --bs-table-bg: transparent; }
html[data-theme="dark"] .table-card .table thead th { background: var(--surface-alt); }

/* mapa: tamne plocice */
html[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.8); }
html[data-theme="dark"] .leaflet-container { background: #1b2a30; }
html[data-theme="dark"] .leaflet-popup-content-wrapper, html[data-theme="dark"] .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* ==========================================================================
   Prekidac teme (svijetla / tamna / sistem)
   ========================================================================== */
.theme-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--r-pill);
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}
.theme-switch button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .75;
    font-weight: 700;
    font-size: .8rem;
    padding: .4rem .8rem;
    border-radius: var(--r-pill);
    min-height: 34px;
    transition: background-color .15s, opacity .15s;
}
.theme-switch button:hover { opacity: 1; }
.theme-switch button[aria-pressed="true"] { opacity: 1; background: color-mix(in srgb, currentColor 18%, transparent); }
.theme-switch button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-switch-wrap { margin-top: .85rem; display: flex; justify-content: center; }
@media (max-width: 420px) { .theme-switch button span { display: none; } .theme-switch button { padding: .4rem .9rem; } }

/* "nema slike": neutralna siva s ikonom slike (kao Airbnb/Booking); u tamnoj temi se prilagodi invertiranjem */
html[data-theme="dark"] img[src*="no-image"],
html[data-theme="dark"] img[src*="no_image"] {
    filter: invert(1) contrast(.5) brightness(.9);
}

/* Bootstrap 5.3 varijable u tamnoj temi usklađene s nasim tokenima (kartice, tabele, tekst) */
html[data-theme="dark"] {
    --bs-body-bg: var(--page);
    --bs-body-color: var(--ink);
    --bs-emphasis-color: var(--ink);
    --bs-secondary-color: var(--ink-soft);
    --bs-secondary-bg: var(--surface-alt);
    --bs-tertiary-bg: var(--surface-alt);
    --bs-border-color: var(--line);
}
html[data-theme="dark"] .card {
    --bs-card-bg: var(--surface);
    --bs-card-color: var(--ink);
    --bs-card-border-color: var(--line);
    --bs-card-cap-bg: var(--surface-alt);
    background-color: var(--surface);
    color: var(--ink);
}
html[data-theme="dark"] main.site-main .contact-card { background-color: var(--surface); }
html[data-theme="dark"] .table-light { --bs-table-bg: var(--surface-alt); --bs-table-color: var(--ink); --bs-table-border-color: var(--line); }
html[data-theme="dark"] iframe[src*="google.com/maps"] { filter: invert(.92) hue-rotate(180deg) brightness(.95) contrast(.9); }
html[data-theme="dark"] hr { border-color: var(--line); opacity: 1; }
