.product-detail-page {
  --ink: #16212b;
  --muted: #5f6972;
  --paper: #fffaf2;
  --surface: #ffffff;
  --line: #e7ddcf;
  --teal: #0e7774;
  --blue: #2878b9;
  --coral: #e95f47;
  --green: #4d8d57;
  --amber: #f4b545;
  --shadow: 0 24px 60px rgba(22, 33, 43, 0.14);
  min-height: 70vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.65;
}

.product-detail-page img {
  display: block;
  max-width: 100%;
}

.product-detail-page a:hover {
  text-decoration: none;
}

body:has(.product-detail-page) {
  background: #fffaf2 !important;
}

.product-detail-page *,
.product-detail-page *::before,
.product-detail-page *::after {
  box-sizing: border-box;
}

.rpd-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  padding: 12px 18px;
  background: rgba(255, 250, 242, 0.92);
  border-bottom: 1px solid rgba(231, 221, 207, 0.8);
  backdrop-filter: blur(16px);
}

.rpd-nav a {
  color: var(--muted);
  font-weight: 800;
}

.rpd-nav a:hover {
  color: var(--ink);
}

.rpd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.86fr) 340px;
  gap: 24px;
  align-items: start;
  max-width: 1220px;
  margin: 0 auto;
  padding: 52px 20px 42px;
}

.rpd-hero-simple {
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  grid-template-areas:
    "gallery copy"
    "gallery purchase";
  max-width: 1120px;
  gap: 20px 28px;
  padding-top: 38px;
}

.product-detail-page:not(.product-rich-page) .rpd-hero-simple,
.product-detail-page:not(.product-rich-page) .rpd-section,
.product-detail-page:not(.product-rich-page) .rpd-app,
.product-detail-page:not(.product-rich-page) .rpd-book,
.product-detail-page:not(.product-rich-page) .rpd-feature-band,
.product-detail-page:not(.product-rich-page) .rpd-platform {
  width: calc(100% - 40px);
  max-width: 1180px;
}

.product-detail-page:not(.product-rich-page) .rpd-hero-simple {
  padding-left: 0;
  padding-right: 0;
}

.rpd-hero-simple .rpd-gallery {
  grid-area: gallery;
  justify-self: stretch;
  width: auto;
  max-width: none;
}

.rpd-hero-simple .rpd-copy {
  grid-area: copy;
}

.rpd-hero-simple .rpd-purchase {
  grid-area: purchase;
}

.rpd-hero-simple .rpd-copy h1 {
  font-size: clamp(30px, 3vw, 42px);
}

.rpd-hero-simple .rpd-lead {
  max-width: 920px;
}

.rpd-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.rpd-eyebrow,
.rpd-panel-label {
  margin: 0 0 10px;
  color: var(--teal);
  font-weight: 850;
}

