/* 学品优选 —— 一屏完整展示，无滚动 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  background: #f2f4f7;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.phone {
  width: 375px;
  max-width: 100%;
  height: 100%;
  max-height: 100vh;
  margin: 0 auto;
  background: #f2f4f7;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nav-bar {
  height: 44px;
  background: #008dff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  position: relative;
  flex-shrink: 0;
}

.nav-bar .back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-bar .back svg {
  width: 12px;
  height: 20px;
}

.nav-bar .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
}

.nav-bar .capsule {
  display: flex;
  align-items: center;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.nav-bar .capsule .cap-btn {
  width: 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nav-bar .capsule .cap-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.4);
}

.nav-bar .capsule .dots {
  display: flex;
  gap: 3px;
}

.nav-bar .capsule .dots i {
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
}

.nav-bar .capsule .ring {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  position: relative;
}

.nav-bar .capsule .ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px solid #fff;
  border-radius: 50%;
}

.main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-card {
  background: #fff;
  border-radius: 0;
  padding: 12px 14px 10px;
  flex-shrink: 0;
}

.user-card .school-row {
  margin-bottom: 6px;
}

.school {
  display: flex;
  align-items: center;
  gap: 6px;
}

.school-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}

.school-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.school-name {
  color: #008dff;
  font-size: 13px;
  font-weight: 500;
}

.name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.action-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 10px;
  background: #e8f4ff;
  color: #008dff;
  border: none;
  border-radius: 13px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.action-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.action-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.user-name {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8c8c8c;
  font-size: 12px;
  line-height: 1.3;
}

.meta-row .meta-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #008dff;
}

.cate-list {
  flex: 1;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
  padding-right: 6px;
}

.cate-card {
  background: #fff;
  border-radius: 0;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.cate-card .cate-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(255, 77, 79, 0.35);
}

.cate-header {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  cursor: pointer;
  user-select: none;
  gap: 6px;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}

.cate-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cate-icon svg {
  width: 14px;
  height: 14px;
}

.cate-icon.green { background: #e8f8ef; color: #22c55e; }
.cate-icon.blue { background: #e8f2ff; color: #008dff; }
.cate-icon.cyan { background: #e6f7fb; color: #06b6d4; }
.cate-icon.orange { background: #fff3e8; color: #ff8a00; }

.cate-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  flex-shrink: 0;
}

.cate-status {
  font-size: 12px;
  color: #5eb3ff;
  margin-left: 4px;
  flex: 1;
  white-space: nowrap;
}

.cate-arrow {
  width: 14px;
  height: 14px;
  color: #c0c0c0;
  flex-shrink: 0;
  transition: transform 0.2s;
  transform: rotate(-90deg);
}

.cate-card.open .cate-arrow {
  transform: rotate(180deg);
}

.cate-body {
  display: none;
  padding: 0 12px 10px;
  border-top: 1px solid #f5f5f5;
}

.cate-card.open .cate-body {
  display: block;
}

.product-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
}

.product-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #d0d0d0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
}

.product-check.checked {
  background: #ff4d4f;
  border-color: #ff4d4f;
}

.product-check.checked::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #87cefa;
}

.product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 56px;
  padding: 2px 0;
}

.product-name {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  line-height: 1.3;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  color: #ff4d4f;
  font-size: 15px;
  font-weight: 700;
}

.stepper {
  display: flex;
  align-items: center;
}

.stepper button {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
}

.stepper button:disabled {
  color: #ddd;
}

.stepper .num {
  min-width: 26px;
  height: 22px;
  background: #f5f5f5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #333;
}

.summary-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e8f2ff;
  border-radius: 0;
  padding: 8px 14px;
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
}

.summary-bar .info-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #008dff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-style: normal;
}

.summary-bar .count {
  color: #ff4d4f;
  font-weight: 600;
}

.footer-bar {
  flex-shrink: 0;
  background: #fff;
  padding: 8px 16px 12px;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.05);
}

.pay-btn {
  width: 100%;
  height: 44px;
  background: #008dff;
  color: #fff;
  border: none;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 2px;
}

.pay-btn:active {
  opacity: 0.88;
}

@media (max-width: 375px) {
  .phone {
    width: 100%;
  }
}
