/* Compact Equipment Sales — the product page (app/views-product.js). One screen, it never scrolls: the name (model white, brand red)
   and the headline number sit over the 360° stage like a poster, the machine stands on a ring in the middle, and a row of tiles
   runs along the bottom — an attachment that fits · six numbers, each with its UIcon · the motor's white data plate with screw heads.
   Laid out on a grid so the name and number can float over the stage without covering the machine. Reads the tokens in styles.css.
   Check every change at 1280×720, 1440×900, 1920×1080, 768×1024, 375×812, 375×667 and 812×375: scrollHeight must equal innerHeight. */

body.is-pdp .chat-fab { display: none; }          /* the page has its own "Ask" button */
.pdp-page { display: flex; flex-direction: column; height: calc(100dvh - var(--top-h) - var(--tray-h)); max-width: none; padding: 0; }
.pdp {
  position: relative; flex: 1; min-height: 0; display: grid; gap: 0 24px;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto;
  padding: 0 max(var(--gut), env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(var(--gut), env(safe-area-inset-left));
}

/* ---- the name, over the stage's top-left */
.p-who { grid-area: 1 / 1; align-self: start; z-index: 3; width: max-content; max-width: min(560px, 40vw); padding-top: 22px; pointer-events: none; }
.p-who > * { pointer-events: auto; }
.p-who .crumbs { flex-wrap: nowrap; margin: 0 0 12px; white-space: nowrap; overflow: hidden; }
.p-who .crumbs b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.p-name { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .22em; margin: 0; font: 700 clamp(56px, 5.6vw, 96px)/.86 var(--font-display); letter-spacing: .005em; text-transform: uppercase; }
.p-brand { order: 2; color: var(--accent); }
.p-cls { margin: 10px 0 0; font-size: 15px; color: var(--text-muted); }
.pdp-page .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; }
.pdp-page .acts .sel-pill { height: 44px; }
.pdp-page .acts .sel-pill.ask { flex-basis: auto; }

/* the smaller buttons under them: spec sheet, PDF, what's included / attachments (those two also live on the gear card) */
.dock { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dock-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px; border-radius: var(--r-sm);
  background: none; border: 1px solid var(--hairline-2); color: var(--text-muted); font: 600 13px var(--font-sans); text-decoration: none; white-space: nowrap;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.dock-btn:hover { background: var(--raised); color: var(--text); border-color: rgba(255, 255, 255, .22); }
.dock-btn .ui-i { width: 17px; height: 17px; }
.dock-btn em { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--raised); color: var(--text-muted); font: 700 11px/1 var(--font-sans); font-style: normal; }
.d-s, .d-dup { display: none; }
.d-short .d-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* "PDF", "In the box": the long label stays for screen readers */
.d-short .d-s { display: inline; }

/* ---- the headline number, top-right (where a store would put the price) */
.hero { grid-area: 1 / 2; align-self: start; justify-self: end; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; padding-top: 50px; text-align: right; }
.h-v { margin: 0; font: 700 clamp(56px, 5.6vw, 96px)/.86 var(--font-display); letter-spacing: .005em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-v .val { border-bottom: 0; }
.h-v .tilde { margin-right: .04em; font-size: .62em; vertical-align: .38em; color: var(--text-faint); }
.h-v.is-lit .val, .h-v.hit .val { color: var(--accent-text); }
.h-l { margin: 10px 0 0; font-size: 15px; color: var(--text); }
.h-l span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-muted); }
.hero .seg { margin-top: 14px; }

/* ---- the stage: the whole space between the header and the tiles; the 360 viewer fills it */
.p-stage { grid-area: 1 / 1 / 2 / -1; position: relative; min-width: 0; min-height: 0; }
.stage-mount { position: absolute; inset: 6px 0 4px; container-type: size; }
.stage-img, .stage-plate, .stage-icon { position: absolute; inset: 0; margin: auto; width: min(100cqw, 133.33cqh); height: min(75cqw, 100cqh); }
.stage-img { object-fit: contain; }
.stage-plate { overflow: hidden; border-radius: 14px; background: var(--plate); isolation: isolate; }
.stage-plate img { width: 100%; height: 100%; padding: 4%; object-fit: contain; mix-blend-mode: multiply; }
.stage-icon { display: grid; place-items: center; color: var(--text-muted); } .stage-icon svg { width: 42%; height: 42%; }
/* the ring it stands on: one hairline ellipse at the tracks, wider than the machine, a red tick where the front points */
.pdp-page .v-spin .v-stage::before, .pdp-page .v-spin .v-stage::after { content: ""; position: absolute; left: 50%; pointer-events: none; }
.pdp-page .v-spin .v-stage::before { top: 95.5%; width: 150%; height: 9%; translate: -50% -50%; border: 1px solid var(--hairline-2); border-radius: 50%; }
.pdp-page .v-spin .v-stage::after { top: calc(95.5% + 4.5% - 1px); width: 14px; height: 3px; translate: -50% -50%; border-radius: 2px; background: var(--accent); }
.pdp-page .v-dock { position: relative; z-index: 4; padding-top: 6px; }

