/* Product model pages and the 3D model viewer.  Colours and rules follow the rest of the site. */

/* ---------- 3D viewer (inside a product figure) ---------- */
figure[data-model3d] { position: relative; }
figure[data-m3d="loading"], figure[data-m3d="ready"] { display: flex !important; flex-direction: column !important; align-items: stretch !important;
  justify-content: flex-start !important; padding: 0 !important; min-height: 0 !important; }
figure[data-m3d="loading"] > img, figure[data-m3d="ready"] > img, figure[data-m3d="loading"] > picture, figure[data-m3d="ready"] > picture { display: none !important; }
figure[data-m3d="loading"] > figcaption, figure[data-m3d="ready"] > figcaption { top: 0 !important; bottom: auto !important; z-index: 2; }
[data-m3d-mount] { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; z-index: 1; }
[data-m3d-mount][hidden] { display: none; }
[data-m3d-stage] { position: relative; flex: 1 1 auto; min-height: clamp(260px, 34vw, 440px); }
[data-m3d-stage] canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
[data-m3d-stage] canvas:active { cursor: grabbing; }
[data-m3d-stage] canvas:focus-visible { outline: 2px solid #e6232d; outline-offset: -2px; }
[data-m3d-poster] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: clamp(20px, 3vw, 44px); box-sizing: border-box; }
[data-m3d-row] { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap;
  padding: 8px 10px; border-top: 1px solid rgba(32,30,29,.22); background: rgba(243,242,242,.72); }
