/*
 * InstaCatalog ("Shop the look") for the Empora theme: the lifestyle page (/Instalooks/list).
 * Tokens come from the theme's empora.css (:root). Mobile first; breakpoints only 768px and 1280px; logical properties.
 * Markup: Themes/Empora/Views/_EmporaLooks.cshtml. The picture and its hotspots are never mirrored (the rtl file only
 * restores the popover's text direction).
 */

/* intro: mark, eyebrow, h1, text (start aligned on phone, centred from 768px) */
.lifestyle .intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 32px var(--m) 24px;
    text-align: start;
}

.lifestyle .intro img {
    width: 52px;
    height: auto;
}

.lifestyle .intro h1 {
    margin: 0;
    font-size: 36px;
    line-height: 1;
    color: var(--plum);
}

.lifestyle .intro p {
    margin: 0;
    max-width: 520px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

/* stories: one column on phone, two from 768px */
.lifestyle .stories {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}

.lifestyle .story {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.lifestyle .story .im {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--sand);
    /* the photo is not mirrored in RTL, so the hotspot coordinates stay physical */
    direction: ltr;
}

.lifestyle .story .im > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lifestyle .story figcaption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-inline: var(--m);
}

.lifestyle .story .cap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lifestyle .story .t {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--plum);
}

.lifestyle .story .d {
    font-size: 14px;
    line-height: 21px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.lifestyle .story figcaption .u {
    flex: none;
    padding-block: 12px;
    font-size: 13px;
    white-space: nowrap;
}

/* hotspots: a 44px target with a 26px ivory dot and a plus; the popover opens above it */
.lifestyle .hotspot {
    position: absolute;
    z-index: 2;
    width: 0;
    height: 0;
}

.lifestyle .hot {
    position: absolute;
    inset-block-start: -22px;
    inset-inline-start: -22px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.lifestyle .hot::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background:
        linear-gradient(var(--plum), var(--plum)) center / 10px 1.5px no-repeat,
        linear-gradient(var(--plum), var(--plum)) center / 1.5px 10px no-repeat,
        var(--ivory);
    box-shadow: 0 0 0 1px var(--line);
    transition: transform .2s ease;
}

.lifestyle .hot[aria-expanded="true"]::before {
    transform: rotate(45deg);
}

.lifestyle .hot-pop {
    position: absolute;
    inset-block-end: 26px;
    inset-inline-start: -90px;
    width: 180px;
    padding: 10px 12px;
    background: var(--ivory);
    border: 1px solid var(--line);
    box-shadow: 0 6px 18px var(--scrim);
    text-align: start;
}

.lifestyle .hot-pop[hidden] {
    display: none;
}

.lifestyle .hotspot.at-start .hot-pop {
    inset-inline-start: -22px;
}

.lifestyle .hotspot.at-end .hot-pop {
    inset-inline-start: auto;
    inset-inline-end: -22px;
}

.lifestyle .hot-pop a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--ink);
}

.lifestyle .hp-name {
    font-size: 14px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.lifestyle .hp-price {
    font-size: 13px;
    color: var(--plum);
    font-weight: 500;
}

/* products of every look, as a rail of cards under the stories */
.lifestyle .looks-shop {
    gap: 28px;
}

.lifestyle .look-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-margin-block-start: calc(var(--hdr-h) + 12px);
}

.lifestyle .look-products h3 {
    margin: 0;
    padding-inline: var(--m);
    font-size: 22px;
    line-height: 1.1;
    color: var(--plum);
}

@media (min-width: 768px) {
    .lifestyle .intro {
        align-items: center;
        gap: 10px;
        padding: 56px var(--m) 40px;
        text-align: center;
    }

    .lifestyle .intro h1 {
        font-size: 56px;
    }

    .lifestyle .intro p {
        font-size: 16px;
    }

    .lifestyle .stories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 48px 2px;
    }

    .lifestyle .story figcaption {
        padding-inline: 8px;
    }

    .lifestyle .story .t {
        font-size: 24px;
    }
}
