/* File: css/bk_shop-product_detail.css */

/* 全站容器 */
.prdDetailWrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  font-family: sans-serif;
}

/* 概覽區：圖片 + 資訊 */
.prdSummary {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* 圖片畫廊 */
.imageGallery {
  max-width: 100%;
  overflow: visible;
}

.mainImg {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

.mainImg img {
  width: 100%;
  height: 500px;         /* 固定高度，可依需求調整 */
  object-fit: contain;   /* 顯示完整圖片，不裁切 */
  background: #fafafa;   /* 可選，讓空白區有底色 */
  display: block;
  border-radius: 4px;
}
.thumbList {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  max-width: 100%;
  scrollbar-width: thin;
  /* 讓橫向捲動更明顯 */
  white-space: nowrap;
}
.thumbList::-webkit-scrollbar {
  height: 8px;
}
.thumbList::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.thumbList li {
  flex: 0 0 auto;
  list-style: none;
}

.thumbList img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #ddd;
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}

.thumbList img.active,
.thumbList img:hover {
  opacity: 1;
  border-color: #333;
}

/* 商品資訊 */
.prdInfo {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prdTitle {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.prdCode {
  color: #666;
  font-size: 0.9rem;
}

.prdPrice {
  font-size: 2rem;
  color: #c00;
  font-weight: 700;
}

.prdActions {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary {
  background-color: #f60;
  color: #fff;
}

.btn-secondary {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
}

/* 詳細導覽（置頂黏附） */
.detailNav {
  position: sticky;
  top: 50px; /* 根據主選單高度調整 */
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 5;
}

.detailNav ul {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 1rem;
  margin: 0;
  list-style: none;
}

.detailNav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 0.5rem;
}

.detailNav a.active {
  border-bottom: 2px solid #f60;
  color: #f60;
}

/* 詳細內容區 */
.detailArea {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detailSection h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* 商品特色 */
.feature-content {
  font-size: 1rem;
  line-height: 1.6;
}

/* 商品規格表 */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 0.75rem;
  border: 1px solid #eee;
}

.specs-table th {
  background: #f9f9f9;
  text-align: left;
  width: 30%;
}

/* 商品評價 */
.review-item {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.review-header .author {
  font-weight: 600;
}

.review-header .rating {
  color: #f60;
}

.comment {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 退換貨須知 */
.return-list {
  list-style: disc inside;
  padding-left: 1rem;
}

.return-list li {
  margin-bottom: 0.5rem;
}

/* 取代原本的 radio 顯示，讓整個區塊可點擊並有選取效果 */
.spec-option {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1rem;
  margin: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.spec-option input[type="radio"] {
  display: none; /* 隱藏預設 radio 圖示 */
}
.spec-option label {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}
/* 選中後的樣式 */
.spec-option.active {
  border-color: #f60;
  background-color: rgba(246, 96, 0, 0.1);
}

/* ===== 合併後的 評價與統計 區塊 美化 ===== */
.review-summary {
  background: #fafafa;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}
.review-summary h1 {
  font-size: 2.2rem;
  color: #e65;
  margin-bottom: 0.5rem;
}
.review-summary .ratings-bar {
  display: flex;
  align-items: center;
  margin: 0.75rem 0;
}
.review-summary .ratings-bar .label {
  flex: 1;
  font-weight: 600;
  color: #333;
}
.review-summary .ratings-bar .bar {
  flex: 3;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  margin: 0 0.5rem;
  overflow: hidden;
}
.review-summary .ratings-bar .bar span {
  display: block;
  height: 100%;
  background: #e65;
}
.review-summary .ratings-bar .value {
  width: 2rem;
  text-align: right;
  font-weight: 600;
  color: #e65;
}

/* 評價列表 */
.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.review-item {
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.review-item:last-child {
  border-bottom: none;
}
.reviewer {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}
.reviewer .review-date {
  margin-left: auto;
  font-size: 0.85rem;
  color: #888;
}
.review-stars {
  margin-left: 1rem;
  font-size: 1.2rem;
}
.review-comment {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  margin-top: 0.5rem;
}
/* 預設只顯示桌機版 */
.mobile-link {
  display: none;
  text-align: center;
  width: 100%;
}

.gallery-item {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  padding: 8px;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 18px auto;
}

.gallery-item img {
  max-width: 90%;
  object-fit: contain;
  border-radius: 8px;
  background: #fafafa;
  transition: transform 0.2s;
}

.gallery-item:hover {
  box-shadow: 0 4px 18px rgba(25,118,210,0.13);
  transform: translateY(-4px) scale(1.03);
}

.gallery-item img:hover {
  transform: scale(1.08);
}

/* 手機滿版 */
@media (max-width: 768px) {
  .gallery-item {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .gallery-item img {
    max-width: 90%;
  }
}
/* 回應式微調 */
@media (max-width: 768px) {
  .prdSummary {
    flex-direction: column;
  }

  .thumbList img {
    width: 50px;
    height: 50px;
  }
  .desktop-link {
    display: none;
  }
  .mobile-link {
    display: inline-block;
    text-align: center;
  }  
  /* 詳細導覽（置頂黏附） */
  .detailNav {
    /* 根據主選單高度調整 top 值，以下為假設 50px */
    top: 50px;
  }
  .detailNav ul {
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  .detailNav li {
    flex: 1;
    text-align: center;      /* 讓 li 內所有文字都置中 */
  }
  .detailNav a.desktop-link {
    display: none;           /* 隱藏桌機版文字 */
  }
  .detailNav a.mobile-link {
    display: block;          /* 顯示手機版文字 */
    line-height: 1.2;        /* 控制行高，讓<br/>看起來不會太擠 */
  }  
}
