.storefront-frame { position: relative; display: grid; width: min(100%, var(--store-width)); margin-inline: auto; }
.storefront {
  --store-sticky-top: 0px;
  grid-area: 1 / 1;
  width: 100%;
  max-width: var(--store-width);
  min-width: 0;
  margin-inline: auto;
  overflow: clip;
  background: var(--ui-surface);
  box-shadow: var(--shadow-store);
  color: var(--store-ink);
  container-type: inline-size;
}
.preview-tools {
  position: sticky;
  bottom: var(--space-8);
  z-index: var(--layer-preview);
  grid-area: 1 / 1;
  align-self: end;
  justify-self: center;
}
.preview-tools-popover { display: grid; justify-items: center; gap: var(--space-5); }
.preview-tools button { min-height: var(--control-compact); padding: var(--space-4) var(--space-9); border: 1px solid var(--ui-floating-border); border-radius: var(--radius-6); background: var(--ui-panel); color: var(--ui-ink); font-size: var(--text-11); font-weight: 680; white-space: nowrap; }
.preview-tools button:hover, .preview-tools button[aria-expanded="true"] { background: var(--ui-highlight); }
.preview-tools-note { max-width: 206px; padding: var(--space-6) var(--space-9); border-radius: var(--radius-6); background: var(--ui-panel); color: var(--ui-muted); font-size: var(--text-11); box-shadow: var(--shadow-floating); }
.preview-tools .preview-close { display: none; }
#store-screen .preview-close { display: block; }
#store-screen .storefront { margin-bottom: var(--store-toolbar-clearance); }
.store-search { display: flex; width: min(206px, 67vw); gap: var(--space-5); padding: var(--space-5); border: 1px solid var(--ui-floating-border); border-radius: var(--radius-7); background: var(--ui-panel); box-shadow: var(--shadow-floating); }
.store-search input { flex: 1; width: 0; min-width: 0; padding: var(--space-4) var(--space-6); border: 1px solid var(--ui-control-border); border-radius: var(--radius-5); color: var(--store-ink); font-size: var(--text-13); }
.store-search button { padding-inline: var(--space-6); }

.storefront button:focus-visible { outline-color: var(--ui-focus); outline-offset: -2px; }
.order-picture { display: block; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-8); background: var(--store-picture); }
.order-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
button.order-picture:hover img { filter: brightness(.96); }
.order-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-6); color: var(--store-muted); font-size: var(--text-11); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.order-placeholder .text-button { font-size: var(--text-11); }

