/* ========================================
   Product Detail – 迋斯生技 Figma 產品內頁
   ======================================== */

.pd-main {
  margin-top: var(--header-height);
  background: #f6f0dc;
}

#product-detail-main {
  padding-bottom: 0;
}

/* ---------- Breadcrumb ---------- */
.pd-breadcrumb {
  min-height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #eeb65a 0%, #efbf82 48%, #f2c8a6 100%);
}

.pd-breadcrumb__inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 52px;
  padding: 0 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100% !important;
}

.pd-breadcrumb__text {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: #fff;
  margin: 0;
  text-align: left;
}

.pd-breadcrumb__text a {
  color: #fff;
}

.pd-breadcrumb__current {
  color: #fff;
}

/* ---------- Body ---------- */
.pd-body {
  background: #fff;
  padding: 0;
}

.pd-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Primary (Gallery + Info) ---------- */
.pd-primary {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(320px, 360px);
  justify-content: center;
  gap: 28px;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 0 48px;
}

.pd-gallery {
  width: 100%;
  max-width: 500px;
}

.pd-gallery__main {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
}

.pd-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.pd-gallery__main-img.is-switching {
  opacity: 0.6;
}

.pd-gallery__main-img:hover {
  transform: scale(1.02);
}

.pd-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pd-gallery__thumb {
  width: 80px;
  height: 80px;
  padding: 0;
  border: 1px solid #e2d8cd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-gallery__thumb.is-active,
.pd-gallery__thumb:hover {
  border-color: var(--color-wants-accent);
  box-shadow: 0 0 0 1px rgba(90, 138, 148, 0.12);
}

.pd-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

/* ---------- Product Info ---------- */
.pd-info {
  max-width: 360px;
  padding-top: 0;
}

.pd-info__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  height: 28px;
  padding: 0 15px;
  background: var(--color-wants-accent);
  color: #fff;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  margin-bottom: 6px;
}

.pd-info__title {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 28px;
  font-weight: 700;
  line-height: normal;
  color: #595757;
  margin: 0 0 8px;
}

.pd-info__rating {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.pd-info__stars {
  width: 106px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  background-color: #FBC02D;
  -webkit-mask-image: url('../images/product-detail/stars.svg');
  mask-image: url('../images/product-detail/stars.svg');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pd-info__rating-count {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  color: #888;
  line-height: normal;
}

.pd-info__price {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 32px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-brand-orange);
  margin: 0 0 16px;
}

.pd-info__price .woocommerce-Price-amount,
.pd-info__price ins,
.pd-info__price del {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-decoration: none;
}

.pd-info__price del {
  opacity: 0.55;
  font-size: 22px;
  margin-right: 8px;
}

.pd-info__desc {
  margin-bottom: 22px;
}

.pd-info__desc p {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #595757;
  margin: 0 0 4px;
}

.pd-info__desc p:last-child {
  margin-bottom: 0;
}

.pd-info__label {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  color: #595757;
  margin: 0 0 8px;
}

.pd-info__options,
.pd-info__quantity {
  margin-bottom: 18px;
}

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

.pd-option {
  cursor: pointer;
}

.pd-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pd-option__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--color-brand-orange);
  border-radius: 999px;
  background: #FFF;
  color: var(--color-brand-orange);
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  transition: all 0.2s ease;
}

.pd-option.is-active .pd-option__btn,
.pd-option input:checked + .pd-option__btn {
  background: var(--color-brand-orange);
  color: #fff;
  border-color: var(--color-brand-orange);
}

.pd-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pd-qty__btn {
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid #D7CCC8;
  border-radius: 4px;
  background: #fff;
  color: #595757;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.pd-qty__btn:hover {
  background-color: rgba(215, 204, 200, 0.16);
}

.pd-qty__input {
  width: 60px;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid #D7CCC8;
  border-radius: 4px;
  background: #fff;
  color: #595757;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.pd-qty__btn:focus-visible,
.pd-qty__input:focus-visible {
  outline: 2px solid rgba(85, 85, 85, 0.35);
  outline-offset: 2px;
}

.pd-qty__input::-webkit-outer-spin-button,
.pd-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pd-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 32px;
  border: none;
  border-radius: 999px;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pd-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.pd-btn--cart {
  min-width: 188px;
  background: var(--color-wants-accent);
  color: #fff;
  font-size: 17px;
}

.pd-btn--wishlist {
  min-width: 148px;
  background: #fff;
  border: 1px solid var(--color-wants-accent);
  color: var(--color-wants-accent);
  font-weight: 400;
  font-size: 16px;
}

.pd-info__actions--secondary {
  margin-top: -8px;
}

.pd-cart-form {
  margin: 0;
}

.pd-wc-cart {
  margin-bottom: 20px;
}

.pd-wc-cart .variations {
  width: 100%;
  margin-bottom: 16px;
  border-collapse: collapse;
}

.pd-wc-cart .variations th,
.pd-wc-cart .variations td {
  padding: 0 0 12px;
  border: none;
  vertical-align: middle;
}

.pd-wc-cart .variations label {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 700;
  color: #595757;
}

.pd-wc-cart .variations select {
  min-width: 180px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #D7CCC8;
  border-radius: 4px;
  background: #fff;
  color: #595757;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 13px;
}

.pd-wc-cart .quantity {
  display: none;
}

.pd-wc-cart .single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 188px;
  height: 44px;
  padding: 0 32px;
  border: none;
  border-radius: 999px;
  background: var(--color-wants-accent);
  color: #fff;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 17px;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pd-wc-cart .single_add_to_cart_button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.pd-wc-cart .reset_variations {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #888;
}

