/* ===== 2. Stories (special offers) ===== */
.hm-stories { padding-block: clamp(32px, 4vw, 56px); }
.hm-stories__head { display: none; }

/* ---------- Rail of round thumbnails ---------- */
.hm-stories__rail { display: flex; align-items: center; gap: 16px; }
.hm-stories__slider { flex: 1 1 auto; min-width: 0; }
.hm-stories__list { margin: 0; padding: 0; list-style: none; }
.hm-stories__item { width: 168px; height: auto; flex-shrink: 0; }
.hm-stories--fits .hm-stories__list { justify-content: center; }

.hm-stories__open {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 4px 4px 2px;
    border: 0;
    background: none;
    color: inherit;
    text-align: center;
    cursor: pointer;
}
.hm-stories__ring {
    --_size: 76px;
    display: block;
    width: var(--_size);
    height: var(--_size);
    padding: 3px;
    border: 1.5px solid var(--hm-c-accent-2);
    border-radius: 50%;
    transition: border-color var(--hm-dur) var(--hm-ease), transform var(--hm-dur) var(--hm-ease);
}
.hm-stories__thumb {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
    transition: transform .6s var(--hm-ease);
}
.hm-stories__ring { overflow: hidden; }
.hm-stories__open:hover .hm-stories__ring { border-color: var(--hm-c-accent); }
.hm-stories__open:hover .hm-stories__thumb { transform: scale(1.08); }
.hm-stories__item.is-seen .hm-stories__ring { border-color: var(--hm-c-line); }
.hm-stories__name { margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.hm-stories__caption { max-width: 150px; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--hm-c-muted); }

.hm-stories__prev, .hm-stories__next { --_size: 40px; flex: none; background: rgba(0, 0, 0, .3); }
.hm-stories__prev:hover, .hm-stories__next:hover { background: rgba(0, 0, 0, .5); }
.hm-stories__rail .swiper-button-lock { display: none; }
.hm-stories--static .hm-stories__prev, .hm-stories--static .hm-stories__next { display: none; }

.hm-stories__dots { display: none; }

/* Without Swiper: native horizontal scroll-snap */
.hm-stories__slider:not(.swiper-initialized) .hm-stories__list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.hm-stories__slider:not(.swiper-initialized) .hm-stories__item { scroll-snap-align: start; }

/* ---------- Fullscreen viewer (generated by block.js inside the root) ---------- */
.hm-stories__viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    color: #fff;
    opacity: 0;
    transition: opacity .3s var(--hm-ease);
}
.hm-stories__viewer[hidden] { display: none; }
.hm-stories__viewer.is-open { opacity: 1; }
.hm-stories__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 17, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.hm-stories__stage { position: relative; display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.hm-stories__frame {
    position: relative;
    display: grid;
    gap: 14px;
    transform: scale(.94);
    transition: transform .4s var(--hm-ease);
}
.hm-stories__viewer.is-open .hm-stories__frame { transform: none; }

.hm-stories__card {
    position: relative;
    height: min(76svh, 680px);
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.hm-stories__media { position: absolute; inset: 0; }
.hm-stories__media img, .hm-stories__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus, 50% 50%);
    pointer-events: none;
    animation: hm-stories-in .5s var(--hm-ease);
}
@keyframes hm-stories-in { from { opacity: .2; transform: scale(1.03); } }
.hm-stories__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, .62) 100%);
}

.hm-stories__top { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 12px 0; transition: opacity .25s; }
.hm-stories__bars { flex: 1; display: flex; gap: 4px; }
.hm-stories__bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.hm-stories__bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.hm-stories__bar.is-done i { transform: scaleX(1); }
.hm-stories__pause {
    position: relative;
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    cursor: pointer;
}
.hm-stories__pause::before, .hm-stories__pause::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 3px;
    height: 12px;
    border-radius: 1px;
    background: currentColor;
}
.hm-stories__pause::before { left: 9px; }
.hm-stories__pause::after { left: 16px; }
.hm-stories__pause[aria-pressed="true"]::before {
    left: 10px;
    width: 0;
    height: 0;
    border-radius: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent currentColor;
    background: none;
}
.hm-stories__pause[aria-pressed="true"]::after { display: none; }

.hm-stories__info { position: absolute; inset: auto 0 0; z-index: 2; padding: 22px 20px; pointer-events: none; transition: opacity .25s; }
.hm-stories__info-title { margin: 0; font-family: var(--hm-font-head); font-size: 22px; font-weight: var(--hm-head-weight); line-height: 1.15; }
.hm-stories__info-text { margin: 6px 0 0; font-size: 14px; line-height: 1.45; opacity: .88; }
.hm-stories__info-text:empty { display: none; }
.hm-stories__card.is-holding .hm-stories__top,
.hm-stories__card.is-holding .hm-stories__info { opacity: 0; }

.hm-stories__tap { position: absolute; top: 48px; bottom: 0; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; }
.hm-stories__tap--prev { left: 0; width: 35%; }
.hm-stories__tap--next { right: 0; width: 65%; }
.hm-stories__tap:focus-visible { outline-offset: -4px; }

.hm-stories__cta { justify-content: space-between; min-height: 46px; padding-inline: 24px 18px; background: var(--hm-c-accent-2); border-color: var(--hm-c-accent-2); }
.hm-stories__cta::after {
    content: "";
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg);
}
.hm-stories__cta[hidden] { display: none; }

.hm-stories__close {
    position: absolute;
    top: -42px;
    right: -6px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1.5px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: none;
    color: #fff;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}
.hm-stories__close::before, .hm-stories__close::after { content: ""; position: absolute; width: 13px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.hm-stories__close::after { transform: rotate(-45deg); }
.hm-stories__close:hover { background: #fff; color: #111; }

.hm-stories__step { --_size: 46px; flex: none; background: rgba(255, 255, 255, .14); }
.hm-stories__step:hover { background: rgba(255, 255, 255, .28); }

@media (max-width: 767px) {
    .hm-stories__rail { display: block; }
    .hm-stories__prev, .hm-stories__next { display: none; }
    .hm-stories__item { width: 42%; max-width: 170px; }
    .hm-stories__dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }
    .hm-stories__dots .swiper-pagination-bullet { margin: 0 !important; background: var(--hm-c-text); }
    .hm-stories__dots .swiper-pagination-bullet-active { background: var(--hm-c-accent); opacity: 1; }
    .hm-stories__dots.swiper-pagination-lock { display: none; }

    .hm-stories__stage { width: 100%; height: 100%; }
    .hm-stories__step { display: none; }
    .hm-stories__frame {
        width: 100%;
        height: 100%;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 12px;
        padding: max(8px, env(safe-area-inset-top)) 8px max(12px, env(safe-area-inset-bottom));
    }
    .hm-stories__card { width: 100%; height: auto; aspect-ratio: auto; border-radius: 12px; }
    .hm-stories__top { padding-right: 52px; }
    .hm-stories__close { top: calc(max(8px, env(safe-area-inset-top)) + 9px); right: 16px; border-color: transparent; }
    .hm-stories__close::before, .hm-stories__close::after { width: 18px; height: 2px; }
    .hm-stories__cta { margin-inline: 4px; }
}
