/* Storefront (/biz/{slug}/menu, /shop, /product, /catalog, /service) */

.storefront-page {
    --sf-ink: #0b0b0b;
    --sf-muted: #898989;
    --sf-line: #ececec;
    --sf-bg: #f5f5f5;
    --sf-yellow: var(--color-secondary, #ffc107);
    background: var(--sf-bg);
}

.sf-wrap {
    max-width: 1248px;
    margin: 0 auto;
    padding: 0 16px;
}

.sf svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.sf {
    padding-top: 24px;
}

.sf-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
}

.sf-box__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.sf-box__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--sf-ink);
}

.sf-box__title small {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--sf-muted);
}

.sf-link {
    border: 0;
    background: none;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--sf-muted);
    cursor: pointer;
}

.sf-link:hover {
    color: var(--sf-ink);
}

.sf-link.is-armed {
    color: #dc2626;
    font-weight: 600;
}

.sf-co-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--sf-ink);
    border-radius: 9999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--sf-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.sf-co-edit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sf-co-edit:hover {
    background: var(--sf-ink);
    color: #fff;
}

.sf-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--sf-ink);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: var(--sf-ink);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.sf-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--sf-yellow);
    font-size: 15px;
    font-weight: 700;
    color: var(--sf-ink);
    text-decoration: none;
    cursor: pointer;
}

.sf-btn-primary:disabled,
.sf-btn-primary.is-disabled {
    opacity: .5;
    pointer-events: none;
}

/* ── Cover and header card ── */

.sf-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 1216 / 476;
    background: #eee;
}

.sf-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-hero__fabs {
    display: none;
}

.sf-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--sf-ink);
    cursor: pointer;
}

.sf-head {
    margin-top: 20px;
    padding-bottom: 22px;
    border-radius: 16px 16px 0 0;
}

.sf-head__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sf-head__id {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.sf-head__logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--sf-line);
    flex-shrink: 0;
}

.sf-head__text {
    min-width: 0;
}

.sf-head__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -1px;
    color: var(--sf-ink);
}

.sf-head__name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font-size: 14px;
}

.sf-head__addr {
    color: var(--sf-muted);
}

.sf-head__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--sf-ink);
    text-decoration: none;
}

.sf-head__reviews {
    margin-left: 6px;
}

.sf-head__bar {
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--sf-line);
    padding: 14px 24px;
    background: #fff;
    border-radius: 0 0 16px 16px;
}

/* The tab bar: under the site header while the page scrolls */
.sf-stickybar {
    position: sticky;
    top: var(--sf-header-h, 80px);
    z-index: 40;
}

.sf-stickybar.is-stuck {
    border-radius: 0;
    border-bottom: 1px solid var(--sf-line);
}

.sf-tabs {
    position: relative;
    flex: 1;
    min-width: 0;
}

.sf-tabs__nav {
    display: flex;
    gap: 26px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-right: 40px;
}

.sf-tabs__nav::-webkit-scrollbar {
    display: none;
}

.sf-tabs__nav a {
    position: relative;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--sf-ink);
    text-decoration: none;
    white-space: nowrap;
}

.sf-tabs__nav a.is-active {
    font-weight: 700;
}

.sf-tabs__nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--sf-yellow);
}

.sf-tabs__more {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--sf-line);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 8px #fff;
    color: var(--sf-ink);
    cursor: pointer;
    z-index: 1;
}

.sf-tabs__more--prev {
    right: auto;
    left: 0;
}

.sf-tabs__more[hidden] {
    display: none;
}

.sf-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 260px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--sf-line);
    border-radius: 9999px;
    color: var(--sf-muted);
}

.sf-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-search__results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 320px;
    width: max-content;
    max-width: 380px;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #fff;
}

.sf-search__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    color: var(--sf-ink);
    text-decoration: none;
    white-space: nowrap;
}

.sf-search__item:hover {
    background: #f6f6f6;
}

.sf-search__item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.sf-search__item small {
    display: block;
    color: var(--sf-muted);
}

.sf-search__none {
    margin: 0;
    padding: 10px;
    font-size: 14px;
    color: var(--sf-muted);
}

/* ── Two columns ── */

.sf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
    margin: 20px 0 48px;
}

.sf-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Deals */

.sf-deals__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sf-deal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    color: var(--sf-ink);
    cursor: pointer;
}

.sf-deal strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.sf-deal small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--sf-muted);
}

/* Product grid and cards */

.sf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 16px;
}

.sf-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sf-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f1f1;
    cursor: pointer;
}

.sf-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .6);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.sf-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.sf-card__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--sf-ink);
}

.sf-card__add {
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--sf-ink);
    cursor: pointer;
}

.sf-card__add:hover {
    border-color: var(--sf-ink);
}

.sf-card__add.is-added {
    border-color: var(--sf-ink);
    background: var(--sf-ink);
    color: #fff;
}

