/* =========================================================
   GKS Healthsol — 3D product showroom
   ========================================================= */

/* ---------- 3D stage ---------- */
.v3d {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg);
  background:
    radial-gradient(70% 60% at 50% 38%, #ffffff 0%, #f7f1e5 55%, #efe6d4 100%);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.v3d::after { /* soft studio vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(11, 27, 58, .07));
}
.v3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; opacity: 0; transition: opacity .6s var(--ease); }
.v3d-canvas:active { cursor: grabbing; }
.v3d.is-ready .v3d-canvas { opacity: 1; }
.v3d-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; opacity: 0; transition: opacity .4s; z-index: 0; }
.v3d.is-fallback .v3d-fallback, .v3d.show-photo .v3d-fallback { opacity: 1; z-index: 3; background: #f7f1e5; mix-blend-mode: normal; }
.v3d.show-photo .v3d-hs, .v3d.show-photo .v3d-actions { visibility: hidden; }
.v3d-loading {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  font-size: 14px; color: var(--ink-soft); transition: opacity .4s;
}
.v3d-loading span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(11, 27, 58, .12); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
.v3d.is-ready .v3d-loading, .v3d.is-fallback .v3d-loading { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* hotspots */
.v3d-hs { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hs {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 0; padding: 0; background: transparent; cursor: pointer;
  transition: opacity .25s, visibility .25s;
}
.hs span {
  position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--navy); color: var(--cream); font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 6px 18px -4px rgba(11, 27, 58, .55);
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.hs::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: rgba(4, 83, 146, .28); animation: pulse 2.2s var(--ease) infinite; }
.hs:hover span { transform: scale(1.12); }
.hs.is-active span { background: var(--sky); color: var(--navy); transform: scale(1.12); }
.hs.is-active::before { background: rgba(166, 214, 229, .55); }
.hs.is-hidden { opacity: 0; visibility: hidden; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.hs-tip {
  position: absolute; left: 0; top: 0; width: min(280px, 70%);
  padding: 14px 16px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -16px rgba(11, 27, 58, .4); border: 1px solid rgba(11, 27, 58, .06);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; pointer-events: none;
}
.hs-tip.show { opacity: 1; visibility: visible; }
.hs-tip.dim { opacity: .0; }
.hs-tip b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.03rem; line-height: 1.2; color: var(--navy); }
.hs-tip span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }

.v3d-actions { position: absolute; left: 16px; top: 16px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; }
.act-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: var(--pill);
  border: 1px solid rgba(11, 27, 58, .14); background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 500; color: var(--navy); transition: background .2s, color .2s, border-color .2s;
}
.act-btn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 3px rgba(166, 214, 229, .35); }
.act-btn:hover { border-color: var(--navy); }
.act-btn[aria-pressed="true"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* ---------- featured section ---------- */
.feat3d { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.v3d-featured { aspect-ratio: 5 / 4; min-height: 420px; }
.feat3d-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: none; }
.feat3d-list:empty { display: none; }
.feat3d-list button, .pm-hotspots button {
  width: 100%; display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent;
  transition: background .2s, border-color .2s;
}
.feat3d-list button:hover, .pm-hotspots button:hover:not(:disabled) { background: var(--white); border-color: var(--line); }
.feat3d-list button.is-active, .pm-hotspots button.is-active { background: var(--white); border-color: var(--navy); }
.feat3d-list .n, .pm-hotspots .n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--cream); font-size: 12px; font-weight: 600;
}
.feat3d-list .is-active .n, .pm-hotspots .is-active .n { background: var(--sky); color: var(--navy); }
.feat3d-list .t b, .pm-hotspots .t b { display: block; font-weight: 600; font-size: 15px; color: var(--navy); }
.feat3d-list .t small, .pm-hotspots .t small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }

