/* Site FAB — star / speed-dial at bottom of storefront */
.site-fab {
    --site-fab-size: 3.5rem;
    --site-fab-item: 3rem;
    position: fixed;
    z-index: 60;
    left: 0.85rem;
    bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px));
    width: var(--site-fab-size);
    height: var(--site-fab-size);
    pointer-events: none;
}

@media (min-width: 1024px) {
    .site-fab {
        left: 1.25rem;
        bottom: 1.75rem;
    }
}

.site-fab__backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: hsl(var(--text) / 0.28);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.site-fab.is-open .site-fab__backdrop {
    opacity: 1;
    pointer-events: auto;
}

.site-fab__stage {
    position: relative;
    width: var(--site-fab-size);
    height: var(--site-fab-size);
    pointer-events: none;
}

.site-fab__panel {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.site-fab__list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
}

.site-fab__item {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--site-fab-item);
    height: var(--site-fab-item);
    margin: calc(var(--site-fab-item) / -2) 0 0 calc(var(--site-fab-item) / -2);
    opacity: 0;
    transform: translate(0, 0) scale(0.35);
    transition:
        opacity 0.22s ease,
        transform 0.28s cubic-bezier(0.22, 1.2, 0.36, 1);
    pointer-events: none;
}

.site-fab.is-open .site-fab__item {
    opacity: 1;
    transform: translate(var(--fab-x, 0), var(--fab-y, 0)) scale(1);
    pointer-events: auto;
}

.site-fab__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.site-fab__label {
    position: absolute;
    right: calc(100% + 0.45rem);
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--text));
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px hsl(var(--text) / 0.12);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.site-fab.is-open .site-fab__label {
    opacity: 1;
}

.site-fab__icon,
.site-fab__fallback {
    width: var(--site-fab-item);
    height: var(--site-fab-item);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--text));
    box-shadow: 0 10px 24px hsl(var(--text) / 0.16);
    overflow: hidden;
    transition: transform 0.18s ease;
}

.dark .site-fab__icon,
.dark .site-fab__fallback {
    background: hsl(var(--muted));
}

.site-fab__icon-img {
    width: 1.55rem;
    height: 1.55rem;
    object-fit: contain;
    display: block;
}

.site-fab__fallback {
    font-size: 0.95rem;
    font-weight: 800;
    background: hsl(var(--primary-btn));
    color: #fff;
    border-color: transparent;
}

.site-fab__action:hover .site-fab__icon,
.site-fab__action:focus-visible .site-fab__icon {
    transform: scale(1.08);
}

.site-fab__toggle {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    width: var(--site-fab-size);
    height: var(--site-fab-size);
    border: 0;
    border-radius: 999px;
    background: hsl(var(--primary-btn));
    color: #fff;
    cursor: pointer;
    box-shadow:
        0 12px 28px hsl(var(--primary) / 0.38),
        0 2px 8px hsl(var(--text) / 0.12);
    transition: transform 0.22s ease, background-color 0.2s ease, box-shadow 0.22s ease;
}

.site-fab__toggle:hover,
.site-fab__toggle:focus-visible {
    transform: scale(1.06);
    outline: none;
}

.site-fab.is-open .site-fab__toggle {
    background: hsl(var(--text));
    box-shadow: 0 10px 24px hsl(var(--text) / 0.22);
}

.site-fab__toggle-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.site-fab__toggle-icon svg {
    width: 1.55rem;
    height: 1.55rem;
    display: block;
}

.site-fab__toggle-icon--close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.7);
}

.site-fab.is-open .site-fab__toggle-icon--open {
    opacity: 0;
    transform: rotate(90deg) scale(0.7);
}

.site-fab.is-open .site-fab__toggle-icon--close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .site-fab__item,
    .site-fab__toggle,
    .site-fab__toggle-icon,
    .site-fab__backdrop,
    .site-fab__icon {
        transition: none;
    }
}