.sf-card__old {
    margin-top: 4px;
    font-size: 12px;
    color: var(--sf-muted);
}

.sf-card__name {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    color: var(--sf-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.sf-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-ink);
    text-decoration: none;
    white-space: nowrap;
}

.sf-more svg {
    width: 16px;
    height: 16px;
}

.sf-sort {
    min-width: 175px;
    width: max-content;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--sf-line);
    border-radius: 9999px;
    background: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.sf-empty {
    margin: 0;
    font-size: 14px;
    color: var(--sf-muted);
}

/* ── Cart ── */

.sf-cart {
    position: sticky;
    top: calc(var(--sf-header-h, 80px) + var(--sf-bar-h, 72px) + 16px);
}

.sf-cart__panel {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--sf-header-h, 80px) - var(--sf-bar-h, 72px) - 32px);
    overflow-y: auto;
}

.sf-cart__close {
    display: none;
}

.sf-cart__items {
    display: flex;
    flex-direction: column;
}

.sf-cart__empty {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--sf-muted);
}

.sf-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--sf-line);
}

.sf-cart-item:first-child {
    padding-top: 0;
}

.sf-cart-item__img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f1f1;
    flex-shrink: 0;
}

.sf-cart-item__info {
    flex: 1;
    min-width: 0;
}

.sf-cart-item__name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-cart-item__variant {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--sf-muted);
}

.sf-cart-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.sf-cart-item__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--sf-ink);
}

.sf-cart-item__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--sf-line);
    border-radius: 50%;
    background: #fff;
    color: var(--sf-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.sf-cart-item__remove svg {
    width: 16px;
    height: 16px;
}

.sf-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sf-line);
    border-radius: 9999px;
}

.sf-qty button {
    width: 30px;
    height: 30px;
    border: 0;
    background: none;
    font-size: 16px;
    color: var(--sf-muted);
    cursor: pointer;
}

.sf-qty span {
    min-width: 22px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.sf-fulfil {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 9999px;
    background: #f3f3f3;
}

.sf-fulfil[hidden] {
    display: none;
}

.sf-fulfil button {
    flex: 1;
    height: 34px;
    border: 0;
    border-radius: 9999px;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-muted);
    cursor: pointer;
}

.sf-fulfil button:focus:not(:focus-visible) {
    outline: none;
}

.sf-fulfil button:focus-visible {
    outline: 2px solid var(--sf-ink);
    outline-offset: 1px;
}

.sf-fulfil button.is-active {
    background: #fff;
    color: var(--sf-ink);
}

.sf-cart__foot {
    margin-top: 16px;
}

.sf-coupon {
    display: flex;
    gap: 8px;
}

.sf-coupon input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--sf-line);
    border-radius: 9999px;
    font-size: 14px;
    text-transform: uppercase;
}

.sf-coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px dashed var(--sf-ink);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.sf-cart__msg {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-cart__msg.is-error {
    color: #d93025;
}

.sf-totals {
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--sf-line);
}

.sf-totals div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-totals dt {
    font-weight: 500;
}

.sf-totals dd {
    margin: 0;
    font-weight: 600;
}

.sf-totals .sf-totals__grand {
    padding-top: 8px;
    font-size: 16px;
    font-weight: 700;
}

.sf-totals__grand dt,
.sf-totals__grand dd {
    font-weight: 700;
}

.sf-cart__note {
    margin: 20px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--sf-muted);
}

.sf-cartbar,
.sf-cart-backdrop {
    display: none;
}

/* ── Product popup ── */

/* The panel's size (the arbitrary Tailwind sizes on it aren't in the compiled core CSS) */
.sf-modal__panel {
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
}

[data-sf-modal] {
    z-index: 120;
}

[data-sf-modal] .listing-about-modal__backdrop {
    background: rgba(0, 0, 0, .5);
}

@media (min-width: 640px) {
    .sf-modal__panel {
        max-width: 560px;
        max-height: min(865px, 90vh);
        border-radius: 30px;
    }
}

.sf-item__title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -1px;
    color: var(--sf-ink);
}

.sf-item__desc {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--sf-muted);
    white-space: pre-line;
}

.sf-item__media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f1f1f1;
}

.sf-item__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.sf-item__track::-webkit-scrollbar {
    display: none;
}

.sf-item__track img {
    flex: 0 0 100%;
    width: 100%;
    height: 320px;
    object-fit: cover;
    scroll-snap-align: start;
}

.sf-item__count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .6);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.sf-item__count[hidden],
.sf-item__thumbs[hidden] {
    display: none;
}

.sf-item__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sf-item__thumbs button {
    flex: 0 0 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--sf-line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.sf-item__thumbs button.is-active {
    border-color: var(--sf-ink);
}

.sf-item__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-item__buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--sf-line);
}

.sf-item__prices strong {
    font-size: 24px;
    font-weight: 700;
    color: var(--sf-ink);
}

