/**
 * WooCommerce 單一產品頁面樣式
 *
 * @package Ciaoli
 */

[id] {
  scroll-margin-top: 200px;
}
/* ========================================
   單一產品頁面容器
   ======================================== */

.single-product-page {
  min-height: 100vh;
}

/* 首圖區塊 */
.single-product-hero {
  width: 100%;
  overflow: hidden;
}

/* ========================================
   麵包屑導航
   ======================================== */

.product-breadcrumb {
  display: flex;
  width: 100%;
  max-width: 1344px;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg) 0 44px;
  font-size: var(--font-size-sm);
  color: var(--text-color-light);
}

.product-breadcrumb a {
  color: #000;
  text-decoration: none;
  transition: color var(--transition-base);
}

.product-breadcrumb a:hover {
  color: var(--color-primary);
}

.product-breadcrumb .separator {
  color: var(--text-color-lighter);
}

.product-breadcrumb .current-page {
  color: var(--text-color);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   產品主要佈局
   ======================================== */
.onsale {
  display: none;
}
.single-product-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1344px;
}

.single-product-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 84px;
  align-items: start;
  width: 100%;
  max-width: 1000px;
}

/* ========================================
   產品圖片區域
   ======================================== */
.woocommerce div.product div.images.woocommerce-product-gallery {
  position: relative;
  gap: 41px;
  display: flex;
  flex-direction: column;
}
.single-product__gallery {
  position: sticky;
  top: var(--spacing-lg);
  width: 100%;
  min-width: 400px;
}

.single-product__gallery .woocommerce-product-gallery {
  opacity: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.single-product__gallery .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  object-fit: cover;
}

/* 產品縮圖 */
.single-product__gallery .flex-control-thumbs {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding: 0;
  list-style: none;
}

ol li:before {
  content: none;
}

.single-product__gallery .flex-control-thumbs li {
  flex: 0 0 calc(25% - var(--spacing-sm));
}

.single-product__gallery .flex-control-thumbs li img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-base);
  border: 2px solid transparent;
}

.single-product__gallery .flex-control-thumbs li img:hover,
.single-product__gallery .flex-control-thumbs li img.flex-active {
  opacity: 1;
  border-color: var(--color-primary);
}

/* 特價標籤 */
.single-product__gallery .onsale {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background: var(--color-danger);
  color: #fff;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  z-index: 10;
}

/* ========================================
   產品資訊區域
   ======================================== */

.single-product__summary {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  max-width: 400px;
}

/* 產品標題 */
.single-product__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-color);
  margin: 0;
  line-height: var(--line-height-tight);
}

/* 產品價格 */
.single-product__price-wrapper {
  display: flex;
  gap: 8px;
  margin: 8px 0 27px;
}

