:root {
  --primary: #ff0036;
  --primary-light: #ff5b5b;
}

/* ===== 统一基准字体（手机/电脑同比例） ===== */
html {
  font-size: calc(100vw / 375 * 10);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (min-width: 600px) {
  html { font-size: 16px; }
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  color: #222;
  background: #f5f5f5;
  font-size: 1.2rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 750px;
  margin: 0 auto;
  padding-bottom: 5.4rem;
  touch-action: manipulation;
}

/* ===== 顶部标题栏 ===== */
.topbar {
  position: sticky;
  top: 0; z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4.2rem;
  background: #fff;
  padding: 0 1.2rem;
  border-bottom: 1px solid #eee;
}
.topbar__back {
  position: absolute;
  left: .5rem; top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem; color: #333; cursor: pointer;
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.topbar__title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #111;
}

/* ===== 轮播 ===== */
.swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 1 / 1;
}
.swiper__track {
  display: flex;
  transition: transform .3s ease;
  height: 100%;
}
.swiper__track img {
  min-width: 100%;
  object-fit: contain;
  background: #f0f0f0;
}
.swiper__dots {
  position: absolute;
  bottom: .7rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .4rem;
}
.swiper__dots i {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}
.swiper__dots i.on { background: #fff; }
.swiper__index {
  position: absolute;
  right: .7rem; bottom: .7rem;
  background: rgba(0,0,0,.35);
  color: #fff; font-size: 1rem;
  padding: .2rem .5rem; border-radius: 1rem;
}

/* ===== 价格区 ===== */
.pricebox {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  padding: 1rem 1rem;
}
.pricebox__top {
  display: flex; align-items: baseline; gap: .5rem;
  margin-bottom: .3rem;
}
.pricebox__price { font-size: 1.15rem; }
.pricebox__price i { font-style: normal; }
.pricebox__price em {
  font-size: 2.5rem; font-weight: 700; font-style: normal;
}
.pricebox__origin {
  font-size: 1.05rem; text-decoration: line-through; opacity: .7;
}
.pricebox__sales {
  font-size: 1rem; opacity: .75; margin-left: auto;
}
.pricebox__coupons {
  display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .4rem;
}
.pricebox__coupons span {
  font-size: 1rem;
  background: rgba(255,255,255,.18);
  padding: .15rem .4rem; border-radius: .25rem;
}
.pricebox__title {
  font-size: 1.5rem; font-weight: 600; line-height: 1.3;
  margin-bottom: .2rem;
}
.pricebox__subtitle {
  font-size: 1.1rem; opacity: .8; margin-bottom: .35rem;
}
.pricebox__services {
  display: flex; gap: .6rem; flex-wrap: wrap;
}
.pricebox__services span {
  font-size: 1rem; opacity: .75;
}

/* ===== 店铺（增大） ===== */
.shop {
  display: flex; align-items: center; gap: .8rem;
  background: #fff;
  padding: 1.1rem 1rem;
  margin-bottom: .5rem;
}
.shop__logo {
  font-size: 2.5rem;
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
}
.shop__name { font-size: 1.4rem; font-weight: 600; }
.shop__meta { font-size: 1.05rem; color: #999; }

/* ===== 规格选择入口 ===== */
.specbar {
  display: flex; align-items: center;
  background: #fff;
  padding: .9rem 1rem;
  margin-bottom: .5rem;
  cursor: pointer;
}
.specbar__label { font-size: 1.15rem; color: #999; margin-right: .6rem; }
.specbar__val { flex: 1; font-size: 1.2rem; color: #333; }
.specbar__arrow { font-size: 1.5rem; color: #ccc; }

/* ===== 用户评价（淘宝风格 v2） ===== */
.reviews {
  background: #fff;
  margin-bottom: .5rem;
  padding-top: .3rem;
}
.reviews__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem;
}
.reviews__hd--title {
  font-size: 1.55rem; font-weight: 700; color: #111;
}
.reviews__hd--title em {
  font-style: normal; font-weight: 400; color: #999;
  font-size: 1.3rem; margin-left: .15rem;
}
.reviews__hd--more {
  font-size: 1.1rem; color: #999;
  cursor: pointer;
}

/* 标签筛选行 */
.reviews__tags {
  display: flex; gap: .5rem; padding: 0 1rem .8rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.reviews__tags::-webkit-scrollbar { display: none; }
.reviews__tag {
  flex-shrink: 0;
  padding: .45rem .9rem; border-radius: 1.2rem;
  background: #faf4ec; color: #b48b5a;
  font-size: 1.05rem; white-space: nowrap; cursor: pointer;
  transition: all .15s;
}
.reviews__tag.on { background: #fff0e6; color: #ff5000; font-weight: 600; }
.reviews__tag em {
  font-style: normal; font-weight: 500; margin-left: .2rem;
  font-size: .95rem; color: inherit;
}

/* 评价列表 */
.reviews__bd { padding: 0 1rem; }
.review-item {
  padding: 1.05rem 0;
  border-bottom: 1px solid #f5f5f5;
}
.review-item:last-child { border-bottom: none; }
.review-item__top {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .5rem;
  overflow: hidden;
}
.review-item__avatar {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
  background: #f5f5f5;
}
.review-item__user {
  font-size: 1.1rem; color: #333; font-weight: 500;
  flex-shrink: 0;
}
.review-item__spec {
  font-size: 1.05rem; color: #999;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.review-item__content {
  font-size: 1.18rem; color: #333; line-height: 1.65;
  word-break: break-word;
}
.review-item__content em {
  font-style: normal; color: #ff5000; font-weight: 500;
}
.review-item__empty {
  color: #ccc; font-size: 1.1rem; text-align: center; padding: 2rem 0;
}

/* ===== 图文详情 ===== */
.detail { background: #fff; padding: 0; }
.detail img { display: block; width: 100%; height: auto; }

/* ===== 底部购买栏（增大） ===== */
.botbar {
  position: fixed;
  bottom: 0; left: 0; right: 0; z-index: 90;
  max-width: 750px;
  margin: 0 auto;
  background: #fff;
  display: flex; align-items: center;
  padding: .6rem 1rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
  padding-bottom: calc(.6rem + env(safe-area-inset-bottom));
}
.botbar__buy {
  flex: 1;
  height: 3.6rem;
  border: none; border-radius: .45rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 1.5rem; font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  touch-action: manipulation;
  transition: opacity .15s;
  outline: none;
}
.botbar__buy:active { opacity: .85; }

/* ===== 规格弹层 ===== */
.mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5); display: none;
}
.mask.show, .sheet.show ~ .mask { display: block; }
.sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 210;
  max-width: 750px; margin: 0 auto;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  transform: translateY(100%);
  transition: transform .3s ease, visibility 0s .3s;
  visibility: hidden;
  max-height: 75vh;
  display: flex; flex-direction: column;
}
.sheet.show { 
  transform: translateY(0);
  visibility: visible;
  transition: transform .3s ease, visibility 0s 0s;
}

.sheet__hd {
  display: flex; gap: .9rem; padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid #f0f0f0; position: relative;
}
/* 隐藏空src的破损图片 */
.sheet__thumb[src=""],
.sheet__thumb[src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"] {
  background: #f0f0f0;
}
.sheet__thumb {
  width: 6.5rem; height: 6.5rem; border-radius: .4rem;
  object-fit: cover; background: #f0f0f0; margin-top: -2.6rem;
}
.sheet__info { flex: 1; padding-top: .2rem; }
.sheet__price {
  font-size: 1.85rem; color: var(--primary); font-weight: 700;
  margin-bottom: .35rem;
}
.sheet__sel { font-size: 1.3rem; color: #666; line-height: 1.5; }
.sheet__close {
  position: absolute; top: .3rem; right: .5rem;
  font-size: 1.6rem; color: #999; cursor: pointer;
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
}

.sheet__bd {
  flex: 1; overflow-y: auto;
  padding: .8rem 1rem;
}
.specgroup { margin-bottom: 1.1rem; }
.specgroup__name {
  font-size: 1.4rem; font-weight: 600; margin-bottom: .6rem;
}
.specgroup__opts {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.spec-opt {
  padding: .7rem 1.2rem;
  border: 1px solid #ddd; border-radius: .3rem;
  font-size: 1.3rem; cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.spec-opt.on {
  border-color: var(--primary); color: var(--primary);
  background: rgba(255,0,54,.05);
}
.spec-opt.disabled {
  color: #ccc; border-color: #eee; cursor: not-allowed; background: #f9f9f9;
}

.sheet__qty {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1rem; border-top: 1px solid #f0f0f0;
}
.sheet__qty span { font-size: 1.4rem; }
.qty {
  display: flex; align-items: center; border: 1px solid #ddd; border-radius: .3rem;
}
.qty button {
  width: 3.2rem; height: 3rem; border: none; background: #f5f5f5;
  font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.qty input {
  width: 3.6rem; text-align: center; border: none;
  font-size: 1.5rem; background: #fff;
}

.sheet__buy {
  margin: 1rem 1rem 1.4rem;
  height: 3.8rem; border: none; border-radius: .45rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 1.6rem; font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  touch-action: manipulation;
}

/* ===== 支付弹层 ===== */
.pay-sheet {
  position: fixed; inset: 0; z-index: 300;
  display: none;
}
.pay-sheet.show { display: block; }
.pay-sheet__mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
}
.pay-sheet__box {
  position: absolute; bottom: 0; left: 0; right: 0;
  max-width: 750px; margin: 0 auto;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  padding: 1.5rem 1rem;
  text-align: center;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
.pay-sheet__title { font-size: 1.4rem; font-weight: 600; margin-bottom: .8rem; }
.pay-sheet__amount {
  font-size: 2.5rem; color: var(--primary); font-weight: 700; margin-bottom: .5rem;
}
.pay-sheet__hint { font-size: 1rem; color: #999; margin-bottom: 1rem; }
.pay-sheet__btns { display: flex; gap: .8rem; margin-bottom: .8rem; }
.pay-sheet__btns button {
  flex: 1; height: 3.5rem; border: none; border-radius: .4rem;
  font-size: 1.3rem; font-weight: 600; cursor: pointer;
  -webkit-appearance: none;
  touch-action: manipulation;
}
.pay-sheet__btns button:first-child {
  background: #07c160; color: #fff;
}
.pay-sheet__btns button:last-child {
  background: #1677ff; color: #fff;
}
.pay-sheet__cancel {
  font-size: 1.1rem; color: #999; cursor: pointer; padding: .3rem;
}

/* ===== Toast ===== */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.75); color: #fff;
  padding: .6rem 1.2rem; border-radius: .4rem;
  font-size: 1.2rem; z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.toast.show { opacity: 1; }
