/*

    ____   ___   _      ____      _      ____  _____
   / ___| / _ \ | |    |  _ \    / \    / ___|| ____|
  | |  _ | | | || |    | | | |  / _ \  | |  _ |  _|
  | |_| || |_| || |___ | |_| | / ___ \ | |_| || |___
   \____| \___/ |_____||____/ /_/   \_\ \____||_____|
                            /\
                            \/
  Goldage Jewellery Limited
  Hong Kong fine jewellery, made for trade

  Developer: Prinseyy

*/

/* GoldAge buyer tools — search palette, shortlist & compare, product sharing, buyer dock. */

:root {
  --bt-ink: #213b39;
  --bt-muted: #5f6f6c;
  --bt-line: #e1e6e4;
  --bt-soft: #f4f7f6;
  --bt-teal: #087c7b;
  --bt-teal-deep: #0b5a59;
  --bt-teal-wash: #e9f6f4;
  --bt-gold: #e2b537;
  --bt-gold-wash: #fff6d6;
  --bt-shadow: 0 24px 70px -18px rgba(6, 45, 44, .38);
  --bt-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Header entry points (search button, "/" hint) live in site-shell.css, shared by every page. */

/* ---------------------------------------------------------------- hearts on catalogue cards */
body.jp-inspired-home .ga-sku-card { position: relative; }

.ga-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(8, 124, 123, .16);
  border-radius: 50%;
  color: var(--bt-teal);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 6px 16px -8px rgba(6, 45, 44, .35);
  cursor: pointer;
  transition: transform .18s var(--bt-ease), background .18s ease, border-color .18s ease;
}
.ga-heart:hover { transform: scale(1.08); border-color: var(--bt-teal); }
.ga-heart:focus-visible { outline: 2px solid var(--bt-teal); outline-offset: 2px; }
.ga-heart-svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill .18s ease; }
.ga-heart[aria-pressed="true"] { color: #fff; border-color: var(--bt-teal); background: var(--bt-teal); }
.ga-heart[aria-pressed="true"] .ga-heart-svg { fill: currentColor; }
.ga-heart[aria-pressed="true"] { animation: ga-heart-pop .32s var(--bt-ease); }
@keyframes ga-heart-pop { 0% { transform: scale(.82); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* ---------------------------------------------------------------- product dialog tools */
.ga-product-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
.ga-tool-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(8, 124, 123, .28);
  border-radius: 999px;
  color: var(--bt-teal-deep);
  background: #fff;
  font: 700 .75rem/1 Manrope, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.ga-tool-button:hover { border-color: var(--bt-teal); background: var(--bt-teal-wash); }
.ga-tool-button:focus-visible { outline: 2px solid var(--bt-teal); outline-offset: 2px; }
.ga-tool-button .ga-heart-svg { width: 16px; height: 16px; }
.ga-tool-button[aria-pressed="true"] { border-color: var(--bt-teal); color: #fff; background: var(--bt-teal); }
.ga-tool-button[aria-pressed="true"] .ga-heart-svg { fill: currentColor; }
.ga-tool-glyph { font-size: .9375rem; }
.ga-product-tools .ga-share-field {
  flex-basis: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--bt-teal);
  border-radius: 6px;
  color: var(--bt-ink);
  background: var(--bt-teal-wash);
  font: 600 .75rem/1 Manrope, sans-serif;
}
.ga-palette-bar input:focus, .ga-palette-bar input:focus-visible { outline: none; box-shadow: none; }

/* ---------------------------------------------------------------- search palette */
.ga-palette {
  width: min(700px, calc(100vw - 32px));
  max-width: none;
  max-height: min(660px, calc(100dvh - 15vh - 24px));
  margin: 12vh auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--bt-line);
  border-radius: 12px;
  color: var(--bt-ink);
  background: #fff;
  box-shadow: var(--bt-shadow);
  font-family: Manrope, sans-serif;
}
.ga-palette[open] { display: flex; flex-direction: column; animation: ga-palette-in .2s var(--bt-ease); }
.ga-palette::backdrop { background: rgba(4, 36, 35, .52); backdrop-filter: blur(4px); }
@keyframes ga-palette-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }

.ga-palette-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--bt-line);
}
.ga-palette-icon { color: var(--bt-teal); font-size: 1.5rem; line-height: 1; }
.ga-palette-bar input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--bt-ink);
  background: transparent;
  font: 500 1.125rem/1.3 Manrope, sans-serif;
  box-shadow: none;
}
.ga-palette-bar input::placeholder { color: #8a9794; }
.ga-palette-esc {
  padding: 5px 8px;
  border: 1px solid var(--bt-line);
  border-radius: 6px;
  color: var(--bt-muted);
  background: var(--bt-soft);
  font: 700 .75rem/1 Manrope, sans-serif;
  cursor: pointer;
}

.ga-palette-chips {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--bt-line);
  scrollbar-width: none;
}
.ga-palette-chips::-webkit-scrollbar { display: none; }
.ga-palette-chips button {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--bt-line);
  border-radius: 999px;
  color: var(--bt-muted);
  background: #fff;
  font: 700 .75rem/1 Manrope, sans-serif;
  letter-spacing: .03em;
  cursor: pointer;
}
.ga-palette-chips button:hover { border-color: var(--bt-teal); color: var(--bt-teal); }
.ga-palette-chips button[aria-pressed="true"] { border-color: var(--bt-teal); color: #fff; background: var(--bt-teal); }

.ga-palette-scroll { flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 10px; }
.ga-palette-group + .ga-palette-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--bt-line); }
.ga-palette-group-title {
  margin: 8px 10px 6px;
  color: #7b8885;
  font: 800 .75rem/1 Manrope, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ga-palette-option {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.ga-palette-option[aria-selected="true"] { background: var(--bt-teal-wash); }
.ga-palette-option[aria-selected="true"]::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--bt-teal);
}
.ga-palette-thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--bt-line);
  border-radius: 6px;
  background: #fff;
}
.ga-palette-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ga-palette-thumb.is-glyph { color: var(--bt-teal); background: var(--bt-soft); font-size: 1.125rem; }
.ga-palette-option.is-page { grid-template-columns: 52px minmax(0, 1fr); }
.ga-palette-option.is-page .ga-palette-thumb { width: 36px; height: 36px; justify-self: center; }
.ga-palette-text { display: grid; gap: 3px; min-width: 0; }
.ga-palette-text strong { overflow: hidden; color: var(--bt-ink); font-size: .875rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ga-palette-text small { overflow: hidden; color: var(--bt-muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.ga-palette-text mark { padding: 0 1px; border-radius: 2px; color: inherit; background: #ffe58a; }
.ga-palette-aside { display: flex; align-items: center; gap: 8px; }
.ga-palette-price { color: var(--bt-teal-deep); font-size: .75rem; font-weight: 800; white-space: nowrap; }
.ga-palette-saved { display: grid; color: var(--bt-teal); }
.ga-palette-saved .ga-heart-svg { width: 14px; height: 14px; fill: currentColor; }
.ga-palette-empty { display: grid; gap: 6px; padding: 36px 16px; color: var(--bt-muted); text-align: center; font-size: .8125rem; }
.ga-palette-empty strong { color: var(--bt-ink); font-size: .9375rem; }

.ga-palette-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--bt-line);
  color: #7b8885;
  background: var(--bt-soft);
  font-size: .75rem;
}
.ga-palette-foot kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-right: 2px;
  padding: 0 4px;
  border: 1px solid #d5dcda;
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--bt-ink);
  background: #fff;
  font: 700 .75rem/1 Manrope, sans-serif;
}
.ga-palette-count { margin-left: auto; }
.ga-palette-count b { color: var(--bt-ink); }