.pd-tab-panel__rich {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-wants-dark);
  margin-bottom: 8px;
}

.pd-tab-panel__rich p {
  margin: 0 0 8px;
}

.pd-review-card--empty {
  justify-content: center;
}

.pd-info__shipping {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #888;
  margin: 0;
}

/* ---------- Tabs ---------- */
.pd-details {
  margin-top: 8px;
}

/* ---------- Content section (tabs + reviews) ---------- */
.pd-content-section {
  position: relative;
  overflow: hidden;
  background-color: #f6f0dc;
  background-image: url('../images/product-detail/detail-info-reviews-bg.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  min-height: 63.5417vw;
}

.pd-content-section__bg {
  display: none;
}

.pd-content-section__inner {
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  .pd-content-section .pd-container {
    padding-top: 48px;
  }

  .pd-details {
    margin-top: 0;
  }

  .pd-content-section .pd-reviews {
    background: transparent;
    padding-top: 56px;
    padding-bottom: 96px;
  }
}

@media (max-width: 768px) {
  .pd-content-section .pd-container {
    padding-bottom: 40px;
  }
}

.pd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.pd-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--color-brand-orange);
  border-radius: 8px;
  background: #fff;
  color: #3f3f3f;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.pd-tab + .pd-tab {
  margin-left: -1px;
}

.pd-tab.is-active {
  background: var(--color-brand-orange);
  color: #fff;
  border-color: var(--color-brand-orange);
}

.pd-tab-panels {
  margin-top: 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  padding: 32px 36px 40px;
  min-height: 280px;
  overflow: hidden;
}

.pd-tab-panel {
  display: none;
}

.pd-tab-panel.is-active {
  display: block;
}

.pd-tab-panel__heading {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-wants-dark);
  margin: 0 0 12px;
}

.pd-tab-panel__heading + .pd-tab-panel__heading,
.pd-feature-list + .pd-tab-panel__heading {
  margin-top: 28px;
}

.pd-feature-list,
.pd-spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd-feature-list li,
.pd-spec-list li,
.pd-tab-panel__text {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-wants-dark);
  margin: 0 0 8px;
}

.pd-feature-list li:last-child,
.pd-spec-list li:last-child {
  margin-bottom: 0;
}

/* ---------- Reviews ---------- */
.pd-reviews {
  position: relative;
  background: transparent;
  padding: 72px 20px 96px;
  overflow: hidden;
}

.pd-reviews__inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.pd-reviews__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.pd-reviews__title {
  color: var(--0003, #D77350);
  text-align: center;
  font-family: Georgia, serif;
  font-size: 26px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0;
}

.pd-reviews__underline {
  display: block;
  width: 40px;
  height: 5px;
}

.pd-reviews__list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.pd-review-card {
  display: flex;
  flex-direction: column;
  gap: 21px;
  min-height: 150px;
  padding: 21px 30px;
  background: #fff;
  border: 1px solid #eee;
}

.pd-review-card__stars {
  width: 106px;
  height: 18px;
  display: block;
}

.pd-review-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 520px;
}

.pd-review-card__title {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-wants-dark);
  margin: 0;
}

.pd-review-card__text {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-wants-dark);
  margin: 0;
}

.pd-review-card__meta {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #999;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pd-primary {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 500px;
  }

  .pd-gallery {
    max-width: 500px;
  }

  .pd-gallery__main {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .pd-info {
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .pd-breadcrumb {
    min-height: 52px;
    padding: 0;
  }

  .pd-breadcrumb__inner {
    min-height: 52px;
    padding: 0 45px;
  }

  .pd-breadcrumb__text {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 13px;
  }

  .pd-container,
  .pd-reviews__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pd-info__actions {
    flex-direction: column;
  }

  .pd-btn--cart,
  .pd-btn--wishlist {
    width: 100%;
  }

  .pd-tabs {
    flex-direction: column;
    gap: 0;
  }

  .pd-tab {
    width: 100%;
    border: 1px solid var(--color-brand-orange);
    border-radius: 8px;
  }

  .pd-tab.is-active {
    border-color: var(--color-brand-orange);
  }

  .pd-tab + .pd-tab {
    margin-left: 0;
    margin-top: -1px;
  }

  .pd-tab-panels {
    margin-top: 16px;
    border-radius: 8px;
    padding: 24px 20px 32px;
  }
}

/* ---------- Lightbox ---------- */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pd-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pd-lightbox__content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.pd-lightbox.is-open .pd-lightbox__content {
  transform: scale(1);
}

.pd-lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.pd-lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.pd-lightbox__close:hover {
  opacity: 1;
}