/* 门头与门店卡 */
.store-hero {
  --hero-ink: var(--store-cover-light-ink);
  --hero-shade: var(--store-cover-light-shade);
  --hero-control-bg: var(--store-cover-light-control);
  --hero-control-border: var(--store-cover-light-border);
  --hero-control-hover: var(--store-cover-light-hover);
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--store-cover-placeholder);
}
.store-hero[data-cover-tone="dark"] {
  --hero-ink: var(--store-cover-dark-ink);
  --hero-shade: var(--store-cover-dark-shade);
  --hero-control-bg: var(--store-cover-dark-control);
  --hero-control-border: var(--store-cover-dark-border);
  --hero-control-hover: var(--store-cover-dark-hover);
}
.store-hero::before {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: clamp(64px, 24cqw, 96px);
  background: linear-gradient(to bottom, var(--hero-shade), transparent);
  pointer-events: none;
  content: '';
}
.store-hero-overlay { position: absolute; z-index: 2; inset: 0 0 auto; color: var(--hero-ink); pointer-events: none; }
.store-hero-overlay button { pointer-events: auto; }
.store-phone-status { display: flex; height: clamp(22px, 6.4cqw, 26px); align-items: center; justify-content: space-between; padding-inline: var(--space-18); font-size: var(--text-14); font-weight: 750; font-variant-numeric: tabular-nums; }
.phone-indicators { display: flex; align-items: center; gap: var(--space-4); }
.store-hero-nav, .store-hero-actions { display: flex; align-items: center; }
.store-hero-nav { justify-content: space-between; margin-top: var(--space-5); padding-inline: var(--space-9); }
.store-hero-actions { gap: clamp(var(--space-3), 1.25cqw, var(--space-5)); }
.hero-icon-button { display: grid; width: 33px; height: 31px; place-items: center; padding: 0; border: 0; border-radius: var(--radius-7); background: transparent; color: inherit; }
.hero-icon-button[aria-pressed="true"] svg { fill: var(--store-yellow); }
.hero-text-button { min-width: 37px; min-height: 23px; padding: var(--space-2) var(--space-7); border: 1px solid var(--hero-control-border); border-radius: var(--radius-7); background: var(--hero-control-bg); color: inherit; font-size: var(--text-11); font-weight: 680; }
.hero-text-button:hover, .hero-icon-button:hover { background: var(--hero-control-hover); }
.cover-photo { border-radius: 0; }
.store-hero-media { position: absolute; right: 9px; bottom: 15px; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-8); background: var(--store-cover-media); color: var(--store-cover-media-ink); }
.store-hero-media button { min-height: 20px; padding: var(--space-2) var(--space-6); border: 0; border-radius: var(--radius-5); background: transparent; color: inherit; font-size: var(--text-10); line-height: 1.1; white-space: nowrap; }
.store-hero-media button[data-hero-original] { color: var(--store-cover-accent); font-weight: 680; }
.store-hero-media button:hover { background: var(--store-inverse-hover); }
.store-hero-media button:focus-visible { outline-color: var(--store-cover-accent); }
.store-summary { position: relative; margin-top: calc(-1 * var(--space-11)); padding: var(--space-13) var(--store-gutter) var(--space-11); border-radius: var(--radius-13) var(--radius-13) 0 0; border-bottom: 6px solid var(--store-category-bg); background: var(--ui-surface); }
.store-hero[hidden] + .store-summary { margin-top: 0; }
.store-profile { display: flex; align-items: center; gap: var(--space-10); }
.store-avatar { display: grid; place-items: center; flex: 0 0 clamp(53px, 17cqw, 72px); aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-9); background: var(--store-avatar); font-size: var(--text-17); font-weight: 850; }
.avatar-art { height: 100%; aspect-ratio: 1; border-radius: 0; background: transparent; }
.avatar-art img { object-fit: contain; }
.avatar-art.order-placeholder span, .avatar-art.order-placeholder .text-button { font-size: var(--text-9); }
.store-profile-copy { min-width: 0; flex: 1; }
.store-profile h3 { font-size: clamp(var(--text-15), 4.8cqw, 21px); line-height: 1.22; font-weight: 850; letter-spacing: -.045em; overflow-wrap: anywhere; }
.store-metrics { display: flex; gap: 0; margin: var(--space-7) 0 0; }
.store-metrics > div { padding-inline: clamp(var(--space-7), 2.65cqw, var(--space-14)); border-left: 1px solid var(--store-line); white-space: nowrap; }
.store-metrics > div:first-child { padding-left: 0; border-left: 0; }
.store-metrics > div:last-child { padding-right: 0; }
.store-metrics dt { color: var(--store-muted); font-size: var(--text-10); }
.store-metrics dd { margin: 0; font-size: clamp(var(--text-12), 3.5cqw, var(--text-15)); line-height: 1.3; font-weight: 780; }
.store-fulfillment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--space-11);
  padding: var(--space-2);
  border: 1px solid var(--store-yellow-border);
  border-radius: var(--radius-pill);
  background: var(--store-cover-dark-ink);
}
.store-fulfillment button {
  position: relative;
  display: flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 1px var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--store-ink);
  font-size: var(--text-14);
  font-weight: 780;
  line-height: 1.2;
  white-space: nowrap;
}
.store-fulfillment button[aria-pressed="true"] { background: linear-gradient(100deg, var(--store-yellow-light), var(--store-yellow)); }
.store-fulfillment small { color: var(--store-muted); font-size: var(--text-11); font-weight: 550; }
.pickup-tag {
  position: absolute;
  top: -11px;
  right: -3px;
  padding: var(--space-2) var(--space-7);
  border-radius: var(--radius-8) var(--radius-8) var(--radius-8) 2px;
  background: var(--store-menu-action);
  color: var(--ui-surface);
  font-size: var(--text-10);
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
}
.store-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  row-gap: var(--space-3);
  margin-top: var(--space-10);
  color: var(--store-offer);
  font-size: var(--text-11);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.store-offer > span {
  position: relative;
  min-height: 26px;
  max-width: 100%;
  align-content: center;
  padding: var(--space-3) 5.var(--space-5);
  border-block: 1px solid var(--store-offer-border);
  background: var(--store-offer-soft);
}
.store-offer > span:last-child { border-right: 1px solid var(--store-offer-border); border-radius: 0 var(--radius-6) var(--radius-6) 0; }
.store-offer > span:only-child { border-left: 1px solid var(--store-offer-border); border-radius: var(--radius-6); }
.store-offer .offer-label {
  padding-inline: var(--space-6);
  border-color: var(--store-offer-end);
  border-radius: var(--radius-6) 0 0 var(--radius-6);
  background: linear-gradient(110deg, var(--store-offer-start), var(--store-offer-end));
  color: var(--ui-surface);
  font-size: var(--text-12);
  font-weight: 760;
}
.store-offer .offer-value + .offer-value::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 11px;
  transform: translateY(-50%);
  background: var(--store-offer-divider);
  content: '';
}
.offer-value strong { margin-left: 1px; font-size: var(--text-15); font-weight: 820; font-variant-numeric: tabular-nums; }
.store-offer-tools { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-5); margin-top: var(--space-6); }
.store-delivery-minimum { flex: 0 0 auto; padding: var(--space-3) var(--space-5); border: 1px solid var(--store-offer-border); border-radius: var(--radius-4); color: var(--store-offer); font-size: var(--text-10); }
.store-offer-detail { max-width: 225px; margin-left: auto; color: var(--store-muted); font-size: var(--text-10); }
.store-offer-detail summary { display: flex; min-height: 22px; align-items: center; justify-content: flex-end; gap: var(--space-4); cursor: pointer; list-style: none; }
.store-offer-detail summary::-webkit-details-marker { display: none; }
.store-offer-detail summary::after { width: 5px; height: 5px; margin: calc(-1 * var(--space-2)) var(--space-2) 0 0; transform: rotate(45deg); border: solid currentColor; border-width: 0 1px 1px 0; content: ''; }
.store-offer-detail[open] summary::after { margin-top: var(--space-2); transform: rotate(225deg); }
.store-offer-detail p { margin-top: var(--space-3); padding: var(--space-5); background: var(--store-paper); text-align: left; }
.store-summary-note { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-8); color: var(--store-muted); }
.store-summary-note:not(:has(> :not([hidden]))) { display: none; }
.summary-story { margin-inline-start: auto; padding: var(--space-2) 0; border: 0; background: transparent; color: var(--store-ink); font-size: var(--text-11); white-space: nowrap; }
.store-slogan { margin-top: var(--space-7); font-size: var(--text-11); line-height: 1.5; overflow-wrap: anywhere; }
.store-preview-label { flex: 0 0 auto; font-size: var(--text-10); }