@media (max-width: 640px) {
  .ga-palette {
    width: 100vw;
    max-height: none;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .ga-palette-foot > span:not(.ga-palette-count) { display: none; }
  .ga-palette-option { grid-template-columns: 48px minmax(0, 1fr); }
  .ga-palette-option .ga-palette-aside { grid-column: 2; justify-content: flex-start; }
  .ga-palette-thumb { width: 48px; height: 48px; }
}

/* ---------------------------------------------------------------- shortlist & compare dialog */
body.layout-v18 dialog.ga-shortlist-modal {
  width: min(70rem, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
}
.ga-shortlist-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 38px 20px;
  border-bottom: 1px solid var(--bt-line);
}
.ga-shortlist-head h2 { margin: 6px 0 4px !important; font-size: clamp(28px, 4vw, 38px) !important; }
.ga-shortlist-sub { margin: 0; color: var(--bt-muted); font-size: .8125rem; }
.ga-shortlist-sub b { color: var(--bt-ink); }
.ga-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--bt-line); border-radius: 999px; background: var(--bt-soft); }
.ga-segmented button {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--bt-muted);
  background: transparent;
  font: 800 .75rem/1 Manrope, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.ga-segmented button[aria-pressed="true"] { color: #fff; background: var(--bt-teal); }

.ga-shared-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 38px 0;
  padding: 12px 16px;
  border: 1px solid #f0dc9c;
  border-radius: 6px;
  background: var(--bt-gold-wash);
  font-size: .8125rem;
}
.ga-shared-banner[hidden] { display: none; }
.ga-shared-banner .secondary-button { min-height: 38px; font-size: .75rem; }

