/*
 * BSS Instagram Feed - storefront styles.
 * Everything is scoped under .bss-igf (feed) and .bss-igf-pop (popup) so the theme is never restyled.
 * Fonts, text colour and buttons follow the theme unless the Appearance page sets a --bss-igf-* variable.
 */

.bss-igf,
.bss-igf-pop {
    --bss-igf-ease: cubic-bezier(.16, 1, .3, 1);
    --bss-igf-ring: var(--bss-igf-accent, currentColor);
    box-sizing: border-box;
    font-family: var(--bss-igf-font, inherit);
    color: var(--bss-igf-text, inherit);
    /* Some themes centre their home page zones; the feed lays out its own alignment. */
    text-align: start;
}

.bss-igf *,
.bss-igf *::before,
.bss-igf *::after,
.bss-igf-pop *,
.bss-igf-pop *::before,
.bss-igf-pop *::after {
    box-sizing: inherit;
}

/* The popup itself is hidden with [hidden] too: without this its display:flex keeps an invisible
   full-screen layer over the page after closing, and nothing underneath can be clicked. */
.bss-igf[hidden],
.bss-igf-pop[hidden],
.bss-igf [hidden],
.bss-igf-pop [hidden] {
    display: none !important;
}

.bss-igf {
    container-type: inline-size;
    position: relative;
    width: 100%;
    margin: 2.5em 0;
    clear: both;
}

.bss-igf a {
    color: inherit;
}

.bss-igf-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.bss-igf__icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -.2em;
}

.bss-igf :focus-visible,
.bss-igf-pop :focus-visible {
    outline: 2px solid var(--bss-igf-ring);
    outline-offset: 2px;
}

/*
 * Width. Some themes render a widget zone full-width and expect widgets to bring their own container.
 * Auto: the script measures the theme's centered content containers and matches them (is-contained).
 * Fixed: the Appearance page's maximum width. Full width: no limit.
 */
.bss-igf.is-contained:not(.bss-igf--floating) {
    max-width: var(--bss-igf-auto-width);
    margin-left: auto;
    margin-right: auto;
}

.bss-igf--width-fixed:not(.bss-igf--floating) {
    max-width: min(var(--bss-igf-max-width, 1200px), calc(100% - 2rem));
    margin-left: auto;
    margin-right: auto;
}

/* Full width stretched past the theme's column: the posts go edge to edge, the title and buttons keep a margin. */
.bss-igf.is-full-bleed .bss-igf__header {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ---------- Header ---------- */

.bss-igf__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em 1.5em;
    flex-wrap: wrap;
    margin-bottom: 1.25em;
}

.bss-igf__identity {
    display: flex;
    align-items: center;
    gap: .9em;
    min-width: 0;
}

.bss-igf__avatar {
    flex: none;
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 2px;
    background: var(--bss-igf-accent-fill, var(--bss-igf-accent, currentColor));
}

.bss-igf__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bss-igf-popup-bg, #fff);
}

.bss-igf__heading {
    min-width: 0;
}

.bss-igf .bss-igf__title {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    text-wrap: balance;
}

/* Only when the Appearance page sets them; otherwise the theme's heading style applies. */
.bss-igf--title-size .bss-igf__title {
    font-size: var(--bss-igf-title-size);
}

.bss-igf--title-color .bss-igf__title {
    color: var(--bss-igf-title-color);
}

.bss-igf__meta {
    margin: .3em 0 0;
    font-size: .95em;
    opacity: .78;
}

.bss-igf__meta a {
    font-weight: 600;
    text-decoration: none;
}

.bss-igf__meta a:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.bss-igf__followers::before {
    content: "\00b7";
    margin: 0 .45em;
}

/* ---------- Buttons ---------- */

/*
 * Buttons. Custom mode: the Appearance colours (server-side variables). Theme mode: the script copies the
 * look of a real button of the theme on the same page into the same variables; without one, a neutral
 * outline button that follows the text colour.
 */
