/* 美团式点餐结构，仅限商家与购物车两页。 */
body #takeaway-shop-detail-modal.tk-store-page,
body #takeaway-cart-modal.tk-store-page {
    --tk-yellow: #ffd100;
    --tk-ink: #222;
    --tk-muted: #757575;
    --tk-price: #df401d;
    --tk-line: #f0f0f0;
    position: fixed;
    inset: 0 auto auto 50%;
    width: 100%;
    max-width: 480px;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-50%);
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overscroll-behavior: contain;
}
body .tk-store-page, body .tk-store-page * { box-sizing: border-box; }
body .tk-store-page [hidden] { display: none !important; }
body #takeaway-shop-detail-modal.tk-store-page .tk-store-shell.wallet-modal-content,
body #takeaway-cart-modal.tk-store-page .tk-store-shell.wallet-modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: var(--tk-ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow: hidden;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body .tk-store-page button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
body .tk-store-page button:focus-visible, body .tk-store-page input:focus-visible { outline: 2px solid #745b00; outline-offset: 2px; }
body .tk-store-page button:disabled { cursor: default; }
body .tk-store-page .tk-store-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: calc(2px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 8px 2px;
    background: #fff;
}
body .tk-store-page .tk-store-header h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--tk-ink); }
body .tk-store-page .tk-store-header-label { font-size: 14px; color: #555; }
body .tk-store-page .tk-icon-button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: transparent; color: var(--tk-ink); box-shadow: none; }
body .tk-store-page svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body .tk-store-page .tk-header-spacer { width: 44px; }
body .tk-store-page .tk-store-info { flex: 0 0 auto; min-width: 0; }
body .tk-store-page .tk-store-hero { height: 96px; padding: 18px 20px; position: relative; background: #fff5cf; overflow: hidden; }
body .tk-store-page .tk-store-hero.is-tea { background: #edeedc url("assets/takeaway/store/tea-hero-v1.webp") center / cover no-repeat; }
body .tk-store-page .tk-store-hero > div:first-child { position: relative; z-index: 1; }
body .tk-store-page .tk-store-hero span { font-size: 10px; color: #606944; }
body .tk-store-page .tk-store-hero strong { display: block; margin-top: 5px; font-size: 21px; font-weight: 700; color: #3b4526; letter-spacing: 1px; }
body .tk-store-page .tk-store-hero > small { position: absolute; right: 6px; bottom: 4px; font-size: 9px; color: #555; background: #ffffffb3; padding: 1px 4px; border-radius: 3px; }
body .tk-store-page .tk-store-hero .takeaway-shop-thumb { position: absolute; right: 18px; top: 5px; width: 86px; height: 86px; }
body .tk-store-page .tk-store-hero .takeaway-shop-thumb img { width: 100%; height: 100%; object-fit: contain; }
body .tk-store-page .tk-store-hero .takeaway-shop-image-label, body .tk-store-page .tk-store-hero .takeaway-shop-picture-source { display: none; }
body .tk-store-page .tk-store-summary { padding: 12px 16px 9px; }
body .tk-store-page .tk-store-summary h3 { margin: 0 0 7px; font-size: 19px; line-height: 1.35; font-weight: 750; color: var(--tk-ink); overflow-wrap: anywhere; }
body .tk-store-page .tk-store-stats, body .tk-store-page .tk-store-delivery { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: #686868; line-height: 1.7; }
body .tk-store-page .tk-store-rating { font-size: 12px; color: #b76200; font-weight: 700; }
body .tk-store-page .tk-store-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
body .tk-store-page .tk-store-tags span { background: #f6f6f6; color: #666; border-radius: 3px; padding: 2px 6px; font-size: 10px; }
body .tk-store-page .tk-store-tabs { display: flex; align-items: center; gap: 26px; flex: 0 0 auto; border-bottom: 1px solid var(--tk-line); padding: 0 16px; }
body .tk-store-page .tk-store-tabs button { position: relative; padding: 12px 2px; border: 0; background: transparent; color: #686868; font-size: 14px; }
body .tk-store-page .tk-store-tabs button.is-selected { color: var(--tk-ink); font-weight: 700; }
body .tk-store-page .tk-store-tabs button.is-selected::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 24px; height: 3px; border-radius: 2px; transform: translateX(-50%); background: var(--tk-yellow); }
body .tk-store-page .tk-store-tabs > span { margin-left: auto; color: #888; font-size: 10px; }
body .tk-store-page .tk-store-search { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; margin: 8px 12px; padding: 0 10px; border-radius: 8px; background: #f5f5f5; color: #777; }
body .tk-store-page .tk-store-search svg { width: 16px; height: 16px; }
body .tk-store-page .tk-store-search input { width: 100%; min-width: 0; height: 34px; padding: 0; border: 0; background: transparent; color: var(--tk-ink); font-size: 13px; font-family: inherit; }
body .tk-store-page .tk-store-search input::placeholder { color: #858585; }
body .tk-store-page .tk-store-menu-layout { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; }
body .tk-store-page .tk-store-categories { flex: 0 0 76px; min-height: 0; background: #f6f6f6; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 10px; }
body .tk-store-page .tk-store-categories button { display: block; width: 100%; min-height: 48px; padding: 14px 10px; border: 0; border-left: 3px solid transparent; border-radius: 0; background: transparent; color: #666; text-align: left; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
body .tk-store-page .tk-store-categories button.is-selected { border-left-color: var(--tk-yellow); background: #fff; color: var(--tk-ink); font-weight: 700; }
body .tk-store-page .tk-store-menu-scroll { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 0 12px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body .tk-store-page .tk-menu-heading { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 2px; font-size: 13px; color: var(--tk-ink); }
body .tk-store-page .tk-menu-heading small { font-size: 10px; font-weight: 400; color: #858585; }
body .tk-store-page .takeaway-menu-group-list { gap: 0; }
body .tk-store-page .takeaway-dish-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; padding: 14px 0 !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--tk-line) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; transform: none !important; transition: none !important; }
body .tk-store-page .takeaway-dish-thumb { flex: 0 0 80px; width: 80px; height: 80px; border: 0 !important; border-radius: 8px !important; overflow: hidden; position: relative; background: #f7f6f2 !important; box-shadow: none !important; }
body .tk-store-page .takeaway-dish-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
body .tk-store-page .takeaway-dish-thumb img.tk-item-placeholder { object-fit: contain; padding: 4px; }
body .tk-store-page .tk-image-caption { position: absolute; bottom: 0; width: 100%; padding: 1px; background: #ffffffd9; text-align: center; font-size: 9px; color: #777; }
body .tk-store-page .takeaway-dish-meta { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 0; }
body .tk-store-page .takeaway-dish-name { margin: 0; color: var(--tk-ink) !important; font-size: 15px !important; line-height: 1.4; font-weight: 700 !important; overflow-wrap: anywhere; }
body .tk-store-page .takeaway-dish-category { margin: 4px 0 9px; color: #797979; font-size: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body .tk-store-page .tk-dish-buy { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; margin-top: auto; }
body .tk-store-page .takeaway-dish-price { color: var(--tk-price); font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
body .tk-store-page .takeaway-quantity-selector { display: flex; align-items: center; gap: 0; margin: -6px -5px -6px 0; }
body .tk-store-page .takeaway-quantity-btn { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px !important; height: 38px !important; border: 7px solid #fff !important; border-radius: 50% !important; background: var(--tk-yellow) !important; color: var(--tk-ink) !important; padding: 0; box-shadow: none !important; font-size: 21px; font-weight: 500 !important; line-height: 1; transition: none !important; transform: none !important; }
body .tk-store-page .takeaway-quantity-btn.tk-qty-minus { background: #fff !important; position: relative; }
body .tk-store-page .takeaway-quantity-btn.tk-qty-minus::after { content: ""; position: absolute; inset: 0; border: 1px solid #ccc; border-radius: 50%; }
body .tk-store-page .takeaway-quantity-btn:disabled { opacity: 0.4; }
body .tk-store-page .takeaway-quantity-value { min-width: 16px; color: var(--tk-ink) !important; font-size: 13px !important; font-weight: 600 !important; padding: 0 !important; }
body .tk-store-page .takeaway-menu-empty { padding: 30px 4px; text-align: center; color: #777; font-size: 12px; line-height: 1.7; }
body .tk-store-page .takeaway-menu-empty strong { display: block; color: #333; font-size: 14px; }
body .tk-store-page .tk-menu-skeleton { height: 140px; margin-top: 20px; border-radius: 8px; background: repeating-linear-gradient(#f5f5f5 0, #f5f5f5 56px, #fff 56px, #fff 68px); }
body .tk-store-page .tk-store-business { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; }
body .tk-store-page .tk-store-business h4 { margin: 0 0 12px; font-size: 15px; }
body .tk-store-page .tk-store-business dl { display: grid; grid-template-columns: 76px 1fr; gap: 14px 10px; font-size: 12px; }
body .tk-store-page .tk-store-business dt { color: #777; }
body .tk-store-page .tk-store-business dd { margin: 0; overflow-wrap: anywhere; }
body .tk-store-page .tk-store-business p { color: #777; font-size: 11px; line-height: 1.8; }
body .tk-store-page .tk-store-dock { flex: 0 0 auto; padding: 10px 12px calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); background: #fff; }
body .tk-store-page .tk-store-dock-bar { display: flex; align-items: center; min-height: 52px; border-radius: 28px; background: #333; color: #fff; }
body .tk-store-page .takeaway-cart-btn { display: flex; align-items: center; justify-content: center; width: 62px; min-height: 52px; flex: 0 0 62px; border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 0; box-shadow: none !important; transform: none !important; color: #fff !important; }
body .tk-store-page .tk-bag-icon { position: relative; display: block; }
body .tk-store-page .tk-bag-icon svg { width: 28px; height: 28px; }
body .tk-store-page .takeaway-cart-badge { position: absolute; top: -7px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; background: #fa5d39; color: #fff; border-radius: 8px; font-size: 10px; line-height: 16px; }
body .tk-store-page .tk-store-dock-price { flex: 1; min-width: 0; padding-right: 5px; }
body .tk-store-page .tk-store-dock-price strong { display: block; font-size: 19px; line-height: 1.3; white-space: nowrap; }
body .tk-store-page .tk-store-dock-price small { display: block; margin-top: 2px; color: #c9c9c9; font-size: 9px; line-height: 1.4; }
body .tk-store-page .tk-store-checkout { min-width: 93px; min-height: 52px; align-self: stretch; padding: 0 14px; border: 0; border-radius: 0 28px 28px 0; background: var(--tk-yellow); color: var(--tk-ink); font-size: 14px; font-weight: 700; }
body .tk-store-page .tk-store-checkout:disabled { background: #595959; color: #c0c0c0; }
body #takeaway-cart-modal.tk-store-page .tk-store-shell.wallet-modal-content { background: #f5f5f5 !important; }
body .tk-store-page .tk-cart-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; padding: 16px 16px 2px; }
body .tk-store-page .tk-cart-caption strong { color: #333; font-size: 16px; font-weight: 700; }
body .tk-store-page .tk-cart-caption span { color: #777; font-size: 11px; }
body .tk-store-page .takeaway-cart-list { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 20px; gap: 12px; overscroll-behavior: contain; }
body .tk-store-page .takeaway-cart-shop-group { background: #fff; border-radius: 12px; padding: 0 12px; gap: 0; }
body .tk-store-page .takeaway-cart-shop-header { display: flex; align-items: center; gap: 7px; border-radius: 0; border-bottom: 1px solid var(--tk-line); padding: 11px 0; background: #fff; }
body .tk-store-page .tk-cart-shop-symbol { color: #555; font-size: 20px; }
body .tk-store-page .takeaway-cart-shop-name { flex: 1; min-width: 0; margin: 0; font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--tk-ink); overflow-wrap: anywhere; }
body .tk-store-page .takeaway-cart-shop-clear { min-width: 40px; min-height: 38px; padding: 4px 0 4px 4px; border: 0; border-radius: 0; background: transparent; color: #777; font-size: 11px; }
body .tk-store-page .takeaway-cart-item { display: flex; align-items: flex-start; gap: 11px; padding: 14px 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--tk-line); background: #fff; }
body .tk-store-page .takeaway-cart-item .takeaway-dish-thumb { flex-basis: 72px; width: 72px; height: 72px; }
body .tk-store-page .takeaway-cart-item-info { flex: 1; min-width: 0; }
body .tk-store-page .tk-cart-item-heading { display: flex; align-items: flex-start; gap: 8px; }
body .tk-store-page .takeaway-cart-item-name { flex: 1; min-width: 0; margin: 0; color: var(--tk-ink); font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
body .tk-store-page .takeaway-cart-item-remove { padding: 0 0 5px; border: 0; background: transparent; color: #888; font-size: 10px; flex-shrink: 0; }
body .tk-store-page .takeaway-cart-item-price { color: #888; font-size: 10px; margin: 4px 0 9px; }
body .tk-store-page .tk-cart-subtotal { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 10px 0; font-size: 11px; color: #777; }
body .tk-store-page .tk-cart-subtotal strong { margin-left: 4px; color: #333; font-size: 14px; font-weight: 700; }
body .tk-store-page .tk-cart-note { color: #888; font-size: 10px; line-height: 1.5; text-align: center; padding: 0 8px; }
body .tk-store-page .takeaway-cart-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 20px 10px 48px; }
body .tk-store-page .takeaway-cart-empty img { width: 150px; height: 150px; object-fit: contain; }
body .tk-store-page .takeaway-cart-empty h4 { margin: 12px 0 6px; font-size: 17px; color: #444; }
body .tk-store-page .takeaway-cart-empty p { margin: 0 0 20px; font-size: 12px; color: #888; line-height: 1.6; text-align: center; }
body .tk-store-page .tk-yellow-button { padding: 10px 24px; min-height: 40px; border: 0; border-radius: 20px; background: var(--tk-yellow); color: var(--tk-ink); font-size: 13px; font-weight: 600; }
body .tk-store-page .takeaway-direction-toggle { flex-shrink: 0; display: flex; gap: 6px; padding: 8px 16px; background: #fff; border: 0; margin: 0; }
body .tk-store-page .takeaway-direction-btn { flex: 1; padding: 10px 6px; border: 1px solid #eee; border-radius: 8px; background: #fff; color: #666; font-size: 12px; box-shadow: none; }
body .tk-store-page .takeaway-direction-btn.is-active { background: #fff9d8; border-color: #ffdd52; color: #5a4900; }
body .tk-store-page .tk-cart-footer { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding: 12px 16px calc(12px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); background: #fff; border-top: 1px solid var(--tk-line); }
body .tk-store-page .takeaway-menu-total-wrap { flex: 1; min-width: 0; color: #777; }
body .tk-store-page .takeaway-menu-total-wrap small { display: block; font-size: 10px; margin-bottom: 3px; }
body .tk-store-page .takeaway-menu-total-wrap strong { display: block; color: var(--tk-price); font-size: 23px; font-weight: 700; line-height: 1.1; }
body .tk-store-page .takeaway-submit-btn { min-width: 120px; min-height: 44px; padding: 10px 22px; border: 0 !important; border-radius: 24px !important; background: var(--tk-yellow) !important; color: var(--tk-ink) !important; box-shadow: none !important; font-size: 15px; font-weight: 700; margin: 0; width: auto; }
body .tk-store-page .takeaway-submit-btn:disabled { background: #ededed !important; color: #999 !important; }
/* 详情与购物车共用可视区规则，聊天入口也保持全宽，避免全局弹窗键盘皮肤挤到左边。 */
body[data-mobile-keyboard-open="1"] #takeaway-shop-detail-modal.tk-store-page.modal.show,
body[data-mobile-keyboard-open="1"] #takeaway-cart-modal.tk-store-page.modal.show {
    top: var(--lovemi-vv-offset-top, 0px) !important;
    left: calc(50% + var(--lovemi-vv-offset-left, 0px)) !important;
    right: auto !important;
    width: 100% !important;
    max-width: 480px !important;
    height: var(--lovemi-vv-height, 100dvh) !important;
    max-height: var(--lovemi-vv-height, 100dvh) !important;
    transform: translateX(-50%) !important;
    padding: 0 !important;
    border-radius: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}
body[data-mobile-keyboard-open="1"] #takeaway-shop-detail-modal.tk-store-page.modal.show .tk-store-shell.wallet-modal-content,
body[data-mobile-keyboard-open="1"] #takeaway-cart-modal.tk-store-page.modal.show .tk-store-shell.wallet-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    overflow: hidden !important;
}
body[data-mobile-keyboard-open="1"] .tk-store-page .tk-store-hero { display: none; }
body[data-mobile-keyboard-open="1"] .tk-store-page .tk-store-tags, body[data-mobile-keyboard-open="1"] .tk-store-page .tk-store-delivery { display: none; }
body[data-mobile-keyboard-open="1"] .tk-store-page .tk-store-summary { padding: 5px 12px; }
body[data-mobile-keyboard-open="1"] .tk-store-page .tk-store-summary h3 { font-size: 14px; margin-bottom: 0; }
body[data-mobile-keyboard-open="1"] .tk-store-page .tk-store-dock { padding-bottom: 8px; }
body[data-mobile-keyboard-open="1"] .tk-store-page .tk-cart-footer { padding-bottom: 10px; }
@media (min-width: 481px) {
    body #takeaway-shop-detail-modal.tk-store-page, body #takeaway-cart-modal.tk-store-page { top: 20px; height: calc(100vh - 40px); height: calc(100dvh - 40px); max-height: calc(100dvh - 40px); border-radius: 20px; }
}
@media (max-width: 359px) {
    body .tk-store-page .tk-store-summary { padding: 10px 12px 8px; }
    body .tk-store-page .tk-store-summary h3 { font-size: 17px; }
    body .tk-store-page .tk-store-categories { flex-basis: 64px; }
    body .tk-store-page .tk-store-menu-scroll { padding-left: 9px; padding-right: 9px; }
    body .tk-store-page .takeaway-dish-thumb { flex-basis: 66px; width: 66px; height: 72px; }
    body .tk-store-page .takeaway-dish-item { gap: 8px; }
    body .tk-store-page .takeaway-dish-name { font-size: 13px !important; }
    body .tk-store-page .takeaway-dish-price { font-size: 15px; }
    body .tk-store-page .tk-store-dock-price strong { font-size: 16px; }
    body .tk-store-page .tk-store-checkout { min-width: 84px; padding: 0 10px; }
}
@media (max-height: 640px) {
    body .tk-store-page .tk-store-hero { height: 64px; padding: 10px 16px; }
    body .tk-store-page .tk-store-hero strong { font-size: 18px; }
    body .tk-store-page .tk-store-summary { padding-top: 8px; }
    body .tk-store-page .tk-store-tags { display: none; }
}
@media (max-height: 480px) {
    body .tk-store-page .tk-store-hero { display: none; }
    body .tk-store-page .tk-store-summary { padding: 5px 12px; }
    body .tk-store-page .tk-store-summary h3 { font-size: 14px; margin-bottom: 0; }
    body .tk-store-page .tk-store-delivery { display: none; }
}
@media (prefers-reduced-motion: reduce) { body .tk-store-page *, body .tk-store-page *::before, body .tk-store-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
