/* B2C storefront shell — branding, dark mode, SVG actions */

/* Prevent pinch / double-tap zoom on mobile storefront (app-like UX). */
html:has(body.storefront-body),
body.storefront-body {
    touch-action: pan-y pinch-zoom;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.storefront-body {
    font-family: var(--font-family, 'Rubik', 'Noto Sans Arabic', 'Segoe UI', system-ui, sans-serif);
}

/*
 * iOS Safari zooms focused inputs below ~16px — keep storefront controls at 16px+ on phones.
 */
@media (max-width: 1024px) {
    body.storefront-body
        :where(
            input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']):not([type='button']):not([type='submit']):not([type='reset']):not([type='image']),
            textarea,
            select
        ) {
        font-size: max(1rem, 16px) !important;
    }
}

/*
 * Storefront z-index scale (low → high) — single source of truth:
 *  15  — sticky marketing announcement (in-page)
 *  25  — floating cart bar (in-page)
 *  55  — classic sticky header rail (theme CSS)
 *  70  — fulfillment modal, toasts
 *  75  — product modal
 *  80  — phone verify, hub address edit, marketing popup
 *  90  — product search overlay
 * 100  — customer hub drawer (teleported to body)
 * 105  — gifting modal (teleported to body)
 */
.sf-marketing-announcement {
    position: sticky;
    top: 0;
    z-index: 60;
    flex-shrink: 0;
}

.sf-cart-float {
    position: fixed;
    z-index: 25;
}

/* Leaflet panes default to z-index 400+ — isolate maps so sf-cart-float stays clickable. */
.sf-order-track-map-wrap {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
}

.sf-order-track-map-wrap .sf-order-track-map-canvas {
    position: relative;
    z-index: 0;
}

.sf-order-track-map-wrap .leaflet-routing-container {
    display: none !important;
}

.sf-order-track-map-wrap .sf-driver-marker-icon,
.sf-order-track-map-wrap .sf-destination-marker-icon {
    background: transparent !important;
    border: none !important;
}

.sf-customer-drawer-root {
    position: fixed;
    inset: 0;
    z-index: 100;
    isolation: isolate;
}

.sf-customer-drawer-host {
    display: contents;
}

.sf-customer-drawer-live-body[hidden] {
    display: none !important;
}

.sf-customer-drawer-root .sf-drawer-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sf-customer-drawer-root .sf-drawer-panel {
    z-index: 1;
}

.sf-customer-drawer-live-body {
    position: fixed;
    top: var(--sf-customer-drawer-header-offset, 4.25rem);
    bottom: 0;
    inset-inline-end: 0;
    /* Above .sf-customer-drawer-root (z-index 100); live body morphs outside wire:ignore. */
    z-index: 101;
    display: flex;
    width: min(100vw, 24rem);
    max-width: 24rem;
    flex-direction: column;
    min-height: 0;
    pointer-events: auto;
    background: #fff;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
}

.dark .sf-customer-drawer-live-body {
    background: #18181b;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

.sf-fulfillment-host {
    display: contents;
}

.sf-fulfillment-live-body[hidden] {
    display: none !important;
}

.sf-fulfillment-live-body {
    position: fixed;
    inset: 0;
    z-index: 71;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    pointer-events: none;
}

@media (min-width: 640px) {
    .sf-fulfillment-live-body {
        align-items: center;
        padding: 1rem;
    }
}

.sf-fulfillment-live-body-panel {
    display: flex;
    width: 100%;
    max-width: 28rem;
    max-height: 92dvh;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

@media (min-width: 640px) {
    .sf-fulfillment-live-body-panel {
        max-height: 92vh;
        border-radius: 1.25rem;
    }
}

.sf-fulfillment-tab {
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: rgb(100 116 139);
    background: rgb(248 250 252);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dark .sf-fulfillment-tab {
    background: rgb(39 39 42);
    color: rgb(161 161 170);
}

.sf-fulfillment-tab.is-active {
    background: var(--primary-color, #0d9488);
    color: #fff;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--primary-color, #0d9488) 32%, transparent);
}

.sf-fulfillment-branch-icon {
    -webkit-tap-highlight-color: transparent;
}

.dark .sf-fulfillment-live-body-panel {
    background: #09090b;
}

.sf-product-modal-host {
    display: contents;
}

.sf-product-modal-live-body[hidden],
.sf-product-modal-live-body {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    inset: auto !important;
    z-index: -1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sf-product-modal-live-body-panel {
    display: none !important;
}

.sf-gifting-modal-root {
    position: fixed;
    inset: 0;
    z-index: 105;
    isolation: isolate;
    min-height: 100dvh;
    width: 100%;
    pointer-events: auto;
}

.sf-gifting-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    min-height: 100dvh;
    background-color: rgb(15 23 42 / 0.55);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.sf-gifting-modal-panel {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    touch-action: pan-y;
}

html.sf-gifting-modal-open,
html.sf-gifting-modal-open body {
    overflow: hidden;
    overscroll-behavior: none;
}

.sf-marketing-announcement__viewport {
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.sf-marketing-announcement__track {
    display: inline-flex;
    width: max-content;
    min-width: 100%;
    gap: 3rem;
    white-space: nowrap;
    will-change: transform;
}

.sf-marketing-announcement__chunk {
    display: inline-block;
    padding-inline: 1rem;
}

.sf-marketing-announcement--rtl .sf-marketing-announcement__track {
    animation: sf-marketing-marquee-rtl 22s linear infinite;
}

.sf-marketing-announcement--ltr .sf-marketing-announcement__track {
    animation: sf-marketing-marquee-ltr 22s linear infinite;
}

@keyframes sf-marketing-marquee-rtl {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes sf-marketing-marquee-ltr {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-marketing-announcement__track {
        animation: none !important;
        justify-content: center;
        width: 100%;
    }

    .sf-marketing-announcement__chunk[aria-hidden='true'] {
        display: none;
    }
}

.has-sf-marketing-announcement {
    --sf-announcement-offset: 0px;
    --sf-sticky-menu-offset: 0px;
}

.has-sf-marketing-announcement .theme-layout-classic .sf-classic-sticky-rail,
.has-sf-marketing-announcement .theme-layout-minimal .sf-minimal-sticky-cats {
    top: var(--sf-announcement-offset, 0px);
}

.has-sf-marketing-announcement .storefront-category-root .sf-category-hub-show-header {
    top: var(--sf-announcement-offset, 2rem);
}

.sf-marketing-popup__panel {
    will-change: transform, opacity;
    transform-origin: center center;
}

/* Compact inline qty stepper on product cards (simple products). */
.sf-product-action-slot {
    position: relative;
    z-index: 20;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.sf-product-action-slot--compact {
    width: 2rem;
    height: 2rem;
}

.sf-product-action-slot--compact:has(.sf-product-action--qty) {
    width: auto;
    height: auto;
    min-width: 0;
}

.sf-product-action--qty {
    min-width: 4.25rem;
    padding-inline: 0.25rem;
    gap: 0;
}

.sf-product-action--qty-btn {
    inline-size: 1.5rem;
    block-size: 1.5rem;
    font-size: 0.875rem;
    line-height: 1;
}

/* Product modal addon row — RTL: name+price right, qty stepper left (after first pick). */
.sf-addon-choice-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.sf-addon-choice-meta {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
    padding: 0;
    text-align: start;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.sf-addon-choice-meta:disabled {
    cursor: not-allowed;
}

.sf-addon-choice-meta .sf-addon-choice-name {
    min-width: 0;
}

.sf-addon-choice-meta .sf-addon-choice-price {
    flex-shrink: 0;
    white-space: nowrap;
}

.sf-addon-choice-row .sf-product-modal-addon-qty {
    flex: 0 0 auto;
}

.sf-addon-choice-row--blocked .sf-addon-choice-meta:not(:disabled) {
    opacity: 0.55;
}

/* Mix & Match piece progress — pending (amber) vs complete (green). */
.sf-mix-match-progress-sticky {
    position: sticky;
    top: 0;
    z-index: 12;
    margin-top: 0;
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--primary-color, #0d9488) 4%, white);
    box-shadow: 0 1px 0 rgb(15 23 42 / 0.06);
}

.sf-dark .sf-mix-match-progress-sticky,
html.sf-dark .sf-mix-match-progress-sticky {
    background: color-mix(in srgb, var(--primary-color, #0d9488) 10%, #18181b);
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.06);
}

.sf-mix-match-progress__track {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 12%, #e2e8f0);
}

.sf-mix-match-progress--pending .sf-mix-match-progress__bar {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.sf-mix-match-progress--pending .sf-mix-match-progress__label,
.sf-mix-match-progress--pending .sf-mix-match-progress__ratio {
    color: #b45309;
}

.sf-mix-match-progress--pending .sf-mix-match-progress__hint {
    color: #c2410c;
}

.sf-mix-match-progress--complete .sf-mix-match-progress__bar {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.sf-mix-match-progress--complete .sf-mix-match-progress__label,
.sf-mix-match-progress--complete .sf-mix-match-progress__ratio {
    color: #15803d;
}

.sf-mix-match-progress--complete .sf-mix-match-progress__hint {
    color: #166534;
}

.sf-mix-match-progress--over .sf-mix-match-progress__bar {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.sf-mix-match-progress--over .sf-mix-match-progress__label,
.sf-mix-match-progress--over .sf-mix-match-progress__ratio {
    color: #b91c1c;
}

@media (prefers-color-scheme: dark) {
    .sf-mix-match-progress__track {
        background-color: color-mix(in srgb, var(--primary-color, #0d9488) 18%, #3f3f46);
    }

    .sf-mix-match-progress--pending .sf-mix-match-progress__label,
    .sf-mix-match-progress--pending .sf-mix-match-progress__ratio {
        color: #fbbf24;
    }

    .sf-mix-match-progress--pending .sf-mix-match-progress__hint {
        color: #fdba74;
    }

    .sf-mix-match-progress--complete .sf-mix-match-progress__label,
    .sf-mix-match-progress--complete .sf-mix-match-progress__ratio {
        color: #4ade80;
    }

    .sf-mix-match-progress--complete .sf-mix-match-progress__hint {
        color: #86efac;
    }
}

/* Product modal addon qty — visible on all themes (primary pill between label and price). */
.sf-product-modal-addon-qty {
    background-color: var(--primary-color, #0d9488);
    color: #fff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color, #0d9488) 25%, transparent);
}

.sf-product-modal-addon-qty .sf-product-action--qty-btn {
    color: inherit;
}

.sf-dark .sf-product-modal-addon-qty,
.sf-product-sheet.sf-dark .sf-product-modal-addon-qty {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 78%, #18181b);
    color: #fff;
}

.sf-addon-choice-row:has(.sf-product-modal-addon-qty) {
    cursor: default;
}

:root {
    --sf-primary: var(--primary-color, #0d9488);
    --sf-accent: var(--accent-color, #14b8a6);
}

.sf-shell-cat.is-active,
.sf-shell-btn-primary,
.sf-cart-badge,
.sf-bestseller-add,
.sf-add-btn,
.sf-classic-add-btn,
.storefront-btn-primary {
    background-color: var(--sf-primary) !important;
    color: #fff !important;
    border-color: transparent;
}

.sf-shell-cat.is-active {
    box-shadow: 0 4px 16px color-mix(in srgb, var(--sf-primary) 32%, transparent);
}

.sf-shell-btn-primary:hover,
.sf-bestseller-add:hover,
.sf-add-btn:hover,
.sf-classic-add-btn:hover,
.storefront-btn-primary:hover {
    filter: brightness(0.96);
}

.sf-text-primary,
.storefront-text-primary {
    color: var(--sf-primary) !important;
}

.sf-text-accent {
    color: var(--sf-accent) !important;
}

.sf-text-muted {
    color: color-mix(in srgb, var(--sf-primary) 45%, #64748b);
}

.sf-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--sf-primary) 12%, #fff);
    color: var(--sf-primary);
}

.sf-dark .sf-icon-chip {
    background: color-mix(in srgb, var(--sf-primary) 18%, #1e293b);
    color: color-mix(in srgb, var(--sf-primary) 75%, #fff);
}

.sf-layout-toggle {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--sf-primary) 18%, rgba(15, 23, 42, 0.12));
    border: 1px solid color-mix(in srgb, var(--sf-primary) 22%, #e2e8f0);
    color: var(--sf-primary);
    background: color-mix(in srgb, var(--sf-primary) 6%, #fff);
}

.sf-dark .sf-layout-toggle {
    background: color-mix(in srgb, var(--sf-primary) 12%, #1e293b);
    border-color: color-mix(in srgb, var(--sf-primary) 28%, #334155);
    color: color-mix(in srgb, var(--sf-primary) 80%, #fff);
}

.sf-modal-panel {
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.sf-fulfillment-sheet {
    width: 100%;
    max-width: 28rem;
    border-radius: 1.25rem 1.25rem 0 0;
    will-change: transform, opacity;
}

@media (min-width: 640px) {
    .sf-fulfillment-sheet {
        border-radius: 1.25rem;
    }
}

.sf-fulfillment-sheet--enter {
    animation: sf-fulfillment-sheet-up 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sf-fulfillment-sheet--leave {
    animation: sf-fulfillment-sheet-down 0.26s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes sf-fulfillment-sheet-up {
    from {
        transform: translate3d(0, 100%, 0);
        opacity: 0.55;
    }

    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes sf-fulfillment-sheet-down {
    from {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }

    to {
        transform: translate3d(0, 100%, 0);
        opacity: 0.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-fulfillment-sheet--enter,
    .sf-fulfillment-sheet--leave {
        animation: none;
    }
}

/* Phone verify — teleported to body, bottom sheet over full viewport */
.sf-phone-verify-root {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 100dvh;
    min-height: 100svh;
}

.sf-phone-verify-sheet {
    animation: sf-phone-sheet-up 0.28s ease-out;
    max-height: min(92dvh, 92svh);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
    .sf-phone-verify-root {
        align-items: center;
    }

    .sf-phone-verify-sheet {
        max-height: min(88dvh, 88svh);
    }
}

@keyframes sf-phone-sheet-up {
    from {
        transform: translateY(100%);
        opacity: 0.65;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sf-dark .sf-modal-panel {
    background: #18181b;
    border: 1px solid #334155;
}

.sf-modal-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    border-radius: 1rem;
    border: 1.5px solid #e2e8f0;
    padding: 1rem 1.125rem;
    text-align: start;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    background: #fff;
}

.sf-modal-card:hover,
.sf-modal-card:focus-visible {
    border-color: color-mix(in srgb, var(--sf-primary) 45%, #e2e8f0);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--sf-primary) 12%, transparent);
    transform: translateY(-1px);
}

.sf-dark .sf-modal-card {
    background: #1e293b;
    border-color: #334155;
}

.sf-dark .sf-modal-card:hover {
    border-color: color-mix(in srgb, var(--sf-primary) 50%, #334155);
}

.sf-modal-card__icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--sf-primary) 12%, #fff);
    color: var(--sf-primary);
}

.sf-dark .sf-modal-card__icon {
    background: color-mix(in srgb, var(--sf-primary) 20%, #0f172a);
}

.sf-branch-row.is-current {
    background: color-mix(in srgb, var(--sf-primary) 8%, #ecfdf5);
    border-inline-start: 3px solid var(--sf-primary);
}

.sf-dark .sf-branch-row.is-current {
    background: color-mix(in srgb, var(--sf-primary) 14%, #1e293b);
}

.sf-badge-current {
    background: color-mix(in srgb, var(--sf-primary) 14%, #fff);
    color: var(--sf-primary);
    font-weight: 700;
}

.sf-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--sf-primary) 34%, transparent);
}

.sf-classic-row,
.sf-modern-card,
.sf-minimal-row {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sf-cart-bar .sf-cart-badge {
    box-shadow: 0 6px 16px color-mix(in srgb, var(--sf-primary) 35%, transparent);
}

.sf-cart-float-btn {
    background: linear-gradient(
        135deg,
        var(--primary-color, var(--sf-primary, #0d9488)) 0%,
        color-mix(in srgb, var(--primary-color, var(--sf-primary, #0d9488)) 82%, #0f172a) 100%
    );
    border: 1px solid color-mix(in srgb, #fff 18%, transparent);
}

.sf-cart-float-icon {
    flex-shrink: 0;
}

.sf-cart-float-badge {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.22);
    border: 2px solid color-mix(in srgb, var(--primary-color, var(--sf-primary, #0d9488)) 12%, #fff);
}

.merchant-order-toggle {
    vertical-align: middle;
}

.merchant-order-toggle__knob {
    will-change: transform;
}

.sf-storefront-frame footer {
    padding-top: 1.75rem;
    padding-bottom: max(5.5rem, calc(1.25rem + env(safe-area-inset-bottom)));
}

.sf-storefront-footer {
    width: 100%;
}

.sf-footer-logo {
    display: block;
}

.sf-cart-suggestions-track {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sf-cart-suggestions-track::-webkit-scrollbar {
    display: none;
}

.sf-cart-suggestions-track--pulse {
    animation: sf-cart-suggestions-pulse 0.55s ease-out;
}

@keyframes sf-cart-suggestions-pulse {
    0% {
        opacity: 0.45;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.sf-cart-suggestion-card {
    width: 9.25rem;
    min-width: 9.25rem;
    flex-shrink: 0;
}

.sf-checkout-float {
    background: linear-gradient(to top, color-mix(in srgb, var(--sf-page-bg, #f1f5f9) 92%, transparent) 0%, transparent 100%);
    padding-top: 0.75rem;
}

.sf-dark .sf-checkout-float {
    background: linear-gradient(to top, color-mix(in srgb, #0f172a 92%, transparent) 0%, transparent 100%);
}

.sf-bestsellers-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(9.25rem, min(11.5rem, calc((100% - 0.75rem) / 2)));
    grid-template-rows: 1fr;
    align-items: stretch;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.sf-bestseller-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
    scroll-snap-align: start;
}

.sf-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.sf-card-footer {
    flex-shrink: 0;
    margin-top: auto;
}

.sf-bestseller-card,
.sf-classic-square-card,
.sf-classic-grid-card,
.sf-modern-card {
    height: 100%;
}

.sf-bestseller-card .sf-bestseller-card__media {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.sf-bestseller-card .sf-bestseller-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
}

.sf-bestsellers .sf-bestseller-add {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--sf-primary) 35%, transparent);
}

.sf-track-directions-btn {
    background-color: #fff;
    color: color-mix(in srgb, var(--primary-color, #0d9488) 78%, #0f172a);
    border: 1.5px solid color-mix(in srgb, var(--primary-color, #0d9488) 42%, #cbd5e1);
}

.sf-track-directions-btn svg {
    color: var(--primary-color, #0d9488);
}

.sf-dark .sf-track-directions-btn {
    background-color: #18181b;
    color: #f8fafc;
    border-color: color-mix(in srgb, var(--primary-color, #0d9488) 48%, #52525b);
}

.sf-dark .sf-track-directions-btn svg {
    color: color-mix(in srgb, var(--primary-color, #0d9488) 88%, #f8fafc);
}

/* Order track — horizontal stepper (single progress bar + icons) */
.ot-stepper {
    position: relative;
    width: 100%;
    margin-top: 1.5rem;
}

.ot-stepper__bar {
    position: absolute;
    z-index: 0;
    top: 1.25rem;
    height: 0.5rem;
    transform: translateY(-50%);
    pointer-events: none;
    overflow: hidden;
    border-radius: 9999px;
}

.ot-stepper__bar-track,
.ot-stepper__bar-fill,
.ot-stepper__bar-shimmer {
    position: absolute;
    inset-block: 0;
    border-radius: 9999px;
}

.ot-stepper__bar-track {
    inset-inline: 0;
    background-color: #cbd5e1;
}

.sf-dark .ot-stepper__bar-track {
    background-color: #52525b;
}

.ot-stepper__bar-fill {
    inset-inline-start: 0;
    width: 0;
    background-color: var(--primary-color, #0d9488);
    box-shadow: 0 0 14px color-mix(in srgb, var(--primary-color, #0d9488) 55%, transparent);
    transition: width 0.45s ease;
}

.ot-stepper__bar-shimmer {
    overflow: hidden;
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 42%, #cbd5e1);
    box-shadow: 0 0 12px color-mix(in srgb, var(--primary-color, #0d9488) 40%, transparent);
}

.sf-dark .ot-stepper__bar-shimmer {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 48%, #52525b);
}

.ot-stepper__bar-shimmer::after {
    content: '';
    position: absolute;
    inset-block: 0;
    width: 55%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.92), transparent);
    animation: ot-stepper-shimmer 1.25s ease-in-out infinite;
}

@keyframes ot-stepper-shimmer {
    0% {
        inset-inline-start: -60%;
    }

    100% {
        inset-inline-start: 105%;
    }
}

.ot-stepper__row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.ot-stepper__col {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    width: 4.25rem;
    max-width: 24%;
    text-align: center;
}

.ot-stepper__dot {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 2px solid transparent;
    background-color: #fff;
    box-shadow: 0 1px 4px rgb(15 23 42 / 0.12);
}

.ot-stepper__dot--idle {
    border-color: #e2e8f0;
    color: #94a3b8;
    background-color: #fff;
}

.ot-stepper__dot--active,
.ot-stepper__dot--done {
    border-color: transparent;
    color: #fff;
    background-color: var(--ot-step-color, var(--primary-color, #0d9488));
}

.ot-stepper__dot--active {
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--ot-step-color, var(--primary-color, #0d9488)) 28%, transparent),
        0 1px 4px rgb(15 23 42 / 0.12);
}

.sf-dark .ot-stepper__dot--idle {
    border-color: #52525b;
    color: #71717a;
    background-color: #18181b;
}

.ot-stepper__label {
    margin-top: 0.5rem;
    width: 100%;
    font-size: 0.625rem;
    line-height: 1.35;
}

@media (min-width: 640px) {
    .ot-stepper__col {
        width: 5rem;
    }

    .ot-stepper__label {
        font-size: 0.6875rem;
    }
}

.ot-stepper__label--active {
    font-weight: 700;
}

.ot-stepper__label--done {
    font-weight: 600;
    color: #334155;
}

.sf-dark .ot-stepper__label--done {
    color: #d4d4d8;
}

.ot-stepper__label--idle {
    color: #94a3b8;
}

.sf-dark .ot-stepper__label--idle {
    color: #71717a;
}

@media (prefers-reduced-motion: reduce) {
    .ot-stepper__bar-shimmer::after {
        display: none;
    }
}

.sf-empty-state {
    border-color: color-mix(in srgb, var(--sf-primary) 20%, #cbd5e1);
    color: #64748b;
    background: color-mix(in srgb, var(--sf-primary) 4%, #fff);
}

.sf-dark .storefront-body,
.sf-dark body.storefront-body {
    background-color: #0f172a !important;
    color: #e2e8f0;
}

.sf-dark .sf-shell-sticky,
.sf-dark .sf-classic-row,
.sf-dark .sf-modern-card,
.sf-dark .sf-minimal-row,
.sf-dark .sf-cart-bar,
.sf-dark .sf-modal-panel,
.sf-dark .sf-drawer-panel {
    background-color: #1e293b;
    color: #e2e8f0;
}

.sf-dark .text-slate-900 { color: #f1f5f9 !important; }
.sf-dark .text-slate-800 { color: #e2e8f0 !important; }
.sf-dark .text-slate-700 { color: #cbd5e1 !important; }
.sf-dark .text-slate-600 { color: #94a3b8 !important; }
.sf-dark .text-slate-500 { color: #94a3b8 !important; }
.sf-dark .sf-product-choice-label,
.sf-dark .sf-product-choice-row .font-medium {
    color: #f4f4f5 !important;
}

.sf-product-sheet label.sf-product-choice-row:has(:checked) {
    border-color: var(--primary-color, #0d9488);
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 8%, white);
}

.sf-dark .sf-product-sheet label.sf-product-choice-row {
    color: #f4f4f5;
    background-color: #27272a;
    border-color: #52525b;
}

.sf-dark .sf-product-sheet label.sf-product-choice-row:has(input:checked) {
    color: #0f172a;
    background-color: color-mix(in srgb, var(--primary-color) 12%, #fafafa);
}

.sf-dark .sf-product-sheet label.sf-product-choice-row:has(input:checked) .sf-product-choice-label,
.sf-dark .sf-product-sheet label.sf-product-choice-row:has(input:checked) .font-medium {
    color: #0f172a !important;
}

.sf-dark .sf-product-sheet label.sf-product-choice-row .sf-text-primary {
    color: var(--primary-color, #0d9488) !important;
}

.sf-dark .sf-modal-panel .tabular-nums.text-xl {
    color: #f4f4f5 !important;
}
.sf-dark .bg-white { background-color: #1e293b !important; }
.sf-dark .bg-slate-50 { background-color: #0f172a !important; }
.sf-dark .bg-slate-100 { background-color: #334155 !important; }
.sf-dark .border-slate-200 { border-color: #334155 !important; }

.sf-dark .sf-shell-cat:not(.is-active) {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

.sf-dark .sf-fulfillment-pill,
.sf-dark .sf-badge-muted {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

.sf-drawer-panel {
    background: #fff;
}

.sf-dark .sf-drawer-panel {
    background: #18181b;
}

.sf-hub-stat {
    border: 1px solid color-mix(in srgb, var(--sf-primary) 16%, #e2e8f0);
    border-radius: 1rem;
}

.sf-dark .sf-hub-stat {
    border-color: color-mix(in srgb, var(--sf-primary) 22%, #334155);
}

.sf-hub-coupon-btn {
    background: var(--sf-primary);
    color: #fff;
    border-radius: 0.65rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.sf-hub-coupon-applied {
    background: color-mix(in srgb, #10b981 14%, transparent);
    color: #047857;
}

.sf-dark .sf-hub-coupon-applied {
    background: color-mix(in srgb, #34d399 18%, transparent);
    color: #6ee7b7;
}

.sf-pickup-action {
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.sf-pickup-action:hover {
    transform: scale(1.04);
    border-color: color-mix(in srgb, var(--sf-primary) 35%, #e2e8f0);
    color: var(--sf-primary);
}

.sf-dark .sf-closing-banner {
    background: color-mix(in srgb, #f59e0b 22%, #1e293b);
    color: #fde68a;
}

.sf-checkout-map {
    min-height: 10rem;
}

.sf-storefront-frame .pac-container {
    z-index: 50;
    border-radius: 0.75rem;
    margin-top: 0.25rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.talb-map-red-pin {
    display: block;
    width: 36px;
    height: 36px;
    line-height: 0;
    pointer-events: auto;
    filter: drop-shadow(0 2px 4px rgb(15 23 42 / 35%));
}

@supports (-webkit-touch-callout: none) {
    .has-sf-marketing-announcement .sf-marketing-announcement {
        position: sticky;
        top: 0;
    }

    .has-sf-marketing-announcement .theme-layout-classic .sf-classic-sticky-rail,
    .has-sf-marketing-announcement .theme-layout-minimal .sf-minimal-sticky-cats {
        top: var(--sf-announcement-offset, 0px);
    }
}

.sf-product-search-input::-webkit-search-cancel-button,
.sf-product-search-input::-webkit-search-decoration {
    display: none;
    appearance: none;
}

.sf-search-result-card {
    -webkit-tap-highlight-color: transparent;
}

.sf-product-search-results {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
}

html.sf-product-search-open,
html.sf-product-search-open body.storefront-body {
    overflow: hidden;
    overscroll-behavior: none;
}

.sf-product-search-modal__backdrop {
    animation: sf-search-backdrop-in 0.2s ease-out both;
}

.sf-product-search-modal__panel {
    animation: sf-search-panel-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sf-search-backdrop-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes sf-search-panel-in {
    from {
        opacity: 0;
        transform: translateY(-0.65rem) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-product-search-modal__backdrop,
    .sf-product-search-modal__panel {
        animation: none;
    }
}

/* Product modal skeleton shimmer */
.sf-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #e2e8f0;
}

.sf-dark .sf-skeleton,
.storefront-theme-category_hub.sf-dark .sf-skeleton {
    background-color: #3f3f46;
}

.sf-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: sf-skeleton-shimmer 1.15s ease-in-out infinite;
}

.sf-dark .sf-skeleton::after,
.storefront-theme-category_hub.sf-dark .sf-skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.sf-skeleton--media {
    border-radius: 0;
}

@keyframes sf-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.sf-product-modal-shell {
    isolation: isolate;
}

html.sf-product-modal-open,
html.sf-product-modal-open body {
    overflow: hidden;
}

.sf-product-sheet--enter {
    animation: sf-product-sheet-up 0.28s ease-out forwards;
}

.sf-product-modal-scroll {
    overflow-anchor: none;
}

.sf-product-modal-body-stage {
    position: relative;
}

.sf-product-modal-body-stage--locked {
    min-height: 20.5rem;
}

.sf-product-modal-client-stage {
    min-height: 20.5rem;
}

.sf-product-modal-options-skeleton {
    min-height: 20.5rem;
}

.sf-product-modal-skeleton-choice {
    height: 2.75rem;
    min-height: 2.75rem;
}

.sf-product-modal-skeleton-note {
    height: 4.75rem;
    min-height: 4.75rem;
}

@keyframes sf-product-sheet-up {
    from {
        transform: translateY(100%);
        opacity: 0.65;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sf-product-modal-footer {
    flex-shrink: 0;
    box-shadow: 0 -8px 24px rgb(15 23 42 / 0.08);
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.sf-product-page-sticky-wrap {
    pointer-events: none;
}

.sf-product-page-sticky-wrap > * {
    pointer-events: auto;
}

/* Hide global cart float while configuring a product — only the page bar shows. */
.sf-storefront-frame:has([data-sf-product-page]) .sf-cart-float {
    display: none !important;
}

.sf-product-page-hero {
    max-height: min(100vw, 28rem);
}

@media (min-width: 640px) {
    .sf-product-page-hero {
        max-height: 32rem;
    }
}

.sf-dark .sf-product-modal-footer {
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.35);
}

@keyframes sf-otp-autofill-start {
    from {
        opacity: 1;
    }

    to {
        opacity: 1;
    }
}

.sf-otp-input:-webkit-autofill,
.sf-phone-input:-webkit-autofill {
    animation-name: sf-otp-autofill-start;
    animation-duration: 0.01s;
}

@keyframes sf-category-product-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sf-category-products-enter :is(article, .sf-product-card) {
    opacity: 0;
    transform: translateY(6px);
}

.sf-category-products-enter--ready :is(article, .sf-product-card) {
    animation: sf-category-product-fade-in 0.32s ease-out forwards;
}

.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(1) { animation-delay: 0ms; }
.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(2) { animation-delay: 24ms; }
.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(3) { animation-delay: 48ms; }
.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(4) { animation-delay: 72ms; }
.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(5) { animation-delay: 96ms; }
.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(6) { animation-delay: 120ms; }
.sf-category-products-enter--ready :is(article, .sf-product-card):nth-child(n + 7) { animation-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
    .sf-skeleton::after {
        animation: none;
    }

    .sf-product-sheet--enter {
        animation: none;
    }

    .sf-category-products-enter :is(article, .sf-product-card),
    .sf-category-products-enter--ready :is(article, .sf-product-card) {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .sf-otp-input:-webkit-autofill,
    .sf-phone-input:-webkit-autofill {
        animation: none;
    }
}