/* ---- the tile row */
.p-tiles { grid-area: 2 / 1 / 3 / -1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.76fr) minmax(0, 1.12fr); gap: 10px; height: clamp(172px, 23vh, 232px); }
.gear, .plate { position: relative; min-width: 0; min-height: 0; border-radius: var(--r-card); }

/* gear card: an attachment (or the machine it fits, or the tool box) — words left, picture right, button + dots underneath */
.gear { display: flex; flex-direction: column; padding: 16px 16px 14px 18px; background: var(--panel); border: 1px solid var(--hairline); overflow: hidden; }
.g-slide { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 8px; width: 100%; padding: 0;
  color: inherit; text-align: left; text-decoration: none; border-radius: 10px; cursor: pointer; }
.g-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.g-k { font: 600 12.5px/1.2 var(--font-sans); color: var(--text-muted); }
.g-n { font: 700 clamp(28px, 2.4vw, 40px)/1 var(--font-display); letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
.g-l { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 1.35; color: var(--text-muted); }
.g-pic { position: relative; align-self: center; justify-self: end; height: 100%; max-width: 100%; aspect-ratio: 4 / 3; }
.g-pic .pic { position: absolute; inset: 0; }
.g-pic .pic.icon svg { width: 70%; height: 70%; }
.g-box { width: 100%; height: 100%; object-fit: contain; }
.g-slide:hover .pic img, .g-slide:hover .g-box { transform: translateY(-3px); }
.g-box { transition: transform var(--dur-slow) var(--ease); }
.g-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.g-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 14px; border-radius: var(--r-sm); background: var(--paper); color: var(--paper-ink);
  font: 600 13.5px var(--font-sans); white-space: nowrap; transition: background var(--dur); }
