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

.pd-main {
  margin-top: var(--header-height);
  background: var(--color-wants-dark);
}

/* ---------- Breadcrumb ---------- */
.pd-breadcrumb {
  background: #FFFFFF;
}

.pd-breadcrumb__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px 24px;
}

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

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

.pd-breadcrumb__current {
  color: var(--color-wants-dark);
}

/* ---------- Body ---------- */
.pd-body {
  background: var(--color-wants-cream);
  padding: 0;
}

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

/* ---------- Primary (Gallery + Info) ---------- */
.pd-primary {
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 48px;
  align-items: start;
  padding: 24px 0 48px;
}

.pd-gallery__main {
  width: 500px;
  height: 500px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
}

.pd-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  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: 12px;
  margin-top: 16px;
}

.pd-gallery__thumb {
  width: 80px;
  height: 80px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.pd-gallery__thumb.is-active,
.pd-gallery__thumb:hover {
  border-color: var(--color-wants-dark);
}

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

/* ---------- Product Info ---------- */
.pd-info {
  padding-top: 8px;
}

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

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

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

.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-wants-dark);
  margin: 0 0 20px;
}

.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: 24px;
}

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

.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: var(--color-wants-dark);
  margin: 0 0 10px;
}

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

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

.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: 96px;
  height: 38px;
  padding: 0 20px;
  border: 1px solid #E2E2E2;
  border-radius: 999px;
  background: #FFF;
  color: #555;
  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-wants-dark);
  color: #fff;
  border-color: var(--color-wants-dark);
}

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

.pd-qty__btn {
  width: 46px;
  height: 47px;
  box-sizing: border-box;
  border: 1px solid #D7CCC8;
  border-radius: 7px;
  background: transparent;
  color: #555;
  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: 69px;
  height: 47px;
  box-sizing: border-box;
  border: 1px solid #D7CCC8;
  border-radius: 7px;
  background: transparent;
  color: var(--color-wants-dark);
  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: 20px;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 36px;
  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: 240px;
  background: #877C55;
  color: #fff;
}

.pd-btn--wishlist {
  min-width: 160px;
  background: transparent;
  border: 1px solid var(--color-wants-accent);
  color: var(--color-wants-accent);
  font-weight: 400;
}

.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: var(--color-wants-dark);
}

.pd-wc-cart .variations select {
  min-width: 180px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-wants-dark);
  background: #fff;
  color: var(--color-wants-dark);
  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: 240px;
  height: 48px;
  padding: 0 36px;
  border: none;
  border-radius: 999px;
  background: #877C55;
  color: #fff;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 16px;
  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;
}

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

.pd-content-section__inner {
  position: relative;
}

@media (min-width: 769px) {
  .pd-content-section {
    overflow: hidden;
    background: var(--color-wants-dark);
  }

  .pd-content-section__bg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }

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

  .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 {
    background: var(--color-wants-cream);
    padding-bottom: 0;
  }

  .pd-content-section .pd-container {
    padding-bottom: 40px;
  }
}

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

.pd-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--color-wants-dark);
  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.is-active {
  background: var(--color-wants-dark);
  color: #fff;
  border-color: #fff;
}

.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: var(--color-wants-dark);
  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: #fff;
  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: 1100px) {
  .pd-primary {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

@media (max-width: 768px) {
  .pd-breadcrumb__inner,
  .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: 8px;
  }

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

  .pd-tab.is-active {
    border-color: #fff;
  }

  .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;
}
