/* Scope the storefront theme to the existing menu page, including Livewire updates. */
body:has(.store-hero) {
    --store-red: #e52330;
    --store-ink: #242424;
    --store-muted: #676767;
    --store-line: #ececec;
    --store-soft: #f7f7f7;
    color: var(--store-ink);
    background: #fff;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body:has(.store-hero) .container,
.store-header-inner {
    max-width: 1200px;
}

body:has(.store-hero) :is(a, button, input):focus-visible {
    outline: 3px solid #a31621;
    outline-offset: 4px;
}

.store-header {
    background: #fff;
    border-bottom: 1px solid var(--store-line, #ececec);
}

.store-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
    margin-inline: auto;
    padding-inline: 12px;
}

.store-header a {
    color: var(--store-ink, #242424);
    text-decoration: none;
}

.store-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--store-red, #e52330);
    flex-shrink: 0;
}

.store-logo svg,
svg.store-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.store-wordmark {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.store-header-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
}

.store-header .store-header-link {
    color: var(--store-red, #e52330);
}

#page-wrapper:has(.store-hero) > .bg-white.border-bottom {
    border-bottom: 0 !important;
}

#page-wrapper:has(.store-hero) > .bg-white > .container.py-4 {
    padding-top: 40px !important;
    padding-bottom: 34px !important;
}

/* The single-location menu does not need the native location-picker/back row. */
#page-wrapper:has(.store-hero) > .bg-white > .container.py-4 > .mb-3,
#page-wrapper:has(.store-hero) > .bg-white > .container.py-4 > .row.align-items-start > .col-lg-4 {
    display: none !important;
}

#page-wrapper:has(.store-hero) > .bg-white > .container.py-4 > .row.align-items-start > .col-lg-8 {
    flex: 0 0 100%;
    width: 100%;
}

.store-hero-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
}

.store-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border: 1px solid #f8d9dc;
    border-radius: 22px;
    background: #fff4f4;
    color: var(--store-red, #e52330);
    font-size: 40px;
    font-weight: 800;
}

.store-hero-inner > div:nth-child(2) { flex: 1; min-width: 0; }
.store-wordmark { display: inline-flex; align-items: center; gap: 10px; }

.store-avatar svg {
    width: 44px;
    height: 44px;
}

.store-kicker {
    margin: 0 0 6px;
    color: var(--store-red, #e52330);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.25px;
    text-transform: uppercase;
}

.store-title {
    margin: 0 0 9px;
    color: var(--store-ink, #242424);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    letter-spacing: -1.25px;
    line-height: 1.15;
}

.store-subtitle {
    margin: 0;
    color: var(--store-muted, #676767);
    font-size: 14px;
    line-height: 1.6;
}

.store-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 9px 12px;
    border: 1px solid #f1e1e2;
    border-radius: 8px;
    background: #fff9f9;
    color: #963039;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.store-hero-inner > .store-status {
    margin-left: auto;
}

.store-status-dot {
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

#page-wrapper:has(.store-hero) > .sticky-top {
    top: 0;
    z-index: 30;
    background: #fff !important;
    border-color: var(--store-line) !important;
    box-shadow: 0 3px 8px rgb(0 0 0 / 2%);
}

#page-wrapper:has(.store-hero) .sticky-top .layout-scrollable {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

#page-wrapper:has(.store-hero) .sticky-top .layout-scrollable::-webkit-scrollbar {
    display: none;
}

#page-wrapper:has(.store-hero) #navbar-categories {
    gap: 26px;
    min-height: 64px;
    margin: 0;
    padding: 0 !important;
}

#page-wrapper:has(.store-hero) #navbar-categories .nav-item {
    flex-shrink: 0;
}

#page-wrapper:has(.store-hero) #navbar-categories .nav-link {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 18px 0 !important;
    border-bottom: 3px solid transparent;
    border-radius: 0 !important;
    color: var(--store-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
}

#page-wrapper:has(.store-hero) #navbar-categories .nav-link.active,
#page-wrapper:has(.store-hero) #navbar-categories .nav-link:hover {
    color: var(--store-red);
    border-bottom-color: var(--store-red);
    background: transparent;
}