.sf-item__prices del {
    margin-left: 8px;
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-item__qty {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-item__group {
    padding-top: 16px;
}

.sf-item__group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.sf-item__rule {
    padding-right: 8px;
    font-size: 12px;
    color: var(--sf-muted);
    white-space: nowrap;
}

.sf-item__group h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--sf-ink);
}

.sf-item__group h3 em {
    font-style: normal;
    color: #d93025;
}

.sf-item__tags,
.sf-item__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sf-item__tags span,
.sf-option {
    padding: 6px 12px;
    border: 1px solid var(--sf-line);
    border-radius: 9999px;
    background: #fff;
    font-size: 13px;
    color: var(--sf-ink);
}

.sf-option {
    cursor: pointer;
}

.sf-option small {
    margin-left: 4px;
    color: var(--sf-muted);
}

.sf-option.is-selected {
    border-color: var(--sf-ink);
    background: var(--sf-ink);
    color: #fff;
}

.sf-option.is-selected small {
    color: #ddd;
}

.sf-item__error {
    margin: 12px 0 0;
    font-size: 13px;
    color: #d93025;
}

.sf-item__order {
    margin-top: 16px;
    flex-shrink: 0;
}

.sf-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 200;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--sf-ink);
    font-size: 14px;
    color: #fff;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.sf-toast.is-on {
    opacity: 1;
}

/* ── Tablet ── */

@media (max-width: 1199.98px) {
    .sf-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .sf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sf-deals__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Phones and small tablets: cover edge to edge, sections scroll sideways, cart is a sheet ── */

@media (max-width: 1023.98px) {
    .sf {
        padding-top: 0;
    }

    .sf-head__back,
    .sf-search,
    .sf-tabs__more {
        display: none;
    }

    .sf-wrap {
        padding: 0;
    }

    .sf-hero {
        border-radius: 0;
        aspect-ratio: 375 / 230;
    }

    .sf-hero__fabs {
        position: absolute;
        inset: 16px 16px auto;
        display: flex;
        justify-content: space-between;
    }

    .sf-head {
        position: relative;
        margin-top: -24px;
        border-radius: 20px 20px 0 0;
        padding: 20px 16px 16px;
    }

    .sf-head__logo {
        width: 56px;
        height: 56px;
    }

    .sf-head__id {
        gap: 12px;
    }

    .sf-head__name {
        margin-bottom: 2px;
        font-size: 20px;
        letter-spacing: -.6px;
    }

    .sf-head__meta {
        font-size: 13px;
    }

    .sf-head__addr {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sf-head__bar {
        padding: 6px 16px 0;
        border-radius: 0;
    }

    .sf-tabs__nav {
        gap: 20px;
        padding-right: 0;
    }

    .sf-tabs__nav a {
        padding: 10px 0;
    }

    .sf-layout {
        display: block;
        margin: 0;
        padding: 12px 16px 96px;
        background: #fff;
    }

    .sf-main {
        gap: 12px;
    }

    .sf-box {
        padding: 16px;
        border: 1px solid var(--sf-line);
    }

    .sf-head.sf-box {
        border: 0;
    }

    .sf-box__head {
        margin-bottom: 14px;
    }

    .sf-box__title {
        font-size: 18px;
    }

    .sf-box__title small {
        display: block;
        margin: 2px 0 0;
    }

    .sf-deals__list {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sf-deal {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .sf-grid--row {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        margin-right: -16px;
        padding-right: 16px;
    }

    .sf-grid--row::-webkit-scrollbar,
    .sf-deals__list::-webkit-scrollbar {
        display: none;
    }

    .sf-grid--row .sf-card {
        flex: 0 0 44%;
        scroll-snap-align: start;
    }

    .sf-cart {
        position: fixed;
        inset: auto 0 0;
        z-index: 110;
        top: auto;
        transform: translateY(100%);
        transition: transform .3s ease-out;
    }

    .sf-cart.is-open {
        transform: translateY(0);
    }

    .sf-cart__panel {
        max-height: 85vh;
        border: 0;
        border-radius: 24px 24px 0 0;
    }

    .sf-cart__close {
        display: inline-flex;
        border: 0;
        background: none;
        padding: 0;
        color: var(--sf-ink);
        cursor: pointer;
    }

    .sf-cart-backdrop {
        position: fixed;
        inset: 0;
        z-index: 105;
        background: rgba(0, 0, 0, .5);
    }

    .sf.is-cart-open .sf-cart-backdrop {
        display: block;
    }

    .sf-cartbar {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        z-index: 100;
        align-items: center;
        gap: 10px;
        height: 52px;
        padding: 0 16px;
        border: 0;
        border-radius: 9999px;
        background: var(--sf-ink);
        font-size: 15px;
        font-weight: 600;
        color: #fff;
        cursor: pointer;
    }

    .sf-cartbar:not([hidden]) {
        display: flex;
    }

    .sf-cartbar strong {
        margin-left: auto;
    }

    .sf-cartbar__count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        height: 24px;
        padding: 0 6px;
        border-radius: 9999px;
        background: var(--sf-yellow);
        font-size: 13px;
        color: var(--sf-ink);
    }

    /* App-like view: keep the bar above the bottom tab bar */
    html[data-mobile-app] .sf-cartbar {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    html[data-mobile-app] .sf-layout {
        padding-bottom: 170px;
    }

    .sf-item__title {
        font-size: 20px;
    }

    .sf-item__prices strong {
        font-size: 20px;
    }

    .sf-item__prices del {
        display: block;
        margin: 2px 0 0;
    }

    .sf-item__qty {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
/* ── Pages under the store: store strip, product, cart, checkout, orders ── */

.sf-head__actions,
.sf-storebar__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.sf-link--ink {
    font-weight: 600;
    color: var(--sf-ink);
}

.sf-btn-block {
    display: flex;
    width: 100%;
    margin-top: 10px;
}

.sf-storebar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
}

.sf-storebar__back {
    display: none;
}

.sf-storebar__id {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    color: var(--sf-ink);
    text-decoration: none;
}

.sf-storebar__logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--sf-line);
    object-fit: cover;
    flex-shrink: 0;
}

.sf-storebar__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sf-storebar__name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.4px;
}

.sf-storebar__name span,
.sf-storebar__addr {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-storebar__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
}

.sf-storebar__addr {
    margin-left: 8px;
    color: var(--sf-muted);
}

.sf-page-title {
    margin: 24px 0 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--sf-ink);
}

.sf-page-title small {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--sf-muted);
}