.single-product__price-wrapper ins {
  order: 1;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  background: linear-gradient(90deg, #ffab36 0%, #ffd036 100%);
  color: transparent;
  background-clip: text;
  text-decoration: none;
}

.single-product__price-wrapper del {
  order: 2;
  font-size: 12px;
  font-weight: 500;
  color: #000;
}

.product-detail {
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  margin-bottom: 19px;
}

.single-product__price {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0;
}

.single-product__price del {
  color: var(--text-color-lighter);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  margin-right: var(--spacing-sm);
}

.single-product__price ins {
  text-decoration: none;
  color: var(--color-danger);
}

/* 產品簡短描述 */
.single-product__short-description {
  font-size: var(--font-size-base);
  line-height: 40px;
  color: var(--text-color-light);
  margin-bottom: 65px;
}

.single-product__short-description p {
  margin: 0 0 var(--spacing-md);
}

.single-product__short-description p:last-child {
  margin-bottom: 0;
}

/* 產品評分 */
.single-product__summary .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.single-product__summary .star-rating {
  color: var(--color-warning);
  font-size: var(--font-size-lg);
}

.single-product__summary .woocommerce-review-link {
  color: var(--text-color-light);
  font-size: var(--font-size-sm);
}

/* LINE諮詢按鈕 */
.line-consult-btn {
  width: 100%;
  max-width: 400px;
  height: 59.914px;
  align-content: center;
  text-align: center;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  background: var(--0002, linear-gradient(90deg, #ff942b 0%, #ffdc37 100%));
}

/* ========================================
   加入購物車區域
   ======================================== */

.single-product__summary .cart {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  align-items: center;
  margin: var(--spacing-lg) 0;
}

/* 數量選擇器 */
.single-product__summary .quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.single-product__summary .quantity .qty {
  width: 60px;
  text-align: center;
  border: none;
  padding: var(--spacing-sm);
  font-size: var(--font-size-base);
  -moz-appearance: textfield;
}

.single-product__summary .quantity .qty::-webkit-outer-spin-button,
.single-product__summary .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 加入購物車按鈕 */
.single-product__summary .single_add_to_cart_button {
  flex: 1;
  min-width: 200px;
  background: var(--color-primary);
  color: #000;
  border: none;
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.single-product__summary .single_add_to_cart_button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.single-product__summary .single_add_to_cart_button:disabled {
  background: var(--color-secondary-light);
  cursor: not-allowed;
  transform: none;
}

/* 變體產品選項 */
.single-product__summary .variations {
  width: 100%;
  margin-bottom: var(--spacing-lg);
}

.single-product__summary .variations tr {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.single-product__summary .variations .label {
  font-weight: var(--font-weight-medium);
  color: var(--text-color);
}

.single-product__summary .variations select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  background: var(--bg-color);
}

/* ========================================
   產品 Meta 資訊
   ======================================== */

.single-product__meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  color: var(--text-color-light);
}

.single-product__meta .meta-label {
  font-weight: var(--font-weight-medium);
  color: var(--text-color);
  margin-right: var(--spacing-xs);
}

.single-product__meta a {
  color: var(--color-primary);
  text-decoration: none;
}

.single-product__meta a:hover {
  text-decoration: underline;
}

/* ========================================
   產品分頁 (Tabs) - 覆蓋 WooCommerce 預設樣式
   ======================================== */

/* 重置 WooCommerce 預設 tabs 樣式 */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  list-style: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
  display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
  display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  background: none !important;
  font-weight: inherit !important;
  color: #000;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  font-weight: 600 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background: none !important;
  border-bottom-color: transparent !important;
}

/* 自訂 tabs 樣式 */
.single-product__tabs {
  margin-top: var(--spacing-2xl);
  width: 100%;
}

.single-product__tabs .woocommerce-tabs ul.tabs {
  display: flex;
  list-style: none !important;
  padding: 0 !important;
  border-bottom: 1px solid #000 !important;
  gap: 36px;
}

.single-product__tabs .woocommerce-tabs ul.tabs li {
  margin: 0;
  color: #000;
  display: inline-block;
  position: relative;
  z-index: 0;
  bottom: -2px;
}

.single-product__tabs .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: var(--spacing-md) var(--spacing-xl);
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  position: relative;
}

.single-product__tabs .woocommerce-tabs ul.tabs li a:hover {
  color: var(--color-primary);
}

.single-product__tabs .woocommerce-tabs ul.tabs li.active a {
  color: #0b2341;
  background: var(--bg-color);
}

/* 漸層底線 - 使用偽元素 */
.single-product__tabs .woocommerce-tabs ul.tabs li.active a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ffab36 0%, #ffd036 100%);
}

.single-product__tabs .woocommerce-tabs .panel {
  padding: var(--spacing-xl);
}

.single-product__tabs .woocommerce-tabs .panel h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-lg);
  color: var(--text-color);
}

/* ========================================
   相關產品 & 追加銷售
   ======================================== */

.single-product__tabs .related.products,
.single-product__tabs .upsells.products {
  margin-top: var(--spacing-2xl);
  width: 100%;
  display: flex;
  flex-direction: column;
}

.single-product__tabs .related.products > h2,
.single-product__tabs .upsells.products > h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-xl);
  color: var(--text-color);
}