/* 内容切换与推荐活动 */
.order-title { position: sticky; top: var(--store-sticky-top); z-index: 2; display: flex; gap: clamp(var(--space-18), 6.1cqw, var(--space-24)); padding: 0 var(--store-gutter); background: var(--ui-surface); scroll-margin-top: var(--store-sticky-top); }
.order-title button { position: relative; min-height: var(--store-tabs-height); padding: 0; border: 0; background: transparent; color: var(--store-muted); font-size: clamp(var(--text-13), 4cqw, var(--text-16)); font-weight: 500; white-space: nowrap; }
.order-title button[aria-pressed="true"] { color: var(--store-ink); font-weight: 750; }
.order-title button[aria-pressed="true"]::after { position: absolute; bottom: 8px; left: 50%; width: 21px; height: 3px; transform: translateX(-50%); border-radius: var(--radius-5); background: var(--store-tab-active); content: ''; }
.order-title small { color: var(--store-muted); font-size: var(--text-10); font-weight: 450; }
.store-information { padding: 17px var(--store-gutter) var(--space-24); }
.store-information h4 { margin: 0 0 var(--space-7); }
.store-information p { margin-top: var(--space-6); color: var(--store-muted); font-size: var(--text-13); }
.storefront[data-story-open] > :not([data-store-story]) { display: none; }
.brand-story { min-height: 235px; }
.brand-story header { display: grid; grid-template-columns: 35px 1fr 35px; align-items: center; min-height: 45px; border-bottom: 1px solid var(--store-line); }
.brand-story header button { min-height: 42px; border: 0; background: transparent; color: inherit; font-size: 25px; }
.brand-story h4 { text-align: center; }
.brand-story > p { padding: 33px var(--store-gutter); color: var(--store-muted); font-size: var(--text-13); text-align: center; }
.store-poster, .store-wall, .store-featured { margin: var(--space-3) var(--store-gutter) var(--space-12); }
.poster-photo { aspect-ratio: var(--poster-ratio); }
.store-wall { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 3); gap: var(--space-6); overflow-x: auto; scrollbar-width: none; }
.wall-photo { aspect-ratio: var(--wall-ratio); }
.store-featured { position: relative; isolation: isolate; display: flex; aspect-ratio: var(--showcase-ratio); flex-direction: column; padding: 0 var(--space-7) var(--space-8); overflow: hidden; border-radius: var(--radius-11); background: var(--store-feature-bg); scroll-margin-top: calc(var(--store-sticky-top) + var(--store-tabs-height)); }
.showcase-backdrop { position: absolute; z-index: -1; inset: 0; }
.showcase-backdrop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-featured:has(.showcase-backdrop img) .featured-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.featured-heading { display: flex; min-height: 9.7cqw; flex: 0 0 auto; align-items: center; padding-inline: var(--space-4); }
.featured-title { color: var(--store-feature-text); font-size: var(--text-15); font-weight: 850; }
.featured-items { display: grid; min-height: 0; flex: 1; grid-auto-flow: column; grid-auto-columns: 30%; gap: var(--space-5); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; user-select: none; }
.featured-items:focus-visible { outline: 2px solid var(--store-feature-text); outline-offset: -2px; }
@media (pointer: fine) {
  .featured-items { cursor: grab; }
  .featured-items[data-dragging], .featured-items[data-dragging] * { cursor: grabbing; }
}
@media (pointer: coarse) {
  .featured-items { scroll-snap-type: x mandatory; }
}
.feature-item { display: grid; grid-template-rows: auto 1fr; min-width: 0; overflow: hidden; border-radius: var(--radius-7); background: var(--store-feature-card); color: var(--store-ink); scroll-snap-align: start; }
.feature-picture { position: relative; min-width: 0; }
.featured-photo { aspect-ratio: 1; border-radius: 0; }
.featured-photo img, .menu-photo img { object-position: right center; }
.source-product-photo img { transform: scale(1.06); transform-origin: right center; }
.feature-rank, .feature-sales { position: absolute; pointer-events: none; }
.feature-rank { top: 6px; left: 6px; min-width: 23px; padding: var(--space-2) var(--space-5); border-radius: var(--radius-5); background: var(--store-chip); color: var(--store-chip-ink); font-size: var(--text-11); font-weight: 850; text-align: center; }
.feature-sales { right: 4px; bottom: 4px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-3); background: var(--store-sales-overlay); color: var(--ui-surface); font-size: var(--text-10); line-height: 1.3; }
.feature-copy { display: flex; min-width: 0; min-height: 0; flex-direction: column; justify-content: space-between; padding: var(--space-6) var(--space-6) var(--space-4); }
.feature-name { display: -webkit-box; margin: 0; overflow: hidden; font-size: clamp(var(--text-11), 3.2cqw, var(--text-14)); font-weight: 755; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1px var(--space-3); margin-top: var(--space-3); }
.feature-price { color: var(--store-offer); font-size: clamp(var(--text-11), 3.4cqw, var(--text-14)); font-weight: 850; font-variant-numeric: tabular-nums; }
.feature-detail { width: 24px; min-height: 25px; margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--store-offer); font-size: var(--text-22); font-weight: 780; line-height: 1; }