.sf-notice {
    margin: 0 0 12px;
    padding: 12px 16px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
}

/* Cart and My Orders pages */

.sf-pagehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 24px 0 0;
}

.sf-pagehead + .sf-notice {
    margin-top: 16px;
}

.sf-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--sf-muted);
}

.sf-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-steps li + li::before {
    content: "";
    width: 28px;
    height: 1px;
    background: #d6d6d6;
}

.sf-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #d6d6d6;
    border-radius: 50%;
    background: #fff;
    font-size: 12px;
}

.sf-steps .is-current {
    color: var(--sf-ink);
}

.sf-steps .is-current span {
    border-color: var(--sf-ink);
    background: var(--sf-ink);
    color: #fff;
}

.sf-cartpage__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sf-cartpage__sumtitle {
    margin-bottom: 16px;
}

.sf-cartpage__items .sf-cart-item {
    gap: 16px;
    padding: 16px 0;
}

.sf-cartpage__items .sf-cart-item__img {
    width: 88px;
    height: 88px;
    border-radius: 12px;
}

.sf-cartpage__items .sf-cart-item__name {
    font-size: 16px;
    white-space: normal;
}

.sf-cartpage__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-ink);
    text-decoration: none;
}

.sf-cartpage__more svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.sf-cartpage__more:hover {
    text-decoration: underline;
}

.sf-cart-item__variants {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sf-ink);
}

.sf-cart-item__variants span {
    color: var(--sf-muted);
}

.sf-cart-item__variants span::after {
    content: ":";
}

.sf-storecard .sf-box__title,
.sf-reorder .sf-box__title {
    margin-bottom: 14px;
}

.sf-storecard__open {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--sf-muted);
}

.sf-storecard__open strong {
    color: #d93025;
}

.sf-storecard__open.is-open strong {
    color: #15803d;
}

.sf-storecard__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d93025;
}

.sf-storecard__open.is-open .sf-storecard__dot {
    background: #16a34a;
}

.sf-storecard__row {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sf-ink);
}

.sf-storecard__row svg,
.sf-storecard__ways svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sf-storecard__ways {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-storecard__ways li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #fafafa;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-muted);
}

.sf-storecard__ways li.is-on {
    background: #fff;
    color: var(--sf-ink);
}

.sf-storecard__ways small {
    font-size: 12px;
    font-weight: 500;
    color: var(--sf-muted);
}

.sf-storecard__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.sf-reorder p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sf-muted);
}

/* Room for three overlapping thumbs, so every order's text lines up */
.sf-order__thumbs {
    display: flex;
    flex: 0 0 124px;
}

.sf-order__thumbs img,
.sf-order__thumbs span {
    width: 52px;
    height: 52px;
    border: 2px solid #fff;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f1f1;
}

.sf-order__thumbs .sf-order__ph svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #9a9a9a;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sf-order__thumbs > * + * {
    margin-left: -16px;
}

.sf-order__thumbs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--sf-ink);
}

.sf-order__line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.sf-order__id .sf-order__line strong {
    display: inline;
}

.sf-order__items {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    color: var(--sf-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-order__actions .sf-co-edit {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

/* Forms (checkout) */

.sf-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    cursor: pointer;
}

.sf-choice:has(input:checked) {
    border-color: var(--sf-ink);
}

.sf-choice input {
    margin: 3px 0 0;
    accent-color: var(--sf-ink);
}

.sf-choice__body strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-ink);
}

