﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #151516;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 414px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #e8e8e8;
  overflow: hidden;
}

.hero-slider {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
}

.hero-track.dragging {
  transition: none;
}

.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  pointer-events: auto;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.hero-top-right {
  display: flex;
  gap: 8px;
}

.hero-text {
  position: absolute;
  left: 16px;
  bottom: 28%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-text-line {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  text-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.15),
    -1px -1px 0 rgba(0, 0, 0, 0.1),
    0 0 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 2px;
}

.hero-indicator {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.5;
}

/* ===== Price Section ===== */
.price-section {
  padding: 10px 12px 0;
  background: #fff;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.price-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
}

.coupon-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #e02e24;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 2px;
  margin-right: 2px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.price-label {
  color: #e02e24;
  font-size: 13px;
  font-weight: 500;
}

.price-symbol {
  color: #e02e24;
  font-size: 14px;
  font-weight: 700;
  margin-left: 1px;
}

.price-value {
  color: #e02e24;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  margin-right: 6px;
}

.original-price {
  color: #9c9c9c;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.sold-count {
  color: #9c9c9c;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.coupon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #f0c0bc;
  background: #fff8f7;
  border-radius: 3px;
  padding: 6px 10px;
  margin-bottom: 10px;
}

.coupon-text {
  color: #e02e24;
  font-size: 13px;
  font-weight: 500;
}

.pay-later-bar {
  display: flex;
  align-items: center;
  background: #edf9f0;
  padding: 8px 12px;
  margin: 0 -12px;
  font-size: 12px;
  color: #00a832;
  gap: 4px;
}

.pay-later-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.pay-later-bar .divider {
  color: #00a832;
  opacity: 0.6;
  margin: 0 2px;
}

.arrow-sm {
  width: 14px;
  height: 14px;
  color: #9c9c9c;
  flex-shrink: 0;
}

/* ===== Title ===== */
.product-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: #151516;
  margin-bottom: 0;
  padding: 12px 12px 8px;
}

.refund-tag {
  display: inline-block;
  background: #00a832;
  color: #fff;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 2px;
  line-height: 1.6;
}

/* ===== Group Section ===== */
.group-section {
  border-bottom: 8px solid #f5f5f5;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 10px;
  border-bottom: 1px solid #f2f2f2;
}

.group-status {
  color: #e02e24;
  font-size: 14px;
  font-weight: 500;
}

.group-list {
  padding: 0 12px;
}

.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
}

.group-item:last-child {
  border-bottom: none;
}

.group-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.avatars {
  flex-shrink: 0;
}

.avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #f0f0f0;
}

.avatars.double {
  position: relative;
  width: 52px;
  height: 36px;
}

.avatars.double img:first-child {
  position: absolute;
  left: 0;
  z-index: 2;
}

.avatars.double img:last-child {
  position: absolute;
  left: 16px;
  z-index: 1;
}

.group-info {
  min-width: 0;
}

.username {
  font-size: 14px;
  color: #151516;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 6px;
}

.group-status-text {
  font-size: 12px;
  color: #e02e24;
  white-space: nowrap;
  line-height: 1.35;
}

.group-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.countdown {
  font-size: 13px;
  color: #e02e24;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.35;
}

.join-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.no-wait {
  font-size: 10px;
  color: #ff7700;
  white-space: nowrap;
  line-height: 1;
}

.join-btn {
  background: #e02e24;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}

/* ===== Service Section ===== */
.service-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #fff;
}

.service-text {
  font-size: 12px;
  color: #00a832;
  line-height: 1.4;
}

/* ===== Bottom Bar ===== */
.bottom-spacer {
  height: 54px;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 414px;
  height: 54px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-icons {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.bottom-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 4px 0;
  color: #666;
  cursor: pointer;
}

.bottom-icon-item svg {
  width: 20px;
  height: 20px;
  margin-bottom: 1px;
}

.bottom-icon-item span {
  font-size: 10px;
  line-height: 1.2;
}

.bottom-actions {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 6px 8px 6px 0;
  gap: 0;
}

.action-btn {
  flex: 1;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1.25;
  text-decoration: none;
}

.buy-alone {
  background: #ffecee;
  color: #e02e24;
  border-radius: 4px 0 0 4px;
}

.buy-group {
  background: #e02e24;
  color: #fff;
  border-radius: 0 4px 4px 0;
}

.action-price {
  font-size: 13px;
  font-weight: 600;
}

.action-label {
  font-size: 13px;
  font-weight: 500;
}

.buy-group .action-price {
  font-size: 12px;
}
