/* Chemco Group: product page with an interactive 3D bottle in the banner.
   Loaded after assets/site.css, only by pages that carry the 3D viewer. */

/* banner: copy on the left, the bottle on the right */
.hero.p3d-hero{overflow:hidden;overflow:clip}
.hero.p3d-hero .wrap.p3d-grid{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:clamp(16px,3vw,56px);align-items:center;padding-top:clamp(20px,2.6vw,36px);padding-bottom:22px}
.p3d-hero .prod-hero-copy{padding:24px 0;max-width:620px}
.p3d-hero h1{text-wrap:balance}

/* the stage the bottle stands on */
.p3d{--p3d-h:clamp(440px,calc(100vh - 250px),620px);position:relative;justify-self:center;height:var(--p3d-h);width:calc(var(--p3d-h)*.76);margin:0 clamp(0px,2vw,28px) 62px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.p3d::before{content:"";position:absolute;left:50%;top:48%;width:150%;height:112%;transform:translate(-50%,-50%);background:radial-gradient(closest-side,rgba(120,178,240,.30),rgba(110,170,235,.13) 48%,rgba(110,170,235,0) 74%);pointer-events:none}
.p3d::after{content:"";position:absolute;left:50%;bottom:4.5%;width:74%;height:11%;transform:translateX(-50%);border-radius:50%;background:radial-gradient(closest-side,rgba(150,200,255,.16),rgba(150,200,255,0));pointer-events:none;transition:opacity .3s}
.p3d.aloft::after{opacity:0}
.p3d-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:1}
.p3d .p3d-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:2;opacity:0;transition:opacity .3s;touch-action:pan-y;cursor:grab;outline:none}
.p3d .p3d-canvas.dragging{cursor:grabbing}
/* soft edges, so a zoomed-in view fades into the banner instead of ending in a hard rectangle */
.p3d .p3d-canvas{-webkit-mask-image:linear-gradient(to right,transparent 0,#000 7%,#000 93%,transparent 100%),linear-gradient(to bottom,transparent 0,#000 4%,#000 96%,transparent 100%);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent 0,#000 7%,#000 93%,transparent 100%),linear-gradient(to bottom,transparent 0,#000 4%,#000 96%,transparent 100%);mask-composite:intersect}
.p3d.is3d .p3d-canvas{opacity:1}
.p3d.is3d.swapped .p3d-poster{visibility:hidden}
.p3d-ring{position:absolute;inset:2%;z-index:3;border:3px solid #F2A900;border-radius:26px;opacity:0;pointer-events:none}
.p3d.kfocus .p3d-ring{opacity:1}

/* controls under the bottle */
.p3d-bar{position:absolute;z-index:3;left:50%;bottom:-50px;transform:translateX(-50%);display:none;align-items:center;gap:4px;padding:5px;border-radius:999px;background:rgba(6,32,66,.62);border:1px solid rgba(255,255,255,.16);box-shadow:0 14px 30px -14px rgba(0,10,30,.7);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);white-space:nowrap}
.p3d.is3d .p3d-bar{display:flex}
.p3d-hint{display:inline-flex;align-items:center;gap:8px;padding:0 12px 0 10px;font-size:13px;font-weight:500;color:#DCE7F3;letter-spacing:.2px}
.p3d-hint svg{flex:none;color:#7FD1A0}
.p3d-sep{width:1px;height:20px;background:rgba(255,255,255,.18);margin:0 2px}
.p3d-bar button{font:inherit;font-size:13px;font-weight:500;color:#fff;background:transparent;border:0;border-radius:999px;padding:8px 13px;line-height:1;cursor:pointer;transition:background .15s,color .15s}
.p3d-bar button:hover{background:rgba(255,255,255,.14)}
.p3d-bar button[aria-pressed="true"]{background:#fff;color:var(--blue)}
.p3d-bar button:focus-visible{outline:2px solid #F2A900;outline-offset:1px}
.p3d-bar .p3d-ic{width:32px;height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.p3d-views{display:flex;gap:2px}
/* the bottle is not shown from below: the Base button of a page made by an earlier kit stays out of sight */
.p3d-bar [data-view="base"]{display:none}

@media (max-width:1100px){
  .p3d-hint span{display:none}
  .p3d-hint{padding:0 6px 0 9px}
}
@media (max-width:900px){
  .hero.p3d-hero .wrap.p3d-grid{grid-template-columns:1fr;gap:0;padding-top:28px}
  .p3d-hero .prod-hero-copy{padding:8px 0 0;max-width:none}
  .p3d{--p3d-h:clamp(320px,calc(100vh - 150px),min(500px,calc((100vw - 48px)/.76)));margin:6px 0 64px}
  .p3d-hint span{display:inline}
  .p3d-hint{padding:0 10px}
}
@media (max-width:520px){
  .p3d-bar .p3d-zoom,.p3d-bar .p3d-sep.z{display:none}
  .p3d-hint span{display:none}
  .p3d-hint{padding:0 4px 0 8px}
  .p3d-bar button{padding:8px 11px}
}
@media (prefers-reduced-motion:reduce){.p3d .p3d-canvas,.p3d::after{transition:none}}

/* overview: the description beside the product photo */
.p3d-ov{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(28px,5vw,64px);align-items:center}
.p3d-ov .pf-ov{gap:14px}
.p3d-ov .teams{margin-top:10px}
.p3d-photo{margin:0;border:1px solid var(--line);border-radius:20px;background:#fff;overflow:hidden}
.p3d-photo img{display:block;width:100%;height:auto}
@media (max-width:900px){.p3d-ov{grid-template-columns:1fr}.p3d-photo{max-width:520px}}

/* ---------- second layout: the banner carries the text only, and the bottle stands on a light panel in the
   body of the page (beside the overview), where it can be shown in any colour ---------- */
.hero.p3d-plain .wrap{padding-top:56px;padding-bottom:52px}
.section.p3d-band{padding:64px 0 72px}
.p3d-sec{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(28px,5vw,64px);align-items:center}
.p3d-sec .pf-ov{gap:14px}
.p3d-sec .teams{margin-top:10px}
.p3d-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 16px 18px;border:1px solid var(--line);border-radius:24px;background:radial-gradient(120% 90% at 50% 30%,#fff 0%,#F6F8FB 58%,#ECF1F7 100%);overflow:hidden}
/* the stage keeps one shape, so the still picture and the 3D view line up; on a short screen it narrows to stay in view */
.p3d.lt{width:min(100%,max(300px,calc((100vh - 316px)/1.16)));height:auto;aspect-ratio:1/1.16;margin:0}
.p3d.lt::before,.p3d.lt::after{display:none}
/* colour choice above the bottle, view controls below it; both wait until the 3D view is running */
.p3d-cols{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;min-height:36px;visibility:hidden}
.p3d-cols-l{font-size:12px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted2);margin-right:4px}
.p3d-cols button{font:inherit;font-size:13px;font-weight:500;line-height:1;display:inline-flex;align-items:center;gap:8px;padding:6px 14px 6px 7px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.p3d-cols button:hover{border-color:#9DB6D3}
.p3d-cols button[aria-pressed="true"]{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.p3d-cols button:focus-visible{outline:2px solid #F2A900;outline-offset:2px}
.p3d-cols i{flex:none;width:20px;height:20px;border-radius:50%;border:1px solid rgba(0,30,70,.22)}
.p3d-card .p3d-bar{position:static;transform:none;display:flex;visibility:hidden;max-width:100%;background:#fff;border:1px solid var(--line);box-shadow:0 10px 24px -16px rgba(0,40,90,.45);-webkit-backdrop-filter:none;backdrop-filter:none}
.p3d-card.p3d-on .p3d-bar,.p3d-card.p3d-on .p3d-cols,.p3d-card.p3d-on .p3d-tip{visibility:visible}
.p3d-card .p3d-sep{background:var(--line)}
.p3d-card .p3d-bar button{color:var(--ink)}
.p3d-card .p3d-bar button:hover{background:#EEF3F9}
.p3d-card .p3d-bar button[aria-pressed="true"]{background:var(--blue);color:#fff}
/* "Drag to rotate" is a line of its own under the bottle (the bar in the card has no room for it) */
.p3d-tip{display:inline-flex;align-items:center;gap:7px;min-height:18px;margin-bottom:4px;font-size:12.5px;font-weight:500;line-height:1;color:var(--muted2);white-space:nowrap;visibility:hidden}
.p3d-tip svg{flex:none;color:#1B8A4E}
@media (max-width:900px){
  .section.p3d-band{padding:40px 0 56px}
  .p3d-sec{grid-template-columns:1fr}
  .p3d-card{order:-1;width:100%;max-width:560px;justify-self:center}
  .p3d.lt{width:min(100%,max(260px,calc((100vh - 226px)/1.16)))}
}
@media (max-width:520px){
  .section.p3d-band{padding-top:28px}
  .p3d-card{padding:12px 10px 14px}
  .p3d-cols-l{display:none}
}
@media (max-width:359px){
  .p3d-cols{gap:5px}
  .p3d-cols button{font-size:12.5px;gap:5px;padding:4px 9px 4px 4px}
  .p3d-cols i{width:16px;height:16px}
}
