/* pages/product-detail/product-detail.wxss */

page {
  background: #f2f2f2;
}

.page {
  min-height: 100vh;
  padding-bottom: 140rpx;
  box-sizing: border-box;
}

/* 加载 */
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
}

.spinner {
  width: 56rpx;
  height: 56rpx;
  border: 4rpx solid #f0f0f0;
  border-top-color: #e02e24;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 20rpx;
}

.loading-text {
  font-size: 26rpx;
  color: #999;
}

/* 错误 */
.error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
}

.error-text {
  font-size: 30rpx;
  color: #999;
  margin-bottom: 32rpx;
}

.error-btn {
  padding: 16rpx 48rpx;
  background: #e02e24;
  color: #fff;
  font-size: 28rpx;
  font-weight: 600;
  border-radius: 40rpx;
}

/* 商品大图 */
.hero {
  position: relative;
  width: 100%;
  height: 750rpx;
  background: #fff;
}

.hero-img {
  width: 100%;
  height: 100%;
}

.hero-badge {
  position: absolute;
  top: 24rpx;
  left: 24rpx;
  padding: 8rpx 16rpx;
  border-radius: 6rpx;
  background: rgba(224, 46, 36, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-badge-text {
  font-size: 20rpx;
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

/* 价格区 - 拼多多红底 */
.price-block {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 24rpx 28rpx;
  background: linear-gradient(135deg, #e02e24, #f05545);
}

.price-left {
  display: flex;
  align-items: baseline;
}

.price-sym {
  font-size: 28rpx;
  color: #fff;
  font-weight: 700;
}

.price-int {
  font-size: 60rpx;
  color: #fff;
  font-weight: 800;
  line-height: 1;
  margin-left: 2rpx;
}

.price-dec {
  font-size: 28rpx;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.price-right {
  display: flex;
  align-items: center;
}

.sold-text {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.15);
  padding: 6rpx 16rpx;
  border-radius: 20rpx;
}

/* 标题区 */
.title-block {
  background: #fff;
  padding: 24rpx 28rpx 20rpx;
}

.title-tags {
  display: flex;
  align-items: center;
  margin-bottom: 12rpx;
}

.tag-hot {
  font-size: 20rpx;
  color: #fff;
  background: #e02e24;
  padding: 4rpx 12rpx;
  border-radius: 4rpx;
  font-weight: 600;
  margin-right: 12rpx;
}

.title-text {
  font-size: 32rpx;
  font-weight: 600;
  color: #222;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* 服务保障条 */
.service-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 16rpx 28rpx;
  background: #fff;
  margin-bottom: 16rpx;
}

.service-item {
  display: flex;
  align-items: center;
  margin-right: 24rpx;
  margin-bottom: 8rpx;
}

.service-check {
  font-size: 20rpx;
  color: #e02e24;
  font-weight: 700;
  margin-right: 4rpx;
}

.service-label {
  font-size: 22rpx;
  color: #666;
}

/* 选择SKU入口 */
.sku-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 24rpx 28rpx;
  margin-bottom: 16rpx;
}

.sku-trigger-left {
  display: flex;
  align-items: center;
}

.sku-label {
  font-size: 26rpx;
  color: #999;
  margin-right: 16rpx;
}

.sku-value {
  font-size: 26rpx;
  color: #333;
}

.sku-arrow {
  font-size: 28rpx;
  color: #ccc;
  margin-left: 12rpx;
}

/* 详情卡片 */
.detail-card {
  background: #fff;
  margin-bottom: 16rpx;
  padding: 28rpx;
}

.detail-card-head {
  margin-bottom: 20rpx;
}

.detail-card-title {
  font-size: 30rpx;
  font-weight: 700;
  color: #222;
  position: relative;
  padding-left: 16rpx;
}

.detail-card-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4rpx;
  width: 6rpx;
  height: 28rpx;
  border-radius: 3rpx;
  background: #e02e24;
}

.detail-card-body {
  font-size: 26rpx;
  color: #555;
  line-height: 1.8;
  white-space: pre-line;
}

.rule-img {
  width: 100%;
  border-radius: 8rpx;
  display: block;
}

/* 底部留白 */
.bottom-space {
  height: 40rpx;
}

/* 底部操作栏 */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1rpx solid #f0f0f0;
}

.bottom-bar-inner {
  display: flex;
  align-items: stretch;
  height: 100rpx;
}

.bar-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 28rpx;
  height: 96rpx;
}

.bar-icon-text {
  font-size: 22rpx;
  color: #666;
  margin-top: 4rpx;
}

.bar-buy-btn {
  width: 50%;
  height: 100%;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e02e24;
  margin-left: auto;
}

.bar-buy-btn--disabled {
  background: #ccc;
}

.bar-buy-btn--hover {
  opacity: 0.9;
  transform: scale(0.98);
}

.bar-buy-text {
  font-size: 30rpx;
  font-weight: 700;
  color: #fff;
  margin-right: 8rpx;
}

.bar-buy-price {
  font-size: 26rpx;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