.ga-shortlist-body { padding: 22px 38px 26px; }
.ga-shortlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ga-shortlist-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bt-line); border-radius: 6px; background: #fff; }
.ga-shortlist-photo { display: block; width: 100%; padding: 14px; overflow: hidden; border: 0; background: #fff; cursor: pointer; }
.ga-shortlist-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; transition: transform .3s var(--bt-ease); }
.ga-shortlist-photo:hover img { transform: scale(1.04); }
.ga-shortlist-meta { display: grid; gap: 4px; padding: 12px 14px 8px; border-top: 1px solid var(--bt-line); }
.ga-shortlist-meta .ga-sku-code { color: var(--bt-teal); font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.ga-shortlist-meta strong { color: var(--bt-ink); font-size: .875rem; line-height: 1.3; }
.ga-shortlist-meta small { color: var(--bt-muted); font-size: .75rem; }
.ga-shortlist-price { color: var(--bt-teal-deep); font-size: .8125rem; font-weight: 800; }
.ga-shortlist-card-actions { display: flex; gap: 6px; margin-top: auto; padding: 8px 14px 14px; }
.ga-shortlist-card-actions button {
  flex: 1;
  min-height: 34px;
  border: 1px solid var(--bt-line);
  border-radius: 4px;
  color: var(--bt-ink);
  background: #fff;
  font: 700 .75rem/1 Manrope, sans-serif;
  cursor: pointer;
}
.ga-shortlist-card-actions button:hover { border-color: var(--bt-teal); color: var(--bt-teal); }

.ga-shortlist-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 16px; color: var(--bt-muted); text-align: center; font-size: .875rem; }
.ga-shortlist-empty .ga-heart-svg { width: 34px; height: 34px; color: var(--bt-teal); }
.ga-shortlist-empty strong { color: var(--bt-ink); font-size: 1.0625rem; }
.ga-shortlist-empty .secondary-button { margin-top: 8px; min-height: 44px; }