.single-product__tabs .products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.single-product__tabs .products .product {
  background: var(--bg-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.single-product__tabs .products .product:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ========================================
   響應式設計
   ======================================== */

@media (max-width: 1024px) {
  .single-product-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .single-product__gallery {
    position: static;
    min-width: unset;
    max-width: 600px;
    margin: 0 auto;
  }

  .single-product__tabs .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .single-product-wrapper {
    padding: var(--spacing-lg);
    margin: 0 var(--spacing-md) var(--spacing-xl);
  }

  .single-product__title {
    font-size: var(--font-size-2xl);
  }

  .single-product__price {
    font-size: var(--font-size-xl);
  }

  .single-product__tabs .woocommerce-tabs ul.tabs {
    flex-wrap: wrap;
  }

  .single-product__tabs .woocommerce-tabs ul.tabs li a {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }

  .single-product__tabs .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  [id] {
    scroll-margin-top: 100px;
  }
  .single-product-wrapper {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
  }

  .single-product__summary .cart {
    flex-direction: column;
  }

  .single-product__summary .quantity {
    width: 100%;
    justify-content: center;
  }

  .single-product__summary .single_add_to_cart_button {
    width: 100%;
  }

  .single-product__tabs .products {
    grid-template-columns: 1fr;
  }

  .product-breadcrumb {
    font-size: 0.75rem;
  }

  .single-product__tabs .woocommerce-tabs .panel {
    margin: 0 !important;
  }
}

/* ========================================
   猜你喜歡區塊
   ======================================== */

.related-products-section {
  width: 100%;
  margin-bottom: 124px;
  margin-top: var(--spacing-3xl);
  padding: 0 var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 猜你喜歡標題裝飾 */
.section-title-decorated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin: 140px 0 48px;
  max-width: 1210px;
  width: 100%;
}

.section-title-decorated h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  margin: 0;
}

.section-title-decorated .line {
  flex: 1;
  width: 100%;
  height: 1px;
  background-color: #000;
}

/* ========================================
   商品評論樣式
   ======================================== */

/* 評論區容器 */
#reviews {
  padding: 0;
}

/* 評論標題 */
.woocommerce-Reviews-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-color);
  margin-bottom: var(--spacing-lg);
}

/* 評論列表 */
#comments .commentlist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-xl);
  display: flex;
  flex-direction: row;
  justify-content: center;
}

/* 評論卡片 - 垂直佈局：名稱 → 評分 → 內容 */
.review-card {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  margin-bottom: 0;
  background: #fff;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 22.2px 0 rgba(0, 0, 0, 0.25);
}

/* 使用 order 調整顯示順序 */
.review-card__author {
  order: 1;
}

.review-card__rating {
  order: 2;
}

.review-card__text {
  order: 3;
  margin: 0;
}

.review-card__images {
  order: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--spacing-sm);
}

.review-card__images .review-image-link {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.review-card__images .review-image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-card__divider {
  display: none;
}

/* 作者區塊樣式 */
.review-card__author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.review-card__name {
  font-size: var(--font-size-lg);
}

/* 上半部：內容區 */
.review-card__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* 星級評分 */
.review-card__rating {
  margin-bottom: var(--spacing-sm);
}

.review-card__rating .star-rating {
  display: flex;
  gap: 2px;
}

.review-card__rating .star-rating span::before {
  color: var(--color-primary);
}

/* 留言文字 + 圖片 */
.review-card__text {
  color: var(--text-color);
  line-height: var(--line-height-relaxed);
}

.review-card__text p {
  margin: 0;
  line-height: 24px;
  font-size: 16px;
}

/* 分隔線 */
.review-card__divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: var(--spacing-md) 0;
}

/* 下半部：作者資訊 */
.review-card__author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.review-card__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-card__name {
  font-weight: var(--font-weight-bold);
  color: var(--text-color);
  font-size: var(--font-size-base);
}

.review-card__account {
  font-size: var(--font-size-sm);
  color: #000;
}

/* 商品評論 slider */

.product-reviews-slider-wrapper {
  width: 100%;
  margin-bottom: 2.5rem;
}

.product-reviews-slider {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.product-reviews-slider-dots {
  display: flex;
  justify-content: center;
  gap: 21px;
  margin-top: 38px;
}

/* 無評論提示 */
.woocommerce-noreviews {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-color-light);
}

/* ========================================
   評論表單樣式
   ======================================== */

.review-form-section {
  width: 100%;
}

#review_form_wrapper {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 28px;
  border-radius: 8px;
  box-shadow: 0 4px 22.2px 0 rgba(0, 0, 0, 0.15);
  margin-bottom: 40px;
}

.review-form-smiley {
  aspect-ratio: 1/1;
  height: fit-content !important;
}

/* 表單標題 */
#reply-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-color);
  margin-bottom: var(--spacing-lg);
}

/* 星級選擇 */
.comment-form-rating {
  margin-bottom: var(--spacing-md);
  display: flex;
  gap: 10px;
}

