/* Mobile / Mini-app / Delivery frame */
.mobile-page {
  min-height: 100vh;
  background: #ededed;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

.phone-shell {
  width: 375px;
  height: 812px;
  max-height: calc(100vh - 48px);
  background: #111;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  position: relative;
}

.phone-screen {
  background: #f7f7f7;
  border-radius: 32px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.status-bar {
  height: 44px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-bar {
  height: 44px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.nav-bar .back { font-size: 20px; padding: 8px; color: var(--text); text-decoration: none; }
.nav-bar .title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; margin-right: 36px; }
.nav-bar.wechat { background: #fff; }
.nav-bar.orange { background: var(--primary); color: #fff; }
.nav-bar.orange .back, .nav-bar.orange .title { color: #fff; }

.screen-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

.tab-bar {
  flex-shrink: 0;
  height: 58px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  z-index: 10;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-size: 10px; color: #999; text-decoration: none; gap: 2px;
}
.tab-item.active { color: var(--primary); }
.tab-item .ico { font-size: 22px; }

.search-bar {
  margin: 10px 12px; background: #f0f0f0; border-radius: 20px;
  padding: 8px 14px; display: flex; align-items: center; gap: 8px; color: #999; font-size: 13px;
}

.banner {
  margin: 0 12px 12px; height: 120px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #fdcb6e);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 600;
}

.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 0 12px 16px; background: #fff; margin-bottom: 8px;
}
.cat-item { text-align: center; font-size: 12px; color: var(--text); text-decoration: none; }
.cat-item .ico {
  width: 48px; height: 48px; margin: 0 auto 6px; border-radius: 12px;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 24px;
}

.product-list { background: #fff; }
.product-row {
  display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid #f0f0f0;
  text-decoration: none; color: inherit;
}
.product-row .info { flex: 1; min-width: 0; }
.product-row .name { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.product-row .desc { font-size: 12px; color: #999; margin-bottom: 6px; }
.product-row .price { color: var(--primary); font-size: 16px; font-weight: 700; }
.product-row .price small { font-size: 12px; }
.product-row .action { align-self: flex-end; }

.store-card {
  background: #fff; margin: 8px 12px; border-radius: 12px; padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); text-decoration: none; color: inherit; display: block;
}
.store-card .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.store-card .name { font-size: 16px; font-weight: 600; }
.store-card .meta { font-size: 12px; color: #999; margin-top: 4px; }

.cart-bar {
  flex-shrink: 0;
  margin: 0 12px 8px;
  background: #2d3436; border-radius: 24px; padding: 8px 16px;
  display: flex; align-items: center; color: #fff; z-index: 9;
}
.cart-bar .total { flex: 1; font-size: 18px; font-weight: 700; }
.cart-bar .checkout-btn {
  background: var(--primary); padding: 8px 20px; border-radius: 18px;
  font-size: 14px; text-decoration: none; color: #fff;
}

.order-steps { display: flex; padding: 16px 12px; background: #fff; margin-bottom: 8px; }
.step { flex: 1; text-align: center; font-size: 11px; color: #ccc; position: relative; }
.step.done { color: var(--success); }
.step.active { color: var(--primary); font-weight: 600; }
.step::before { content: attr(data-num); display: block; width: 24px; height: 24px; line-height: 24px;
  border-radius: 50%; background: #eee; margin: 0 auto 4px; font-size: 12px; }
.step.done::before { background: var(--success); color: #fff; }
.step.active::before { background: var(--primary); color: #fff; }

.delivery-card {
  background: #fff; margin: 12px; border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow);
}
.delivery-card .order-no { font-size: 12px; color: #999; margin-bottom: 8px; }
.delivery-card .addr { font-size: 15px; font-weight: 500; margin-bottom: 12px; }
.delivery-card .actions { display: flex; gap: 10px; margin-top: 12px; }

.map-placeholder {
  height: 180px;
  background: url('../images/maps/delivery.jpg') center/cover;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6);
  position: relative;
}
.map-placeholder::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
}
.map-placeholder > * { position: relative; z-index: 1; }

.profile-header {
  background: var(--primary); padding: 40px 20px 24px; color: #fff;
}
.profile-menu { background: #fff; margin-top: 8px; }
.menu-item {
  display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5; text-decoration: none; color: var(--text);
}
.menu-item .ico { margin-right: 12px; font-size: 18px; }
.menu-item .arrow { margin-left: auto; color: #ccc; }

.checkout-section { background: #fff; margin-bottom: 8px; padding: 14px 16px; }
.checkout-section .label { font-size: 13px; color: #999; margin-bottom: 8px; }

.fulfillment-tabs {
  display: flex; background: #fff; margin-bottom: 8px; padding: 12px 16px 0;
}
.fulfillment-tabs button {
  flex: 1; border: none; background: #f5f5f5; padding: 10px 8px;
  font-size: 14px; font-weight: 600; color: #666; cursor: pointer;
  border-radius: 8px 8px 0 0; margin-right: 8px;
}
.fulfillment-tabs button:last-child { margin-right: 0; }
.fulfillment-tabs button.active {
  background: var(--primary); color: #fff;
}
.fulfillment-panel { display: none; }
.fulfillment-panel.active { display: block; }
.pickup-code-box {
  text-align: center; padding: 20px; background: #f8f9fa; border-radius: 12px;
}
.pickup-code-box .code {
  font-size: 32px; font-weight: 700; letter-spacing: 8px; color: var(--primary);
}
.fulfillment-tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: #e8f4fd; color: #2980b9; margin-left: 6px;
}
.fulfillment-tag.pickup { background: #e8f8ef; color: #27ae60; }

.fixed-bottom-btn {
  flex-shrink: 0;
  padding: 12px 16px; background: #fff; border-top: 1px solid #eee;
  display: flex; align-items: center; gap: 12px; z-index: 10;
}
.fixed-bottom-btn .amount { flex: 1; }
.fixed-bottom-btn .amount .num { color: var(--primary); font-size: 20px; font-weight: 700; }

.login-logo {
  text-align: center; padding: 60px 24px 40px;
}
.login-logo .logo {
  width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 22px;
  background: linear-gradient(135deg, #c4452b, #e07058);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #fff; box-shadow: 0 8px 24px rgba(196,69,43,.32);
  overflow: hidden;
}
.login-logo .logo.logo-brand { background: #fff; box-shadow: 0 12px 32px rgba(196,69,43,.22); border-radius: 50%; }
.login-logo .logo.logo-brand img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }

.banner {
  margin: 0 12px 12px; height: 128px; border-radius: 14px; overflow: hidden;
  position: relative; box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner .banner-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,71,87,.75), rgba(255,107,53,.65));
  color: #fff; font-size: 17px; font-weight: 700;
}

.category-grid .cat-item .ico img { width: 100%; height: 100%; object-fit: cover; }

.store-card .store-cover {
  width: 100%; height: 100px; border-radius: 10px; overflow: hidden; margin-bottom: 10px;
}
.store-card .store-cover img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-hero {
  height: 280px; background: #f0f2f5; position: relative; overflow: hidden;
}
.product-detail-hero img { width: 100%; height: 100%; object-fit: cover; }

.profile-header {
  background: linear-gradient(135deg, #c4452b 0%, #e07058 100%);
  padding: 40px 20px 28px; color: #fff;
  position: relative; overflow: hidden;
}
.profile-header::before {
  content: ''; position: absolute; inset: 0;
  background: url('../images/banners/fresh.jpg') center/cover; opacity: .15;
}

.login-form { padding: 0 24px; }

.delivery-status {
  padding: 20px; background: linear-gradient(135deg, #c4452b, #e07058); color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.delivery-status::before {
  content: ''; position: absolute; inset: 0;
  background: url('../images/maps/delivery.jpg') center/cover; opacity: .25;
}
.delivery-status > * { position: relative; z-index: 1; }
.delivery-status .big { font-size: 24px; font-weight: 700; margin-bottom: 4px; }

.new-order-alert {
  background: linear-gradient(135deg, #fff9e6, #fff3cd); border: 2px solid var(--warning);
  margin: 12px; border-radius: 14px; padding: 16px; animation: pulse 2s infinite;
  box-shadow: 0 4px 16px rgba(253,203,110,.25);
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.85} }
