/* "How it's made" 3D section on product pages and its cards (inc/process-3d.php). */

.hy3d { scroll-margin-top: 96px; }
.hy3d .hy3d-lead { max-width: 64ch; color: var(--ink-2, #4a5655); }
.hy3d-anchor { display: block; position: relative; top: -96px; }

/* Stage: poster and launch button first, the canvas after a click. */
.hy3d-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin-top: 18px; border: 1px solid var(--stone-2, #d9d2c5); border-radius: 14px; background: radial-gradient(120% 90% at 50% 15%, #fffdf9 0%, #f1ece3 60%, #e7e1d6 100%); }
.hy3d-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hy3d-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.hy3d-canvas:active { cursor: grabbing; }
.hy3d .hy3d-launch { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); box-shadow: 0 6px 18px rgba(8, 85, 90, .25); }
.hy3d-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.hy3d .hy3d-hint { position: absolute; left: 14px; bottom: 12px; margin: 0; color: var(--ink-2, #4a5655); font-size: 12px; line-height: 1.4; pointer-events: none; }
.hy3d .hy3d-fallback { display: none; position: absolute; inset: auto 16px 16px; margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--ink-2, #4a5655); font-size: 14px; text-align: center; }
.hy3d.no-webgl .hy3d-fallback { display: block; }
.hy3d.no-webgl .hy3d-launch { display: none; }
.hy3d.is-live .hy3d-poster,
.hy3d.is-live .hy3d-launch,
.hy3d:not(.is-live) .hy3d-tools,
.hy3d:not(.is-live) .hy3d-hint,
.hy3d:not(.is-live) .hy3d-text,
.hy3d:not(.is-live) .hy3d-bar { display: none; }

.hy3d-tag { position: absolute; left: 0; top: 0; padding: 4px 10px; border: 1px solid var(--stone-2, #d9d2c5); border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink, #15201f); font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .25s; }
.hy3d-tag::before { content: ""; position: absolute; top: 50%; left: -14px; width: 8px; height: 8px; margin-top: -4px; border: 2px solid #fff; border-radius: 50%; background: var(--teal, #0b6b70); box-shadow: 0 0 0 1px var(--teal, #0b6b70); }
.hy3d-tag.is-left::before { left: auto; right: -14px; }
.hy3d-tag.is-tool { border-color: var(--teal, #0b6b70); background: var(--teal, #0b6b70); color: #fff; }

/* Buttons. */
.hy3d .hy3d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; margin: 0; padding: 0 16px; border: 1px solid var(--stone-2, #d9d2c5); border-radius: 999px; background: #fff; color: var(--ink, #15201f); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; }
.hy3d .hy3d-btn:hover { border-color: var(--teal, #0b6b70); }
.hy3d .hy3d-btn.is-primary { border-color: var(--teal, #0b6b70); background: var(--teal, #0b6b70); color: #fff; }
.hy3d .hy3d-btn.is-primary:hover { background: var(--teal-dark, #08555a); }
.hy3d .hy3d-btn.is-icon { width: 42px; padding: 0; font-size: 20px; }
.hy3d .hy3d-btn[aria-pressed="true"] { border-color: var(--teal, #0b6b70); background: var(--teal-pale, #e4eeec); }
.hy3d .hy3d-btn:focus-visible, .hy3d .hy3d-step:focus-visible { outline: 3px solid #8fc09a; outline-offset: 2px; }
.hy3d.is-loading .hy3d-launch { cursor: progress; opacity: .85; }
.hy3d .hy3d-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hy3d .hy3d-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; }
.hy3d .hy3d-pick select { min-height: 42px; max-width: 100%; margin: 0; padding: 0 12px; border: 1px solid var(--stone-2, #d9d2c5); border-radius: 999px; background: #fff; color: var(--ink, #15201f); font: inherit; font-size: 14px; cursor: pointer; }
.hy3d .hy3d-pick select:hover { border-color: var(--teal, #0b6b70); }
.hy3d .hy3d-pick select:focus-visible { outline: 3px solid #8fc09a; outline-offset: 2px; }
/* Wall panel page: the pine view follows the three pine cards. */
.v3-wall-pine + .hy3d { margin-top: 44px; }

/* Steps: a readable list before the 3D opens, step buttons after. */
.hy3d .hy3d-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.hy3d .hy3d-steps li { margin: 0; border: 1px solid var(--stone-2, #d9d2c5); border-radius: 10px; background: #fff; font-size: 15px; line-height: 1.5; }
.hy3d .hy3d-step { display: block; width: 100%; padding: 12px 14px 4px; border: 0; border-radius: 9px; background: none; color: var(--ink, #15201f); font: inherit; line-height: 1.3; text-align: left; cursor: pointer; }
.hy3d .hy3d-step span { display: block; margin-bottom: 2px; color: var(--teal, #0b6b70); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hy3d .hy3d-step-name { display: block; font-size: 15px; line-height: 1.3; }
.hy3d .hy3d-step-text { margin: 0; padding: 0 14px 14px; color: var(--ink-2, #4a5655); font-size: 14px; line-height: 1.55; }
.hy3d .hy3d-step-text strong { color: var(--ink, #15201f); font-weight: 600; }
.hy3d.is-live .hy3d-steps { grid-template-columns: repeat(var(--hy3d-count, 6), minmax(0, 1fr)); gap: 8px; }
.hy3d.is-live .hy3d-steps li { border: 0; background: none; }
.hy3d.is-live .hy3d-step { height: 100%; padding: 10px 10px 11px; border: 1px solid var(--stone-2, #d9d2c5); background: #fff; }
.hy3d.is-live .hy3d-step:hover { border-color: var(--teal, #0b6b70); }
.hy3d.is-live .hy3d-step[aria-current="step"] { border-color: var(--teal, #0b6b70); background: var(--teal, #0b6b70); color: #fff; }
.hy3d.is-live .hy3d-step[aria-current="step"] span { color: #cfe5e3; }
.hy3d.is-live .hy3d-step-name { font-size: 14px; }
.hy3d.is-live .hy3d-step-text { display: none; }
.hy3d .hy3d-text { min-height: 3.2em; margin: 14px 0 0; max-width: 70ch; }
.hy3d .hy3d-text strong { color: var(--teal-dark, #08555a); }
.hy3d .hy3d-note { margin: 14px 0 0; color: var(--ink-2, #4a5655); font-size: 13px; }

@media (max-width: 760px) {
	.hy3d.is-live .hy3d-stage { aspect-ratio: 4 / 5; }
	.hy3d .hy3d-steps { grid-template-columns: minmax(0, 1fr); }
	.hy3d.is-live .hy3d-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hy3d.is-live .hy3d-steps[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hy3d.is-live .hy3d-step { padding: 8px; }
	.hy3d.is-live .hy3d-step-name { font-size: 13px; }
	.hy3d .hy3d-launch { bottom: 14px; }
	.hy3d-tools .hy3d-btn:not(.is-icon) { padding: 0 12px; }
}

/* Cards on category pages and the factory page. */
.hy3d-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.hy3d-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--stone-2, #d9d2c5); border-radius: 14px; background: #fff; color: var(--ink, #15201f); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.hy3d-card:hover { border-color: var(--teal, #0b6b70); box-shadow: 0 10px 24px rgba(21, 32, 31, .08); }
.hy3d-card .hy3d-poster { position: static; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 50% 15%, #fffdf9 0%, #f1ece3 60%, #e7e1d6 100%); }
.hy3d-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.hy3d-card-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.hy3d-card-text { color: var(--ink-2, #4a5655); font-size: 15px; line-height: 1.55; }
.hy3d-card-cta { margin-top: 4px; color: var(--teal, #0b6b70); font-size: 15px; font-weight: 700; }
.hy3d-cards-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.hy3d-cards-grid.is-single .hy3d-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; }
.hy3d-cards-grid.is-single .hy3d-card-body { padding: 20px 26px; }
@media (max-width: 760px) {
	.hy3d-cards-grid.is-single .hy3d-card { grid-template-columns: minmax(0, 1fr); }
	.hy3d-cards-grid.is-single .hy3d-card-body { padding: 16px 18px 18px; }
}