.comment-form-comment {
  display: flex;
  gap: 10px;
}

.comment-form-rating label {
  display: block;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.comment-form-rating .stars {
  display: flex;
  gap: 4px;
}

.comment-form-rating .stars a {
  font-size: 24px;
  color: #ddd;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.comment-form-rating .stars a:hover,
.comment-form-rating .stars a.active {
  color: var(--color-primary);
}

.comment-form-rating .stars.selected a.active ~ a {
  color: #ddd;
}

.comment-form-rating .stars.selected a {
  color: var(--color-primary);
}

/* 表單欄位 */
#commentform p {
  margin-bottom: var(--spacing-md);
}

#commentform label {
  display: block;
  font-weight: var(--font-weight-medium);
  color: var(--text-color);
  white-space: nowrap;
}

#commentform .required {
  color: #e74c3c;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast);
}

#commentform input:focus,
#commentform textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

#commentform textarea {
  min-height: 120px;
  resize: vertical;
}

/* 提交按鈕 */
#commentform .form-submit {
  margin-top: var(--spacing-md);
  letter-spacing: normal;
  border: none;
  color: #fff;
  font-size: 20px;
  position: relative;
  padding: 0;
  bottom: 0;
  right: 0;
  height: auto;
  margin: 0 !important;
  justify-self: end;
  width: 100%;
  max-width: 160px;
}

.woocommerce #review_form #respond .form-submit input {
  font-size: 20px;
  width: 160px;
  height: 40px;
  font-weight: 700;
  align-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(90deg, #ff942b 0%, #ffdc37 100%);
}

.comment-form-author,
.comment-form-email,
.comment-form-cookies-consent {
  display: none;
}

/* 名稱欄位 */
.comment-form-display-name,
.comment-form-display-email {
  display: flex;
  gap: 10px;
  margin-bottom: var(--spacing-md);
}

.comment-form-display-name input {
  flex: 1;
}

#commentform .submit {
  background: linear-gradient(90deg, #ffab36 0%, #ffd036 100%);
  color: #000;
  border: none;
  padding: var(--spacing-sm) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

#commentform .submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   評論頭像上傳 & 圖片上傳
   ======================================== */

/* 頭像上傳容器 */
.review-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.review-avatar-label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  transition: opacity var(--transition-base);
}

.review-avatar-label:hover {
  opacity: 0.8;
}

.review-avatar-label:hover .review-avatar-hint {
  opacity: 1;
}

#review-avatar-preview {
  border-radius: 50%;
  object-fit: cover;
}

.review-avatar-hint {
  font-size: var(--font-size-sm);
  color: var(--text-color-light);
  transition: opacity var(--transition-base);
  text-align: center;
  white-space: nowrap;
}

.woocommerce #reviews #comments ol.commentlist li {
  display: flex;
}

.review-card__avatar img {
  position: relative !important;
  padding: 0 !important;
}

/* Submit row: submit button + upload images button */
.form-submit-row {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.form-submit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: var(--spacing-sm);
}

/* Reset margin on .form-submit inside flex row so buttons align on the same line */
.form-submit-actions .form-submit {
  margin: 0;
}

.review-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  box-sizing: border-box;
  color: #004dff !important;
}

.review-upload-btn:hover {
  color: #0b2341;
}

.review-upload-btn svg {
  flex-shrink: 0;
}

/* Image preview area */
.review-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.review-images-preview:empty {
  display: none;
}

.review-image-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

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

.review-image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.review-image-remove:hover {
  background: rgba(239, 68, 68, 0.9);
}