/* ---------- toolbar ---------- */
.ptoolbar { position: sticky; top: 84px; z-index: 20; background: rgba(253, 248, 238, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ptoolbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.chips-f { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips-f::-webkit-scrollbar { display: none; }
.chip-f {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--pill);
  border: 1px solid var(--line); background: var(--white); font-size: 14px; font-weight: 500; transition: background .2s, color .2s, border-color .2s;
}
.chip-f span { font-size: 12px; color: var(--ink-mute); }
.chip-f:hover { border-color: var(--navy); }
.chip-f[aria-pressed="true"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.chip-f[aria-pressed="true"] span { color: var(--sky); }
.psearch { flex: 0 1 320px; display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 44px; border-radius: var(--pill); background: var(--white); border: 1px solid var(--line); transition: border-color .2s; }
.psearch:focus-within { border-color: var(--blue); }
.psearch svg { width: 17px; height: 17px; color: var(--ink-mute); flex: none; }
.psearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }

/* ---------- catalogue ---------- */
.pcat { padding-top: clamp(56px, 7vw, 96px); scroll-margin-top: 170px; }
.pcat-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: 32px; }
.pcat-head .eyebrow { margin-bottom: 12px; }
.pcat-head p { max-width: 46ch; justify-self: end; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pcard { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; scroll-margin-top: 170px; }
.pcard:hover { border-color: rgba(11, 27, 58, .35); transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(11, 27, 58, .35); }
.pcard-media {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 40%, #ffffff, #f4ede0);
}
.pcard-media img { width: 100%; height: 100%; object-fit: contain; padding: 6%; mix-blend-mode: multiply; transition: transform .7s var(--ease); }
.pcard-media img.is-snap { padding: 0; mix-blend-mode: normal; }
.pcard:hover .pcard-media img { transform: scale(1.05); }
.pcard-media.no-img::after { content: "3D preview"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-mute); font-size: 14px; }
.pcard-3d {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--pill); background: var(--navy); color: var(--cream); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  box-shadow: 0 8px 20px -8px rgba(11, 27, 58, .6); transition: background .25s, color .25s;
}
.pcard-3d svg { width: 14px; height: 14px; }
.pcard:hover .pcard-3d { background: var(--sky); color: var(--navy); }
.pcard-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tag-badge { padding: 4px 10px; border-radius: var(--pill); background: var(--cream-2); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.tag-badge.is-gks { background: var(--sky-2); color: var(--navy); }
.pcard-model { font-size: 12.5px; font-weight: 500; color: var(--blue); letter-spacing: .02em; }
.pcard h3 { font-size: 1.22rem; line-height: 1.2; }
.pcard-body > p { color: var(--ink-soft); font-size: 15px; }
.pcard-feats { display: grid; gap: 6px; margin-top: 2px; font-size: 14px; color: var(--ink); }
.pcard-feats li { display: flex; gap: 10px; }
.pcard-feats li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 8px; border-radius: 50%; background: var(--blue); }
.pcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.pcard-actions .btn svg { width: 15px; height: 15px; }
.pempty { padding: 80px 0 0; text-align: center; color: var(--ink-soft); }
.pempty button { margin-left: 8px; background: none; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font: inherit; }