.ga-compare-toggle { display: inline-flex !important; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--bt-muted); font-size: .8125rem; font-weight: 600; cursor: pointer; }
.ga-compare-toggle input { width: 16px; height: 16px; min-height: 0 !important; accent-color: var(--bt-teal); }
.ga-compare-scroll { position: relative; overflow-x: auto; border: 1px solid var(--bt-line); border-radius: 6px; }
.ga-compare-scroll:focus-visible { outline: 2px solid var(--bt-teal); outline-offset: 2px; }
.ga-compare-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8125rem; }
.ga-compare-table th, .ga-compare-table td { padding: 11px 14px; border-bottom: 1px solid var(--bt-line); text-align: left; vertical-align: top; }
.ga-compare-table tbody tr:last-child > * { border-bottom: 0; }
.ga-compare-table td { width: 210px; min-width: 190px; max-width: 240px; color: var(--bt-ink); }
.ga-compare-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 160px;
  min-width: 150px;
  border-right: 1px solid var(--bt-line);
  color: #6d7b78;
  background: var(--bt-soft);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ga-compare-table thead th { position: relative; background: #fff; }
.ga-compare-table thead th:first-child { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--bt-line); background: var(--bt-soft); }
.ga-compare-photo { display: grid; gap: 8px; width: 100%; padding: 0; border: 0; color: var(--bt-ink); background: none; text-align: left; cursor: pointer; }
.ga-compare-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--bt-line); border-radius: 4px; background: #fff; padding: 8px; }
.ga-compare-photo span { font: 700 .875rem/1.3 Manrope, sans-serif; }
.ga-compare-photo:hover span { color: var(--bt-teal); }
.ga-compare-remove {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--bt-line);
  border-radius: 50%;
  color: var(--bt-muted);
  background: rgba(255, 255, 255, .95);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.ga-compare-remove:hover { border-color: #b3261e; color: #b3261e; }
.ga-compare-table.is-highlighting tr.is-different td { background: var(--bt-gold-wash); }
.ga-compare-table.is-highlighting tr.is-different th { color: #7a5a06; }

.ga-shortlist-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 38px;
  border-top: 1px solid var(--bt-line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}
.ga-shortlist-actions .primary-button,
.ga-shortlist-actions .secondary-button { width: auto; min-height: 46px; font-size: .75rem; }
.ga-shortlist-actions button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ga-text-button { padding: 8px 4px; border: 0; color: var(--bt-muted); background: none; font: 700 .75rem/1 Manrope, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ga-text-button:hover { color: #b3261e; }
.ga-text-button[hidden] { display: none; }
.ga-shortlist-status { flex-basis: 100%; min-height: 0; color: var(--bt-teal-deep); font-size: .8125rem; font-weight: 700; overflow-wrap: anywhere; }
.ga-shortlist-status:empty { display: none; }

@media (max-width: 760px) {
  body.layout-v18 dialog.ga-shortlist-modal { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .ga-shortlist-head { padding: 26px 20px 16px; }
  .ga-shared-banner { margin: 14px 20px 0; }
  .ga-shortlist-body { padding: 18px 20px 22px; }
  .ga-shortlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ga-shortlist-actions { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
  .ga-shortlist-actions .primary-button { flex-basis: 100%; }
  .ga-shortlist-actions .secondary-button { flex: 1; padding: 0 10px; }
  .ga-compare-table tbody th { width: 112px; min-width: 104px; }
  .ga-compare-table td { min-width: 150px; }
}

/* ---------------------------------------------------------------- floating buyer dock */
.ga-dock {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 39;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--bt-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 40px -14px rgba(6, 45, 44, .35);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .22s ease, transform .22s var(--bt-ease);
}
.ga-dock.is-visible { opacity: 1; pointer-events: auto; transform: none; }
body.modal-open .ga-dock { opacity: 0; pointer-events: none; }
.ga-dock button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--bt-ink);
  background: transparent;
  font: 800 .75rem/1 Manrope, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.ga-dock button:hover { background: var(--bt-teal-wash); color: var(--bt-teal-deep); }
.ga-dock button:focus-visible { outline: 2px solid var(--bt-teal); outline-offset: 1px; }
.ga-dock .ga-dock-search { justify-content: center; padding: 0; font-size: 1.25rem; letter-spacing: 0; }
.ga-dock .ga-heart-svg { width: 16px; height: 16px; color: var(--bt-teal); }
.ga-dock.has-shortlist .ga-dock-shortlist .ga-heart-svg { fill: currentColor; }
.ga-dock-glyph { color: var(--bt-gold); font-size: .875rem; }
.ga-dock b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: #9aa7a4;
  font-size: .75rem;
  letter-spacing: 0;
}
.ga-dock.has-shortlist .ga-dock-shortlist b,
.ga-dock.has-rfq .ga-dock-rfq b { background: var(--bt-teal); }

@media (max-width: 760px) {
  .ga-dock { bottom: 12px; left: 12px; }
  .ga-dock button { padding: 0 10px; }
  .ga-dock .ga-dock-shortlist .ga-dock-label { display: none; }
}

/* ---------------------------------------------------------------- toast */
.ga-toast {
  position: fixed;
  inset: auto auto 86px 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  height: auto;
  margin: 0;
  padding: 10px 18px 10px 12px;
  overflow: visible;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #123f3d;
  box-shadow: 0 18px 40px -16px rgba(6, 45, 44, .55);
  font: 600 .8125rem/1.35 Manrope, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s ease, transform .2s var(--bt-ease);
}
.ga-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ga-toast strong { display: block; font-weight: 800; }
.ga-toast small { display: block; color: rgba(255, 255, 255, .78); font-size: .75rem; }
.ga-toast-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--bt-gold); background: rgba(255, 255, 255, .1); }
.ga-toast-mark .ga-heart-svg { width: 16px; height: 16px; fill: currentColor; }

.ga-copy-buffer { position: fixed; top: 0; left: -9999px; opacity: 0; }

/* ---------------------------------------------------------------- motion & print */
@media (prefers-reduced-motion: reduce) {
  .ga-heart, .ga-heart[aria-pressed="true"], .ga-palette[open], .ga-dock, .ga-toast, .ga-shortlist-photo img { animation: none !important; transition: none !important; }
}

@media print {
  .ga-heart, .ga-dock, .ga-toast, .ga-palette, .ga-product-tools { display: none !important; }
}
