* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #edf1f5;
  color: #24272d;
  --order-theme: #b4c900;
  --order-theme-soft: #eef4d4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.order-phone {
  width: min(100vw, 414px);
  min-height: 100vh;
  margin: 0 auto;
  background: #f7f8fb;
  overflow-x: hidden;
  position: relative;
}

.brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 26px 16px 22px;
  background: #fff;
}

.brand-title img {
  width: 26px;
  height: auto;
}

.brand-title h1 {
  margin: 0;
  color: #b4c900;
  font-size: 18px;
  line-height: 26px;
  font-weight: 800;
}

.brand-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 177px);
  justify-content: center;
  gap: 20px;
  padding: 20px 0 32px;
}

.brand-card {
  width: 177px;
  height: 105px;
  padding: 12px 15px;
  border-radius: 7px;
  background: center / cover no-repeat;
  color: #333;
  text-align: left;
  overflow: hidden;
}

.brand-card strong,
.brand-card em,
.brand-card span {
  display: block;
}

.brand-card strong {
  font-size: 17px;
  line-height: 25px;
  font-weight: 800;
}

.brand-card em {
  margin-top: 4px;
  font-size: 14px;
  line-height: 21px;
  font-style: normal;
}

.brand-card span {
  width: 50px;
  height: 20px;
  margin-top: 10px;
  border-radius: 33px;
  background: var(--brand-color, #b4c900);
  color: #fff;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
}

.top-nav,
.menu-store-header {
  height: 54px;
  display: grid;
  grid-template-columns: 68px 1fr 68px;
  align-items: center;
  padding: 0 10px;
  background: #fff;
}

.top-nav h1,
.menu-store-header h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  line-height: 22px;
}

.top-nav button,
.menu-store-header button {
  min-height: 34px;
  border-radius: 8px;
  background: transparent;
  color: #59616d;
}

.brand-entry-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--brand-theme, #b4c900) 0, #f7f8fb 238px);
  position: relative;
}

.brand-entry-page::after {
  content: "";
  position: absolute;
  top: 176px;
  left: 0;
  right: 0;
  height: 80px;
  border-radius: 26px 26px 0 0;
  background: #f7f8fb;
}

.brand-entry-hero {
  position: relative;
  z-index: 1;
  width: 252px;
  height: 150px;
  margin: 24px auto 0;
  border-radius: 7px;
  background: center / cover no-repeat;
  box-shadow: 0 18px 38px rgba(24, 30, 45, .18);
}

.brand-entry-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 46px 16px 0;
}

.brand-entry-actions button {
  min-height: 96px;
  padding: 22px 10px;
  border-radius: 7px;
  background: #fff;
  color: #202124;
  text-align: center;
  box-shadow: 0 8px 22px rgba(30, 38, 58, .08);
}

.brand-entry-actions button:nth-child(-n + 2) {
  min-height: 142px;
  padding-top: 36px;
}

.brand-entry-actions strong,
.brand-entry-actions span {
  display: block;
}

.brand-entry-actions strong {
  color: var(--brand-theme, #b4c900);
  font-size: 17px;
  line-height: 24px;
}

.brand-entry-actions span {
  margin-top: 5px;
  color: #9098a3;
  font-size: 12px;
}

.store-toolbar {
  display: grid;
  grid-template-columns: 82px 88px 1fr;
  gap: 8px;
  padding: 12px 18px 16px;
  background: #fff;
}

.store-toolbar button,
.store-toolbar select,
.store-toolbar input,
.product-search {
  width: 100%;
  height: 42px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: #202124;
  outline: 0;
}

.city-panel {
  padding: 12px 10px;
  background: #fff;
  border-top: 1px solid #edf0f5;
}

.city-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.city-chip-grid button,
.city-list button {
  height: 37px;
  border-radius: 2px;
  background: #f7f8fa;
  color: #30343b;
}

.city-list {
  margin-top: 10px;
  display: grid;
  gap: 1px;
}

.city-list button {
  text-align: left;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid #f0f1f3;
}

.status-line,
.empty-state {
  margin: 18px;
  color: #7a828f;
  text-align: center;
  font-size: 13px;
}

.order-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 16px 18px;
  padding: 22px 16px;
  border-radius: 8px;
  background: #fff;
  color: #59616d;
  box-shadow: 0 8px 22px rgba(30, 38, 58, .08);
}

.order-loading.compact {
  margin: 0 0 14px;
  padding: 16px;
  box-shadow: none;
  background: #f7f9fc;
}

body.is-loading-menu #menu-loading {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 80;
  width: min(320px, calc(100vw - 48px));
  margin: 0;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 18px 48px rgba(20, 28, 44, .22);
}

body.is-loading-menu::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(246, 248, 251, .68);
  backdrop-filter: blur(2px);
}

.order-loading strong,
.order-loading small {
  display: block;
}

.order-loading strong {
  color: #30343b;
  font-size: 15px;
  line-height: 21px;
}

.order-loading small {
  color: #8b929d;
  font-size: 12px;
  line-height: 18px;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #edf0f5;
  border-top-color: var(--order-theme);
  animation: order-loading-spin .8s linear infinite;
}

