/* 商城 */
.yd-shop-page {
  background: #F6F6F6;
}

.yd-shop-header {
  gap: 10px;
}

.yd-shop-header .yd-page-header__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.yd-shop-header__title {
  font-size: 16px;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
}

.yd-shop-header__app-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
}

.yd-shop-header__app-switch {
  color: #16A34A;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.yd-shop-content {
  height: calc(100% - 56px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.yd-shop-cats {
  margin: 12px 12px 0;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 6px;
}

.yd-shop-cat {
  border: none;
  background: transparent;
  padding: 6px 4px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.yd-shop-cat:active {
  opacity: 0.78;
}

.yd-shop-cat[aria-pressed="true"] {
  background: #FFF3EA;
  color: #FF6B00;
}

.yd-shop-cat--add .yd-shop-cat__icon {
  background: rgba(255, 107, 0, 0.10);
}

.yd-shop-cat--add .yd-shop-cat__name {
  color: #FF6B00;
}

.yd-shop-cat__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #F5F5F7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.yd-shop-cat[aria-pressed="true"] .yd-shop-cat__icon {
  background: #FFE6D6;
}

.yd-shop-cat__name {
  font-size: 12px;
  font-weight: 700;
}

.yd-shop-section {
  margin: 12px 12px 0;
}

.yd-shop-section__title {
  font-size: 16px;
  font-weight: 900;
  color: #111;
  margin-bottom: 10px;
  padding-left: 2px;
}

.yd-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.yd-shop-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  position: relative; /* 给“⋯”菜单定位用 */
}

.yd-shop-card:active {
  opacity: 0.86;
}

.yd-shop-card__img {
  height: 110px;
  background: #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.yd-shop-card__body {
  padding: 10px 10px 12px;
}

.yd-shop-card__name {
  font-size: 14px;
  font-weight: 900;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-shop-card__desc {
  margin-top: 4px;
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-shop-card__row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yd-shop-card__price {
  font-size: 15px;
  font-weight: 900;
  color: #FF6B00;
}

.yd-shop-card__add {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: #FF6B00;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 商品详情弹窗（全量重写：移动端 bottom-sheet / 桌面端居中对话框） */
.yd-shop-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(.16,1,.3,1), visibility 0s linear 420ms;
  -webkit-tap-highlight-color: transparent;
}

.yd-shop-modal.yd-modal--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 320ms cubic-bezier(.16,1,.3,1), visibility 0s linear 0s;
}

.yd-shop-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  opacity: 0;
  transition: opacity 320ms cubic-bezier(.16,1,.3,1);
  will-change: opacity;
}

.yd-shop-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(620px, calc(100vw - 24px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  max-height: min(82vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  transform: translate3d(-50%, calc(-50% + 28px), 0) scale(0.975);
  opacity: 0;
  transition: transform 420ms cubic-bezier(.16,1,.3,1), opacity 320ms cubic-bezier(.16,1,.3,1);
  will-change: transform, opacity;
  box-shadow: 0 26px 90px rgba(0,0,0,0.48);
}

.yd-shop-modal.yd-modal--active .yd-shop-modal__mask {
  opacity: 1;
}

.yd-shop-modal.yd-modal--active .yd-shop-modal__panel {
  transform: translate3d(-50%, -50%, 0) scale(1);
  opacity: 1;
}

.yd-shop-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px 12px;
  flex-shrink: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.78) 100%
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.yd-shop-modal__title {
  font-size: 16px;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: 0.2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-shop-modal__x {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.72);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, background-color 160ms ease, color 160ms ease;
}

.yd-shop-modal__x:hover {
  background: rgba(15, 23, 42, 0.1);
  color: rgba(15, 23, 42, 0.86);
}

.yd-shop-modal__x:active {
  transform: scale(0.98);
}

.yd-shop-modal__body {
  padding: 14px 16px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.yd-shop-item-hero {
  height: 160px;
  border-radius: 18px;
  background:
    radial-gradient(120px 90px at 20% 25%, rgba(255, 107, 0, 0.20), transparent 60%),
    radial-gradient(160px 110px at 85% 35%, rgba(59, 130, 246, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.02));
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: rgba(15, 23, 42, 0.78);
}

.yd-shop-item-meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
}

.yd-shop-item-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.yd-shop-item-desc {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.58);
  text-align: left;
  width: 100%;
  line-height: 1.45;
  word-break: break-word;
}

.yd-shop-item-price__num {
  font-size: 22px;
  font-weight: 950;
  color: #ff6b00;
  letter-spacing: 0.2px;
  flex: 0 0 auto;
}

.yd-shop-item-price__name {
  font-size: 13px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.86);
  text-align: right;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-shop-item-options {
  margin-top: 14px;
}

.yd-shop-attrs {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.86);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.yd-shop-attrs__title {
  font-size: 13px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.50);
  letter-spacing: 0.2px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.yd-shop-attrs__inline {
  color: rgba(15, 23, 42, 0.74);
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.yd-shop-attrs__inline::-webkit-scrollbar {
  display: none;
}

.yd-shop-attrs__pair {
  white-space: nowrap;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 2px 12px;
  flex: 0 0 auto;
  text-align: center;
}

.yd-shop-attrs__pair + .yd-shop-attrs__pair {
  border-left: 1px solid rgba(15, 23, 42, 0.22);
}

.yd-shop-attrs__pair-v{
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.84);
}

.yd-shop-attrs__pair-k{
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.52);
}