.sf-choice__body small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sf-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sf-field--wide {
    grid-column: 1 / -1;
}

.sf-field[hidden] {
    display: none;
}

.sf-field > span:first-child {
    font-size: 13px;
    font-weight: 500;
    color: var(--sf-muted);
}

.sf-field input,
.sf-field select,
.sf-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--sf-line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-field textarea {
    resize: vertical;
}

.sf-field input:focus,
.sf-field select:focus,
.sf-field textarea:focus {
    outline: 0;
    border-color: var(--sf-ink);
}

.sf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-check input {
    accent-color: var(--sf-ink);
}

.sf-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    margin-top: 4px;
    padding: 6px;
    border: 1px solid var(--sf-line);
    border-radius: 10px;
    background: #fff;
}

.sf-suggest button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 9999px;
    background: none;
    font-size: 14px;
    text-align: left;
    color: var(--sf-ink);
    white-space: nowrap;
    cursor: pointer;
}

.sf-suggest button:hover {
    background: #f6f6f6;
}

.sf-suggest small {
    margin-left: 8px;
    color: var(--sf-muted);
}

.sf-addr-labels {
    margin-bottom: 16px;
}

.sf-co-summary {
    position: sticky;
    top: 96px;
}

.sf-co-items {
    max-height: 320px;
    overflow-y: auto;
}

.sf-co-pickup {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--sf-muted);
}

.sf-co-pickup strong {
    color: var(--sf-ink);
}

.sf-totals--flush {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* Order history */






.sf-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sf-ink);
    white-space: nowrap;
}

.sf-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
}

.sf-status--confirmed::before,
.sf-status--preparing::before,
.sf-status--ready::before {
    background: #2563eb;
}

.sf-status--completed::before {
    background: #16a34a;
}

.sf-status--cancelled,
.sf-status--rejected {
    color: #d93025;
}

.sf-status--cancelled::before,
.sf-status--rejected::before {
    background: #d93025;
}

.sf-facts {
    margin: 0;
}

.sf-facts div {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--sf-line);
    font-size: 14px;
}

.sf-facts div:last-child {
    border-bottom: 0;
}

.sf-facts dt {
    flex: 0 0 110px;
    font-weight: 500;
    color: var(--sf-muted);
}

.sf-facts dd {
    margin: 0;
    color: var(--sf-ink);
}

.sf-orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sf-orders-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.sf-orders-empty .sf-btn-primary {
    width: auto;
    padding: 0 24px;
}

.sf-order {
    padding: 0;
}

.sf-order__head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    list-style: none;
    cursor: pointer;
}

.sf-order__head::-webkit-details-marker {
    display: none;
}

.sf-order__id {
    flex: 1;
    min-width: 0;
}

.sf-order__id strong {
    display: block;
    font-size: 15px;
}

.sf-order__id small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-order__total {
    font-size: 15px;
    white-space: nowrap;
}

.sf-order__chev {
    color: var(--sf-muted);
    transition: transform .2s;
}

.sf-order[open] .sf-order__chev {
    transform: rotate(180deg);
}

.sf-order__body {
    padding: 0 24px 20px;
    border-top: 1px solid var(--sf-line);
}

.sf-order__body > .sf-cart-item:first-child {
    padding-top: 12px;
}

.sf-order__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.sf-pager {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.sf-pager a,
.sf-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--sf-line);
    border-radius: 9999px;
    background: #fff;
    font-size: 14px;
    color: var(--sf-ink);
    text-decoration: none;
}

.sf-pager .is-active {
    border-color: var(--sf-ink);
    background: var(--sf-ink);
    color: #fff;
}

.sf-pager svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 1023.98px) {
    .sf--sub .sf-wrap {
        padding: 0 16px;
    }

    .sf-storebar {
        margin-top: 12px;
        padding: 12px;
        gap: 10px;
    }

    .sf-storebar__back {
        display: inline-flex;
        color: var(--sf-ink);
    }

    .sf-storebar__actions .sf-btn-outline,
    .sf-head__actions .sf-head__orders {
        display: none;
    }

    .sf-storebar__actions .sf-link {
        font-size: 13px;
    }

    .sf-storebar__logo {
        width: 40px;
        height: 40px;
    }

    .sf-storebar__name {
        font-size: 15px;
    }

    .sf-storebar__addr {
        display: none;
    }

    .sf--sub .sf-layout {
        margin: 12px -16px 0;
    }

    .sf-page-title {
        margin-top: 16px;
        font-size: 22px;
    }


    .sf-fields {
        grid-template-columns: 1fr;
    }

    .sf-co-summary {
        position: static;
        margin-top: 12px;
    }

    .sf-co-items {
        max-height: none;
    }

    .sf-order__head {
        gap: 12px;
        padding: 14px 16px;
    }

    /* Phones: the first photo only, so the text keeps its room */
    .sf-order__thumbs {
        flex-basis: 44px;
        align-self: flex-start;
    }

    .sf-order__thumbs img,
    .sf-order__thumbs span {
        width: 44px;
        height: 44px;
    }

    .sf-order__thumbs > * + * {
        display: none;
    }

    .sf-order__id {
        flex: 1;
    }

    .sf-order__total {
        font-size: 14px;
    }

    .sf-order__chev {
        display: none;
    }

    .sf-pagehead {
        margin-top: 16px;
    }

    .sf-steps li + li::before {
        width: 14px;
    }

    .sf-cartpage__side {
        margin-top: 12px;
    }

    .sf-cartpage__items .sf-cart-item__img {
        width: 72px;
        height: 72px;
    }

    .sf-order__body {
        padding: 0 16px 16px;
    }

}

