/* 商品详情页样式文件 - 四川学考科技有限公司 */
/* 所有自定义类和ID使用 zh_ 前缀 */

/* ============================================
   基础样式
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0F1214;
  background: #F8F8F8;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.zh_container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.zh_goods-main {
  min-height: calc(100vh - 300px);
}

/* ============================================
   面包屑导航
   ============================================ */
.zh_breadcrumb {
  background: #FFFFFF;
  padding: 20px 0;
  border-bottom: 1px solid #EEEEEE;
}

.zh_breadcrumb-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.zh_breadcrumb-content i {
  color: #BF9271;
  font-size: 16px;
}

/* ============================================
   商品详情区域
   ============================================ */
.zh_goods-section {
  padding: 40px 0;
}

.zh_goods-info-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* ============================================
   商品图片展示
   ============================================ */
.zh_goods-gallery {
  position: sticky;
  top: 120px;
  align-self: start;
}

.zh_gallery-main {
  position: relative;
  background: #F8F8F8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.zh_main-image {
  display: none;
  padding-top: 100%;
  position: relative;
}

.zh_main-image.active {
  display: block;
}

.zh_main-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zh_gallery-thumbs {
  overflow-x: auto;
}

.zh_thumbs-list {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.zh_thumbs-list li {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.zh_thumbs-list li.active {
  border-color: #BF9271;
}

.zh_thumbs-list li:hover {
  border-color: #E3B7A0;
}

.zh_thumbs-list li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   商品信息
   ============================================ */
.zh_goods-details {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.zh_goods-title {
  font-family: 'Mulish', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #0F1214;
  line-height: 1.4;
  margin: 0;
}

.zh_goods-brief {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
  padding: 15px;
  background: #F8F8F8;
  border-radius: 8px;
}

.zh_goods-price-box {
  background: linear-gradient(135deg, #FFF5F0 0%, #FFF9F5 100%);
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #E3B7A0;
}

.zh_price-main {
  display: flex;
  align-items: center;
  gap: 15px;
}

.zh_price-label {
  font-size: 18px;
  color: #666;
  font-weight: 500;
}

.zh_price-value {
  font-size: 36px;
  font-weight: 700;
  color: #DA3E31;
}

/* 促销信息 */
.zh_goods-promo {
  background: #FFF9F5;
  padding: 15px 20px;
  border-radius: 8px;
  border-left: 4px solid #FAAD14;
}

.zh_promo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0F1214;
  font-size: 15px;
}

.zh_promo-item i {
  color: #FAAD14;
  font-size: 18px;
}

/* 发货信息 */
.zh_goods-delivery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zh_delivery-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #666;
}

.zh_delivery-item i {
  color: #52C41A;
  font-size: 18px;
}

.zh_seller-link {
  color: #BF9271;
  font-weight: 600;
  transition: color 0.3s;
}

.zh_seller-link:hover {
  color: #362222;
}

/* 购买数量 */
.zh_goods-quantity {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #F8F8F8;
  border-radius: 8px;
}

.zh_quantity-label {
  font-size: 16px;
  font-weight: 600;
  color: #0F1214;
}

.zh_quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid #EEEEEE;
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}

.zh_qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #FFFFFF;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zh_qty-btn:hover {
  background: #BF9271;
  color: #FFFFFF;
}

.zh_qty-input {
  width: 70px;
  height: 40px;
  border: none;
  border-left: 1px solid #EEEEEE;
  border-right: 1px solid #EEEEEE;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #0F1214;
}

.zh_stock-info {
  font-size: 14px;
  color: #666;
}

.zh_in-stock {
  color: #52C41A;
  font-weight: 600;
  font-style: normal;
}

.zh_out-stock {
  color: #DA3E31;
  font-weight: 600;
  font-style: normal;
}

/* 购买按钮 */
.zh_goods-actions {
  display: flex;
  gap: 15px;
}

.zh_btn-buy-now,
.zh_btn-add-cart {
  flex: 1;
  padding: 18px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
}

.zh_btn-buy-now {
  background: #BF9271;
  color: #FFFFFF;
}

.zh_btn-buy-now:hover {
  background: #362222;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(191, 146, 113, 0.4);
}

.zh_btn-add-cart {
  background: #FFFFFF;
  color: #BF9271;
  border: 2px solid #BF9271;
}

.zh_btn-add-cart:hover {
  background: #BF9271;
  color: #FFFFFF;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(191, 146, 113, 0.3);
}

/* ============================================
   店铺信息
   ============================================ */
.zh_store-info {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
}

.zh_store-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.zh_store-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #BF9271 0%, #E3B7A0 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 28px;
}

.zh_store-title {
  font-family: 'Mulish', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0F1214;
  margin: 0;
}

.zh_store-content {
  display: flex;
  gap: 40px;
}

.zh_store-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zh_store-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.zh_store-value {
  font-size: 15px;
  color: #0F1214;
  font-weight: 600;
  transition: color 0.3s;
}

