/* Studio-style 3D silicone dumbbell page. Scoped to body.page-studio; does not touch other pages. */
.page-studio {
    --sd-accent: #8A9A5B;
    --sd-accent-dark: #6f7d47;
    --sd-ink: #111311;
    --sd-muted: #5f645d;
    --sd-bg: #fbfbfa;
    --sd-bg2: #f1f1ef;
    --sd-font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--sd-bg);
    color: var(--sd-ink);
    font-family: var(--sd-font);
}
.page-studio h1, .page-studio h2, .page-studio h3 { font-family: var(--sd-font); }
.page-studio .header { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }

.sd { padding-top: 70px; --sd-edge: max(var(--spacing-md, 2rem), calc((100% - 1400px) / 2 + var(--spacing-md, 2rem))); }
@media (max-width: 768px) { .sd { --sd-edge: var(--spacing-sm, 1rem); } }
.sd section { padding-left: var(--sd-edge); padding-right: var(--sd-edge); }

.sd-eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--sd-accent-dark); margin-bottom: 1.2rem; }
.sd-h1 { font-size: clamp(2.4rem, 3.6vw, 3.4rem); font-weight: 900; line-height: 1.02; letter-spacing: -.03em; margin-bottom: 1.1rem; }
.sd-sub { font-size: clamp(1.1rem, 1.6vw, 1.5rem); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--sd-accent-dark); margin-bottom: 1.1rem; }
.sd-h2 { font-size: clamp(2.2rem, 5vw, 4.4rem); font-weight: 900; line-height: 1.02; letter-spacing: -.03em; }
.sd-lead { font-size: 1rem; line-height: 1.6; font-weight: 400; color: var(--sd-muted); max-width: 34em; }