.bss-igf .bss-igf__btn,
.bss-igf-pop .bss-igf__btn {
    position: static;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    width: auto;
    max-width: 100%;
    min-height: 2.6em;
    margin: 0;
    padding: .6em 1.3em;
    border: 1px solid var(--bss-igf-btn-border, var(--bss-igf-btn-bg, currentColor));
    border-radius: var(--bss-igf-btn-radius, 4px);
    background: var(--bss-igf-btn-bg-fill, var(--bss-igf-btn-bg, transparent));
    color: var(--bss-igf-btn-text, inherit);
    font: inherit;
    font-weight: var(--bss-igf-btn-weight, 600);
    line-height: 1.2;
    text-transform: var(--bss-igf-btn-transform, none);
    letter-spacing: var(--bss-igf-btn-tracking, normal);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s var(--bss-igf-ease), color .2s var(--bss-igf-ease), border-color .2s var(--bss-igf-ease), filter .2s var(--bss-igf-ease);
}

.bss-igf .bss-igf__btn:hover,
.bss-igf .bss-igf__btn:focus-visible,
.bss-igf-pop .bss-igf__btn:hover,
.bss-igf-pop .bss-igf__btn:focus-visible {
    background: var(--bss-igf-btn-hover-bg-fill, var(--bss-igf-btn-hover-bg, var(--bss-igf-btn-text, currentColor)));
    color: var(--bss-igf-btn-hover-text, var(--bss-igf-btn-bg, #fff));
    border-color: var(--bss-igf-btn-hover-bg, var(--bss-igf-btn-border, currentColor));
}

/* Gradient button border: drawn by a masked layer on the 1px border, so it keeps the corner radius and works
   over any button background, including a transparent one. */
.bss-igf--btn-border-fill .bss-igf__btn,
.bss-igf-pop--btn-border-fill .bss-igf__btn {
    position: relative;
}

.bss-igf--btn-border-fill .bss-igf__btn,
.bss-igf--btn-border-fill .bss-igf__btn:hover,
.bss-igf--btn-border-fill .bss-igf__btn:focus-visible,
.bss-igf-pop--btn-border-fill .bss-igf__btn,
.bss-igf-pop--btn-border-fill .bss-igf__btn:hover,
.bss-igf-pop--btn-border-fill .bss-igf__btn:focus-visible {
    border-color: transparent;
}

.bss-igf--btn-border-fill .bss-igf__btn::before,
.bss-igf-pop--btn-border-fill .bss-igf__btn::before {
    content: "";
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    background: var(--bss-igf-btn-border-fill);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* A copied theme button has no known hover colour: darken it slightly instead. */
.bss-igf.is-theme-sampled .bss-igf__btn:hover,
.bss-igf.is-theme-sampled .bss-igf__btn:focus-visible,
.bss-igf-pop.is-theme-sampled .bss-igf__btn:hover,
.bss-igf-pop.is-theme-sampled .bss-igf__btn:focus-visible {
    background: var(--bss-igf-btn-bg);
    color: var(--bss-igf-btn-text);
    border-color: var(--bss-igf-btn-border, var(--bss-igf-btn-bg));
    filter: brightness(.9);
}

.bss-igf__btn--small {
    font-size: .875em;
}

.bss-igf .bss-igf__btn--small,
.bss-igf-pop .bss-igf__btn--small {
    min-height: 2.3em;
    padding: .45em .95em;
}

/* "View product": always a quiet outline next to the filled Add to cart buttons. */
.bss-igf-pop .bss-igf__btn--ghost,
.bss-igf-pop .bss-igf__btn--ghost:hover,
.bss-igf-pop .bss-igf__btn--ghost:focus-visible {
    border-color: currentColor;
    background: transparent;
    color: inherit;
    filter: none;
}

.bss-igf-pop .bss-igf__btn--ghost:hover {
    background: color-mix(in srgb, currentColor 8%, transparent);
}

/* ---------- Grid ---------- */

.bss-igf__grid {
    display: grid;
    grid-template-columns: repeat(var(--bss-igf-cols, 4), minmax(0, 1fr));
    gap: var(--bss-igf-gap, 8px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bss-igf__cell {
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.bss-igf__cell.is-collapsed {
    display: none;
}

.bss-igf__more {
    display: flex;
    justify-content: center;
    margin-top: 1.5em;
}

/* ---------- Tile ---------- */

.bss-igf__tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--bss-igf-radius, 0);
    aspect-ratio: 1 / 1;
    color: #fff;
    text-decoration: none;
    background: color-mix(in srgb, currentColor 8%, transparent);
    isolation: isolate;
}

.bss-igf--portrait34 .bss-igf__tile { aspect-ratio: 3 / 4; }
.bss-igf--portrait45 .bss-igf__tile { aspect-ratio: 4 / 5; }
.bss-igf--landscape43 .bss-igf__tile { aspect-ratio: 4 / 3; }
.bss-igf--story916 .bss-igf__tile { aspect-ratio: 9 / 16; }
.bss-igf--circle .bss-igf__tile { aspect-ratio: 1 / 1; border-radius: 50%; }

.bss-igf--loading-anim .bss-igf__tile:not(.is-loaded) {
    background: linear-gradient(100deg,
        color-mix(in srgb, currentColor 6%, transparent) 30%,
        color-mix(in srgb, currentColor 12%, transparent) 50%,
        color-mix(in srgb, currentColor 6%, transparent) 70%);
    background-size: 300% 100%;
    animation: bss-igf-shimmer 1.4s linear infinite;
}

@keyframes bss-igf-shimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

.bss-igf__media,
.bss-igf__img,
.bss-igf__video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.bss-igf__img,
.bss-igf__video {
    object-fit: cover;
    transition: transform .9s var(--bss-igf-ease), opacity .4s var(--bss-igf-ease);
}

.bss-igf--loading-anim .bss-igf__tile:not(.is-loaded) .bss-igf__img {
    opacity: 0;
}

.bss-igf__video {
    z-index: 1;
    opacity: 0;
}

.bss-igf__tile.is-playing .bss-igf__video,
.bss-igf__video--cover {
    opacity: 1;
}

a.bss-igf__tile:hover .bss-igf__img,
a.bss-igf__tile:focus-visible .bss-igf__img {
    transform: scale(1.04);
}

.bss-igf__badge {
    position: absolute;
    z-index: 2;
    top: .55em;
    right: .55em;
    display: flex;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
    pointer-events: none;
}

.bss-igf__tile.is-playing .bss-igf__badge {
    opacity: 0;
}

.bss-igf__overlay {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: 1em;
    background: color-mix(in srgb, var(--bss-igf-overlay, #000) calc(var(--bss-igf-overlay-opacity, .45) * 100%), transparent);
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity .3s var(--bss-igf-ease);
    pointer-events: none;
}

a.bss-igf__tile:hover .bss-igf__overlay,
a.bss-igf__tile:focus-visible .bss-igf__overlay {
    opacity: 1;
}

/* Gradient hover overlay: a layer behind the likes and caption, at the "Hover overlay strength". */
.bss-igf--overlay-fill .bss-igf__overlay {
    background: none;
}

.bss-igf--overlay-fill .bss-igf__overlay::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--bss-igf-overlay-fill);
    opacity: var(--bss-igf-overlay-opacity, .45);
}

.bss-igf__likes {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bss-igf__caption {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .85em;
    line-height: 1.45;
    max-width: 32ch;
}

/* ---------- Product markers ---------- */

.bss-igf__marker {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -50%);
    display: block;
    text-decoration: none;
}

.bss-igf__marker-dot {
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--bss-igf-marker-bg, #fff);
    color: var(--bss-igf-marker-text, #111);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    transition: transform .25s var(--bss-igf-ease);
}

.bss-igf__marker-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + .45rem);
    transform: translate(-50%, 4px);
    max-width: 14rem;
    width: max-content;
    padding: .35rem .6rem;
    border-radius: 4px;
    background: var(--bss-igf-marker-bg, #fff);
    color: var(--bss-igf-marker-text, #111);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--bss-igf-ease), transform .2s var(--bss-igf-ease);
}

.bss-igf__marker:hover .bss-igf__marker-dot,
.bss-igf__marker:focus-visible .bss-igf__marker-dot {
    transform: scale(1.12);
}

.bss-igf__marker:hover .bss-igf__marker-label,
.bss-igf__marker:focus-visible .bss-igf__marker-label,
.bss-igf__marker.is-open .bss-igf__marker-label {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Slider ---------- */

.bss-igf__slider {
    position: relative;
}

.bss-igf__swiper {
    overflow: hidden;
}

.bss-igf__slider:not(.is-ready) .swiper-wrapper {
    display: flex;
    gap: var(--bss-igf-gap, 8px);
    overflow: hidden;
}

.bss-igf__slider:not(.is-ready) .swiper-slide {
    flex: 0 0 calc((100% - (var(--bss-igf-visible, 4) - 1) * var(--bss-igf-gap, 8px)) / var(--bss-igf-visible, 4));
}

.bss-igf__arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bss-igf-arrow-bg, rgba(255, 255, 255, .92));
    color: var(--bss-igf-arrow, #111);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .18);
    transform: translateY(-50%);
    cursor: pointer;
    transition: opacity .2s var(--bss-igf-ease), transform .2s var(--bss-igf-ease);
}

.bss-igf__arrow:hover {
    transform: translateY(-50%) scale(1.06);
}

.bss-igf__arrow--prev { left: .75rem; }
.bss-igf__arrow--next { right: .75rem; }

.bss-igf__arrow.swiper-button-disabled,
.bss-igf__arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.bss-igf__dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1rem;
}

.bss-igf .bss-igf__dots .swiper-pagination-bullet {
    flex: none;
    width: .5rem;
    height: .5rem;
    margin: 0;
    border-radius: 50%;
    background: var(--bss-igf-dot, currentColor);
    opacity: .3;
    transition: opacity .2s var(--bss-igf-ease), transform .2s var(--bss-igf-ease);
}

.bss-igf .bss-igf__dots .swiper-pagination-bullet-active {
    background: var(--bss-igf-dot-active, var(--bss-igf-dot, currentColor));
    opacity: 1;
    transform: scale(1.25);
}

.bss-igf .bss-igf__dots.is-progress {
    position: relative;
    display: block;
    width: min(12rem, 60%);
    height: 3px;
    margin: 1.25rem auto 0;
    overflow: hidden;
    border-radius: 3px;
    background: color-mix(in srgb, var(--bss-igf-dot, currentColor) 18%, transparent);
}

.bss-igf .bss-igf__dots.is-progress .swiper-pagination-progressbar-fill {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    border-radius: inherit;
    background: var(--bss-igf-dot-active, var(--bss-igf-dot, currentColor));
}

[dir="rtl"] .bss-igf .bss-igf__dots.is-progress .swiper-pagination-progressbar-fill {
    transform-origin: right center;
}

/* ---------- Floating post ---------- */

.bss-igf--floating {
    position: fixed;
    z-index: 1040;
    right: 1rem;
    bottom: 1rem;
    width: min(15rem, calc(100vw - 2rem));
    margin: 0;
    container-type: normal;
}

.bss-igf--floating.bss-igf--left {
    right: auto;
    left: 1rem;
}

/* The feed's "Rounded corners (px)" shapes the floating card; capped so large values do not clip the
   minimise and close buttons. */
.bss-igf__floating {
    overflow: hidden;
    border-radius: min(var(--bss-igf-radius, 10px), 28px);
    background: var(--bss-igf-popup-bg, #fff);
    color: var(--bss-igf-popup-text, #111);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .08);
    animation: bss-igf-rise .6s var(--bss-igf-ease) both;
}

@keyframes bss-igf-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.bss-igf__floating-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .45rem .5rem .45rem .75rem;
    font-size: .85rem;
}

.bss-igf__floating-user {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

.bss-igf__floating-user span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bss-igf__floating-user .bss-igf__icon {
    flex: none;
}

.bss-igf__floating-actions {
    flex: none;
    display: flex;
    gap: .15rem;
}

.bss-igf__icon-btn {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.bss-igf__icon-btn:hover {
    background: color-mix(in srgb, currentColor 10%, transparent);
}

.bss-igf__floating .bss-igf__tile {
    border-radius: 0;
}

/* Circles: the image is a circle inside the card, with room around it so the card's edges do not clip it. */
.bss-igf--circle .bss-igf__floating-body {
    padding: 0 .75rem .75rem;
}

.bss-igf--circle .bss-igf__floating .bss-igf__tile {
    border-radius: 50%;
}

.bss-igf--floating.is-minimized .bss-igf__floating-body {
    display: none;
}

.bss-igf--floating.is-minimized [data-igf-minimize] .bss-igf__icon {
    transform: rotate(180deg);
}

/* Closed with "keep a small Instagram button": only the round launcher stays in the corner. */
.bss-igf--floating.is-launcher {
    width: auto;
}

.bss-igf--floating.is-launcher .bss-igf__floating {
    display: none;
}

.bss-igf__launcher {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bss-igf-popup-bg, #fff);
    color: var(--bss-igf-popup-text, #111);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .08);
    cursor: pointer;
    animation: bss-igf-rise .4s var(--bss-igf-ease) both;
}

.bss-igf__launcher .bss-igf__icon {
    width: 1.5rem;
    height: 1.5rem;
}

.bss-igf__launcher:hover {
    transform: scale(1.06);
}

/* ---------- Popup ---------- */

html.bss-igf-noscroll {
    overflow: hidden;
}

.bss-igf-pop {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 4.5rem;
    background: color-mix(in srgb, var(--bss-igf-backdrop, #000) calc(var(--bss-igf-backdrop-opacity, .75) * 100%), transparent);
    opacity: 0;
    transition: opacity .25s var(--bss-igf-ease);
}

.bss-igf-pop.is-open {
    opacity: 1;
}

.bss-igf-pop__dialog {
    position: relative;
    display: flex;
    width: min(66rem, 100%);
    max-height: min(46rem, 100%);
    overflow: hidden;
    border-radius: var(--bss-igf-popup-radius, 6px);
    background: var(--bss-igf-popup-bg, #fff);
    color: var(--bss-igf-popup-text, #111);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
    transform: translateY(12px) scale(.985);
    transition: transform .4s var(--bss-igf-ease);
}

.bss-igf-pop.is-open .bss-igf-pop__dialog {
    transform: none;
}

.bss-igf-pop__dialog > .bss-igf-pop__post {
    display: flex;
    width: 100%;
    min-height: 0;
}

.bss-igf-pop__status {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 22rem;
    padding: 2rem;
    text-align: center;
}

.bss-igf-pop__spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid color-mix(in srgb, currentColor 20%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: bss-igf-spin .8s linear infinite;
}

@keyframes bss-igf-spin {
    to { transform: rotate(360deg); }
}

.bss-igf-pop__close,
.bss-igf-pop__nav {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color .2s var(--bss-igf-ease);
}

.bss-igf-pop__close .bss-igf__icon,
.bss-igf-pop__nav .bss-igf__icon {
    width: 1.6rem;
    height: 1.6rem;
}

.bss-igf-pop__close:hover,
.bss-igf-pop__nav:hover {
    background: rgba(255, 255, 255, .14);
}

/* Add to cart result, shown inside the popup for a few seconds (nop's own bar sits under the backdrop). */
.bss-igf-pop__toast {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 1.5rem;
    max-width: min(28rem, calc(100% - 2rem));
    padding: .7rem 1rem .7rem 2.4rem;
    border-radius: 8px;
    background: #1f7a3d;
    color: #fff;
    font-size: .95rem;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.bss-igf-pop__toast::before {
    content: "";
    position: absolute;
    left: .95rem;
    top: 50%;
    width: .5rem;
    height: .85rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translate(0, -60%) rotate(45deg);
}

.bss-igf-pop__toast.is-error {
    background: #b42318;
}

.bss-igf-pop__toast.is-error::before {
    content: "!";
    width: auto;
    height: auto;
    border: 0;
    font-weight: 700;
    transform: translate(0, -50%);
}

.bss-igf-pop__toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.bss-igf-pop__close {
    top: .5rem;
    right: .5rem;
}

.bss-igf-pop__nav {
    top: 50%;
    transform: translateY(-50%);
}

.bss-igf-pop__nav--prev { left: .75rem; }
.bss-igf-pop__nav--next { right: .75rem; }

.bss-igf-pop__media {
    position: relative;
    flex: 1 1 60%;
    min-width: 0;
    background: #000;
}

.bss-igf-pop__slides {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.bss-igf-pop__slides::-webkit-scrollbar {
    display: none;
}

.bss-igf-pop__slide {
    position: relative;
    flex: 0 0 100%;
    display: grid;
    place-items: center;
    margin: 0;
    scroll-snap-align: center;
}

.bss-igf-pop__img,
.bss-igf-pop__video {
    display: block;
    max-width: 100%;
    max-height: min(46rem, calc(100vh - 5rem));
    width: auto;
    height: auto;
    object-fit: contain;
}

.bss-igf-pop__unavailable {
    color: #fff;
    padding: 2rem;
}

.bss-igf-pop__slide-nav {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bss-igf-arrow-bg, rgba(255, 255, 255, .9));
    color: var(--bss-igf-arrow, #111);
    transform: translateY(-50%);
    cursor: pointer;
}

.bss-igf-pop__slide-nav--prev { left: .6rem; }
.bss-igf-pop__slide-nav--next { right: .6rem; }

.bss-igf-pop__slide-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: .75rem;
    display: flex;
    justify-content: center;
    gap: .35rem;
    pointer-events: none;
}

.bss-igf-pop__slide-dot {
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: #fff;
    opacity: .45;
    transition: opacity .2s var(--bss-igf-ease);
}

.bss-igf-pop__slide-dot.is-active {
    opacity: 1;
}

.bss-igf-pop__side {
    display: flex;
    flex-direction: column;
    flex: 0 0 24rem;
    min-width: 0;
    max-height: inherit;
    border-left: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.bss-igf-pop__author {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1rem 3.25rem 1rem 1.25rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.bss-igf-pop__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.bss-igf-pop__username {
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.bss-igf-pop__username:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.bss-igf-pop__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.1rem 1.25rem 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, currentColor 25%, transparent) transparent;
}

.bss-igf-pop__caption {
    margin: 0 0 .9rem;
    font-size: .95rem;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.bss-igf-pop__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.25rem;
    font-size: .82rem;
    opacity: .7;
}

.bss-igf-pop__likes {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bss-igf-pop .bss-igf-pop__shop-title {
    position: static;
    margin: 0 0 .75rem;
    padding: 0;
    font-family: inherit;
    line-height: 1.3;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .75;
}

.bss-igf-pop__products {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bss-igf-pop__product {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    grid-template-areas: "img info" "img action";
    column-gap: .85rem;
    row-gap: .5rem;
    align-items: start;
    margin: 0;
    padding: 0 0 .75rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 8%, transparent);
    list-style: none;
}

.bss-igf-pop__product:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.bss-igf-pop__product-image {
    grid-area: img;
    position: relative;
    display: block;
    width: 4rem;
    height: 4rem;
}

.bss-igf-pop__product-image img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    background: color-mix(in srgb, currentColor 6%, transparent);
}

/* On the light popup the list numbers swap the marker colours, so they stay visible. */
.bss-igf-pop__product-image .bss-igf__marker-dot {
    position: absolute;
    z-index: 1;
    top: -.35rem;
    left: -.35rem;
    width: 1.3rem;
    height: 1.3rem;
    background: var(--bss-igf-marker-text, #111);
    color: var(--bss-igf-marker-bg, #fff);
    font-size: .68rem;
    box-shadow: 0 0 0 2px var(--bss-igf-popup-bg, #fff);
}

.bss-igf-pop__product-info {
    grid-area: info;
    min-width: 0;
}

.bss-igf-pop .bss-igf-pop__product-name {
    display: block;
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
    color: inherit;
    text-decoration: none;
}

.bss-igf-pop .bss-igf-pop__product-name:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.bss-igf-pop__rating {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .25rem;
    font-size: .78rem;
}

.bss-igf-pop__stars {
    --bss-igf-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4L2.8 9.5l6.4-.8z'/%3E%3C/svg%3E");
    position: relative;
    display: inline-block;
    width: 5.25rem;
    height: .95rem;
    background: color-mix(in srgb, currentColor 22%, transparent);
    -webkit-mask: var(--bss-igf-star) 0 0 / 1.05rem .95rem repeat-x;
    mask: var(--bss-igf-star) 0 0 / 1.05rem .95rem repeat-x;
}

.bss-igf-pop__stars::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--bss-igf-rating, 0%);
    background: var(--bss-igf-accent-fill, var(--bss-igf-accent, #f5a623));
}

.bss-igf-pop__reviews {
    opacity: .65;
    font-variant-numeric: tabular-nums;
}

.bss-igf-pop .bss-igf-pop__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .2rem .5rem;
    margin: .3rem 0 0;
    font-variant-numeric: tabular-nums;
}

.bss-igf-pop .bss-igf-pop__prices .price {
    margin: 0;
    padding: 0;
    font-size: .95rem;
}

.bss-igf-pop .bss-igf-pop__prices .actual-price {
    font-weight: 700;
    color: var(--bss-igf-price, inherit);
}

.bss-igf-pop .bss-igf-pop__prices .old-price {
    font-size: .85rem;
    text-decoration: line-through;
    color: var(--bss-igf-old-price, inherit);
    opacity: .6;
}

.bss-igf-pop__product > .bss-igf__btn {
    grid-area: action;
    justify-self: start;
}

.bss-igf-pop__categories {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 1rem 0 0;
}

.bss-igf-pop__chip {
    display: inline-block;
    padding: .3rem .7rem;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 999px;
    font-size: .8rem;
    color: inherit;
    text-decoration: none;
}

.bss-igf-pop__chip:hover {
    border-color: currentColor;
}

.bss-igf-pop__footer {
    padding: .85rem 1.25rem;
    border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.bss-igf-pop__ig-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .88rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.bss-igf-pop__ig-link:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.bss-igf-pop__post--minimal .bss-igf-pop__side {
    flex-basis: 20rem;
}

.bss-igf-pop ::selection {
    background: color-mix(in srgb, var(--bss-igf-accent, #3b82f6) 30%, transparent);
}

/* ---------- Mobile and narrow containers ---------- */

@media (max-width: 767px) {
    .bss-igf-pop {
        align-items: stretch;
        padding: 0;
    }

    .bss-igf-pop__dialog {
        width: 100%;
        max-height: none;
        border-radius: 0;
    }

    .bss-igf-pop__dialog > .bss-igf-pop__post {
        flex-direction: column;
        overflow-y: auto;
    }

    .bss-igf-pop__media {
        flex: none;
    }

    .bss-igf-pop__img,
    .bss-igf-pop__video {
        max-height: 62vh;
    }

    .bss-igf-pop__side {
        flex: 1 0 auto;
        max-height: none;
        border-left: 0;
    }

    .bss-igf-pop__scroll {
        overflow: visible;
    }

    .bss-igf-pop__close {
        top: .35rem;
        right: .35rem;
        background: rgba(0, 0, 0, .45);
    }

    /* Previous / next post sit at the bottom corners, on the panel, around the "View on Instagram" link. */
    .bss-igf-pop__nav {
        top: auto;
        bottom: .75rem;
        transform: none;
        background: var(--bss-igf-popup-bg, #fff);
        color: var(--bss-igf-popup-text, #111);
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--bss-igf-popup-text, #111) 14%, transparent), 0 4px 12px rgba(0, 0, 0, .12);
    }

    .bss-igf-pop__nav:hover {
        background: color-mix(in srgb, var(--bss-igf-popup-text, #111) 6%, var(--bss-igf-popup-bg, #fff));
    }

    .bss-igf-pop__footer {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 4.25rem;
        padding: .5rem 4.25rem;
        position: sticky;
        bottom: 0;
        z-index: 1;
        background: var(--bss-igf-popup-bg, #fff);
    }

    .bss-igf-pop__side:not(:has(.bss-igf-pop__footer)) {
        padding-bottom: 4.25rem;
    }

    .bss-igf-pop__nav--prev { left: .75rem; }
    .bss-igf-pop__nav--next { right: .75rem; }

    .bss-igf__arrow {
        width: 2.2rem;
        height: 2.2rem;
    }

    /* Phones: a small corner thumbnail rather than a card over a third of the screen. */
    .bss-igf--floating {
        right: .75rem;
        bottom: .75rem;
        width: min(8.5rem, 38vw);
    }

    .bss-igf--floating.bss-igf--left {
        left: .75rem;
    }

    .bss-igf__floating-bar {
        padding: .2rem .25rem .2rem .5rem;
        font-size: .75rem;
    }

    .bss-igf__floating .bss-igf__icon-btn {
        width: 1.75rem;
        height: 1.75rem;
    }

    /* Too narrow for the name: the Instagram icon stays, the name stays readable to screen readers. */
    .bss-igf__floating-user span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@container (max-width: 560px) {
    .bss-igf__header {
        align-items: flex-start;
    }

    .bss-igf__avatar {
        width: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bss-igf *,
    .bss-igf-pop,
    .bss-igf-pop * {
        animation: none !important;
        transition: none !important;
    }
}
