/* 顶部导航 */
.top-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 12px 15px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-button {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
}

.header-actions {
  display: flex;
  gap: 15px;
}

.header-actions i {
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
}

/* 商品图片轮播 */
.product-gallery {
  position: relative;
  height: 380px;
  overflow: hidden;
  background: #f0f2f5;
}

.gallery-main {
  height: 100%;
  display: flex;
  transition: transform 0.5s ease;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.gallery-indicators {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.gallery-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.gallery-indicator.active {
  background: #e60012;
}

/* 商品基本信息 */
.product-info {
  background: white;
  padding: 15px;
  position: relative;
  border-bottom: 1px solid #eee;
}

.product-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-subtitle {
  color: #666;
  font-size: 13px;
  margin-bottom: 12px;
}

.product-price {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.current-price {
  color: #e60012;
  font-size: 24px;
  font-weight: 700;
}

.original-price {
  color: #999;
  font-size: 14px;
  text-decoration: line-through;
  margin-left: 10px;
}

.discount-badge {
  background: #ffe6e8;
  color: #e60012;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 10px;
}

.promotion {
  background: #fff8e6;
  color: #e6a23c;
  padding: 10px;
  border-radius: 6px;
  margin-top: 15px;
  font-size: 13px;
}

.promotion i {
  margin-right: 5px;
}

/* 商品服务 */
.services {
  background: white;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.service-item {
  text-align: center;
  font-size: 12px;
}

.service-icon {
  color: #e60012;
  font-size: 18px;
  margin-bottom: 5px;
}

/* 商品规格选择 */
.spec-section {
  background: white;
  padding: 15px;
  margin-top: 10px;
  border-bottom: 1px solid #eee;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-option {
  padding: 8px 15px;
  border: 1px solid #eee;
  border-radius: 20px;
  font-size: 13px;
}

.spec-option.active {
  border-color: #e60012;
  color: #e60012;
  background: #fff8f8;
}

.spec-option.disabled {
  color: #ccc;
  background: #f9f9f9;
  text-decoration: line-through;
}

/* 商品评价 */
.review-section {
  background: white;
  padding: 15px;
  margin-top: 10px;
  border-bottom: 1px solid #eee;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.review-overview {
  display: flex;
  align-items: center;
}

.review-rating {
  font-size: 24px;
  font-weight: 700;
  color: #ff9900;
}

.review-stars {
  color: #ff9900;
  font-size: 14px;
  margin: 0 10px;
}

.review-count {
  color: #666;
  font-size: 13px;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.review-tag {
  padding: 5px 12px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 12px;
}

.review-tag.active {
  background: #fff8f8;
  color: #e60012;
}

.review-list {
  margin-top: 15px;
}

.review-item {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.review-user {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.user-name {
  font-weight: 500;
}

.review-content {
  margin-bottom: 10px;
}

.review-images {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.review-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* 商品详情 */
.detail-section {
  background: white;
  margin-top: 10px;
  padding: 15px;
}

.detail-title {
  font-size: 16px;
  font-weight: 700;
  padding: 10px 0;
  text-align: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.detail-content {
  line-height: 1.8;
}
.detail-content img {
  width: 100%;
  display: block;
}
.detail-image {
  width: 100%;
  margin: 15px 0;
  border-radius: 8px;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  display: block;
}

/* 底部操作栏 */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  border-top: 1px solid #eee;
  z-index: 100;
  padding: 10px;
}

.action-icons {
  display: flex;
  align-items: center;
  width: 40%;
}

.action-icon {
  text-align: center;
  padding: 0 10px;
  position: relative;
}

.action-icon i {
  font-size: 20px;
  color: #666;
}

.action-icon .badge {
  position: absolute;
  top: -5px;
  right: 5px;
  background: #e60012;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  line-height: 16px;
}

.action-buttons {
  display: flex;
  width: 60%;
  gap: 10px;
}

.action-btn {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  border-radius: 25px;
  font-weight: 500;
  font-size: 15px;
}

.cart-btn {
  background: #ff9500;
  color: white;
}

.buy-btn {
  background: #e60012;
  color: white;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
}

.modal-content {
  background: white;
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  font-size: 20px;
  color: #999;
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.product-modal-info {
  display: flex;
  margin-bottom: 20px;
}

.modal-product-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
}

.modal-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-product-details {
  flex: 1;
}

.modal-product-price {
  color: #e60012;
  font-weight: 700;
  font-size: 16px;
  margin-top: 5px;
}

.spec-group {
  margin-bottom: 20px;
}

.spec-group-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.quantity-label {
  font-size: 15px;
  font-weight: 600;
}

.quantity-control {
  display: flex;
  align-items: center;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.quantity-value {
  margin: 0 15px;
  font-size: 16px;
  font-weight: 500;
}

.modal-footer {
  display: flex;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  margin-top: 20px;
}

.modal-footer .action-btn {
  flex: 1;
  padding: 15px 0;
}