@media (max-width: 360px) {
  .yd-shop-attrs__inline { width: 100%; }
}

.yd-shop-opt-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.yd-shop-opt-group__title {
  font-size: 13px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.50);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.yd-shop-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.yd-shop-opt {
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.85);
  color: rgba(15, 23, 42, 0.86);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.yd-shop-opt:hover {
  background: rgba(255,255,255,0.98);
  border-color: rgba(15, 23, 42, 0.16);
}

.yd-shop-opt:active {
  transform: translateY(1px);
}

.yd-shop-opt[aria-pressed="true"] {
  border-color: rgba(255, 107, 0, 0.35);
  background: rgba(255, 107, 0, 0.12);
  color: #c24a00;
}

.yd-shop-modal__footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.72) 0%,
    rgba(255,255,255,0.94) 45%,
    rgba(255,255,255,0.98) 100%
  );
}

.yd-shop-modal__btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff7a1a 0%, #ff5f00 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(255, 107, 0, 0.28);
  transition: transform 120ms ease, filter 160ms ease, opacity 160ms ease;
}

.yd-shop-modal__btn:hover {
  filter: brightness(1.03) saturate(1.02);
}

.yd-shop-modal__btn:active {
  transform: translateY(1px);
}

.yd-shop-modal__btn:disabled {
  opacity: 0.45;
}

/* 桌面端：变成真正的居中对话框，而不是贴底 */
@media (min-width: 720px) {
  .yd-shop-modal__panel {
    width: min(680px, calc(100vw - 56px));
  }

  .yd-shop-modal.yd-modal--active .yd-shop-modal__panel {
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .yd-shop-modal__mask,
  .yd-shop-modal__panel {
    transition: none !important;
  }
}

/* 购物车抽屉：基础弹层样式（之前与商品弹窗共用，需单独保留） */
.yd-shop-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  -webkit-tap-highlight-color: transparent;
}

.yd-shop-cart-drawer.yd-modal--active {
  display: block;
}

.yd-shop-cart-drawer__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
}

.yd-shop-cart-drawer__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 16px 16px 0 0;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 18px 50px rgba(0,0,0,0.26);
}

.yd-shop-cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.yd-shop-cart-drawer__title {
  font-size: 16px;
  font-weight: 900;
  color: #111;
}