/* Review comment images (displayed in comment list) */
.review-comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.review-comment-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.review-comment-img:hover {
  transform: scale(1.05);
}
.product-carousel-wrapper .slider-dot {
  background: linear-gradient(90deg, #ff942b 0%, #ffdc37 100%);
  border: none;
}

.product-carousel-wrapper .slider-dot.active {
  background: linear-gradient(90deg, #ff942b 0%, #ffdc37 100%);
}

/* 評論響應式設計 */
@media (max-width: 480px) {
  .hero-image-rwd {
    width: 100%;
  }
  .product-reviews-slider {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-reviews-slider-dots {
    margin-top: 22px;
    gap: 6px;
  }
  .review-card {
    padding: var(--spacing-md);
    border-radius: 2px;
  }

  .review-card__author {
    gap: 4px;
  }

  .review-card__avatar img {
    width: 36px;
    height: 36px;
  }

  .review-card__name {
    font-size: 12px;
  }

  .review-star {
    width: 8px;
  }

  .review-card__divider {
    margin: 4px 0;
  }

  .review-card__account {
    font-size: 8px;
  }

  #review_form_wrapper {
    padding: var(--spacing-md);
    border-radius: 2px;
  }

  .single-product__price-wrapper {
    margin: 8px 0;
  }

  .woocommerce div.product div.images.woocommerce-product-gallery {
    gap: 10px;
    margin-bottom: 24px;
  }

  .single-product-layout {
    gap: 0;
  }

  .single-product__tabs .woocommerce-tabs ul.tabs {
    gap: 18px !important;
    justify-content: space-between;
  }

  .line-consult-btn {
    font-size: 12.403px;
    width: 100%;
    height: 36px;
  }

  .woocommerce div.product .product_title {
    font-size: 13px;
  }

  .woocommerce div.product div.summary {
    margin-bottom: 0;
  }
  .product-detail {
    margin-bottom: 8px;
  }

  .single-product__short-description {
    margin-bottom: 24px;
  }

  .single-product__price-wrapper ins {
    font-size: 13px;
  }

  .single-product__price-wrapper del {
    font-size: 8px;
  }

  .review-form-smiley {
    max-width: 70px !important;
  }

  .woocommerce #review_form #respond .form-submit input {
    max-width: 120px;
    height: 24px;
    border-radius: 8px;
    font-size: 13px;
    padding: 0;
  }

  #commentform .form-submit {
    max-width: 120px;
  }

  .woocommerce p.stars a {
    font-size: 18px;
  }

  #commentform label {
    font-size: 13px;
  }
  #reply-title {
    font-size: 13px;
    margin-bottom: 20px;
  }

  #reviews {
    padding: 0;
  }

  .review-avatar-hint {
    font-size: 10px;
  }

  .form-submit-row {
    margin-top: 7px;
  }
  .form-submit-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    align-self: flex-end;
    flex-direction: column-reverse;
  }

  .review-upload-btn {
    font-size: 12px;
    padding: 0;
    height: 24px;
    border-radius: 8px;
  }

  .review-upload-btn svg {
    width: 12px;
    height: 12px;
  }

  .review-image-thumb {
    width: 48px;
    height: 48px;
  }

  .review-comment-img {
    width: 60px;
    height: 60px;
  }
}

/* FAQ 手風琴樣式 — 共用樣式已移至 component.css */

/* ========================================
   實際案例樣式
   ======================================== */

.product-cases {
  color: var(--text-color-light);
  line-height: var(--line-height-relaxed);
  display: flex;
  justify-content: center;
}

/* 實際案例圖片網格 */
.case-images-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-image-link {
  max-width: 300px;
  display: block;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  transition: transform var(--transition-base);
}

.case-image-link:hover {
  transform: scale(1.02);
}

.case-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.no-cases {
  text-align: center;
  color: var(--text-color-light);
  padding: var(--spacing-xl);
}

/* 響應式：平板 */
@media (max-width: 768px) {
  .case-images-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* 響應式：手機 */
@media (max-width: 480px) {
  .case-images-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
/* 評論圖片連結樣式 */
.review-comment-img-link {
  display: inline-block;
  cursor: pointer;
}

.review-comment-img-link:hover {
  opacity: 0.8;
}

/* ========================================
   響應式設計 - 猜你喜歡 & FAQ
   ======================================== */

.product-carousel__slider {
  gap: 120px;
}
@media (max-width: 768px) {
  .product-carousel__slider {
    gap: 16px;
  }
  .section-title-decorated {
    gap: var(--spacing-md);
    margin: var(--spacing-2xl) 0 var(--spacing-lg);
  }

  .section-title-decorated h2 {
    font-size: var(--font-size-xl);
  }
}

@media (max-width: 480px) {
  .related-products-section {
    margin-top: 0;
    padding: 0;
    margin-bottom: 82px;
  }

  .section-title-decorated {
    gap: var(--spacing-sm);
    margin: var(--spacing-xl) 0 var(--spacing-md);
  }

  .section-title-decorated h2 {
    font-size: 13px !important;
  }
}
