/* ============================================
   product.css - 商品详情页样式（爱花客）
   包含：商品详情容器、图片展示、信息区、
         规格选择、数量、详情Tab、底部操作栏
   ============================================ */

/* ========== Product Detail Page Container ========== */
.product-detail-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
}

/* ========== Breadcrumb ========== */
.pd-bread {
  font-size: 12px;
  color: var(--tl);
  padding: 8px 0 16px;
}

.pd-bread a {
  color: var(--tl);
  text-decoration: none;
}

.pd-bread .current {
  color: var(--txt);
}

/* ========== Hero: Thumbnails + Main Image ========== */
.pd-hero {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.pd-hero-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 80px;
  flex-shrink: 0;
}

.pd-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}

.pd-thumb.active {
  border-color: var(--primary);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-hero-right {
  flex: 1;
  position: relative;
}

.pd-main-img {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #fdf2f4 0%, #fce4ec 100%);
}

.pd-main-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Info Section ========== */
.pd-info-section {
  background: #fff;
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--sh);
}

.pd-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pd-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.pd-collect {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--bd);
  border-radius: 20px;
  font-size: 12px;
  color: var(--tl);
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
}

.pd-collect svg {
  width: 16px;
  height: 16px;
}

.pd-collect.on {
  color: var(--primary);
  border-color: var(--primary);
}

.pd-collect.on svg {
  fill: var(--primary);
}

.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pd-price-now {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.pd-price-now::before {
  content: '\00a5';
  font-size: 18px;
}

.pd-price-old {
  font-size: 14px;
  color: var(--tl);
  text-decoration: line-through;
}

.pd-price-discount {
  font-size: 12px;
  background: #fff0f0;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
}

.pd-sales {
  font-size: 12px;
  color: var(--tl);
  margin-left: auto;
}

/* ========== Spec Section ========== */
.pd-spec-section {
  background: #fff;
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--sh);
}

.pd-spec-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.pd-spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-spec-opt {
  padding: 8px 16px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
}

.pd-spec-opt:hover {
  border-color: var(--primary);
}

.pd-spec-opt.active {
  border-color: var(--primary);
  background: #fff5f5;
  color: var(--primary);
  font-weight: 600;
}

/* ========== Qty Section ========== */
.pd-qty-section {
  background: #fff;
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--sh);
  display: flex;
  align-items: center;
  gap: 16px;
}

.pd-qty-label {
  font-size: 14px;
  font-weight: 600;
}

.pd-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--bd);
  border-radius: 8px;
  overflow: hidden;
}

.pd-qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  font-size: 18px;
  cursor: pointer;
  color: var(--txt);
}

.pd-qty-btn:hover {
  background: #eee;
}

.pd-qty-input {
  width: 48px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--bd);
  border-right: 1px solid var(--bd);
  font-size: 15px;
  font-weight: 600;
  height: 36px;
}

/* ========== Detail Tabs ========== */
.pd-detail-section {
  background: #fff;
  border-radius: var(--r);
  padding: 0;
  margin-bottom: 12px;
  box-shadow: var(--sh);
  overflow: hidden;
}

.pd-detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--bd);
  overflow-x: auto;
}

.pd-detail-tab {
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--tl);
  border-bottom: 2px solid transparent;
}

.pd-detail-tab:hover {
  color: var(--txt);
}

.pd-detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.pd-detail-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  min-height: 100px;
}

/* ========== Action Buttons ========== */
.pd-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--bd);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.pd-action-btn {
  flex: 1;
  height: 46px;
  border-radius: 23px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.pd-cart-btn {
  background: #ff9800;
  color: #fff;
}

.pd-buy-btn {
  background: var(--primary);
  color: #fff;
}

.pd-action-btn:hover {
  opacity: 0.9;
}

/* ========== Mobile Bottom Bar ========== */
.pd-mobile-bar {
  display: none;
  width: 100%;
  align-items: center;
  gap: 0;
}

.pd-mb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: var(--tl);
  text-decoration: none;
  padding: 6px 10px;
}

.pd-mb-item svg {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
}

.pd-mb-buy,
.pd-mb-cart {
  flex: 1;
  height: 40px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: #fff;
}

.pd-mb-buy {
  background: var(--primary);
}

.pd-mb-cart {
  background: #ff9800;
}

/* ========== Responsive（商品详情部分） ========== */
@media (max-width: 768px) {
  .pd-hero {
    flex-direction: column;
  }

  .pd-hero-left {
    flex-direction: row;
    order: 2;
    width: 100%;
    overflow-x: auto;
  }

  .pd-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .pd-main-img {
    padding-bottom: 80%;
  }

  .pd-actions {
    padding: 8px 10px;
  }

  .pd-desk-btn {
    display: none;
  }

  .pd-mobile-bar {
    display: flex;
  }
}