.sf-print-frame {
    position: fixed;
    width: 0;
    height: 0;
    border: 0;
    visibility: hidden;
}

.sf-page-title--flush {
    margin: 0;
}

/* ── Cart line: name + delete, unit price, quantity + line total ── */

.sf-cart-item {
    align-items: flex-start;
}

.sf-cart-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.sf-cart-item__unit {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--sf-muted);
}

.sf-cart-item__top .sf-cart-item__remove {
    width: 28px;
    height: 28px;
    margin-top: -2px;
}

/* ── Empty cart: one small moving drawing per tab ── */

.sf-empty-cart {
    padding: 8px 0 20px;
    text-align: center;
}

.sf-empty-cart__art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sf-empty-cart__art[hidden] {
    display: none;
}

.sf-empty-cart__art.is-in {
    animation: sf-ec-in .35s ease-out;
}

.sf-empty-cart svg {
    width: 160px;
    height: 96px;
    margin-bottom: 8px;
    fill: none;
    stroke: var(--sf-ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sf-empty-cart strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--sf-ink);
}

.sf-empty-cart span {
    max-width: 240px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--sf-muted);
}

.sf-ec-box,
.sf-ec-handle {
    stroke: var(--sf-yellow);
}

.sf-ec-box {
    fill: var(--sf-yellow);
    fill-opacity: .25;
}

.sf-ec-road {
    stroke: var(--sf-line);
    stroke-dasharray: 10 8;
    animation: sf-ec-road .8s linear infinite;
}

.sf-ec-speed {
    stroke: var(--sf-muted);
    animation: sf-ec-speed .8s ease-in-out infinite;
}

.sf-ec-rider {
    animation: sf-ec-bump .4s ease-in-out infinite alternate;
}

.sf-ec-bag {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: sf-ec-hop 1.6s ease-in-out infinite;
}

.sf-ec-shadow {
    fill: var(--sf-line);
    stroke: none;
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: sf-ec-shadow 1.6s ease-in-out infinite;
}

@keyframes sf-ec-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes sf-ec-road {
    to { stroke-dashoffset: 18; }
}

@keyframes sf-ec-speed {
    0%, 100% { opacity: .2; transform: translateX(6px); }
    50% { opacity: 1; transform: translateX(0); }
}

@keyframes sf-ec-bump {
    to { transform: translateY(-1.5px); }
}

@keyframes sf-ec-hop {
    0%, 100% { transform: translateY(0) rotate(0); }
    40% { transform: translateY(-8px) rotate(-3deg); }
    60% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes sf-ec-shadow {
    0%, 100% { transform: scaleX(1); opacity: 1; }
    50% { transform: scaleX(.7); opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
    .sf-empty-cart *,
    .sf-empty-cart__art.is-in {
        animation: none !important;
    }
}

@media (max-width: 1023.98px) {
    .sf-item__track img {
        height: 240px;
    }
}

/* ── Menu levels: path above the listing, swapped in place ── */

.sf-menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sf-main {
    transition: opacity .15s;
}

.sf-main.is-loading {
    opacity: .45;
    pointer-events: none;
}

.sf-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    font-size: 14px;
    color: var(--sf-muted);
}

.sf-trail a {
    color: var(--sf-muted);
    text-decoration: none;
}

.sf-trail a:hover {
    color: var(--sf-ink);
}

.sf-trail span {
    font-weight: 600;
    color: var(--sf-ink);
}

.sf .sf-trail svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 1023.98px) {
    .sf-menu {
        gap: 12px;
    }

    .sf-trail {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        font-size: 13px;
    }
}

/* ── Placing the order (checkout overlay) ── */

.sf-placing {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #fff;
    opacity: 0;
    transition: opacity .2s;
}

.sf-placing[hidden] {
    display: none;
}

.sf-placing.is-on {
    opacity: 1;
}

.sf-placing__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 320px;
    text-align: center;
}

