/* listing.css — shell layout (mobile-first content; desktop grid from md+)
   Owns the page grid so Listing.razor does not depend on explore.css. */

.lst-page {
    width: 100%;
    max-width: 130rem;
    margin: 0 auto;
    padding: 2.754rem 1.836rem 6.12rem;
    /* visible: overflow:hidden clipped listing body on desktop (BUG-002 / PEND-010). */
    overflow: visible;
}

.lst-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 1.6rem;
    align-items: start;
    min-width: 0;
}

.lst-main {
    grid-column: 1 / 13;
    min-width: 0;
    overflow: visible;
    padding: 1.75rem 1rem 5rem;
    font-family: var(--font-heading);
    color: var(--antologa-dark);
}

/* Overview + booking: single column by default; two-col from md */
.lst-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
    min-width: 0;
}

.lst-intro__main,
.lst-intro__aside {
    min-width: 0;
}

.lst-intro__aside {
    display: none; /* bottom bar on small screens */
}

.lst-body {
    display: block;
    margin-bottom: 2.5rem;
    min-width: 0;
}

.lst-content {
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.lst-booking-sticky {
    position: static;
}

.lst-section {
    scroll-margin-top: 4rem;
}

/* ── Mobile booking bottom bar — sits ABOVE site bottom nav ─────────────── */
.lst-mobile-bar {
    display: flex;
    position: fixed;
    bottom: var(--bottom-chrome, 0px);
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--antologa-paper);
    border-top: 1px solid var(--antologa-light-gray);
    padding: 0.75rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 -4px 16px color-mix(in srgb, var(--antologa-dark) 10%, transparent);
}

/* When this bar is in the layout tree on small screens, reserve its height
   on :root via body:has so cookie/help/chrome offsets stay in sync. */
body:has(.lst-mobile-bar) {
    --lst-mobile-bar-height: 4.25rem;
}

@media (min-width: 961px) {
    body:has(.lst-mobile-bar) {
        --lst-mobile-bar-height: 0px;
    }
}

.lst-mobile-bar__info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.lst-mobile-bar__price {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--antologa-heading-ink);
    line-height: 1;
}

.lst-mobile-bar__rating {
    font-size: 0.75rem;
    color: var(--antologa-gray);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lst-mobile-bar__star {
    color: var(--antologa-contrast) !important;
}

.lst-mobile-bar__btn {
    flex-shrink: 0;
    height: 2.75rem !important;
    min-width: 5.5rem !important;
    background: var(--antologa-primary) !important;
    color: var(--antologa-white) !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    padding: 0 1.5rem !important;
}

@media (hover: hover) {
    .lst-mobile-bar__btn:hover {
        background: var(--antologa-secondary) !important;
    }
}

/* Clear both the book bar and the site bottom nav */
.lst-main {
    padding-bottom: calc(var(--bottom-chrome-with-listing, 6rem) + 1.5rem);
}

/* ── md+: sidebar booking card, hide mobile bar ─────────────────────────── */
@media (min-width: 961px) {
    .lst-intro {
        grid-template-columns: 1fr 20rem;
        gap: 1.5rem;
    }

    .lst-intro__aside {
        display: block;
    }

    .lst-booking-sticky {
        position: sticky;
        top: 1.5rem;
    }

    .lst-mobile-bar {
        display: none;
    }

    .lst-main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 5rem;
    }
}

@media (max-width: 960px) {
    .lst-page {
        padding: 2.4rem 1.6rem 5rem;
    }
}

@media (max-width: 600px) {
    .lst-page {
        padding: 1.6rem 1rem 4rem;
    }
}

@media (min-width: 1101px) {
    .lst-main {
        grid-column: 3 / 11;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 1281px) {
    .lst-intro {
        grid-template-columns: 1fr 22.5rem;
        gap: 2rem;
    }
}

/* ── Travelin-style page entrance (staggered fadeUp) ─────────────────────── */
.lst-enter {
    animation: fadeUp var(--timing-standard) var(--ease-smooth) both;
}

.lst-enter--0 { animation-delay: 0ms; }
.lst-enter--1 { animation-delay: 60ms; }
.lst-enter--2 { animation-delay: 120ms; }
.lst-enter--3 { animation-delay: 180ms; }
.lst-enter--4 { animation-delay: 240ms; }
.lst-enter--5 { animation-delay: 300ms; }

/* Shared-element target for card → detail photo morph (View Transitions API) */
.lst-hero-vt {
    view-transition-name: listing-hero;
}

::view-transition-old(listing-hero),
::view-transition-new(listing-hero) {
    animation-duration: 0.45s;
    animation-timing-function: var(--ease-bounce);
    height: 100%;
    object-fit: cover;
    overflow: clip;
}

::view-transition-group(listing-hero) {
    animation-duration: 0.45s;
    animation-timing-function: var(--ease-bounce);
}

@media (prefers-reduced-motion: reduce) {
    .lst-enter {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .lst-hero-vt {
        view-transition-name: none;
    }
}
