.merchant-profile-hero {
    min-height: 360px;
    padding: 46px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(120deg, rgba(5, 48, 36, .98), rgba(11, 105, 73, .9)), var(--merchant-banner, linear-gradient(135deg, #0b3f31, #11805a)) center / cover;
    box-shadow: 0 18px 45px rgba(16, 42, 42, .16);
}

.merchant-profile-hero::after {
    content: "";
    width: 320px;
    height: 320px;
    position: absolute;
    right: -80px;
    top: -120px;
    border: 58px solid rgba(224, 247, 201, .13);
    border-radius: 50%;
}

.merchant-profile-main {
    width: 100%;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 24px;
    align-items: end;
}

.merchant-profile-logo {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, .92);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 35px rgba(0, 0, 0, .2);
}

.merchant-profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant-profile-logo span { font-size: 52px; }
.merchant-profile-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.merchant-profile-badges span,
.merchant-profile-badges b { padding: 7px 11px; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.merchant-profile-badges span { background: rgba(255, 255, 255, .16); }
.merchant-profile-badges b.open { color: #bff4d2; background: rgba(16, 107, 67, .8); }
.merchant-profile-badges b.closed { color: #ffe0d8; background: rgba(139, 40, 31, .84); }
.merchant-profile-copy h1 { margin: 10px 0 8px; font: 800 clamp(2.5rem, 5vw, 4.6rem) / .97 "Manrope", sans-serif; letter-spacing: -.065em; }
.merchant-profile-copy > p { max-width: 760px; margin: 0; color: #d9ece5; font-size: 1rem; }
.merchant-profile-copy > p span { margin-right: 8px; color: #bdeca9; }
.merchant-profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.merchant-profile-actions .button { border: 1px solid rgba(255, 255, 255, .24); }
.merchant-back-button { color: #102a2a; background: #fff; }
.merchant-cart-button { background: #ff693b; }
.merchant-cart-button b { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #ff693b; background: #fff; font-size: .7rem; }

.merchant-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--line);
    box-shadow: 0 8px 24px rgba(20, 55, 45, .05);
}

.merchant-facts article { min-height: 92px; padding: 19px; display: flex; gap: 12px; align-items: center; background: #fff; }
.merchant-facts article > span { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 13px; color: #0c7451; background: #e8f5ed; font-weight: 900; }
.merchant-facts small,
.merchant-facts strong { display: block; }
.merchant-facts small { margin-bottom: 3px; color: var(--muted); font-size: .72rem; }
.merchant-facts strong { font-size: .9rem; }

.merchant-information {
    padding: 24px 26px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
    gap: 24px;
    align-items: center;
    border: 1px solid #dbe8df;
    border-radius: 22px;
    background: linear-gradient(135deg, #f0f8f2, #fff);
}

.merchant-information h2 { margin: 5px 0 7px; letter-spacing: -.04em; }
.merchant-info-title-mobile { display: none; }
.merchant-information p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.55; }
.merchant-contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.merchant-contact-actions > a { padding: 14px; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.merchant-contact-actions > a > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: #0f7a55; }
.merchant-contact-actions small,
.merchant-contact-actions strong { display: block; }
.merchant-contact-actions small { color: var(--muted); font-size: .68rem; }
.merchant-contact-actions strong { margin-top: 2px; overflow-wrap: anywhere; font-size: .76rem; }

.merchant-category-tabs { padding: 10px; top: 78px; border: 1px solid var(--line); border-radius: 17px; background: rgba(244, 247, 243, .95); backdrop-filter: blur(12px); }
.merchant-category-tabs a { display: flex; gap: 8px; align-items: center; }
.merchant-category-tabs small { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #0f7a55; font-size: .64rem; }
.menu-section .section-heading p { font-size: .82rem; }
.menu-grid { align-items: start; }
.menu-item { min-height: 205px; padding: 17px; grid-template-columns: minmax(0, 1fr) 132px; align-items: start; transition: transform .18s, box-shadow .18s; }
.menu-item:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(20, 55, 45, .09); }
.menu-item img,
.menu-item-placeholder { width: 132px; height: 132px; border-radius: 18px; }
.menu-item-copy h3 { font-size: 1.12rem; }
.menu-item-copy .muted { margin: 0 0 10px; font-size: .82rem; line-height: 1.45; }
.menu-item-copy .price small { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.menu-option-group:has([data-option-absolute-price]) { border-color: #efd4a7; background: #fffaf0; }
.menu-option-group:has([data-option-absolute-price]) legend small { color: #805313; }
.menu-option-group:has([data-option-absolute-price]) .menu-option-list label:has(input:checked) { border-color: #dfad55; background: #fff3d8; box-shadow: 0 0 0 2px rgba(223, 173, 85, .13); }
.menu-order-panel > summary { min-height: 48px; color: #0b6548; background: #f0f8f3; }
.menu-order-panel[open] > summary { border-bottom: 1px solid var(--line); }
.quantity-field { margin-top: 12px; }
.quantity-control { width: 100%; display: grid; grid-template-columns: 50px minmax(70px, 1fr) 50px; overflow: hidden; border: 1px solid #cbd8d1; border-radius: 14px; background: #fff; }
.quantity-control button { min-height: 48px; border: 0; color: #0b6548; background: #edf6f0; font-size: 1.2rem; font-weight: 900; cursor: pointer; }
.quantity-control input { min-width: 0; min-height: 48px; border: 0 !important; border-radius: 0 !important; text-align: center; font-weight: 900; appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }
.menu-add-button { margin-top: 4px; background: linear-gradient(135deg, #0f7a55, #07543c); }
.merchant-empty-menu { padding: 60px 22px; border: 1px dashed #c8d7cd; border-radius: 24px; background: #fff; text-align: center; }
.merchant-empty-menu > span { font-size: 3rem; }
.merchant-empty-menu h2 { margin: 12px 0 5px; }
.merchant-empty-menu p { margin: 0 0 18px; color: var(--muted); }
.cart-add-toast {
    max-width: min(420px, calc(100vw - 28px));
    padding: 12px 17px;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1600;
    border: 1px solid #b9dcc8;
    border-radius: 14px;
    color: #fff;
    background: #0d6c4b;
    box-shadow: 0 16px 38px rgba(8, 57, 40, .25);
    font-size: .82rem;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .18s ease, transform .18s ease;
}
.cart-add-toast.show { opacity: 1; transform: translateY(0); }
.menu-add-button[aria-busy="true"] { cursor: wait; opacity: .72; }

@media (max-width: 900px) {
    .merchant-profile-hero { min-height: 320px; padding: 30px; }
    .merchant-profile-main { grid-template-columns: 96px 1fr; }
    .merchant-profile-logo { width: 96px; height: 96px; border-radius: 23px; }
    .merchant-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .merchant-information { grid-template-columns: 1fr; }
    .menu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .page-shell { margin-top: 4px; }
    .merchant-profile-hero {
        min-height: 205px;
        padding: 15px 13px;
        align-items: end;
        border-radius: 18px;
    }
    .merchant-profile-hero::after { width: 190px; height: 190px; right: -60px; top: -92px; border-width: 34px; }
    .merchant-profile-main {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 5px 11px;
        align-items: center;
    }
    .merchant-profile-logo {
        width: 58px;
        height: 58px;
        grid-row: 1 / 4;
        margin: 0;
        align-self: start;
        border-width: 3px;
        border-radius: 15px;
    }
    .merchant-profile-logo span { font-size: 29px; }
    .merchant-profile-copy { display: contents; }
    .merchant-profile-badges { grid-column: 2; gap: 5px; }
    .merchant-profile-badges span,
    .merchant-profile-badges b { padding: 4px 7px; font-size: .52rem; }
    .merchant-profile-copy h1 { grid-column: 2; margin: 0; font-size: 1.58rem; line-height: 1; letter-spacing: -.05em; }
    .merchant-profile-copy > p {
        max-width: 100%;
        grid-column: 2;
        margin: 0;
        overflow: hidden;
        font-size: .66rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .merchant-profile-copy > p span { margin-right: 4px; }
    .merchant-profile-actions {
        grid-column: 1 / -1;
        margin-top: 8px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }
    .merchant-profile-actions .button { min-height: 40px; padding: 8px 9px; font-size: .65rem; border-radius: 11px; }
    .merchant-cart-button b { min-width: 20px; height: 20px; font-size: .6rem; }

    .merchant-facts.section { margin-top: 8px; }
    .merchant-facts { border-radius: 15px; }
    .merchant-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .merchant-facts article { min-width: 0; min-height: 67px; padding: 6px 3px; display: grid; grid-template-columns: 1fr; gap: 2px; place-items: center; align-content: center; text-align: center; }
    .merchant-facts article > span { width: 23px; height: 23px; flex-basis: 23px; border-radius: 7px; font-size: .58rem; }
    .merchant-facts article > div { min-width: 0; }
    .merchant-facts small { margin-bottom: 1px; font-size: .43rem; line-height: 1; white-space: nowrap; }
    .merchant-facts strong { min-height: 20px; display: grid; place-items: center; font-size: .51rem; line-height: 1.08; overflow-wrap: anywhere; }

    .merchant-information.section { margin-top: 8px; }
    .merchant-information { padding: 7px; grid-template-columns: 82px minmax(0, 1fr); gap: 6px; border-radius: 13px; }
    .merchant-information .eyebrow,
    .merchant-information p,
    .merchant-info-title-full { display: none; }
    .merchant-info-title-mobile { display: inline; }
    .merchant-information h2 { margin: 0; font-size: .72rem; line-height: 1.1; letter-spacing: -.02em; }
    .merchant-contact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .merchant-contact-actions > a { min-width: 0; padding: 5px; grid-template-columns: 24px minmax(0, 1fr); gap: 5px; border-radius: 9px; }
    .merchant-contact-actions > a > span { width: 24px; height: 24px; border-radius: 7px; font-size: .58rem; }
    .merchant-contact-actions small { display: none; }
    .merchant-contact-actions strong { margin: 0; overflow: hidden; font-size: .5rem; text-overflow: ellipsis; white-space: nowrap; }

    .merchant-category-tabs { top: 68px; margin-top: 8px; padding: 7px; border-radius: 13px; }
    .merchant-category-tabs a { padding: 8px 10px; font-size: .72rem; }
    .merchant-category-tabs small { min-width: 18px; height: 18px; font-size: .52rem; }
    .menu-section.section { margin-top: 15px; }
    .menu-section .section-heading { margin-bottom: 9px; }
    .menu-section .section-heading .eyebrow,
    .menu-section .section-heading p { display: none; }
    .menu-section .section-heading h2 { font-size: 1.18rem; }
    .menu-item { min-height: 0; padding: 14px; grid-template-columns: minmax(0, 1fr) 92px; }
    .menu-item img,
    .menu-item-placeholder,
    .menu-item:has(.menu-order-panel[open]) > img,
    .menu-item:has(.menu-order-panel[open]) > .menu-item-placeholder { width: 92px; height: 92px; }
    .quantity-control { grid-template-columns: 52px minmax(70px, 1fr) 52px; }
    .cart-add-toast { right: 14px; bottom: 84px; left: 14px; max-width: none; text-align: center; }
}

/* A compact merchant identity, with ratings directly below the name. */
.merchant-profile-hero { min-height: 0; padding: 26px; border: 1px solid #dce6df; border-radius: 22px; color: #18392b; background: #fff; box-shadow: 0 6px 22px rgba(20,55,45,.05); }
.merchant-profile-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--merchant-banner, linear-gradient(120deg, #dcefe3, #fff3dd)) center / cover no-repeat; opacity: .18; }
.merchant-profile-hero::after { display: none; }
.merchant-profile-main { grid-template-columns: 90px minmax(0,1fr); align-items: start; gap: 18px; }
.merchant-profile-logo { width: 90px; height: 90px; border: 1px solid #e0e8e2; border-radius: 20px; box-shadow: none; }
.merchant-profile-logo img { object-fit: contain; }
.merchant-profile-copy { display: block; min-width: 0; }
.merchant-profile-badges { gap: 6px; }
.merchant-profile-badges span { color: #52655c; background: #f0f5f1; }
.merchant-profile-badges b.open { color: #155d43; background: #e9f5ee; }
.merchant-profile-badges b.closed { color: #963f25; background: #fff0e8; }
.merchant-profile-copy h1 { margin: 8px 0; color: #18392b; font-size: 32px; line-height: 1.15; letter-spacing: -.7px; overflow-wrap: anywhere; }
.merchant-profile-copy > .merchant-profile-address { display: flex; align-items: start; gap: 6px; color: #52655c; font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.merchant-profile-address svg { width: 17px; height: 20px; flex: 0 0 17px; fill: #155d43; }
.merchant-profile-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding-top: 15px; border-top: 1px solid #e6ede8; }
.merchant-profile-actions .button { min-height: 46px; padding: 10px; font-size: 14px; border-radius: 12px; gap: 7px; }
.merchant-profile-actions .merchant-back-button { border-color: #d7e4db; color: #155d43; background: #f7faf7; }
.merchant-profile-actions .merchant-cart-button { background: #155d43; color: #fff; }
.merchant-cart-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.merchant-cart-button b { color: #155d43; }
.merchant-category-tabs { background: #fff; box-shadow: 0 4px 15px rgba(20,55,45,.03); scrollbar-width: thin; }
.merchant-category-tabs a { min-height: 42px; border-radius: 10px; border: 1px solid #dce7df; color: #18392b; background: #f7faf7; }
.merchant-category-tabs a:focus-visible { outline: 3px solid #288056; outline-offset: -3px; }
.menu-section .section-heading h2 { color: #18392b; letter-spacing: -.4px; }
@media (max-width: 600px) {
    .merchant-profile-hero { padding: 16px; border-radius: 18px; }
    .merchant-profile-main { grid-template-columns: 62px minmax(0,1fr); gap: 12px; }
    .merchant-profile-logo { width: 62px; height: 62px; border-radius: 15px; grid-row: auto; }
    .merchant-profile-copy h1 { margin: 6px 0; font-size: 24px; line-height: 1.2; }
    .merchant-profile-copy .merchant-rating-summary, .merchant-profile-copy > .merchant-profile-address { margin-left: -74px; }
    .merchant-profile-copy .merchant-rating-summary { margin-top: 15px; }
    .merchant-profile-copy > .merchant-profile-address { font-size: 13px; margin-top: 7px; }
    .merchant-profile-badges span, .merchant-profile-badges b { padding: 4px 6px; font-size: 10px; }
    .merchant-profile-actions { padding-top: 12px; gap: 8px; }
    .merchant-profile-actions .button { font-size: 12px; }
    .merchant-facts article { min-height: 72px; }
    .merchant-facts small { font-size: 9px; white-space: normal; line-height: 1.3; }
    .merchant-facts strong { font-size: 10px; line-height: 1.3; }
}

/* Customer menu cards: explicit contrast, readable names and full-width ordering. */
.merchant-menu-item.menu-item { color: #18392b; background: #fff; grid-template-columns: minmax(0, 1fr) 104px; gap: 14px; min-height: 0; padding: 18px; border: 1px solid #dde7df; box-shadow: 0 3px 12px rgba(20,55,45,.025); }
.merchant-menu-item .menu-item-copy { min-width: 0; }
.merchant-menu-item .menu-item-copy h3, .merchant-menu-item .merchant-item-name { margin: 0 0 8px; color: #18392b; font-size: 18px; line-height: 1.35; font-weight: 800; letter-spacing: -.3px; overflow-wrap: anywhere; opacity: 1; }
.merchant-item-name { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.merchant-menu-item .menu-item-copy .muted { color: #53685d; font-size: 13px; line-height: 1.5; }
.merchant-menu-item .menu-item-copy .price { margin-top: 10px; color: #146141; font-size: 18px; }
.merchant-menu-item > img, .merchant-menu-item > .menu-item-placeholder { width: 104px; height: 104px; object-fit: contain; border-radius: 15px; background: #f5f8f5; }
.merchant-item-order { grid-column: 1 / -1; min-width: 0; }
.merchant-menu-item .menu-order-panel { margin: 0; border: 1px solid #d5e6da; border-radius: 14px; }
.merchant-menu-item .menu-order-panel > summary { min-height: 46px; padding: 12px 15px; font-size: 14px; list-style: none; }
.merchant-menu-item .menu-order-panel > summary::-webkit-details-marker { display: none; }
.merchant-menu-item .menu-order-panel > form { padding: 14px; }
.merchant-item-form .menu-order-fields { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: end; gap: 12px; }
.merchant-item-form .quantity-field { margin: 0; gap: 5px; }
.merchant-item-form .quantity-field > label { font-size: 11px; }
.merchant-item-form .quantity-control { grid-template-columns: 40px minmax(0, 1fr) 40px; border-radius: 12px; }
.merchant-item-form .quantity-control input { width: 100%; padding: 0; font-size: 16px; }
.merchant-item-form .quantity-control button, .merchant-item-form .quantity-control input { min-height: 44px; }
.merchant-item-form .quantity-control button:disabled { color: #8c9d94; cursor: default; }
.merchant-item-form .menu-add-button { width: 100%; min-height: 46px; margin: 0; padding: 9px 12px; gap: 3px; display: flex; flex-direction: column; justify-content: center; border-radius: 12px; font-size: 13px; }
.merchant-item-form .menu-add-button strong { padding: 0; font-size: 12px; font-weight: 700; }
.merchant-item-form .menu-option-group { min-width: 0; padding: 11px; }
.merchant-item-form .menu-option-group legend { display: block; padding: 0 3px; font-size: 14px; }
.merchant-item-form .menu-option-group legend small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; }
.merchant-item-form .menu-option-list label { min-height: 46px; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; padding: 9px; }
.merchant-item-form .menu-option-list span { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.merchant-item-form .menu-option-list input { width: 18px; height: 18px; margin: 0; }
.merchant-item-form .menu-option-list strong { font-size: 12px; }
.merchant-item-form .menu-option-list label:has(input:checked) { border-color: #43835e; }
.merchant-item-form .form-message { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.merchant-item-form .form-message:empty { display: none; }
.merchant-item-form .form-message.success { color: #146141; }
.menu-view-cart { display: inline-flex; min-height: 40px; align-items: center; margin-top: 4px; color: #135c3e; font-size: 13px; font-weight: 800; text-decoration: underline; }
.menu-view-cart[hidden] { display: none; }
.menu-unavailable-badge { display: inline-block; margin-top: 8px; padding: 4px 8px; border-radius: 6px; background: #fff0e4; color: #8b4116; font-size: 11px; font-weight: 800; }
.menu-order-unavailable { display: grid; gap: 6px; }
.menu-order-unavailable button { min-height: 44px; border: 1px solid #d9e2dc; border-radius: 12px; color: #526258; background: #f0f3f0; font-weight: 750; }
.menu-order-unavailable small { color: #64736a; font-size: 12px; line-height: 1.4; }
.merchant-category-tabs { top: 76px; scroll-padding-inline: 10px; }
.menu-section { scroll-margin-top: 156px; }
.merchant-menu-item button:focus-visible, .merchant-menu-item summary:focus-visible, .merchant-menu-item a:focus-visible { outline: 3px solid #288056; outline-offset: 3px; }
@media (max-width: 600px) {
    .merchant-category-tabs { top: 66px; }
    .menu-section { scroll-margin-top: 144px; }
    .merchant-menu-item.menu-item, .merchant-menu-item.menu-item:has(.menu-order-panel[open]) { padding: 14px; grid-template-columns: minmax(0, 1fr) 80px; gap: 12px; border-radius: 18px; }
    .merchant-menu-item.menu-item:has(.menu-order-panel[open]) > .menu-item-copy { grid-row: 1; grid-column: 1; }
    .merchant-menu-item.menu-item:has(.menu-order-panel[open]) > img,
    .merchant-menu-item.menu-item:has(.menu-order-panel[open]) > .menu-item-placeholder { grid-row: 1; grid-column: 2; width: 80px; height: 80px; }
    .merchant-menu-item .menu-item-copy h3, .merchant-menu-item .merchant-item-name { font-size: 16px; line-height: 1.4; }
    .merchant-menu-item > img, .merchant-menu-item > .menu-item-placeholder { width: 80px; height: 80px; }
    .merchant-menu-item .menu-item-copy .price { font-size: 17px; }
    .merchant-item-form .menu-order-fields { grid-template-columns: 124px minmax(0, 1fr); gap: 8px; }
    .merchant-menu-item .menu-order-panel > form { padding: 10px; }
    .merchant-item-form .menu-option-list label { grid-template-columns: 18px minmax(0, 1fr); gap: 5px 8px; }
    .merchant-item-form .menu-option-list input { grid-row: 1 / 3; }
    .merchant-item-form .menu-option-list strong { grid-column: 2; }
}