[data-m3d-hint] { margin: 0; font-size: 12px; font-weight: 500; line-height: 1.4; color: #605d5d; min-width: 0; }
[data-m3d-tools] { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
[data-m3d-tools] button, [data-m3d-ask] { font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.2; color: #201e1d; background: #f3f2f2;
  border: 1px solid rgba(32,30,29,.4); padding: 7px 11px; min-height: 32px; cursor: pointer; white-space: nowrap; }
[data-m3d-tools] button:hover, [data-m3d-ask]:hover { background: #eae9e9; }
[data-m3d-tools] button[aria-pressed="true"] { background: #201e1d; color: #f3f2f2; border-color: #201e1d; }
[data-m3d-tools] button[hidden] { display: none; }
[data-m3d-status] { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; padding: 7px 12px 9px; background: #201e1d; color: #f3f2f2;
  font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
[data-m3d-status][hidden] { display: none; }
[data-m3d-bar] { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(243,242,242,.25); }
[data-m3d-bar] i { display: block; height: 100%; width: 0; background: #e6232d; transition: width .15s linear; }
figure[data-m3d="ask"] [data-m3d-mount] { position: absolute; inset: 0; align-items: flex-end; justify-content: flex-end; padding: 10px; pointer-events: none; }
[data-m3d-ask] { pointer-events: auto; background: #201e1d; color: #f3f2f2; border-color: #201e1d; }
[data-m3d-ask]:hover { background: #3a3736; }
@media (max-width: 620px) {
  [data-m3d-row] { justify-content: flex-end; }
  [data-m3d-hint] { flex-basis: 100%; }
  [data-m3d-tools] button { min-height: 40px; padding: 7px 11px; }
  [data-m3d-row] { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { [data-m3d-bar] i { transition: none; } }

/* ---------- model page ---------- */
[data-mhero] { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: clamp(18px, 2.4vw, 34px); border-bottom: 2px solid rgba(32,30,29,.4); }
[data-mhero][data-solo] { grid-template-columns: minmax(0, 1fr); }
[data-mhero] > [data-mtext] { padding: clamp(28px, 4vw, 60px) 0 clamp(28px, 4vw, 52px); padding-inline-end: clamp(24px, 4vw, 56px); border-inline-end: 2px solid rgba(32,30,29,.4); min-width: 0; }
[data-mhero][data-solo] > [data-mtext] { border-inline-end: 0; padding-inline-end: 0; }
[data-mhero] > figure { margin: 0; background: #eae9e9; display: flex; align-items: center; justify-content: center; padding: clamp(20px, 3vw, 44px);
  min-height: clamp(240px, 32vw, 440px); position: relative; min-width: 0; }
[data-mhero] > figure > img { width: auto; height: auto; max-width: 100%; max-height: clamp(220px, 30vw, 420px); object-fit: contain; }
[data-mhero] > figure > figcaption { position: absolute; inset-inline-start: 0; bottom: 0; background: #201e1d; color: #f3f2f2; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; padding: 6px 12px; max-width: 100%; }
[data-mcode] { display: block; font-size: clamp(32px, 4.2vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.03em; overflow-wrap: anywhere; }
[data-mname] { display: block; margin-top: clamp(10px, 1.2vw, 16px); font-size: clamp(19px, 2vw, 28px); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
[data-mintro] { margin-top: clamp(16px, 2.2vw, 26px); max-width: 48em; font-size: clamp(14.5px, 1.15vw, 17px); line-height: 1.65; color: #444141; text-wrap: pretty; }
[data-mintro] + [data-mintro] { margin-top: 8px; }
[data-mnote] { margin-top: 12px; max-width: 48em; font-size: 13.5px; line-height: 1.6; color: #605d5d; }
[data-mbtns] { display: flex; gap: 12px; margin-top: clamp(20px, 2.6vw, 32px); flex-wrap: wrap; }
[data-mbtns] a { font-size: 14px; font-weight: 800; padding: 12px 20px; border: 1px solid rgba(32,30,29,.4); color: #201e1d; }
[data-mbtns] a:hover { background: rgba(32,30,29,.07); color: #201e1d; }
[data-mbtns] a[data-primary] { background: #d5171f; border-color: #d5171f; color: #f3f2f2; }
[data-mbtns] a[data-primary]:hover { background: #ca101a; color: #f3f2f2; }
/* sections carry the site's own inline width and padding, so the site's rules for the contact rail apply to them */
[data-msec] > h2 { font-size: clamp(23px, 2.8vw, 36px); font-weight: 800; line-height: 1.06; letter-spacing: -.02em; margin-bottom: clamp(14px, 2vw, 24px); }
[data-mkicker] { font-size: 12px; font-weight: 800; letter-spacing: .13em; color: #ae0e16; margin-bottom: 12px; }
[data-mpics] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(10px, 1.4vw, 18px); }
[data-mpics] figure { margin: 0; background: #eae9e9; display: flex; flex-direction: column; min-width: 0; }
[data-mpics] figure > div { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 1.6vw, 22px); aspect-ratio: 4 / 3; }
[data-mpics] img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
[data-mpics] figcaption { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: #605d5d; padding: 0 12px 10px; }
[data-mdraw] { margin: 0; background: #fff; border: 1px solid rgba(32,30,29,.22); padding: clamp(12px, 2vw, 28px); }
[data-mdraw] img { width: 100%; height: auto; max-height: 620px; object-fit: contain; margin: 0 auto; }
[data-mdraw] figcaption { margin-top: 10px; font-size: 12.5px; color: #605d5d; text-align: center; }
[data-mspec] { border-top: 2px solid rgba(32,30,29,.4); border-bottom: 2px solid rgba(32,30,29,.4); margin: 0; }
[data-mspec] > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 16px; padding: 11px 12px; border-top: 1px solid rgba(32,30,29,.22); }
[data-mspec] > div:first-child { border-top: 0; }
[data-mspec] > div:hover { background: #eae9e9; }
[data-mspec] > div[data-g] { display: block; background: #eae9e9; padding: 10px 12px; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; }
[data-mspec] dt { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.55; color: #201e1d; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
[data-mspec] dd { margin: 0; font-size: 13.5px; line-height: 1.55; color: #444141; min-width: 0; overflow-wrap: anywhere; }
[data-mspecs2] { column-count: 2; column-gap: clamp(20px, 3vw, 48px); }
[data-mspecs2] > dl { break-inside: avoid; margin-bottom: clamp(16px, 2vw, 24px); }
[data-mnone] { font-size: 15px; line-height: 1.7; color: #444141; max-width: 46em; }

/* ---------- model links (lists on the product pages, siblings on a model page) ---------- */
[data-mlist] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
[data-mlist] a { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 11px 12px; border: 1px solid rgba(32,30,29,.25); color: #201e1d; min-width: 0; position: relative; }
[data-mlist] a:hover { background: #eae9e9; border-color: rgba(32,30,29,.55); color: #201e1d; }
[data-mlist] a[aria-current] { background: #201e1d; border-color: #201e1d; color: #f3f2f2; }
[data-mlist] b { font-size: 13.5px; font-weight: 800; line-height: 1.3; white-space: nowrap; padding-inline-end: 30px; }
[data-mlist] span { font-size: 12.5px; line-height: 1.4; color: #605d5d; }
[data-mlist] a[aria-current] span { color: #d8d5d5; }
[data-mlist] i { position: absolute; top: 10px; inset-inline-end: 10px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1;
  padding: 3px 4px; background: #ae0e16; color: #f3f2f2; }
[data-mgroup] { margin-top: clamp(18px, 2.4vw, 30px); }
[data-mgroup] > h3, [data-mgroup] > h4 { font-size: clamp(15px, 1.4vw, 19px); font-weight: 800; letter-spacing: -.01em; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
[data-mgroup] > h3 small, [data-mgroup] > h4 small { font-size: 12px; font-weight: 600; color: #605d5d; letter-spacing: 0; }
[data-mline] { margin-top: clamp(26px, 3.4vw, 44px); padding-top: clamp(16px, 2vw, 24px); border-top: 2px solid rgba(32,30,29,.4); }
[data-mline] > h3 { font-size: clamp(19px, 2vw, 26px); font-weight: 800; letter-spacing: -.015em; }
[data-mlead] { font-size: 14.5px; line-height: 1.65; color: #444141; max-width: 60em; text-wrap: pretty; }
[data-mlead] + [data-mlead] { margin-top: 6px; font-size: 13px; color: #605d5d; }
a[data-mlink] { color: inherit; text-decoration: underline; text-decoration-color: rgba(174,14,22,.55); text-underline-offset: 3px; }
a[data-mlink]:hover { color: #ae0e16; }
a[data-mlink]:not([href]), a[data-mlink][href=""] { text-decoration: none; pointer-events: none; }
/* the whole table row, featured model card or accessory cell opens the model page: the link's click area is stretched over it */
:is([data-trow], article, [data-grid3] > div):has(a[data-mlink]) { position: relative; }
:is([data-trow], article, [data-grid3] > div) a[data-mlink][href]:not([href=""])::after { content: ""; position: absolute; inset: 0; z-index: 1; cursor: pointer; }
:is([data-trow], article, [data-grid3] > div):has(a[data-mlink][href]:not([href=""])):hover a[data-mlink] { color: #ae0e16; }
[data-grid3] > div:has(a[data-mlink][href]:not([href=""])):hover { background: #eae9e9; }
:is([data-trow], article, [data-grid3] > div) a[data-mlink]:focus-visible { outline: none; }
:is([data-trow], article, [data-grid3] > div):has(a[data-mlink]:focus-visible) { outline: 2px solid #e6232d; outline-offset: -2px; }

@media (max-width: 900px) {
  [data-mhero] { grid-template-columns: minmax(0, 1fr); }
  [data-mhero] > [data-mtext] { border-inline-end: 0; padding-inline-end: 0; padding-bottom: clamp(20px, 4vw, 32px); }
  [data-mspecs2] { column-count: 1; }
}
@media (max-width: 620px) {
  [data-mspec] > div { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 12px; padding: 10px 8px; }
  [data-mbtns] a { padding: 13px 16px; }
}