.zh_store-value:hover {
  color: #BF9271;
}

.zh_store-rating {
  display: flex;
  align-items: center;
}

.zh_star-bg {
  position: relative;
  width: 100px;
  height: 18px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><text y="15" font-size="16" fill="%23DDD">★★★★★</text></svg>') no-repeat;
  background-size: contain;
}

.zh_star-val {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><text y="15" font-size="16" fill="%23FAAD14">★★★★★</text></svg>') no-repeat;
  background-size: contain;
  overflow: hidden;
}

.zh_store-action {
  display: flex;
}

.zh_store-btn {
  padding: 12px 30px;
  background: #BF9271;
  color: #FFFFFF;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  white-space: nowrap;
}

.zh_store-btn:hover {
  background: #362222;
  transform: translateX(5px);
}

/* ============================================
   商品详情内容
   ============================================ */
.zh_goods-tabs {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.zh_tabs-header {
  border-bottom: 2px solid #EEEEEE;
  margin-bottom: 30px;
}

.zh_tabs-title {
  display: inline-block;
  font-family: 'Mulish', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #0F1214;
  padding: 15px 30px;
  border-bottom: 3px solid #BF9271;
  margin-bottom: -2px;
  cursor: pointer;
}

.zh_tabs-content {
  line-height: 1.8;
  color: #666;
  font-size: 15px;
}

.zh_tab-panel {
  display: none;
}

.zh_tab-panel.active {
  display: block;
}

/* ============================================
   猜你喜欢
   ============================================ */
.zh_recommend-section {
  padding: 80px 0;
  background: #FFFFFF;
}

.zh_section-header {
  text-align: center;
  margin-bottom: 50px;
}

.zh_section-title {
  font-family: 'Mulish', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #0F1214;
  margin-bottom: 10px;
}

.zh_section-subtitle {
  font-size: 16px;
  color: #BF9271;
  font-weight: 500;
}

.zh_recommend-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
}

.zh_recommend-card {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #EEEEEE;
  transition: all 0.3s;
}

.zh_recommend-card:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  transform: translateY(-5px);
  border-color: #BF9271;
}

.zh_recommend-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: #F8F8F8;
}

.zh_recommend-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.zh_recommend-card:hover .zh_recommend-image img {
  transform: scale(1.1);
}

.zh_recommend-content {
  padding: 20px;
}

.zh_recommend-title {
  font-size: 15px;
  font-weight: 600;
  color: #0F1214;
  margin-bottom: 12px;
}

.zh_recommend-title a {
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: color 0.3s;
}

.zh_recommend-title a:hover {
  color: #BF9271;
}

.zh_recommend-price {
  margin-bottom: 15px;
}

.zh_recommend-current {
  font-size: 20px;
  font-weight: 700;
  color: #DA3E31;
}

.zh_recommend-btn {
  display: block;
  text-align: center;
  background: #BF9271;
  color: #FFFFFF;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.zh_recommend-btn:hover {
  background: #362222;
  transform: translateY(-2px);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1200px) {
  .zh_goods-info-wrapper {
    gap: 30px;
    padding: 30px;
  }

  .zh_goods-title {
    font-size: 28px;
  }

  .zh_price-value {
    font-size: 32px;
  }

  .zh_recommend-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .zh_store-content {
    gap: 25px;
  }
}

@media (max-width: 992px) {
  .zh_goods-info-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .zh_goods-gallery {
    position: static;
  }

  .zh_store-info {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .zh_store-header {
    justify-content: center;
  }

  .zh_store-content {
    flex-direction: column;
    gap: 15px;
  }

  .zh_store-item {
    justify-content: center;
  }

  .zh_recommend-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .zh_goods-section {
    padding: 30px 0;
  }

  .zh_goods-info-wrapper {
    padding: 20px;
  }

  .zh_goods-title {
    font-size: 24px;
  }

  .zh_price-value {
    font-size: 28px;
  }

  .zh_goods-quantity {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .zh_goods-actions {
    flex-direction: column;
  }

  .zh_btn-buy-now,
  .zh_btn-add-cart {
    width: 100%;
  }

  .zh_store-info {
    padding: 20px;
  }

  .zh_goods-tabs {
    padding: 20px;
  }

  .zh_tabs-title {
    font-size: 20px;
    padding: 12px 20px;
  }

  .zh_recommend-section {
    padding: 50px 0;
  }

  .zh_section-title {
    font-size: 28px;
  }

  .zh_recommend-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .zh_breadcrumb-content {
    font-size: 12px;
  }

  .zh_goods-title {
    font-size: 20px;
  }

  .zh_price-label {
    font-size: 16px;
  }

  .zh_price-value {
    font-size: 24px;
  }

  .zh_recommend-grid {
    grid-template-columns: 1fr;
  }

  .zh_recommend-card {
    max-width: 350px;
    margin: 0 auto;
  }
}