#page-wrapper:has(.store-hero) #navbar-categories .nav-link:focus-visible {
    outline-offset: -3px;
    box-shadow: none;
}

#page-wrapper:has(.store-hero) > .container.pt-3 {
    padding-top: 30px !important;
    padding-bottom: 70px !important;
}

#page-wrapper:has(.store-hero) .menu-search {
    padding-bottom: 26px !important;
}

.store-search {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 5px 14px;
    border: 1px solid #efefef;
    border-radius: 10px;
    background: var(--store-soft, #f7f7f7);
}

.store-search:focus-within {
    border-color: #d8666e;
    box-shadow: 0 0 0 3px #fff0f1;
}

.store-search-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--store-red, #e52330);
}

.store-search-icon svg {
    width: 20px;
    height: 20px;
}

.store-search-input {
    width: 100%;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    outline: 0;
    color: var(--store-ink, #242424);
    font: inherit;
    font-size: 14px;
    background: transparent;
    appearance: none;
}

.store-search-input::placeholder {
    color: #6e6e6e;
    opacity: 1;
}

.store-search-input::-webkit-search-cancel-button { appearance: none; }

body:has(.store-hero) .store-search-input:focus-visible {
    outline: 0;
}

.store-search-clear {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--store-muted, #676767);
    cursor: pointer;
}

.store-search-clear svg {
    width: 16px;
    height: 16px;
}

.store-category-section,
#page-wrapper:has(.store-hero) .category-header {
    scroll-margin-top: 90px;
}

.store-category-section {
    margin-bottom: 34px;
}

.store-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--store-ink, #242424);
    font-size: 21px;
    font-weight: 750;
    letter-spacing: -.6px;
    line-height: 1.35;
}

.store-category-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 2px 7px;
    border-radius: 7px;
    background: #f2f2f2;
    color: #717171;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

.store-product {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    align-items: start;
    gap: 16px;
    height: 100%;
    min-height: 162px;
    padding: 16px;
    border: 1px solid #e9e9e9;
    border-radius: 13px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.store-product-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 128px;
}