/* 分类、活动图与商品列表 */
.store-menu { display: grid; grid-template-columns: clamp(65px, 22.5%, 96px) minmax(0, 1fr); background: var(--store-category-bg); scroll-margin-top: calc(var(--store-sticky-top) + var(--store-tabs-height)); }
.store-menu:has(.store-categories[hidden]) { grid-template-columns: minmax(0, 1fr); }
.store-categories { position: sticky; top: calc(var(--store-sticky-top) + var(--store-tabs-height)); align-self: start; display: grid; min-width: 0; padding-bottom: var(--space-9); }
.store-categories button { display: flex; width: 100%; min-height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-8); border: 0; background: transparent; color: var(--store-category-text); font-size: clamp(var(--text-11), 3.05cqw, var(--text-13)); font-weight: 500; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.store-categories button[aria-pressed="true"] { background: var(--ui-surface); color: var(--store-ink); font-weight: 750; }
.store-categories button:hover:not([aria-pressed="true"]) { background: var(--store-category-hover); }
.category-tag { padding: var(--space-2) var(--space-5); border-radius: var(--radius-7) var(--radius-7) var(--radius-7) 2px; background: var(--store-menu-action); color: var(--ui-surface); font-size: var(--text-9); font-weight: 650; line-height: 1.1; white-space: nowrap; }
.store-list { --menu-inset: 9px; min-width: 0; padding: var(--space-8) calc(var(--menu-inset) + var(--space-3)) var(--space-12) var(--menu-inset); background: var(--ui-surface); }
.store-menu-heading { display: flex; align-items: baseline; justify-content: space-between; min-height: 29px; gap: var(--space-4); padding: var(--space-2) 0 var(--space-5); }
.store-menu-heading h4 { margin: 0; font-size: clamp(var(--text-14), 4cqw, var(--text-17)); line-height: 1.3; font-weight: 850; overflow-wrap: anywhere; }
.store-menu-hint { display: flex; width: 100%; align-items: center; justify-content: center; gap: var(--space-9); color: var(--store-muted); font-size: var(--text-11); white-space: nowrap; }
.store-menu-hint::before, .store-menu-hint::after { height: 1px; flex: 1; background: var(--store-line); content: ''; }
.store-campaign { margin-bottom: var(--space-8); }
.campaign-photo { aspect-ratio: 3.1; border-radius: var(--radius-7); background: var(--store-campaign-placeholder); }
.campaign-photo img { object-position: center 38%; }
.store-empty { padding: var(--space-12) 0; color: var(--store-muted); font-size: var(--text-12); }
.menu-group + .menu-group { margin-top: var(--space-10); }
.menu-group-title { margin: 0; padding: var(--space-3) 0; color: var(--store-ink); font-size: var(--text-13); line-height: 1.3; }
.menu-group-promo { margin-inline: calc(-1 * var(--menu-inset)) calc(-1 * var(--space-3)); padding: var(--space-9) var(--space-6) var(--space-4) var(--menu-inset); border-radius: var(--radius-10); background: linear-gradient(var(--store-offer-soft), var(--ui-surface-soft) 70%, var(--ui-surface)); }
.menu-group-promo .menu-group-title { padding: 0; font-weight: 750; }
.menu-group-title small { margin-left: var(--space-6); color: var(--store-warm-text); font-size: var(--text-10); font-weight: 500; }
.order-item { display: grid; grid-template-columns: clamp(60px, 37%, 110px) minmax(0, 1fr); align-items: start; gap: var(--space-8); padding: var(--space-6) 0; }
.order-item + .order-item { margin-top: var(--space-3); }
.menu-photo { aspect-ratio: 1; }
.product-thumbnail { position: relative; min-width: 0; }
.product-image-tag { position: absolute; top: 0; left: 0; padding: var(--space-3) var(--space-6); border-radius: var(--radius-7) 0 var(--radius-6); background: var(--store-chip); color: var(--store-chip-ink); font-size: var(--text-10); font-weight: 760; pointer-events: none; }
.order-item-copy { display: flex; min-width: 0; flex-direction: column; }
.order-item-name { margin: 0; font-size: clamp(var(--text-13), 3.6cqw, var(--text-16)); font-weight: 600; line-height: 1.32; overflow-wrap: anywhere; }
.product-title-tag { display: inline-block; margin-right: var(--space-4); padding: 1px var(--space-3); border-radius: var(--radius-3); background: var(--store-chip); color: var(--store-chip-ink); font-size: var(--text-10); font-weight: 650; vertical-align: 1px; white-space: nowrap; }
.order-sales, .order-detail { margin-top: var(--space-3); font-size: clamp(var(--text-10), 2.9cqw, var(--text-12)); line-height: 1.35; overflow-wrap: anywhere; }
.order-sales { display: flex; flex-wrap: wrap; column-gap: var(--space-6); color: var(--store-muted); }
.order-highlight { color: var(--store-highlight); }
.order-detail { color: var(--store-warm-text); }
.order-price { color: var(--store-menu-action); font-size: clamp(var(--text-14), 4.35cqw, var(--text-17)); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-price-symbol { margin-right: 1px; font-size: .72em; }
.order-item-foot { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-5); }
.product-pricing { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 1px var(--space-3); }
.product-price-tag { padding: 1px var(--space-3); border-radius: var(--radius-3); background: var(--store-offer-end); color: var(--ui-surface); font-size: var(--text-9); font-weight: 650; white-space: nowrap; }
.product-original-price { color: var(--store-muted); font-size: var(--text-10); white-space: nowrap; }
.product-saving { align-self: flex-start; margin-top: var(--space-3); padding: 1px var(--space-3); border-radius: var(--radius-3); background: var(--store-offer-soft); color: var(--store-offer); font-size: var(--text-10); white-space: nowrap; }
.order-action { flex-shrink: 0; margin-left: auto; min-height: 22px; padding: var(--space-3) var(--space-7); border: 0; border-radius: var(--radius-pill); background: var(--store-menu-action); color: var(--ui-surface); font-size: var(--text-11); font-weight: 700; white-space: nowrap; }
.order-action:hover { background: var(--store-menu-action-hover); }

#store-screen-content img { max-height: none; border-radius: inherit; }
@container (max-width: 355px) {
  .store-summary, .order-title { padding-inline: var(--space-10); }
}