.sd-btn { display: inline-block; padding: 16px 34px; background: var(--sd-accent); color: #fff; font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; border: 2px solid var(--sd-accent); border-radius: 999px; text-decoration: none; transition: background .25s, color .25s, transform .25s; }
.sd-btn:hover { background: var(--sd-accent-dark); border-color: var(--sd-accent-dark); transform: translateY(-2px); }
.sd-btn-ghost { background: transparent; color: var(--sd-ink); border-color: var(--sd-ink); }
.sd-btn-ghost:hover { background: var(--sd-ink); border-color: var(--sd-ink); color: #fff; }
.sd-link { color: var(--sd-ink); font-weight: 600; font-size: .9rem; text-decoration: none; border-bottom: 2px solid var(--sd-accent); padding-bottom: 2px; }
.sd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 2.2rem; }
.sd-actions-center { justify-content: center; }

/* Hero */
/* hero edges line up with the header (navbar max-width 1400px) */
.sd .sd-hero { padding-left: var(--sd-edge); padding-right: var(--sd-edge); }
.sd-hero { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; }
.sd-stage { position: relative; background: radial-gradient(ellipse at 50% 45%, #fff 0%, #f1f1ef 70%, #e8e8e5 100%); border-radius: 28px; overflow: hidden; }
.sd-stage-hero { aspect-ratio: 1 / 1; max-height: 78vh; width: 100%; justify-self: center; }
.sd-canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.sd-canvas:active { cursor: grabbing; }
.sd-poster { display: none; position: absolute; inset: 0; margin: 0; pointer-events: none; }
.sd-poster img { display: block; width: 100%; height: 100%; object-fit: fill; }
.sd-loading .sd-poster { display: block; }
.sd-loading .sd-fallback { display: none; }
.sd-fallback { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sd-3d .sd-canvas { display: block; }
.sd-3d .sd-fallback { display: none; }
.sd-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sd-muted); pointer-events: none; }
.sd-hint { display: none; }
.sd-3d .sd-hint { display: block; }

/* Customization */
.sd-custom { padding-top: 6rem; padding-bottom: 4rem; background: #fff; }
.sd-custom-head { margin-bottom: 3rem; }
.sd-custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.sd-steps { list-style: none; }
.sd-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .4s; padding-right: 2rem; }
.sd-step.is-active { opacity: 1; }
.sd-num { font-size: .9rem; font-weight: 800; color: var(--sd-accent-dark); letter-spacing: .12em; margin-bottom: .8rem; }
.sd-step h3 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 1rem; }
.sd-step.is-active h3 { color: var(--sd-ink); box-shadow: inset 0 -.32em 0 rgba(138,154,91,.35); display: inline; align-self: flex-start; }
.sd-step p { font-size: 1.02rem; line-height: 1.7; color: var(--sd-muted); max-width: 30em; margin-top: 1rem; }
.sd-step small { margin-top: 1rem; font-size: .75rem; color: var(--sd-muted); }
.sd-swatches, .sd-chips { display: flex; gap: 12px; margin-top: 1.4rem; flex-wrap: wrap; }
.sd-swatches button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); cursor: pointer; }
.sd-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--sd-accent); }
.sd-swatches button:nth-child(1) { background: #333333; } .sd-swatches button:nth-child(2) { background: #F7B4A4; }
.sd-swatches button:nth-child(3) { background: #FBCFDA; } .sd-swatches button:nth-child(4) { background: #D4E2E4; }
.sd-swatches button:nth-child(5) { background: #B3ADA9; } .sd-swatches button:nth-child(6) { background: #E4DDCA; }
.sd-swatches button:nth-child(7) { background: #F9F4E7; } .sd-swatches button:nth-child(8) { background: #653E36; }
.sd-swatches button:nth-child(9) { background: #C4D1BE; }
.sd-chips button { padding: 10px 22px; border-radius: 999px; border: 1.5px solid var(--sd-ink); background: transparent; font: 600 .85rem var(--sd-font); cursor: pointer; }
.sd-chips button[aria-pressed="true"] { background: var(--sd-accent); border-color: var(--sd-accent); color: #fff; }
.sd-sticky { position: sticky; top: 96px; align-self: start; }
.sd-stage-custom { aspect-ratio: 1 / 1; max-height: calc(100vh - 130px); width: 100%; }

/* Photos */
.sd-photos { padding-top: 6rem; padding-bottom: 6rem; }
.sd-photos .sd-h2 { margin-bottom: 3rem; }
.sd-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.sd-grid figure { margin: 0; overflow: hidden; border-radius: 20px; background: var(--sd-bg2); }
.sd-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.sd-grid figure:hover img { transform: scale(1.04); }
.g-a { grid-column: span 6; aspect-ratio: 1 / 1; } .g-b { grid-column: span 6; aspect-ratio: 1 / 1; }
.g-c { grid-column: span 4; aspect-ratio: 1 / 1; } .g-d { grid-column: span 4; aspect-ratio: 1 / 1; } .g-e { grid-column: span 4; aspect-ratio: 1 / 1; }
.g-f { grid-column: span 12; aspect-ratio: 21 / 9; }

/* Real photos: three side by side, same height, no cropping */
.sd-real-row { display: flex; gap: 16px; margin-top: 16px; }
.sd-real-row figure { flex: 1 1 0; margin: 0; overflow: hidden; border-radius: 20px; background: var(--sd-bg2); }
.sd-real-row img { width: 100%; height: auto; display: block; }

/* CTA */
.sd-cta { padding-top: 7rem; padding-bottom: 8rem; text-align: center; background: var(--sd-bg2); }
.sd-cta .sd-lead { margin: 1.5rem auto 0; }

/* desktop: image left, copy + options right (copy block centered in its column) */
@media (min-width: 861px) {
    .sd-hero { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
    .sd-hero .sd-stage-hero { order: -1; }
    .sd-hero .sd-hero-copy { justify-self: center; width: min(100%, 36rem); }
    /* packaging: preview left, steps right (same centered block), edges match header */
    .sd .sd-custom, .sd .sd-photos { padding-left: var(--sd-edge); padding-right: var(--sd-edge); }
    .sd-custom-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
    .sd-custom-grid .sd-sticky { order: -1; }
    .sd-custom-grid .sd-steps { justify-self: center; width: min(100%, 36rem); }
    .sd-step { padding-right: 0; }
}
@media (max-width: 860px) {
    .sd-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 1.5rem; }
    .sd-stage-hero { order: -1; aspect-ratio: 4 / 3.4; max-height: none; }
    .sd-custom { padding-top: 4rem; }
    .sd-custom-grid { display: flex; flex-direction: column-reverse; gap: 0; }
    .sd-sticky { position: sticky; top: 64px; z-index: 5; align-self: stretch; width: 100%; background: #fff; padding: 8px 0; }
    .sd-stage-custom { aspect-ratio: auto; height: 38vh; }
    .sd-step { min-height: 62vh; padding-right: 0; }
    .g-a, .g-b, .g-c, .g-d, .g-e { grid-column: span 6; }
    .g-c { grid-column: span 12; aspect-ratio: 4/3; }
    .g-f { aspect-ratio: 4 / 3; }
    .sd-real-row { flex-direction: column; }
    .sd-real-row figure { flex: none; }
    .sd-real-row figure:first-child { width: 60%; align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
    .sd-btn, .sd-grid img, .sd-step { transition: none; }
}

/* Logo upload (local preview only) */
.sd-logo-ui { display: flex; align-items: center; gap: 14px; margin-top: 1.4rem; flex-wrap: wrap; }
.sd-file { position: relative; display: inline-block; padding: 12px 26px; border-radius: 999px; background: var(--sd-ink); color: #fff; font: 600 .85rem var(--sd-font); cursor: pointer; }
.sd-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.sd-file:focus-within { outline: 3px solid var(--sd-accent); outline-offset: 2px; }
.sd-clear { background: none; border: 0; font: 600 .85rem var(--sd-font); text-decoration: underline; cursor: pointer; color: var(--sd-muted); }
.sd-logo-ui + .sd-chips { margin-top: 1rem; }
.sd-printcolor { display: flex; align-items: center; gap: 10px; margin-top: 1rem; flex-wrap: wrap; }
.sd-printcolor[hidden] { display: none; }
.sd-pc-label { font: 600 .85rem var(--sd-font); }
.sd-printcolor input[type="color"] { width: 44px; height: 36px; padding: 2px; border: 1.5px solid var(--sd-ink); border-radius: 8px; background: transparent; cursor: pointer; }
.sd-pc-hex { width: 6.5rem; padding: 8px 10px; border: 1.5px solid var(--sd-ink); border-radius: 8px; background: transparent; font: 600 .85rem var(--sd-font); text-transform: uppercase; }
.sd-pc-hex:focus-visible, .sd-printcolor input[type="color"]:focus-visible { outline: 3px solid var(--sd-accent); outline-offset: 2px; }

/* Hero control panel: color + logo live next to the main 3D view */
.sd-hero .sd-eyebrow { margin-bottom: .8rem; }
.sd-hero .sd-actions { margin-top: 1.4rem; }
.sd-panel { margin-top: 1.4rem; padding: 1.1rem 1.3rem; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 20px; box-shadow: 0 6px 24px rgba(0,0,0,.05); max-width: 36rem; }
.sd-panel-row + .sd-panel-row { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,.08); }
.sd-panel h3 { font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--sd-accent-dark); }
.sd-panel small { display: block; margin-top: .6rem; font-size: .72rem; line-height: 1.5; color: var(--sd-muted); }
.sd-panel .sd-swatches { margin-top: .7rem; gap: 12px; }
.sd-panel .sd-logo-ui { margin-top: .7rem; gap: 10px 14px; }
.sd-panel .sd-logo-ui + .sd-chips { margin-top: 0; }
.sd-panel .sd-chips { margin-top: 0; gap: 8px; }
.sd-panel .sd-chips button { padding: 9px 18px; }
.sd-panel .sd-file { padding: 10px 22px; }
.sd-panel .sd-printcolor { margin-top: .7rem; }

/* hero options: even spacing, tidy weight grid */
.sd-panel-row + .sd-panel-row { margin-top: 1.3rem; padding-top: 1.3rem; }
.sd-panel .sd-swatches { gap: 14px; margin-top: .9rem; }
.sd-panel .sd-logo-ui { margin-top: .9rem; }
.sd-panel .sd-weights { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 10px; margin-top: .9rem; }
.sd-panel .sd-weights button { width: 100%; text-align: center; padding: 9px 10px; }

/* Packaging step: white-background photo preview (2D) + options */
.sd-stage-custom { background: #fff; border: 1px solid rgba(0,0,0,.08); }
.sd-pack-canvas, .sd-pack-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.sd-pack-ready .sd-pack-fallback { display: none; }
.sd-pack-ui { margin-top: 1.4rem; max-width: 30rem; }
.sd-pack-ui .sd-chips { margin-top: 0; }
.sd-pack-ui [hidden] { display: none !important; }
.sd-pack-opts { margin-top: 1.2rem; }
.sd-pack-opts .sd-logo-ui { margin-top: 1rem; }
.sd-pack-opts small { display: block; margin-top: .8rem; }
.sd-pack-h { margin: 1.2rem 0 .7rem; font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--sd-accent-dark); }
.sd-pack-h:first-child { margin-top: 0; }
.sd-pack-h span { margin-left: .5rem; color: var(--sd-ink); letter-spacing: .04em; text-transform: none; font-weight: 600; }
.sd-pouch-swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 0; }
.sd-pouch-swatches button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); cursor: pointer; }
.sd-pouch-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--sd-accent); }