@keyframes order-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.store-list,
.order-list {
  background: #fff;
}

.store-item,
.order-item {
  display: grid;
  width: 100%;
  min-height: 116px;
  padding: 24px 32px 14px;
  background: #fff;
  color: #30343b;
  text-align: left;
  border-bottom: 1px solid #f2f4f6;
}

.store-item.active {
  background: #fbfde9;
}

.store-item strong,
.order-item strong {
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
}

.store-item span,
.order-item span {
  margin-top: 7px;
  color: #69707a;
  font-size: 12px;
  line-height: 18px;
}

.fixed-action {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 5;
  width: min(100vw, 414px);
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(35, 45, 70, .08);
}

.fixed-action button,
.primary-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  background: var(--order-theme);
  color: #fff;
  font-weight: 800;
}

.menu-store-header {
  grid-template-columns: 54px 1fr 54px;
  gap: 8px;
  height: 70px;
}

.menu-store-header h1,
.menu-store-header p {
  margin: 0;
}

.menu-store-header p {
  margin-top: 5px;
  color: #7d8490;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-notice {
  height: 30px;
  padding: 0 10px;
  background: #fff7df;
  color: #c08100;
  font-size: 12px;
  line-height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-layout {
  display: grid;
  grid-template-columns: 62px 1fr;
  min-height: calc(100vh - 152px);
}

.category-list {
  background: #f1f4f8;
}

.category-list button {
  width: 62px;
  min-height: 58px;
  padding: 6px;
  background: transparent;
  color: #59616d;
  font-size: 12px;
}

.category-list button.active {
  background: #fff;
  color: var(--order-theme);
  font-weight: 800;
}

.product-column {
  padding: 10px 10px 78px;
  background: #fff;
}

.product-search {
  margin-bottom: 10px;
  background: #f7f9fc;
}

.product-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 72px;
  gap: 10px;
  width: 100%;
  min-height: 116px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
  background: #fff;
  text-align: left;
  align-items: center;
}

.product-card.is-unavailable {
  cursor: not-allowed;
  opacity: .56;
}

.product-card.is-unavailable .product-img {
  filter: grayscale(1);
}

.product-card.is-unavailable .spec-pill {
  background: #c9ced6;
  color: #fff;
}

.menu-empty-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 8px;
  background: #f7f9fc;
  color: #59616d;
}

.menu-empty-card strong,
.menu-empty-card span {
  display: block;
}

.menu-empty-card strong {
  color: #202124;
  font-size: 15px;
  line-height: 21px;
}

.menu-empty-card span {
  font-size: 12px;
  line-height: 18px;
}

.menu-empty-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.menu-empty-actions button {
  min-height: 34px;
  border-radius: 17px;
  background: var(--order-theme);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.menu-empty-actions button:last-child {
  background: #222831;
}

.product-img,
.detail-image {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f4e0, #d7e4a5) center / cover no-repeat;
}

.product-info {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
}

.product-info h2 {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-info p {
  margin: 0;
  color: #9098a3;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-row strong {
  color: #f05a28;
  font-size: 18px;
  line-height: 24px;
}

.product-action {
  justify-self: stretch;
  width: 72px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.spec-pill {
  display: inline-grid;
  place-items: center;
  height: 28px;
  width: 68px;
  border-radius: 14px;
  background: var(--order-theme);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.cart-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: center;
  width: min(100vw, 414px);
  min-height: 52px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(35, 45, 70, .12);
}

.cart-summary {
  height: 100%;
  padding-left: 14px;
  background: #fff;
  text-align: left;
}

.cart-summary,
.cart-summary:active {
  color: inherit;
}

.cart-summary {
  border-radius: 0;
}

.cart-dock div,
.cart-summary {
  padding-left: 14px;
}

.cart-dock span,
.cart-dock strong,
.cart-summary span,
.cart-summary strong {
  display: block;
}

.cart-dock span {
  color: #2c333d;
  font-size: 13px;
}

.cart-dock strong {
  color: #f05a28;
  font-size: 18px;
}

.cart-dock button {
  align-self: stretch;
  background: var(--order-theme);
  color: #fff;
  font-weight: 800;
}

.cart-dock .cart-summary {
  background: #fff;
  color: #2c333d;
  font-weight: 400;
}

.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 16;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .28);
}

.cart-panel-card {
  display: flex;
  flex-direction: column;
  width: min(100vw, 414px);
  max-height: 58vh;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: 8px 8px 0 0;
  background: #fff;
  overflow: hidden;
}

.cart-panel-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cart-panel-card header strong {
  font-size: 16px;
  line-height: 24px;
}

.cart-panel-card header button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 16px;
  background: #f1f4f8;
  color: #59616d;
}

.cart-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.cart-empty {
  margin: 18px 0;
  color: #8b929d;
  text-align: center;
  font-size: 13px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f6;
}

.cart-line strong,
.cart-line span,
.cart-line em {
  display: block;
}

.cart-line strong {
  color: #202124;
  font-size: 14px;
  line-height: 20px;
}

.cart-line span {
  margin-top: 3px;
  color: #9098a3;
  font-size: 12px;
}