.rpd-lead,
.rpd-section-heading div,
.rpd-platform-points div,
.rpd-card-grid div,
.rpd-book-copy,
.rpd-feature-band div,
.rpd-faq div,
.kpd-panel {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.rpd-proof {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rpd-proof span {
  color: var(--amber);
  white-space: nowrap;
}

.rpd-proof p {
  margin: 0;
  font-weight: 800;
}

.rpd-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.rpd-stats span,
.rpd-timer,
.rpd-fulfilment,
.rpd-service-pill {
  padding: 10px;
  background: #fff8ed;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.rpd-stats strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
}

.rpd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.rpd-simple-actions {
  display: none;
}

.rpd-primary,
.rpd-secondary,
.rpd-cart,
.rpd-buy,
.rpd-dictionary,
.rpd-mobile-buy button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 900;
}

.rpd-primary,
.rpd-buy,
.rpd-mobile-buy button,
.rpd-dictionary {
  color: #fff;
  background: var(--coral);
  border: 0;
}

.rpd-secondary,
.rpd-cart {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.rpd-gallery,
.rpd-purchase,
.rpd-platform-card,
.rpd-card-grid article,
.rpd-book,
.rpd-feature-band,
.rpd-testimonials article,
.rpd-section,
.rpd-app {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.rpd-gallery,
.rpd-purchase {
  padding: 14px;
}

#kpdMainImage {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rpd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.kpd-thumb {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.kpd-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.rpd-purchase {
  position: sticky;
  top: 70px;
}

.rpd-purchase-simple {
  position: sticky;
  top: 82px;
  padding: 24px;
  background: #fffdf9;
  box-shadow: 0 18px 46px rgba(22, 33, 43, 0.1);
}

.rpd-price {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 16px;
}

.rpd-price span {
  color: var(--coral);
  font-size: 38px;
  font-weight: 900;
}

.rpd-price small {
  color: var(--muted);
  text-decoration: line-through;
}

.rpd-price em {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-style: normal;
  font-weight: 850;
}

.rpd-options {
  margin: 16px 0;
}

.rpd-options p,
.rpd-qty span {
  margin: 0 0 8px;
  font-weight: 850;
}

.kpd-variant {
  min-height: 42px;
  margin: 0 8px 8px 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.kpd-variant:focus {
  outline: none;
}

.kpd-variant:focus-visible {
  box-shadow: 0 0 0 3px rgba(14, 119, 116, 0.2);
}

.kpd-variant.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 119, 116, 0.16);
}

.rpd-qty {
  display: grid;
  grid-template-columns: 1fr 44px 82px 44px;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.rpd-qty button,
.rpd-qty input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  font-weight: 850;
}

.rpd-cart,
.rpd-buy {
  width: 100%;
  margin-top: 10px;
}

.rpd-purchase-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rpd-purchase-actions .rpd-cart,
.rpd-purchase-actions .rpd-buy {
  margin: 0;
}

.rpd-purchase-simple .rpd-cart,
.rpd-purchase-simple .rpd-buy {
  width: 100%;
}

.rpd-purchase-simple {
  display: block;
}

.rpd-purchase-simple .rpd-price {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.rpd-purchase-simple .rpd-price span {
  font-size: 34px;
}

.rpd-purchase-simple .rpd-options {
  margin: 18px 0 20px;
}

.rpd-purchase-simple .kpd-variant {
  min-width: 80px;
  margin: 0 8px 8px 0;
  background: #fff;
}

.rpd-purchase-simple .kpd-variant.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.rpd-purchase-simple .rpd-qty {
  grid-template-columns: 1fr 44px 78px 44px;
  max-width: none;
  margin: 4px 0 18px;
}

.rpd-purchase-simple .rpd-fulfilment {
  margin-top: 14px;
  text-align: center;
}

.rpd-fulfilment {
  margin: 14px 0 0;
  font-size: 13px;
}

.rpd-section,
.rpd-app,
.rpd-book,
.rpd-feature-band,
.rpd-platform {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 24px;
}

.rpd-platform {
  padding: 0 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rpd-platform-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  padding: 18px;
}

.rpd-platform-card > img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.rpd-platform-points {
  display: grid;
  gap: 14px;
}

.rpd-platform-points h3,
.rpd-card-grid h3,
.rpd-feature-band h3,
.rpd-testimonials h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.rpd-section-heading {
  margin-bottom: 22px;
}

.rpd-section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
}

.rpd-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rpd-card-grid article {
  padding: 18px;
}

.rpd-card-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.rpd-number-grid span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.rpd-app {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: center;
}

.rpd-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.rpd-store-row img {
  max-height: 54px;
}

.rpd-screen-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rpd-screen-rail figure {
  margin: 0;
}

.rpd-screen-rail img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.rpd-screen-rail figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rpd-book {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 22px;
}

.rpd-book ol {
  padding-left: 20px;
  font-weight: 800;
}

.rpd-book-pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rpd-book-pages img {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rpd-feature-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.rpd-testimonials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rpd-testimonials article {
  padding: 18px;
}

.rpd-testimonials article > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rpd-testimonials span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.rpd-testimonials p {
  color: var(--amber);
  font-weight: 900;
}

.rpd-testimonials blockquote {
  margin: 0;
  color: var(--muted);
}

.rpd-faq details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.rpd-faq summary {
  cursor: pointer;
  font-weight: 900;
}

.rpd-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.kpd-tab {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.kpd-tab.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.kpd-panel {
  display: none;
}

.kpd-panel.is-active {
  display: block;
}

.rpd-mobile-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  align-items: center;
  grid-template-columns: minmax(88px, 0.75fr) minmax(108px, 1fr) minmax(108px, 1fr);
  gap: 10px;
  padding: 12px max(14px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(255, 253, 249, 0.98);
  border-top: 1px solid #e7ddcf;
  box-shadow: 0 -14px 34px rgba(22, 33, 43, 0.16);
  backdrop-filter: blur(12px);
}

.rpd-mobile-buy span {
  color: #e95f47;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 900;
  white-space: nowrap;
}

.rpd-mobile-buy small {
  display: block;
  color: #5f6972;
  text-decoration: line-through;
}

.rpd-mobile-buy .rpd-mobile-cart {
  color: #fff;
  background: #0e7774 !important;
  border: 1px solid #0e7774;
  box-shadow: 0 8px 18px rgba(14, 119, 116, 0.2);
}

.rpd-mobile-buy .rpd-mobile-purchase {
  color: #fff;
  background: #e95f47 !important;
  border: 0;
  box-shadow: 0 8px 18px rgba(233, 95, 71, 0.22);
}

.product-detail-page ~ .swal2-container .swal2-popup,
.swal2-container .swal2-popup {
  width: min(420px, calc(100vw - 40px));
  padding: 30px 28px 26px;
  border-radius: 8px;
  color: var(--ink, #16212b);
  box-shadow: 0 24px 70px rgba(22, 33, 43, 0.22);
}

.swal2-container .swal2-title {
  margin: 0;
  padding: 0;
  color: #26323d;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
}

.swal2-container .swal2-icon {
  margin: 0 auto 18px;
}

.swal2-container .swal2-actions {
  margin: 22px 0 0;
}

.swal2-container .swal2-styled.swal2-confirm {
  min-width: 132px;
  min-height: 48px;
  margin: 0;
  padding: 10px 24px;
  border-radius: 8px;
  background: #0e7774 !important;
  background-color: #0e7774 !important;
  box-shadow: none !important;
  font-size: 18px;
  font-weight: 900;
}

.swal2-container .swal2-styled.swal2-confirm:focus {
  box-shadow: 0 0 0 3px rgba(14, 119, 116, 0.18) !important;
}

.cart-section .cart-menu {
  z-index: 40;
}

.cart-section .cart-menu-div {
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7ddcf;
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(22, 33, 43, 0.16);
}

.cart-section .cart-menu-content {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) 40px;
  gap: 14px;
  align-items: center !important;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e7ddcf;
  box-shadow: none;
}

.cart-section .cart-menu-content.hidden,
.cart-section .cart-menu-inner-div.hidden {
  display: none !important;
}

.cart-section .cart-menu-content > .flex-shrink-0,
.cart-section .cart-menu-content > .flex-grow-1,
.cart-section .cart-menu-content > .btnRemove {
  min-width: 0;
}

.cart-section .cart-menu-content > .flex-grow-1 {
  margin-left: 0 !important;
}

.cart-section .cart-menu-content:last-child {
  border-bottom: 0;
}

.cart-section .thumb {
  width: 72px;
  height: 72px;
  border: 1px solid #e7ddcf;
  border-radius: 8px;
}

.cart-section p.title {
  max-width: none;
  max-width: none !important;
  width: auto !important;
  color: #16212b;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cart-section p.qty {
  margin-top: 2px;
  color: #5f6972;
  font-size: 14px;
  font-weight: 800;
}

.cart-section p.price {
  color: #e95f47;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

.cart-section p.old-price {
  margin-top: 4px;
  color: #5f6972;
  font-size: 13px;
}

.cart-section .btnRemove {
  display: inline-flex;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  justify-self: end;
}

.cart-section .btnRemove:hover {
  background: #fff4ef;
}

.cart-section .btnRemove i {
  margin: 0;
  color: #6f7882;
  font-size: 18px;
}

.cart-menu-checkout {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #0e7774;
  font-size: 16px;
  font-weight: 900;
}

.cart-menu-checkout:hover {
  color: #fff;
  background: #0b6966;
  text-decoration: none;
}

.site-footer {
  margin-top: 0 !important;
  padding: 36px 0 40px !important;
  color: #425263;
  background: #f7efe4 !important;
  border-top: 1px solid #eadfce;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.site-footer .site-footer-inner {
  width: calc(100% - 40px);
  max-width: 1180px;
  padding: 0;
}

.site-footer > .site-footer-inner > .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: flex-start;
  margin: 0;
}

.site-footer-column {
  max-width: none;
  padding: 0;
}

.site-footer-column br {
  display: none;
}

.site-footer-title {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px !important;
  color: #13202b;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0;
}

.site-footer p,
.site-footer span {
  margin-bottom: 0;
  line-height: 1.7;
}

.site-footer p {
  font-size: 14px !important;
}

.site-footer-payment-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 8px 0 0;
}

.site-footer-payment-logos > div {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin-top: 0 !important;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #eadfce;
  border-radius: 8px;
}

.site-footer img {
  max-height: 34px;
  object-fit: contain;
}

.site-footer-payment-logos img {
  width: auto;
  max-width: 82px;
  max-height: 26px;
}

.site-footer a {
  color: #0e7774;
  font-weight: 800;
}

@media (max-width: 1020px) {
  .rpd-hero,
  .rpd-hero-simple,
  .rpd-platform-card,
  .rpd-app,
  .rpd-book {
    grid-template-columns: 1fr;
  }

  .rpd-hero-simple {
    grid-template-areas:
      "gallery"
      "purchase"
      "copy";
  }

  .rpd-hero-simple .rpd-gallery {
    justify-self: center;
  }

  .rpd-purchase {
    position: static;
  }

  .rpd-hero-simple .rpd-copy {
    padding: 22px;
  }

  .rpd-purchase-simple {
    padding: 20px;
  }

  .rpd-purchase-simple .rpd-price {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .rpd-purchase-simple .rpd-options {
    margin: 14px 0 16px;
  }

  .rpd-purchase-simple .rpd-purchase-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rpd-card-grid,
  .rpd-testimonials,
  .rpd-feature-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .rpd-nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .rpd-hero {
    padding-top: 28px;
  }

  .rpd-purchase-simple .rpd-purchase-actions {
    grid-template-columns: 1fr;
  }

  .rpd-stats,
  .rpd-card-grid,
  .rpd-testimonials,
  .rpd-feature-band,
  .rpd-screen-rail,
  .rpd-book-pages {
    grid-template-columns: 1fr;
  }

  .rpd-mobile-buy {
    display: grid;
  }

  .product-detail-page {
    padding-bottom: 86px;
  }

  .site-footer {
    padding-bottom: 88px !important;
  }

  .site-footer > .site-footer-inner > .row {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