.store-product-title {
    margin: 0 0 8px;
    color: var(--store-ink, #242424);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.store-product-description {
    margin: 0 0 12px;
    color: var(--store-muted, #676767);
    font-size: 12px;
    line-height: 1.6;
}

.store-product-price {
    margin-top: auto;
    color: #202020;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.store-product-image {
    display: block;
    grid-column: 2;
    grid-row: 1;
    width: 128px;
    height: 128px;
    border-radius: 10px;
    object-fit: cover;
    background: #f7f7f7;
}

.store-product-action {
    position: absolute;
    right: 23px;
    bottom: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 38px;
    min-height: 38px;
    padding: 8px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: var(--store-red, #e52330);
    color: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
    cursor: pointer;
}

.store-product-action:disabled,
.store-product-action[aria-disabled="true"] {
    background: #747474;
    cursor: default;
}

.store-aside {
    position: sticky;
    top: 90px;
    padding: 26px 22px;
    border: 1px solid var(--store-line, #ececec);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgb(0 0 0 / 3%);
}

.store-aside-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #fff2f3;
    color: var(--store-red, #e52330);
}

.store-aside-icon svg {
    width: 26px;
    height: 26px;
}

.store-aside-title {
    margin: 0 0 10px;
    color: var(--store-ink, #242424);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.4px;
    line-height: 1.4;
}

.store-aside-copy {
    margin: 0;
    color: var(--store-muted, #676767);
    font-size: 13px;
    line-height: 1.75;
}

.store-aside-note {
    display: block;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--store-line, #ececec);
    color: #747474;
    font-size: 11px;
    line-height: 1.7;
}

.store-empty {
    padding: 36px 20px;
    border: 1px dashed #ddd;
    border-radius: 12px;
    background: var(--store-soft, #f7f7f7);
    color: var(--store-muted, #676767);
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
}

.store-cookie {
    padding: 14px 0;
    background: #fff !important;
    color: #575757 !important;
    border-top: 1px solid var(--store-line, #ececec);
    box-shadow: 0 -4px 22px rgb(0 0 0 / 5%);
    font-size: 12px;
    line-height: 1.6;
}

.store-cookie :is(button, .btn) {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1px solid var(--store-red, #e52330);
    border-radius: 8px;
    color: #fff;
    background: var(--store-red, #e52330);
    font-size: 12px;
    font-weight: 600;
}

@media (min-width: 992px) {
    #page-wrapper:has(.store-hero) > .container.pt-3 > .row > .col-lg-8 {
        flex: 0 0 74%;
        width: 74%;
        padding-right: 26px;
    }

    #page-wrapper:has(.store-hero) > .container.pt-3 > .row > .col-lg-4 {
        flex: 0 0 26%;
        width: 26%;
    }
}

@media (hover: hover) and (pointer: fine) {
    .store-product:hover {
        border-color: #e5b7ba;
        box-shadow: 0 5px 16px rgb(0 0 0 / 4%);
    }

    .store-product-action:hover {
        background: #c91824;
    }
}

@media (max-width: 1199.98px) {
    body:has(.store-hero) .container,
    .store-header-inner {
        padding-inline: 24px;
    }

    .store-product {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 12px;
    }

    .store-product-image {
        width: 112px;
        height: 112px;
    }

    .store-product-copy {
        min-height: 112px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    #page-wrapper:has(.store-hero) .menu-items > .col-lg-6 {
        flex: 0 0 50%;
        width: 50%;
    }
}

@media (max-width: 767.98px) {
    body:has(.store-hero) .container,
    .store-header-inner {
        padding-inline: 20px;
    }

    .store-header-inner {
        min-height: 64px;
        gap: 14px;
    }

    .store-logo {
        gap: 9px;
    }

    .store-logo svg,
    svg.store-logo {
        width: 28px;
        height: 28px;
    }

    .store-wordmark {
        font-size: 19px;
    }

    .store-header-link {
        font-size: 12px;
    }

    #page-wrapper:has(.store-hero) > .bg-white > .container.py-4 {
        padding-top: 26px !important;
        padding-bottom: 26px !important;
    }

    .store-hero-inner {
        align-items: center;
        gap: 15px;
    }

    .store-avatar {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
        border-radius: 18px;
    }

    .store-avatar svg {
        width: 34px;
        height: 34px;
    }

    .store-kicker {
        font-size: 10px;
        letter-spacing: .8px;
    }

    .store-title {
        margin-bottom: 6px;
        font-size: 28px;
        letter-spacing: -.9px;
    }

    .store-subtitle {
        font-size: 12px;
    }

    .store-hero-inner > .store-status {
        margin-left: 0;
    }

    .store-status {
        padding: 7px 10px;
        font-size: 11px;
    }

    #page-wrapper:has(.store-hero) #navbar-categories {
        min-height: 58px;
        gap: 23px;
    }

    #page-wrapper:has(.store-hero) #navbar-categories .nav-link {
        min-height: 58px;
        padding-block: 16px !important;
        font-size: 13px;
    }

    #page-wrapper:has(.store-hero) > .container.pt-3 {
        padding-top: 22px !important;
        padding-bottom: 42px !important;
    }

    #page-wrapper:has(.store-hero) .menu-search {
        padding-bottom: 26px !important;
    }

    .store-search {
        min-height: 50px;
        gap: 10px;
        padding-inline: 12px;
    }

    .store-search-input {
        font-size: 16px;
    }

    .store-category-section {
        margin-bottom: 30px;
    }

    .store-category-title {
        margin-bottom: 15px;
        font-size: 20px;
    }

    .store-product {
        grid-template-columns: minmax(0, 1fr) 112px;
        min-height: 142px;
        gap: 13px;
        padding: 14px;
        border-radius: 12px;
    }

    .store-product-title {
        font-size: 14px;
    }

    .store-product-description {
        font-size: 12px;
    }

    .store-product-price {
        font-size: 14px;
    }

    .store-product-action {
        right: 20px;
        bottom: 20px;
    }

    .store-cookie .d-flex {
        gap: 12px;
    }
}

@media (max-width: 359.98px) {
    body:has(.store-hero) .container,
    .store-header-inner {
        padding-inline: 16px;
    }

    .store-product {
        gap: 10px;
        padding: 12px;
    }

    .store-product-title {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:has(.store-hero) *,
    body:has(.store-hero) *::before,
    body:has(.store-hero) *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