/* 购物车抽屉 */
.yd-shop-cart-drawer__clear {
  border: none;
  background: transparent;
  color: #FF6B00;
  font-size: 14px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.yd-shop-cart-drawer__list {
  padding: 10px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.yd-shop-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #EEE;
}

.yd-shop-cart-row:last-child {
  border-bottom: none;
}

.yd-shop-cart-row__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.yd-shop-cart-row__main {
  flex: 1;
  min-width: 0;
}

.yd-shop-cart-row__name {
  font-size: 14px;
  font-weight: 900;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-shop-cart-row__opts {
  margin-top: 4px;
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-shop-cart-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.yd-shop-cart-row__price {
  font-size: 13px;
  font-weight: 900;
  color: #FF6B00;
}

.yd-shop-cart-row__stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.yd-shop-cart-row__stepper button {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #E5E5EA;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}

.yd-shop-cart-row__stepper span {
  min-width: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  color: #111;
}

.yd-shop-cart-drawer__footer {
  padding: 12px 14px;
  border-top: 1px solid #EEE;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.yd-shop-cart-drawer__address {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yd-shop-cart-drawer__address-label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 900;
  color: #111;
}

.yd-shop-cart-drawer__address-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #E5E5EA;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.yd-shop-cart-drawer__total {
  font-size: 14px;
  color: #111;
  font-weight: 900;
  text-align: right;
  width: 100%;
}

.yd-shop-cart-drawer__total b {
  color: #FF6B00;
  font-size: 18px;
  margin-left: 6px;
}

.yd-shop-cart-drawer__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.yd-shop-cart-drawer__help {
  border: 1px solid #E5E5EA;
  background: #fff;
  color: #111;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.yd-shop-cart-drawer__pay {
  border: none;
  background: #FF6B00;
  color: #fff;
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

/* 右下角购物车（与外卖一致的交互） */
.yd-shop-cart-fab {
  position: fixed;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.yd-shop-cart-fab--orders {
  bottom: calc(94px + env(safe-area-inset-bottom));
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.yd-shop-cart-fab svg {
  width: 26px;
  height: 26px;
}

.yd-shop-cart-fab:active {
  opacity: 0.85;
}

.yd-shop-cart-fab__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #FF3B30;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.yd-shop-admin-app-section-title {
  padding: 14px 14px 2px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #0f172a;
}

#shop-app-manager-cats,
#shop-app-manager-items {
  padding: 12px 2px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yd-shop-admin-app-row {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.yd-shop-admin-app-row--folder {
  position: relative;
  cursor: pointer;
  margin-top: 1px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98));
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
  padding: 12px 34px 12px 14px;
  list-style: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.yd-shop-admin-app-row--folder:active {
  transform: scale(0.995);
}

.yd-shop-admin-fold[open] .yd-shop-admin-app-row--folder {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.14);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.yd-shop-admin-app-row--folder::-webkit-details-marker {
  display: none;
}

.yd-shop-admin-fold {
  border: none;
  margin: 0 0 8px;
  padding: 0;
}

.yd-shop-admin-fold[open] .yd-shop-admin-app-folder__arrow {
  transform: translateY(-50%) rotate(90deg);
}

.yd-shop-admin-app-folder__arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
  transition: transform 0.18s ease;
}

.yd-shop-admin-app-folder__detail {
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fbff;
  border-left: 1px solid rgba(59, 130, 246, 0.2);
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0 0 14px 14px;
}

.yd-shop-admin-app-row--child {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: none;
  padding: 10px 12px 10px 14px;
}

.yd-shop-admin-app-row--child::before {
  content: none;
}

.yd-shop-admin-app-folder__detail .yd-shop-admin-app-row--child:last-child {
  margin-bottom: 2px;
}

.yd-shop-admin-app-row__title {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
}

.yd-shop-admin-app-row__sub {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  word-break: break-word;
}

.yd-shop-admin-app-row__meta{
  color: rgba(100, 116, 139, 0.92);
  font-weight: 600;
}

.yd-shop-app-item {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.yd-shop-app-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.yd-shop-app-item__top .yd-forum-item__main {
  flex: 1;
  min-width: 0;
}

.yd-shop-app-item__desc-line {
  font-size: 12px;
  color: #8E8E93;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
  padding-right: 2px;
}

/* 购物App列表弹窗：顶部/底部固定，中间列表滚动 */
#yd-shop-app-picker .yd-forum-picker__panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f5f7;
}

#yd-shop-app-picker .yd-forum-picker__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 10px;
  padding-bottom: 8px;
  background: #f5f5f7;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#yd-shop-app-picker .yd-forum-picker__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

#yd-shop-app-picker .yd-forum-picker__footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 10px;
  padding-top: 8px;
  background: #f5f5f7;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.yd-shop-ai-generate-panel {
  position: relative;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.yd-shop-ai-generate-actions {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.yd-shop-ai-generate-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  height: 40px;
  padding: 0 10px;
  flex: 0 0 auto;
}

.yd-shop-ai-generate-count input {
  width: 52px;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.yd-shop-ai-generate-fab {
  position: static;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: #16A34A;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.yd-shop-ai-generate-fab:disabled {
  opacity: 0.55;
  cursor: default;
}

/* 管理页手动新增弹窗层级，确保不被页面遮挡 */
#shop-admin-item-modal {
  z-index: 12020;
}

#shop-admin-item-style-add:disabled {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.06);
  color: #9ca3af;
  cursor: not-allowed;
}

/* 新增商品：款式“确认”按钮（覆盖 takeout 的方块加号风格） */
#shop-admin-item-style-add {
  width: auto;
  min-width: 84px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.yd-shop-app-create-panel {
  gap: 0;
}

.yd-shop-app-create-panel__body {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yd-shop-app-create-panel__body .yd-forum-compose__textarea {
  min-height: 108px;
  resize: none;
}

.yd-shop-app-create-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* 商品管理页：当前购物App信息卡 */
.yd-shop-appinfo{
  margin: 12px 8px 2px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  padding: 12px 12px;
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
}
.yd-shop-admin-app-section-title + #shop-app-manager-appinfo {
  margin-top: 8px;
}
.yd-shop-appinfo__left{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.yd-shop-appinfo__icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 22px;
  flex: 0 0 auto;
}
.yd-shop-appinfo__main{ min-width:0; flex:1; }
.yd-shop-appinfo__name{
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yd-shop-appinfo__desc{
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
  word-break: break-word;
}
.yd-shop-appinfo__actions{
  display:flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}
.yd-shop-appinfo__btn{
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}
.yd-shop-appinfo__btn:active{ opacity: 0.82; }
.yd-shop-appinfo__btn--danger{
  border-color: rgba(185, 28, 28, 0.22);
  background: rgba(185, 28, 28, 0.06);
  color: #b91c1c;
}

/* header 订单按钮 */
#shop-orders svg {
  width: 19px;
  height: 19px;
}

/* 购物支付弹窗（底部抽屉） */
.yd-shop-pay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.yd-shop-pay[aria-hidden="false"]{
  display: block;
}
.yd-shop-pay__mask{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.yd-shop-pay__panel{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
}
.yd-shop-pay__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.yd-shop-pay__title{ font-size: 16px; font-weight: 900; color:#111; }
.yd-shop-pay__x{
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08); background: rgba(0,0,0,0.04);
  font-size: 18px; font-weight: 900;
}
.yd-shop-pay__hero{
  text-align:center;
  padding: 10px 0 12px;
}
.yd-shop-pay__hero-desc{ font-size: 13px; color: rgba(17,17,17,0.65); }
.yd-shop-pay__hero-amount{
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.06;
  font-weight: 900;
  color: #FF6B00;
  font-family: "DIN Alternate","DIN","Bahnschrift","Roboto Mono","Consolas",monospace;
}
.yd-shop-pay__method{
  border-radius: 12px;
  background: rgba(255,214,102,0.22);
  border: 1px solid rgba(255,214,102,0.42);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.yd-shop-pay__row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.yd-shop-pay__label{ font-size: 13px; color: rgba(17,17,17,0.65); }
.yd-shop-pay__value{ font-size: 13px; font-weight: 800; color:#111; text-align:right; }
.yd-shop-pay__pwd{
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 10px 10px 12px;
  background: rgba(0,0,0,0.02);
}
.yd-shop-pay__pwd-title{
  display:flex;
  justify-content: space-between;
  align-items:center;
  font-size: 13px;
  font-weight: 800;
  color:#111;
}
.yd-shop-pay__forgot{
  border:none;
  background:transparent;
  color:#2563eb;
  font-size:12px;
  font-weight:700;
}
.yd-shop-pay__boxes{
  margin-top: 8px;
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.yd-shop-pay__box{
  height: 42px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  background: #fff;
  position: relative;
}
.yd-shop-pay__box.is-filled::after{
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111;
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
}
.yd-shop-pay__kb{
  margin-top: 10px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.yd-shop-pay__key{
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.03);
  font-size: 18px;
  font-weight: 900;
}
.yd-shop-pay__key--ghost{
  font-size: 14px;
  font-weight: 800;
}
.yd-shop-pay__key--danger{
  font-size: 14px;
  font-weight: 900;
  color: #b91c1c;
  background: rgba(185,28,28,0.06);
  border-color: rgba(185,28,28,0.18);
}

/* 支付中模拟：黑色方形等待框 */
.yd-shop-pay-processing {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.16);
}

.yd-shop-pay-processing[aria-hidden="false"] {
  display: flex;
}

.yd-shop-pay-processing__box {
  width: 132px;
  height: 132px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.yd-shop-pay-processing__spinner {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  animation: yd-shop-pay-spin 0.9s linear infinite;
}

.yd-shop-pay-processing__text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  padding: 0 10px;
}

@keyframes yd-shop-pay-spin {
  to { transform: rotate(360deg); }
}

/* 购物订单：完整页面 */
.yd-shop-orders{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.yd-shop-orders[aria-hidden="false"]{
  display:block;
}
.yd-shop-orders__mask{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.yd-shop-orders__panel{
  position:absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  padding: calc(56px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  display:flex;
  flex-direction: column;
}
.yd-shop-orders__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px 10px;
  position: absolute;
  top: env(safe-area-inset-top);
  left: 14px;
  right: 14px;
}
.yd-shop-orders__title{
  font-size: 16px;
  font-weight: 900;
  color: #111;
}
.yd-shop-orders__x{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.04);
  font-size: 18px;
  font-weight: 900;
}
.yd-shop-orders__list{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.yd-shop-order-item{
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
  border-radius: 14px;
  padding: 12px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.yd-shop-order-item__left{
  min-width: 0;
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.yd-shop-order-item__title{
  font-size: 14px;
  font-weight: 900;
  color: rgba(17,17,17,0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.yd-shop-order-item__meta{
  font-size: 12px;
  color: rgba(17,17,17,0.55);
  text-align: left;
}
.yd-shop-order-item__amount{
  font-family: "DIN Alternate","DIN","Bahnschrift","Roboto Mono","Consolas",monospace;
  font-size: 14px;
  font-weight: 900;
  color: #FF6B00;
  flex: 0 0 auto;
}
.yd-shop-orders__detail{
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  font-size: 13px;
  color: rgba(17,17,17,0.82);
  flex: 1;
}
.yd-shop-order-detail__section{
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
  border-radius: 14px;
  padding: 12px 12px;
  margin-bottom: 10px;
}
.yd-shop-order-detail__row{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}
.yd-shop-order-detail__label{ color: rgba(17,17,17,0.55); }
.yd-shop-order-detail__value{ font-weight: 800; text-align:right; }
.yd-shop-order-detail__items{
  margin-top: 6px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.yd-shop-order-detail__item{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.yd-shop-order-detail__item-name{
  min-width:0;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.yd-shop-order-detail__item-qty{
  flex: 0 0 auto;
  color: rgba(17,17,17,0.6);
  font-weight: 800;
}
.yd-shop-order-detail__item-sub{
  flex: 0 0 auto;
  font-weight: 900;
  color: rgba(17,17,17,0.86);
}

.yd-shop-orders__footer{
  flex: 0 0 auto;
  padding: 10px 2px calc(8px + env(safe-area-inset-bottom));
}

.yd-shop-orders__share-btn{
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,0.28);
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.08));
  color: #b88f16;
  font-size: 15px;
  font-weight: 900;
}