/* ---------- modal ---------- */
.pmodal {
  width: min(1380px, calc(100vw - 32px)); height: min(860px, calc(100vh - 32px)); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: var(--r-lg); background: var(--cream); color: var(--ink);
  box-shadow: 0 40px 120px -30px rgba(11, 27, 58, .55); overflow: hidden;
}
.pmodal::backdrop { background: rgba(11, 27, 58, .62); backdrop-filter: blur(6px); }
.pmodal[open] { animation: pm-in .45s var(--ease); }
@keyframes pm-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.modal-open { overflow: hidden; }
.pm-grid { display: grid; grid-template-columns: 1fr 400px; height: 100%; }
.pm-stage { position: relative; display: flex; flex-direction: column; padding: 14px; min-height: 0; }
.v3d-modal { flex: 1; min-height: 0; border-radius: calc(var(--r-lg) - 6px); }
.pm-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 0; flex-wrap: wrap; }
.pm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-view { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tool-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(11, 27, 58, .15); background: var(--white); color: var(--navy); transition: background .2s, color .2s; }
.tool-btn svg { width: 17px; height: 17px; }
.tool-btn:hover, .tool-btn[aria-pressed="true"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--white); border: 1px solid rgba(11, 27, 58, .15); }
.seg button { min-height: 34px; padding: 0 14px; border-radius: var(--pill); border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--cream); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.pm-hint { margin-top: 8px; padding: 0 4px; font-size: 12.5px; color: var(--ink-mute); }
.pm-info { position: relative; overflow-y: auto; padding: 36px 32px 32px; background: var(--white); border-left: 1px solid var(--line); }
.pm-info h2 { margin-top: 14px; }
.pm-info > .muted { margin-top: 10px; font-size: 15px; }
.pm-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); transition: background .2s, color .2s; }
.pm-close:hover { background: var(--navy); color: var(--cream); }
.pm-close svg { width: 16px; height: 16px; }
.pm-sub { margin-top: 26px; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.pm-hotspots { list-style: none; margin: 0 -14px; padding: 0; display: grid; gap: 2px; }
.pm-hotspots button:disabled { cursor: default; }
.pm-feats { display: grid; gap: 8px; font-size: 14.5px; }
.pm-feats li { display: flex; gap: 10px; }
.pm-feats li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--sky-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1b3a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pm-guides { display: grid; gap: 6px; }
.pm-guides a { display: block; padding: 10px 12px; border-radius: var(--r-xs); background: var(--cream); color: var(--navy); font-weight: 500; font-size: 14.5px; line-height: 1.35; transition: background .2s; }
.pm-guides a:hover { background: var(--sky-2); }
.pm-guides small { display: block; margin-top: 2px; font-weight: 400; font-size: 12.5px; color: var(--ink-mute); }
.pm-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pm-note { margin-top: 18px; font-size: 12px; color: var(--ink-mute); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .pm-grid { grid-template-columns: 1fr 340px; }
}
@media (max-width: 900px) {
  .feat3d { grid-template-columns: 1fr; }
  .feat3d-copy { order: 2; }
  .v3d-featured { min-height: 360px; aspect-ratio: 1 / 1; }
  .pcat-head { grid-template-columns: 1fr; }
  .pcat-head p { justify-self: start; }
  .ptoolbar-inner { flex-direction: column; align-items: stretch; }
  .psearch { flex: none; }
  .pmodal { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .pm-grid { grid-template-columns: 1fr; grid-template-rows: 58% 42%; }
  .pm-info { border-left: 0; border-top: 1px solid var(--line); padding: 26px 20px 28px; border-radius: 22px 22px 0 0; margin-top: -14px; box-shadow: 0 -12px 30px -20px rgba(11, 27, 58, .3); }
  .pm-stage { padding: 10px 10px 18px; }
  .pm-hint { display: none; }
  .pm-close { position: fixed; top: 16px; right: 16px; z-index: 10; }
}
@media (max-width: 640px) {
  .ptoolbar { top: 72px; }
  .pgrid { grid-template-columns: 1fr; }
  .v3d-featured { min-height: 320px; }
  .hs-tip { width: min(240px, 78%); }
  .v3d-actions { left: 10px; top: 10px; }
  .act-btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
  .pm-tools { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs::before, .v3d-loading span { animation: none; }
}

/* ---------- catalogue specifications ---------- */
.pcard-specs { border-top: 1px dashed var(--line); padding-top: 10px; }
.pcard-specs summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.pcard-specs summary::-webkit-details-marker { display: none; }
.pcard-specs summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease); }
.pcard-specs[open] summary::after { transform: rotate(-135deg) translate(-2px, 0); }
.pcard-specs table, .pm-specs table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; margin-top: 10px; }
.pcard-specs th, .pcard-specs td, .pm-specs th, .pm-specs td { padding: 7px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid #efe9de; }
.pcard-specs tbody th, .pm-specs tbody th { font-weight: 500; color: var(--ink-soft); width: 46%; }
.pcard-specs td, .pm-specs td { font-weight: 600; color: var(--navy); }
.pcard-specs thead th, .pm-specs thead th { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); border-bottom: 1.5px solid var(--line); }
.pcard-specs tr:last-child th, .pcard-specs tr:last-child td, .pm-specs tr:last-child th, .pm-specs tr:last-child td { border-bottom: 0; }
.pm-specs { border-radius: var(--r-sm); background: var(--cream); padding: 4px 12px 6px; }
.pm-specs table { margin-top: 4px; font-size: 13.5px; }
.tbl-x { overflow-x: auto; }
.pcard-specs .tbl-x table, .pm-specs .tbl-x table { min-width: 420px; }
