/* Shared by every product. No campaign-specific selectors or assumed amounts. */
.gp {
  --gp-ink: #171d41;
  --gp-body: #394a6b;
  --gp-accent: #294878;
  --gp-soft: #eff4fa;
  --gp-tone: #e3edfa;
  --gp-paper: #fff;
  --gp-muted: #526286;
  --gp-focus: #1679a3;
  color: var(--gp-body);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.55;
  margin: 14px 0 24px;
  /* Do not clear the PDP sidebar float: it can be taller than the product. */
  clear: none;
  container-type: inline-size;
}
.gp *, .gp *::before, .gp *::after { box-sizing: border-box; }
.gp .gp-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.gp .gp-heading { margin: 0; padding: 0; color: var(--gp-ink); background: none; border: 0; font-family: inherit; font-size: 19px; font-weight: 600; line-height: 1.4; text-transform: none; }
.gp .gp-count { margin: 0; color: var(--gp-muted); font-size: 13px; line-height: 1.4; white-space: nowrap; }
.gp .gp-offer { min-width: 0; padding: 20px; background: var(--gp-soft); display: flex; flex-direction: column; gap: 14px; }
.gp .gp-copy { flex: 1; min-width: 0; }
.gp .gp-title { margin: 0 0 8px; padding: 0; color: var(--gp-ink); background: none; border: 0; font-family: inherit; font-size: 16px; line-height: 1.5; font-weight: 600; text-transform: none; overflow-wrap: anywhere; }
.gp .gp-detail { color: var(--gp-body); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.gp .gp-detail p { margin: 0 0 8px; }
.gp .gp-detail p:last-child { margin-bottom: 0; }
.gp .gp-detail ul, .gp .gp-detail ol { padding-left: 20px; margin: 6px 0; }
.gp .gp-detail li { margin: 4px 0; }
.gp .gp-detail img { max-width: 100%; height: auto; }
.gp .gp-detail a { color: var(--gp-accent); text-decoration: underline; text-underline-offset: 3px; }
.gp .gp-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; }
.gp .gp-expiry { margin: 0; color: var(--gp-muted); font-size: 12px; line-height: 1.5; }
.gp .gp-action { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 0; color: var(--gp-accent); background: none; border: 0; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.gp .gp-action::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); margin-right: 2px; }
.gp a:hover { color: var(--gp-ink); }
.gp a:focus-visible, .gp button:focus-visible, .gp summary:focus-visible, .gp [tabindex]:focus-visible { outline: 3px solid var(--gp-focus); outline-offset: 3px; }
.gp ::selection { background: var(--gp-tone); color: var(--gp-ink); }
.gp [hidden] { display: none !important; }
/* Every option uses the same one-row, count-independent scrolling rail. */
.gp .gp-header { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; }
.gp .gp-controls { display: flex; gap: 6px; }
.gp .gp-prev, .gp .gp-next { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-height: 36px; padding: 0; border: 0; background: var(--gp-tone); color: var(--gp-accent); border-radius: 50%; cursor: pointer; }
.gp .gp-prev svg, .gp .gp-next svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gp .gp-prev:disabled, .gp .gp-next:disabled { opacity: .38; cursor: default; }
.gp .gp-prev:not(:disabled):hover, .gp .gp-next:not(:disabled):hover { background: #d3e2f5; }
.gp .gp-rail { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; overflow-y: hidden; align-items: stretch; padding: 3px 0 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #9eb5d1 #edf2f8; -webkit-overflow-scrolling: touch; }
.gp .gp-rail::-webkit-scrollbar { height: 6px; }
.gp .gp-rail::-webkit-scrollbar-thumb { background: #9eb5d1; border-radius: 3px; }
.gp .gp-rail::-webkit-scrollbar-track { background: #edf2f8; }
.gp .gp-offer { flex: 0 0 calc((100% - 24px) / 3); scroll-snap-align: start; min-width: 0; border-radius: 4px; }
.gp[data-gp-count="1"] .gp-offer { flex-basis: 100%; }
.gp[data-gp-count="2"] .gp-offer { flex-basis: calc((100% - 12px) / 2); }
/* A. Pale blue cards continue the existing PDP surfaces. */
.gp--cards .gp-offer { background: var(--gp-soft); }
/* B. White offers share a quiet pale-blue scrolling tray. */
.gp--rows .gp-rail { padding: 12px; scroll-padding-inline: 12px; background: var(--gp-soft); }
.gp--rows .gp-offer { background: var(--gp-paper); }
/* C. The first item follows the existing administrator sort order. */
.gp--featured .gp-offer:first-child { --gp-ink: #fff; --gp-body: #f0f4fb; --gp-muted: #d6e2f3; --gp-accent: #fff; background: #171d41; }
/* D. A denser text layout for a shallower product-page section. */
.gp--accordion .gp-offer { padding: 14px 16px; gap: 8px; background: #f5f7fb; }
.gp--accordion .gp-title { font-size: 15px; margin-bottom: 5px; }
.gp--accordion .gp-detail { font-size: 14px; line-height: 1.55; }
.gp--accordion .gp-footer { gap: 2px 12px; }
/* E. A title band distinguishes each offer without depending on an image. */
.gp--tabs .gp-offer { padding: 0; gap: 0; background: var(--gp-soft); overflow: hidden; }
.gp--tabs .gp-copy { display: flex; flex-direction: column; }
.gp--tabs .gp-title { margin: 0; padding: 13px 18px; background: var(--gp-tone); }
.gp--tabs .gp-detail { padding: 14px 18px; }
.gp--tabs .gp-footer { padding: 0 18px 12px; }
@container (max-width: 900px) {
  .gp .gp-offer { flex-basis: calc((100% - 18px) / 2.1); }
}
@container (max-width: 580px) {
  .gp .gp-heading { font-size: 17px; }
  .gp .gp-count { font-size: 12px; }
  .gp .gp-header { gap: 8px; margin-bottom: 10px; }
  .gp .gp-prev, .gp .gp-next { width: 40px; min-height: 40px; }
  .gp .gp-controls { gap: 4px; }
  .gp .gp-offer, .gp[data-gp-count="2"] .gp-offer { flex-basis: calc(100% - 28px); padding: 17px; }
  .gp[data-gp-count="1"] .gp-offer { flex-basis: 100%; }
  .gp .gp-action { min-height: 44px; }
  .gp--accordion .gp-offer { padding: 14px 16px; }
  .gp--tabs .gp-offer { padding: 0; }
  .gp--rows .gp-rail { padding: 10px; scroll-padding-inline: 10px; }
}
.gp-image-dialog { padding: 20px; border: 0; max-width: min(92vw, 840px); max-height: 90vh; background: #fff; color: #173d39; }
.gp-image-dialog::backdrop { background: rgb(14 31 36 / .8); }
.gp-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.gp-dialog-title { margin: 0; font: 600 16px/1.5 Arial, sans-serif; }
.gp-dialog-close { border: 0; min-height: 44px; min-width: 54px; padding: 8px 12px; color: #173d39; background: #e3eee8; cursor: pointer; }
.gp-image-dialog img { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; margin: auto; }
.gp-image-dialog [hidden] { display: none !important; }
.gp-dialog-error { font-size: 14px; }
.gp-dialog-close:focus-visible { outline: 3px solid #1679a3; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .gp .gp-rail { scroll-behavior: auto; } }