.cart-line .cart-selection {
  color: var(--order-theme);
  font-weight: 700;
}

.cart-line em {
  margin-top: 4px;
  color: #f05a28;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.cart-line-actions {
  display: grid;
  grid-template-columns: 28px 28px 28px 42px;
  align-items: center;
  gap: 4px;
}

.cart-line-actions button {
  height: 28px;
  border-radius: 14px;
  background: #f1f4f8;
  color: #2c333d;
  font-size: 12px;
}

.cart-line-actions button[data-action="cart-plus"] {
  background: var(--order-theme);
  color: #fff;
}

.cart-line-actions button[data-action="cart-remove"] {
  width: 42px;
  color: #8b929d;
}

.cart-submit-btn {
  flex: 0 0 auto;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border-radius: 6px;
  background: var(--order-theme);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.cart-submit-btn:disabled {
  background: #d7dce3;
  color: #fff;
}

.product-detail-sheet,
.checkout-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .42);
}

.sheet-card {
  width: min(100vw, 414px);
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.sheet-close {
  float: right;
  background: transparent;
  color: #7d8490;
}

.sheet-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.sheet-card p {
  margin: 0 0 14px;
  color: #7d8490;
  font-size: 13px;
}

.detail-image {
  width: 112px;
  height: 112px;
  margin-bottom: 14px;
}

.detail-image.is-empty,
.sku-option-image.is-empty {
  background-image: linear-gradient(135deg, #f0f4e0, #d7e4a5) !important;
}

.sku-list,
.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.sku-list button,
.payment-methods button {
  min-height: 34px;
  border-radius: 17px;
  padding: 0 12px;
  background: #f1f4f8;
  color: #59616d;
}

.sku-list .sku-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 54px;
  max-width: 100%;
  border-radius: 8px;
  padding: 6px 10px 6px 6px;
  text-align: left;
}

.selected-combo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--order-theme-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(25, 34, 48, .06);
}

.selected-combo span {
  color: #8a94a3;
  font-size: 12px;
  line-height: 16px;
}

.selected-combo strong {
  min-width: 0;
  overflow: hidden;
  color: #30343b;
  font-size: 14px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-combo em {
  color: #f05a28;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  line-height: 18px;
}

.sku-option-image {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: center / cover no-repeat;
}

.sku-option-copy {
  min-width: 0;
}

.sku-option-copy strong,
.sku-option-copy em {
  display: block;
}

.sku-option-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
}

.sku-option-copy em {
  margin-top: 2px;
  color: #f05a28;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.spec-group {
  display: grid;
  gap: 8px;
  width: 100%;
}

.spec-group h3 {
  margin: 0;
  color: #30343b;
  font-size: 13px;
  line-height: 18px;
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-quantity { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #f1f4f8; }
.option-stepper { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.option-stepper button { justify-content: center; padding: 0; width: 34px; }
.spec-group small { font-weight: normal; color: #59616d; }
.fixed-option { font-size: 12px; color: #59616d; padding: 8px; }

.spec-options button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border-radius: 17px;
  padding: 0 13px;
  background: #f1f4f8;
  color: #59616d;
}

.spec-options button.has-image {
  min-height: 42px;
  padding-left: 6px;
}

.spec-options button[disabled] {
  opacity: .42;
}

.spec-option-image {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: center / cover no-repeat #fff;
}

.spec-options strong,
.spec-options em {
  font-size: 12px;
  line-height: 16px;
}

.spec-options em {
  margin-left: 4px;
  color: #f05a28;
  font-style: normal;
}

.sku-list button.active,
.spec-options button.active,
.payment-methods button.active {
  background: var(--order-theme-soft);
  color: var(--order-theme);
  font-weight: 800;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px 0;
}

.qty-row button {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: #f1f4f8;
}

.checkout-summary {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
}

.receiver-field {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.receiver-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 12px;
  background: #f8fafc;
  color: #111827;
  font-size: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f6;
  font-size: 14px;
}

.result-box {
  min-height: 80px;
  max-height: 180px;
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  background: #202124;
  color: #f8fafc;
  font-size: 12px;
  white-space: pre-wrap;
}

.result-box.scan-pay-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-height: none;
  margin: 12px 0 16px;
  padding: 16px;
  border: 1px solid #e7ecf3;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
  text-align: center;
  white-space: normal;
}

.scan-pay-title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.scan-pay-amount {
  color: var(--order-theme);
  font-size: 24px;
  font-weight: 900;
}

.scan-pay-qr {
  display: grid;
  place-items: center;
  width: min(220px, 72vw);
  height: min(220px, 72vw);
  border: 8px solid #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .12);
}

.scan-pay-qr img,
.scan-pay-qr canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scan-pay-box p {
  margin: 0;
  color: #59616d;
  font-size: 14px;
}

.scan-pay-link {
  color: var(--order-theme);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.scan-pay-box small {
  color: #8a94a3;
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 374px) {
  .brand-card-grid {
    grid-template-columns: repeat(2, 158px);
    gap: 12px;
  }

  .brand-card {
    width: 158px;
    height: 94px;
  }
}