.g-btn:hover { background: #fff; }
.g-btn .ui-i { width: 16px; height: 16px; }
.g-dots { display: flex; }
.g-dots button { width: 22px; height: 28px; display: grid; place-items: center; }
.g-dots button::before { content: ""; width: 12px; height: 4px; border-radius: 2px; background: var(--raised-hi); transition: background var(--dur), width var(--dur) var(--ease); }
.g-dots button:hover::before { background: var(--text-faint); }
.g-dots button[aria-current]::before { width: 18px; background: var(--accent); }
/* no attachment, no tool box: what comes standard, as a short checked list */
.gear.std, .plate.std { justify-content: center; gap: 10px; }
.g-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.g-list li { display: flex; align-items: flex-start; gap: 9px; font: 600 14px/1.3 var(--font-sans); }
.g-list .ui-i { width: 17px; height: 17px; margin-top: 1px; color: var(--accent-text); }

/* six numbers, each a small dark tile: UIcon, the number, what it is */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; min-width: 0; min-height: 0; }
.tiles.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.n1, .tiles.n2, .tiles.n3 { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.tiles.n1 { --n: 1; } .tiles.n2 { --n: 2; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 0; padding: 8px 8px 9px; overflow: hidden;
  border-radius: 12px; background: var(--panel); border: 1px solid var(--hairline); text-align: center; transition: box-shadow var(--dur) var(--ease), background var(--dur); }
.t-i { color: var(--text-muted); transition: color var(--dur); } .t-i .ui-i { width: 22px; height: 22px; }
.t-v { margin-top: 2px; font: 700 clamp(24px, 2vw, 32px)/1 var(--font-display); letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-v > span[title] { display: block; font-size: .7em; line-height: 1.1; white-space: normal; }
.t-long .t-v { font-size: clamp(20px, 1.6vw, 26px); }
.t-l { font-size: 12px; line-height: 1.2; color: var(--text-muted); }
.tile.hit { background: var(--accent-wash); }
.tile.is-lit { background: var(--accent-wash); box-shadow: inset 0 0 0 2px var(--accent); }
.tile.is-lit .t-i { color: var(--accent-text); }

/* the motor's data plate: white, a screw head in each corner (same plate as the motors page's numbers) */
.plate {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 6px; padding: 18px 16px 16px 20px;
  color: var(--paper-ink); text-decoration: none; transition: box-shadow var(--dur) var(--ease);
  --screw: radial-gradient(circle, #bdb8ad 0 2.2px, #d8d4cb 2.4px 3px, transparent 3.4px);
  background: var(--screw) 7px 7px / 8px 8px no-repeat, var(--screw) calc(100% - 7px) 7px / 8px 8px no-repeat,
              var(--screw) 7px calc(100% - 7px) / 8px 8px no-repeat, var(--screw) calc(100% - 7px) calc(100% - 7px) / 8px 8px no-repeat, var(--paper);
}
.plate.std { display: flex; flex-direction: column; align-items: stretch; }
.plate.std .g-list .ui-i { color: var(--accent-ink); }
.pl-t { display: flex; flex-direction: column; gap: 5px; min-width: 0; align-self: stretch; }
.pl-k { font: 600 12.5px/1.2 var(--font-sans); color: var(--paper-muted); }
.pl-n { font: 700 clamp(26px, 2.2vw, 36px)/1 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
.pl-l { font-size: 13px; line-height: 1.3; color: var(--paper-muted); }
.pl-hp { font: 700 clamp(24px, 2vw, 30px)/1 var(--font-display); color: var(--accent-ink); }
.pl-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font: 600 13px var(--font-sans); }
.pl-go .ui-i { width: 15px; height: 15px; transition: translate var(--dur) var(--ease); }
.plate:hover .pl-go .ui-i { translate: 3px 0; }
.pl-pic { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.plate.is-lit { box-shadow: 0 0 0 2px var(--accent); }

/* ===== shorter desktop windows (1280×720 and the like): everything a size down so the stage keeps its room */
@media (min-width: 1100px) and (max-height: 820px) {
  .p-name, .h-v { font-size: clamp(50px, 4.6vw, 76px); }
  .p-who { padding-top: 16px; } .hero { padding-top: 40px; }
  .p-who .crumbs { margin-bottom: 8px; }
  .p-cls { margin-top: 8px; font-size: 14px; }
  .pdp-page .acts { margin-top: 14px; }
  .p-tiles { height: clamp(160px, 25vh, 200px); }
  .gear { padding: 13px 14px 12px 16px; } .plate { padding: 15px 14px 13px 17px; }
  .g-n { font-size: clamp(26px, 2.1vw, 32px); }
  .g-l { -webkit-line-clamp: 2; }
  .tile { padding: 6px; gap: 2px; } .t-i .ui-i { width: 20px; height: 20px; } .t-v { font-size: clamp(22px, 1.8vw, 28px); }
}

/* ===== tablet and narrow windows: the name and number above the stage (not over it), the tiles in two rows under it */
@media (max-width: 1099px) {
  .pdp { gap: 10px 16px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "who hero" "stage stage" "tiles tiles"; }
  .p-who { grid-area: who; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; max-width: none; width: auto; padding-top: 14px; }
  .p-who > .crumbs, .p-name, .p-cls { flex-basis: 100%; }
  .p-who .acts, .p-who .dock { margin-top: 14px; }
  .p-who .w-pdp { flex-basis: 100%; margin-top: 10px; }
  .hero { grid-area: hero; padding-top: 30px; }
  .p-stage { grid-area: stage; }
  .stage-mount { inset: 0; }
  .p-tiles { grid-area: tiles; height: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 112px 140px; }
  .tiles, .tiles.n4, .tiles.n5, .tiles.n6 { grid-column: 1 / -1; grid-row: 1; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: minmax(0, 1fr); }
  .t-v { font-size: 24px; } .t-l { font-size: 11.5px; }
  .gear, .plate { grid-row: 2; }
  .gear { padding: 12px 14px 12px 16px; } .plate { padding: 14px 14px 12px 17px; }
  .g-l, .pl-l { display: none; }
  .g-n, .pl-n { font-size: 30px; }
  .p-name, .h-v { font-size: clamp(46px, 7vw, 72px); }
}

/* ===== phone: name + number · stage · six small tiles · Ask + compare · Specs / PDF / Attachments. The two cards are a tap away. */
@media (max-width: 759px) {
  .pdp { gap: 8px 12px; padding-top: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    grid-template-areas: "who hero" "stage stage" "tiles tiles" "acts acts" "dock dock" "where where"; }
  .w-pdp { grid-area: where; }
  .p-who { display: contents; }
  .p-who .crumbs { display: none; }
  .p-name { grid-area: who; align-self: end; padding-top: 10px; font-size: clamp(36px, 11vw, 48px); }
  .p-cls { display: none; }
  .hero { padding-top: 10px; align-self: end; }
  .h-v { font-size: clamp(30px, 9vw, 40px); }
  .h-l { margin-top: 4px; font-size: 12px; } .h-l span, .hero .seg { display: none; }
  .p-stage { min-height: 160px; }
  .pdp-page .v-hint { display: none; }
  .p-tiles { height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .gear, .plate, .plate.std { display: none; }
  .tiles, .tiles.n4, .tiles.n5, .tiles.n6 { grid-row: 1; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(72px, auto); gap: 6px; }
  .tile { gap: 1px; padding: 4px; border-radius: 10px; } .t-i .ui-i { width: 17px; height: 17px; } .t-v { font-size: 21px; } .t-l { font-size: 11px; }
  .t-v > span[title] { font-size: .62em; }
  .t-long .t-v { font-size: 17px; }
  .pdp-page .acts { grid-area: acts; flex-wrap: nowrap; margin: 0; gap: 8px; }
  .pdp-page .acts .sel-pill { flex: 1; justify-content: center; }
  body.chat-on .pdp-page .acts .sel-pill:not(.ask) { flex: none; }
  body.chat-on .pdp-page .acts .sel-pill:not(.ask) .sel-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pdp-page [data-needs-two] { display: none !important; }
  .dock { grid-area: dock; flex-wrap: nowrap; gap: 6px; margin: 0; }
  .dock-btn { flex: 1; flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0 4px; border-radius: 12px; background: var(--raised); color: var(--text); font-size: 11.5px; }
  .dock-btn .ui-i { width: 19px; height: 19px; }
  .d-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .d-s, .d-dup { display: inline; }   /* the long label stays for screen readers */
  .dock-btn.d-dup { display: flex; }
  .dock-btn em { position: absolute; top: 5px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
}
@media (max-width: 759px) and (max-height: 720px) {       /* iPhone SE: three numbers (the rest are in Specs) */
  .tiles .tile:nth-child(n+4) { display: none; }
  .tiles, .tiles.n4, .tiles.n5, .tiles.n6 { grid-auto-rows: minmax(64px, auto); }
  .dock-btn { height: 48px; }
}
@media (max-width: 759px) and (max-height: 600px) and (orientation: portrait) {
  .p-name { font-size: 34px; } .h-v { font-size: 30px; }
  .p-stage { min-height: 130px; }
}

/* ===== a phone turned sideways (any short, wide window): stage on the left; name, number, three tiles and the buttons on the right */
@media (max-height: 631px) and (orientation: landscape) {
  .pdp { gap: 6px 14px; padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; grid-template-areas: "stage who hero" "stage cls cls" "stage tiles tiles" "stage acts acts" "stage dock dock" "stage where where"; }
  .w-pdp { grid-area: where; }
  .p-who { display: contents; }
  .p-who .crumbs, .hero .seg, .h-l span, .gear, .plate, .pdp-page [data-needs-two], .pdp-page .v-ctrls, .pdp-page .v-hint { display: none !important; }
  .p-name { grid-area: who; align-self: end; font-size: 38px; }
  .p-cls { grid-area: cls; margin: 0; font-size: 13px; }
  .hero { grid-area: hero; align-self: end; padding-top: 0; }
  .h-v { font-size: 34px; } .h-l { margin-top: 2px; font-size: 12px; }
  .p-stage { grid-area: stage; }
  .stage-mount { inset: 0; }
  .p-tiles { grid-area: tiles; height: auto; display: block; min-height: 0; }
  .tiles, .tiles.n4, .tiles.n5, .tiles.n6 { height: 100%; max-height: 92px; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 6px; }
  .tiles .tile:nth-child(n+4) { display: none; }
  .tile { gap: 1px; padding: 4px; } .t-i .ui-i { width: 16px; height: 16px; } .t-v { font-size: 20px; } .t-l { font-size: 10.5px; }
  .pdp-page .acts { grid-area: acts; flex-wrap: nowrap; margin: 0; gap: 8px; }
  .pdp-page .acts .sel-pill { flex: 1; justify-content: center; height: 40px; }
  .pdp-page .acts .sel-pill:not(.ask) { flex: none; }
  .pdp-page .acts .sel-pill:not(.ask) .sel-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dock { grid-area: dock; flex-wrap: nowrap; margin: 0; }
  .dock-btn { flex: 1 1 0; min-width: 0; justify-content: center; gap: 5px; height: 36px; padding: 0 6px; font-size: 12px; }
  .dock-btn em { display: none; }
  .d-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .d-s { display: inline; }
  .dock-btn.d-dup { display: inline-flex; }
}