.sf-placing .sf-placing__art {
    width: 132px;
    height: 132px;
    margin-bottom: 8px;
    fill: none;
    stroke: var(--sf-ink);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sf-placing__body {
    fill: #fff;
}

.sf-placing__handle {
    stroke: var(--sf-yellow);
}

.sf-placing__item {
    fill: var(--sf-yellow);
    stroke: none;
    opacity: 0;
    animation: sf-placing-drop 1.4s cubic-bezier(.5, 0, .75, 0) infinite;
}

.sf-placing__item--2 {
    fill: var(--sf-ink);
    animation-delay: .45s;
}

.sf-placing__item--3 {
    animation-delay: .9s;
}

.sf-placing__bag {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: sf-placing-catch 1.4s ease-in-out infinite;
}

.sf-placing__done {
    opacity: 0;
}

.sf-placing__done circle {
    fill: var(--sf-ink);
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
}

.sf-placing__done path {
    stroke: #fff;
    stroke-width: 5;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
}

.sf-placing.is-done .sf-placing__bag {
    animation: sf-placing-out .25s ease-in forwards;
}

.sf-placing.is-done .sf-placing__done {
    opacity: 1;
}

.sf-placing.is-done .sf-placing__done circle {
    animation: sf-pop .4s cubic-bezier(.2, 1.4, .4, 1) .15s both;
}

.sf-placing.is-done .sf-placing__done path {
    animation: sf-draw .4s ease-out .45s forwards;
}

.sf-placing__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.4px;
    color: var(--sf-ink);
}

.sf-placing__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--sf-muted);
}

@keyframes sf-placing-drop {
    0% { opacity: 0; transform: translateY(-18px); }
    15% { opacity: 1; }
    55% { opacity: 1; transform: translateY(30px); }
    65%, 100% { opacity: 0; transform: translateY(34px); }
}

@keyframes sf-placing-catch {
    0%, 40%, 100% { transform: scale(1, 1); }
    50% { transform: scale(1.04, .95); }
    60% { transform: scale(.98, 1.02); }
}

@keyframes sf-placing-out {
    to { opacity: 0; transform: scale(.85); }
}

@keyframes sf-pop {
    from { transform: scale(.4); }
    to { transform: scale(1); }
}

@keyframes sf-draw {
    to { stroke-dashoffset: 0; }
}

/* ── Order page ── */

.sf-done-page {
    max-width: 1000px;
    margin: 20px auto 48px;
}

.sf-done-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 24px 28px;
    text-align: center;
}

.sf-done-hero__mark svg {
    width: 64px;
    height: 64px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sf .sf-done-hero__mark svg {
    width: 64px;
    height: 64px;
}

.sf-done-hero__mark circle {
    fill: var(--sf-ink);
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
}

.sf-done-hero__mark path {
    stroke: #fff;
    stroke-width: 4;
    stroke-dasharray: 40;
    stroke-dashoffset: 0;
}

.sf-done-hero.is-cancelled .sf-done-hero__mark circle {
    fill: #fff;
    stroke: var(--sf-line);
    stroke-width: 2;
}

.sf-done-hero.is-cancelled .sf-done-hero__mark path {
    stroke: #d93025;
}

/* Straight after checkout: the check draws itself */
.sf-done-hero.is-new .sf-done-hero__mark circle {
    animation: sf-pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}

.sf-done-hero.is-new .sf-done-hero__mark path {
    stroke-dashoffset: 40;
    animation: sf-draw .45s ease-out .35s forwards;
}

.sf-done-hero.is-new .sf-done-hero__title,
.sf-done-hero.is-new .sf-done-hero__text,
.sf-done-hero.is-new .sf-done-hero__ref,
.sf-done-hero.is-new .sf-track {
    animation: sf-rise .45s ease-out both;
}

.sf-done-hero.is-new .sf-done-hero__text { animation-delay: .08s; }
.sf-done-hero.is-new .sf-done-hero__ref { animation-delay: .16s; }
.sf-done-hero.is-new .sf-track { animation-delay: .24s; }

@keyframes sf-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.sf-done-hero__title {
    margin: 16px 0 6px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--sf-ink);
}

.sf-done-hero__text {
    max-width: 460px;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #3d3d3d;
}

.sf-done-hero__ref {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    margin-top: 16px;
    padding: 8px 14px;
    border: 1px solid var(--sf-line);
    border-radius: 10px;
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-done-hero__ref strong {
    color: var(--sf-ink);
}

.sf-done-hero__sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--sf-muted);
}

.sf-done-hero__reason {
    margin: 14px 0 0;
    font-size: 14px;
    color: #d93025;
}

.sf-copy {
    display: inline-flex;
    padding: 2px;
    border: 0;
    background: none;
    color: var(--sf-muted);
    cursor: pointer;
}

.sf .sf-copy svg {
    width: 16px;
    height: 16px;
}

.sf-copy:hover {
    color: var(--sf-ink);
}

.sf-copy.is-copied {
    color: var(--sf-ink);
}

.sf-copy.is-copied rect {
    fill: var(--sf-yellow);
    stroke: var(--sf-yellow);
}

/* Progress: Placed → Confirmed → Preparing → Ready / On the way → Picked up / Delivered */
.sf-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    max-width: 640px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.sf-track__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-track__step:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 11px;
    right: calc(50% + 14px);
    left: calc(-50% + 14px);
    height: 2px;
    border-radius: 2px;
    background: var(--sf-line);
}

.sf-track__step.is-past:not(:first-child)::before,
.sf-track__step.is-now:not(:first-child)::before {
    background: var(--sf-ink);
}

.sf-track__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid var(--sf-line);
    border-radius: 50%;
    background: #fff;
}

.sf .sf-track__dot svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    stroke-width: 3;
    opacity: 0;
}

.sf-track__step.is-past .sf-track__dot {
    border-color: var(--sf-ink);
    background: var(--sf-ink);
}

.sf-track__step.is-past .sf-track__dot svg {
    opacity: 1;
}

.sf-track__step.is-now .sf-track__dot {
    border-color: var(--sf-ink);
    background: var(--sf-yellow);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, .25);
}

.sf-track__step.is-past,
.sf-track__step.is-now {
    color: var(--sf-ink);
}

.sf-track__step.is-now .sf-track__label {
    font-weight: 700;
}

.sf-track__time {
    font-size: 11px;
    color: var(--sf-muted);
}

.sf-done-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}

/* Receipt card */
.sf-receipt {
    padding: 0;
}

.sf-receipt__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px dashed var(--sf-line);
}

.sf-receipt__head img {
    width: 40px;
    height: 40px;
    border: 1px solid var(--sf-line);
    border-radius: 50%;
    object-fit: cover;
}

.sf-receipt__head strong {
    display: block;
    font-size: 15px;
    color: var(--sf-ink);
}

.sf-receipt__head span {
    font-size: 13px;
    color: var(--sf-muted);
}

.sf-receipt__items {
    margin: 0;
    padding: 8px 24px;
    list-style: none;
}

.sf-receipt__items > li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--sf-line);
}

.sf-receipt__items > li:last-child {
    border-bottom: 0;
}

.sf-receipt__items > li > img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.sf-receipt__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-receipt__name b {
    font-weight: 700;
}

.sf-receipt__name small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--sf-muted);
}

.sf-receipt__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--sf-ink);
    white-space: nowrap;
}

.sf-receipt__totals {
    margin: 0;
    padding: 16px 24px;
    border-top: 1px dashed var(--sf-line);
}

.sf-receipt__totals div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    color: var(--sf-ink);
}

.sf-receipt__totals dd {
    margin: 0;
    font-weight: 600;
}

.sf-receipt__totals .sf-receipt__grand {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--sf-line);
    font-size: 17px;
    font-weight: 700;
}

.sf-receipt__grand dd {
    font-weight: 700;
}

.sf-receipt__print {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: 0;
    border-top: 1px dashed var(--sf-line);
    border-radius: 0 0 16px 16px;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-ink);
    cursor: pointer;
}

.sf-receipt__print:hover {
    background: #fafafa;
}

.sf .sf-receipt__print svg {
    width: 18px;
    height: 18px;
}

/* Side cards */
.sf-done-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sf-info h2 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sf-muted);
}

.sf-info .sf-info__sub {
    margin-top: 16px;
}

.sf-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--sf-ink);
}

.sf-info p + p {
    margin-top: 4px;
}

.sf-info .sf-info__muted {
    color: var(--sf-muted);
}

.sf-info__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--sf-line);
}

.sf-info__links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-ink);
}

.sf-done-actions {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

@media (max-width: 1023.98px) {
    .sf-done-page {
        margin: 12px 0 120px;
    }

    .sf-done-hero {
        padding: 28px 16px 22px;
    }

    .sf-done-hero__title {
        font-size: 24px;
    }

    .sf-done-hero__sep {
        display: none;
    }

    .sf-done-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 12px;
    }

    .sf-receipt__head,
    .sf-receipt__items,
    .sf-receipt__totals {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Phones: the steps run down the card */
    .sf-track {
        grid-template-columns: 1fr;
        max-width: 260px;
        margin-top: 22px;
        text-align: left;
    }

    .sf-track__step {
        display: grid;
        grid-template-columns: 24px 1fr auto;
        align-items: center;
        column-gap: 12px;
        padding: 8px 0;
    }

    .sf-track__step:not(:first-child)::before {
        top: calc(-50% + 12px);
        bottom: calc(50% + 12px);
        right: auto;
        left: 11px;
        width: 2px;
        height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-placing *,
    .sf-done-hero * {
        animation: none !important;
    }

    .sf-done-hero.is-new .sf-done-hero__mark path,
    .sf-placing.is-done .sf-placing__done path {
        stroke-dashoffset: 0;
    }
}
