/* ============================================================
   hero-blocks.css — Hero block styles
   Phase 1: type1 (full) keeps the existing site.css styles.
   Type 2-5 styles are added in later phases.
   ============================================================ */

:root {
  --ce-hero-css-v: 12;
}

.ce-hero {
  display: block;
}

/* Static fallback used when a runtime is not available / a type is not
   implemented yet. It always shows the first image instead of breaking. */
.ce-hero-fallback {
  width: 100%;
}
.ce-hero-fallback img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   Gallery (type 2)
   ============================================================ */
.ce-gallery {
  --ce-gallery-aspect: 4 / 3;
  --ce-gallery-fit: cover;
  padding: 64px 80px;
}
.ce-gallery--bg-white { background: #fff; color: #111; }
.ce-gallery--bg-black { background: #0a0a0a; color: #fff; }
.ce-gallery--bg-transparent { background: transparent; color: inherit; }
.ce-gallery-head { margin-bottom: 28px; }
.ce-gallery-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
  margin-bottom: 10px;
}
.ce-gallery-title {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 10px;
}
.ce-gallery-text {
  font-size: 14px;
  line-height: 1.8;
  opacity: .65;
  margin: 0;
  max-width: 720px;
}
.ce-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
/* Runtime masonry: figures are absolutely packed into the shortest columns. */
.ce-gallery-grid.is-masonry {
  display: block;
  position: relative;
}
.ce-gallery-grid.is-masonry .ce-gallery-item {
  position: absolute;
}
.ce-gallery--cols-2 .ce-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ce-gallery--cols-3 .ce-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ce-gallery--cols-4 .ce-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ce-gallery-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.ce-gallery-track .ce-gallery-item {
  flex: 0 0 var(--ce-gallery-basis, 33.333%);
  scroll-snap-align: start;
}
.ce-gallery-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
.ce-gallery-hero .ce-gallery-item:first-child { grid-column: 1 / -1; }
.ce-gallery-item { margin: 0; min-width: 0; }
.ce-gallery-grid .ce-gallery-item--span-2 { grid-column: span 2; }
.ce-gallery-grid .ce-gallery-item--span-3 { grid-column: span 3; }
.ce-gallery-grid .ce-gallery-item--span-4 { grid-column: span 4; }
.ce-gallery-picture { display: block; }
.ce-gallery-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--ce-gallery-aspect);
  overflow: hidden;
  border-radius: 8px;
}
.ce-gallery-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--ce-gallery-fit);
  object-position: var(--ce-gallery-pos-x, 50%) var(--ce-gallery-pos-y, 50%);
  transform: scale(var(--ce-gallery-scale, 1));
  transform-origin: var(--ce-gallery-pos-x, 50%) var(--ce-gallery-pos-y, 50%);
}
.ce-gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
}
.ce-gallery-open:focus-visible { outline: 2px solid var(--accent, #0052cc); outline-offset: 2px; }
.ce-gallery-overlay-text {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 2;
  color: #fff;
  font-family: var(--font-display, sans-serif);
  font-size: var(--ce-gallery-overlay-size, 14px);
  font-weight: var(--ce-gallery-overlay-weight, 700);
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8), 0 0 2px rgba(0, 0, 0, .6);
  pointer-events: none;
  overflow-wrap: break-word;
}
.ce-gallery-overlay-text--top-left { top: 12px; text-align: left; }
.ce-gallery-overlay-text--top-center { top: 12px; text-align: center; }
.ce-gallery-overlay-text--top-right { top: 12px; text-align: right; }
.ce-gallery-overlay-text--middle-left { top: 50%; transform: translateY(-50%); text-align: left; }
.ce-gallery-overlay-text--middle-center { top: 50%; transform: translateY(-50%); text-align: center; }
.ce-gallery-overlay-text--middle-right { top: 50%; transform: translateY(-50%); text-align: right; }
.ce-gallery-overlay-text--bottom-left { bottom: 12px; text-align: left; }
.ce-gallery-overlay-text--bottom-center { bottom: 12px; text-align: center; }
.ce-gallery-overlay-text--bottom-right { bottom: 12px; text-align: right; }
.ce-gallery-caption {
  font-size: 12px;
  line-height: 1.6;
  opacity: .65;
  margin-top: 8px;
}
.ce-gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed currentColor;
  border-radius: 8px;
  font-size: 12px;
  opacity: .35;
}
.ce-gallery-empty {
  padding: 64px 16px;
  text-align: center;
  font-size: 13px;
  opacity: .45;
  border: 1px dashed currentColor;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .ce-gallery { padding: 40px 16px; }
  /* The mobile site header is fixed; the first hero block needs the offset. */
  .ce-hero--first .ce-gallery { margin-top: var(--header-height, 50px); }
  .ce-gallery-grid,
  .ce-gallery--cols-2 .ce-gallery-grid,
  .ce-gallery--cols-3 .ce-gallery-grid,
  .ce-gallery--cols-4 .ce-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ce-gallery-track .ce-gallery-item,
  .ce-gallery--cols-2 .ce-gallery-track .ce-gallery-item,
  .ce-gallery--cols-3 .ce-gallery-track .ce-gallery-item,
  .ce-gallery--cols-4 .ce-gallery-track .ce-gallery-item { flex-basis: 85%; }
  .ce-gallery-track .ce-gallery-item--span-2,
  .ce-gallery-track .ce-gallery-item--span-3,
  .ce-gallery-track .ce-gallery-item--span-4 { flex-basis: 100%; }
  .ce-gallery-grid .ce-gallery-item--span-3,
  .ce-gallery-grid .ce-gallery-item--span-4 { grid-column: span 2; }
  .ce-gallery--sp-cols-1 .ce-gallery-grid { grid-template-columns: 1fr; }
  .ce-gallery--sp-cols-2 .ce-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-gallery--sp-cols-3 .ce-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ce-gallery--sp-cols-1 .ce-gallery-grid .ce-gallery-item--span-2,
  .ce-gallery--sp-cols-1 .ce-gallery-grid .ce-gallery-item--span-3,
  .ce-gallery--sp-cols-1 .ce-gallery-grid .ce-gallery-item--span-4 { grid-column: auto; }
  .ce-gallery--sp-cols-1 .ce-gallery-track .ce-gallery-item[data-ce-span="1"] { flex-basis: 100%; }
  .ce-gallery--sp-cols-2 .ce-gallery-track .ce-gallery-item[data-ce-span="1"] { flex-basis: calc((100% - 12px) / 2); }
  .ce-gallery--sp-cols-3 .ce-gallery-track .ce-gallery-item[data-ce-span="1"] { flex-basis: calc((100% - 24px) / 3); }
  /* Fallback for when the masonry runtime is not active. When .is-masonry is
     present the runtime owns the layout, so it must keep its absolute packing
     (otherwise each row grows to the tallest photo and leaves blank gaps). */
  .ce-gallery--sp-cols-1 .ce-gallery-grid:not(.is-masonry),
  .ce-gallery--sp-cols-2 .ce-gallery-grid:not(.is-masonry),
  .ce-gallery--sp-cols-3 .ce-gallery-grid:not(.is-masonry) {
    display: grid !important;
    height: auto !important;
  }
  .ce-gallery--sp-cols-1 .ce-gallery-grid:not(.is-masonry) .ce-gallery-item,
  .ce-gallery--sp-cols-2 .ce-gallery-grid:not(.is-masonry) .ce-gallery-item,
  .ce-gallery--sp-cols-3 .ce-gallery-grid:not(.is-masonry) .ce-gallery-item {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
  }
  .ce-gallery-hero { grid-template-columns: 1fr; }
  .ce-gallery-hero .ce-gallery-item:first-child { grid-column: auto; }
}
@media (max-width: 480px) {
  .ce-gallery-grid,
  .ce-gallery--cols-2 .ce-gallery-grid,
  .ce-gallery--cols-3 .ce-gallery-grid,
  .ce-gallery--cols-4 .ce-gallery-grid { grid-template-columns: 1fr; }
  .ce-gallery-grid .ce-gallery-item--span-2,
  .ce-gallery-grid .ce-gallery-item--span-3,
  .ce-gallery-grid .ce-gallery-item--span-4 { grid-column: auto; }
  .ce-gallery--sp-cols-1 .ce-gallery-grid { grid-template-columns: 1fr; }
  .ce-gallery--sp-cols-2 .ce-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-gallery--sp-cols-3 .ce-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============================================================
   Scroll sequence (type 3a)
   Static markup shows the poster. The runtime adds .is-active and sets
   inline heights; without the runtime the page keeps a normal static image.
   ============================================================ */
.ce-scrollseq {
  position: relative;
  background: #0a0a0a;
  color: #fff;
}
.ce-scrollseq-track {
  position: relative;
}
.ce-scrollseq-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ce-scrollseq-aspect, 16 / 9);
  overflow: hidden;
  background: #0a0a0a;
}
.ce-scrollseq-poster,
.ce-scrollseq-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.ce-scrollseq-poster {
  object-fit: cover;
  transition: opacity .2s ease;
}
.ce-scrollseq-canvas {
  opacity: 0;
  transition: opacity .2s ease;
}
.ce-scrollseq.is-active .ce-scrollseq-stage {
  position: sticky;
  top: var(--ce-seq-sticky-top, 0px);
}
.ce-scrollseq.is-ready .ce-scrollseq-canvas { opacity: 1; }
.ce-scrollseq.is-ready .ce-scrollseq-poster { opacity: 0; }
.ce-scrollseq-status {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .78);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  transition: opacity .2s ease;
}
.ce-scrollseq.is-loaded .ce-scrollseq-status { opacity: 0; }
.ce-scrollseq-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

/* ============================================================
   Rotate 360 (type 3b)
   ============================================================ */
.ce-rotate360 {
  background: #0a0a0a;
  color: #fff;
}
.ce-rotate360-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ce-rotate360-aspect, 16 / 9);
  overflow: hidden;
  background: #0a0a0a;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
.ce-rotate360-stage.is-dragging { cursor: grabbing; }
.ce-rotate360-stage:focus-visible { outline: 2px solid var(--accent, #0052cc); outline-offset: 2px; }
.ce-rotate360-poster,
.ce-rotate360-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.ce-rotate360-poster {
  object-fit: cover;
  transition: opacity .2s ease;
}
.ce-rotate360-canvas {
  opacity: 0;
  transition: opacity .2s ease;
}
.ce-rotate360.is-ready .ce-rotate360-canvas { opacity: 1; }
.ce-rotate360.is-ready .ce-rotate360-poster { opacity: 0; }
.ce-rotate360-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .82);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}
.ce-rotate360-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-rotate360-btn:disabled { opacity: .3; cursor: default; }
.ce-rotate360-prev { left: 16px; }
.ce-rotate360-next { right: 16px; }
.ce-rotate360-hint,
.ce-rotate360-status {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .78);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}
.ce-rotate360-hint { left: 16px; right: auto; }
.ce-rotate360.is-loaded .ce-rotate360-status { opacity: 0; }
.ce-rotate360 [hidden] { display: none !important; }
.ce-rotate360-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

@media (max-width: 768px) {
  .ce-rotate360-btn { width: 44px; height: 44px; }
  .ce-hero--first .ce-rotate360 { margin-top: var(--header-height, 50px); }
}

/* ============================================================
   Slider (type 4)
   ============================================================ */
.ce-slider {
  --ce-slider-aspect: 16 / 9;
  position: relative;
  background: #0a0a0a;
  color: #fff;
}
.ce-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ce-slider-track::-webkit-scrollbar { display: none; }
.ce-slide {
  flex: 0 0 100%;
  min-width: 100%;
  margin: 0;
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: var(--ce-slider-aspect);
  overflow: hidden;
}
.ce-slide-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.ce-slide-picture {
  display: block;
  width: 100%;
  height: 100%;
}
.ce-slide-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ce-slide-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .5);
  font-size: 13px;
}
.ce-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 56px 24px 48px;
  background: linear-gradient(to top, rgba(0, 0, 0, .68), rgba(0, 0, 0, 0));
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  line-height: 1.6;
  pointer-events: none;
}
.ce-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-slider-btn:disabled { opacity: .3; cursor: default; }
.ce-slider-prev { left: 16px; }
.ce-slider-next { right: 16px; }
.ce-slider-pause {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ce-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
}
.ce-slider-dot.is-active { background: #fff; }
.ce-slider [hidden] { display: none !important; }
.ce-slider-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1px dashed rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .5);
  font-size: 13px;
}
.ce-slider--fade .ce-slider-track {
  display: block;
  position: relative;
  overflow: hidden;
  scroll-snap-type: none;
  aspect-ratio: var(--ce-slider-aspect);
}
.ce-slider--fade .ce-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  aspect-ratio: auto;
  transition: opacity .35s ease, visibility .35s ease;
}
.ce-slider--fade .ce-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

@media (max-width: 768px) {
  .ce-slider-btn,
  .ce-slider-pause { width: 44px; height: 44px; }
  .ce-slide-caption { padding: 44px 16px 44px; font-size: 13px; }
  .ce-hero--first .ce-slider { margin-top: var(--header-height, 50px); }
}

/* ============================================================
   Color switch (type 5)
   ============================================================ */
.ce-color-switch {
  --ce-cs-max: 100%;
  background: var(--ce-cs-bg, #fff);
  color: #111;
}
.ce-color-switch--sm { --ce-cs-max: 640px; }
.ce-color-switch--md { --ce-cs-max: 900px; }
.ce-color-switch--lg { --ce-cs-max: 1200px; }
.ce-color-inner {
  width: 100%;
  max-width: var(--ce-cs-max);
  margin: 0 auto;
}
.ce-color-title {
  padding: 24px 16px 0;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-align: center;
}
.ce-color-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
#preview-frame.mobile .ce-color-stage,
#preview-frame.tablet .ce-color-stage { touch-action: pan-y; }
.ce-color-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.ce-color-layer.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.ce-color-picture,
.ce-color-picture img {
  display: block;
  width: 100%;
  height: 100%;
}
.ce-color-picture img { object-fit: contain; }
.ce-color-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(0, 0, 0, .2);
  color: rgba(0, 0, 0, .45);
  font-size: 13px;
}
.ce-color-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .85);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}
.ce-color-swatches {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px 20px;
}
.ce-color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ce-color-swatch.is-active { border-color: currentColor; }
.ce-color-swatch:focus-visible { outline: 2px solid var(--accent, #0052cc); outline-offset: 2px; }
.ce-color-swatch img,
.ce-color-dot {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .15);
}
.ce-color-dot { background: #d8d8d8; }
.ce-color-label { font-size: 12px; line-height: 1.2; }
.ce-color-jan {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .02em;
  opacity: .65;
}
.ce-color-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1px dashed rgba(0, 0, 0, .2);
  color: rgba(0, 0, 0, .45);
  font-size: 13px;
}

@media (max-width: 768px) {
  .ce-color-stage { aspect-ratio: 1 / 1; touch-action: pan-y; }
  .ce-color-swatch img,
  .ce-color-dot { width: 36px; height: 36px; }
  .ce-hero--first .ce-color-switch { margin-top: var(--header-height, 50px); }
}

/* Gallery viewer (fullscreen pan viewer) */
.ce-gallery-viewer { z-index: 9999; background: rgba(0, 0, 0, .94); }
.ce-gallery-viewer--fixed { position: fixed; inset: 0; }
.ce-gallery-viewer--contained { position: absolute; inset: 0; }
.ce-gallery-viewer-scroll {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pinch-zoom;
  overscroll-behavior: contain;
}
.ce-gallery-viewer-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  flex: 0 1 auto;
  margin: auto;
}
.ce-gallery-viewer-close,
.ce-gallery-viewer-prev,
.ce-gallery-viewer-next {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-gallery-viewer-close { top: 16px; right: 16px; }
.ce-gallery-viewer-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.ce-gallery-viewer-next { right: 16px; top: 50%; transform: translateY(-50%); }
.ce-gallery-viewer-caption {
  position: absolute;
  left: 24px;
  right: 100px;
  bottom: 24px;
  z-index: 2;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
  pointer-events: none;
}
.ce-gallery-viewer-count {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  color: rgba(255, 255, 255, .7);
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  pointer-events: none;
}
@media (max-width: 768px) {
  .ce-gallery-viewer-prev,
  .ce-gallery-viewer-next { width: 44px; height: 44px; }
  .ce-gallery-viewer-caption { left: 16px; right: 80px; bottom: 16px; }
  .ce-gallery-viewer-count { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ce-scrollseq-poster,
  .ce-scrollseq-canvas,
  .ce-scrollseq-status,
  .ce-rotate360-poster,
  .ce-rotate360-canvas,
  .ce-slider--fade .ce-slide,
  .ce-color-layer { transition: none; }
  .ce-slider-track { scroll-behavior: auto; }
}

/* ============================================================
   hotspot2d (P1 skeleton)
   ============================================================ */
.ce-hs {
  background: var(--ce-hs-bg, transparent);
}
.ce-hs--sm { --ce-hs-max: 640px; }
.ce-hs--md { --ce-hs-max: 900px; }
.ce-hs--lg { --ce-hs-max: 1200px; }
.ce-hs--full { --ce-hs-max: 100%; }
.ce-hs-inner {
  width: 100%;
  max-width: var(--ce-hs-max, 1200px);
  margin: 0 auto;
  padding: 24px 0;
  box-sizing: border-box;
}
.ce-hs-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.3;
}
.ce-hs-lead {
  margin: 0 0 16px;
  color: var(--text2, #555);
  font-size: 14px;
  line-height: 1.7;
}
.ce-hs-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ce-hs-aspect, auto);
  overflow: hidden;
  border-radius: 8px;
  background: var(--ce-hs-bg, transparent);
}
.ce-hs-picture,
.ce-hs-picture img {
  display: block;
  width: 100%;
  height: 100%;
}
.ce-hs-picture img {
  object-fit: cover;
  object-position: center;
}
.ce-hs-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ce-hs-pin, #1e73ff);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  pointer-events: none;
}
.ce-hs--pins-plus .ce-hs-pin { font-size: 16px; }
.ce-hs--pins-dot .ce-hs-pin {
  min-width: 12px;
  width: 12px;
  height: 12px;
  padding: 0;
  font-size: 0;
}
.ce-hs--pulse .ce-hs-pin {
  animation: ce-hs-pulse 2s ease-out infinite;
}
@keyframes ce-hs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 115, 255, .45); }
  70% { box-shadow: 0 0 0 10px rgba(30, 115, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 115, 255, 0); }
}
.ce-hs-list {
  margin: 16px 0 0;
  padding: 0 0 0 1.4em;
  color: var(--text, #222);
  font-size: 14px;
  line-height: 1.7;
}
.ce-hs-list li { margin: 0 0 8px; }
.ce-hs-list strong { display: block; }
.ce-hs-list p { margin: 2px 0 0; }
.ce-hs-list a { color: var(--accent, #1e73ff); }
.ce-hs-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--text3, #999);
  font-size: 13px;
}
@media (max-width: 768px) {
  .ce-hs-inner { padding: 16px 0; }
  .ce-hs-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ce-hs--pulse .ce-hs-pin { animation: none; }
}

/* ============================================================
   hotspot2d runtime (P2)
   ============================================================ */
.ce-hs {
  position: relative;
}
.ce-hs-inner {
  position: relative;
}
.ce-hs.is-runtime.is-desc-popover:not(.is-sp) .ce-hs-list {
  display: none;
}
.ce-hs.is-runtime.is-sp .ce-hs-list {
  display: block;
}
.ce-hs.is-runtime .ce-hs-pin {
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.ce-hs.is-sp .ce-hs-pin {
  left: var(--ce-hs-pin-spx, var(--ce-hs-pin-x)) !important;
  top: var(--ce-hs-pin-spy, var(--ce-hs-pin-y)) !important;
}
.ce-hs.is-runtime .ce-hs-pin:focus-visible {
  outline: 2px solid var(--accent, #1e73ff);
  outline-offset: 3px;
}
.ce-hs.is-editing .ce-hs-pin {
  cursor: grab;
  touch-action: none;
}
.ce-hs.is-editing .ce-hs-pin:active {
  cursor: grabbing;
}
.ce-hs-list li.is-active {
  background: rgba(30, 115, 255, .08);
  border-radius: 6px;
  padding: 4px 6px;
  margin-left: -6px;
}
.ce-hs-pin.is-active {
  box-shadow: 0 0 0 3px rgba(30, 115, 255, .32);
}
.ce-hs-popover {
  position: absolute;
  z-index: 30;
  max-width: min(280px, calc(100% - 16px));
  padding: 12px 14px;
  border: 1px solid var(--border, rgba(0, 0, 0, .12));
  border-radius: 10px;
  background: var(--bg, #fff);
  color: var(--text, #111);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.ce-hs-popover[hidden] {
  display: none;
}
.ce-hs-popover-body strong {
  display: block;
  padding-right: 18px;
}
.ce-hs-popover-body p {
  margin: 4px 0 0;
}
.ce-hs-popover-close {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text2, #666);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.ce-hs-popover-close:hover {
  background: rgba(127, 127, 127, .12);
}
@media (max-width: 768px) {
  .ce-hs.is-runtime .ce-hs-list {
    display: block;
  }
  .ce-hs .ce-hs-pin {
    left: var(--ce-hs-pin-spx, var(--ce-hs-pin-x)) !important;
    top: var(--ce-hs-pin-spy, var(--ce-hs-pin-y)) !important;
  }
  .ce-hs-popover {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ce-hs.is-runtime .ce-hs-pin,
  .ce-hs-popover {
    animation: none;
    transition: none;
  }
}


/* ============================================================
   model3d (P3)
   ============================================================ */
.ce-m3d { position: relative; margin: 0 auto; color: var(--text, #222); }
.ce-m3d--sm { max-width: 520px; }
.ce-m3d--md { max-width: 760px; }
.ce-m3d--lg { max-width: 1000px; }
.ce-m3d--full { max-width: 100%; }
.ce-m3d-inner { position: relative; }
.ce-m3d-title { font-size: 20px; line-height: 1.4; margin: 0 0 8px; }
.ce-m3d-lead { font-size: 14px; line-height: 1.7; color: var(--text2, #555); margin: 0 0 12px; }
.ce-m3d-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ce-m3d-aspect, 16 / 10);
  overflow: hidden;
  border-radius: 8px;
  background: var(--ce-m3d-bg, #f4f5f7);
}
.ce-m3d-host { position: absolute; inset: 0; }
.ce-m3d-viewer { display: none; width: 100%; height: 100%; }
.ce-m3d-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ce-m3d-bg, #f4f5f7);
  z-index: 1;
}
.ce-m3d.is-runtime .ce-m3d-viewer { display: block; }
.ce-m3d.is-runtime .ce-m3d-fallback { display: none; }
.ce-m3d.is-runtime:not(.is-live) .ce-m3d-fallback { display: flex; }
.ce-m3d.is-runtime.is-fallback .ce-m3d-viewer { display: none; }
.ce-m3d.is-runtime.is-pending .ce-m3d-fallback { display: flex; }
.ce-m3d-poster { display: block; width: 100%; height: 100%; object-fit: contain; }
.ce-m3d-noposter { width: 100%; height: 100%; background: transparent; }
.ce-m3d-fallback-note {
  opacity: 0;
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text2, #666);
  background: rgba(255, 255, 255, .82);
  padding: 2px 6px;
  border-radius: 4px;
}
.ce-m3d.is-fallback .ce-m3d-fallback-note { opacity: 1; }
.ce-m3d-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent, #1e73ff);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.ce-m3d-list { margin: 12px 0 0; padding: 0 0 0 1.4em; font-size: 14px; line-height: 1.6; }
.ce-m3d-list li { margin: 0 0 8px; }
.ce-m3d-list strong { display: block; }
.ce-m3d-list p { margin: 2px 0 0; }
.ce-m3d-list-num { font-weight: 700; color: var(--accent, #1e73ff); margin-right: 4px; }
.ce-m3d-drop { cursor: pointer; transition: border-color .2s, background .2s; }
.ce-m3d-drop:hover { border-color: var(--accent, #1e73ff); }


/* G3: runtime pins accept pointer input (static output stays non-interactive). */
.ce-hs.is-runtime .ce-hs-pin { pointer-events: auto; }

/* ============================================================
   model3d pins / description card (P5)
   ============================================================ */
model-viewer:not(:defined) .ce-m3d-pin { display: none; }
.ce-m3d-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent, #1e73ff);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.ce-m3d-pin[data-visible="false"] { opacity: 0; pointer-events: none; }
.ce-m3d-pin:focus-visible, .ce-m3d-list-btn:focus-visible { outline: 2px solid var(--accent, #1e73ff); outline-offset: 2px; }
.ce-m3d.is-add-mode .ce-m3d-viewer { cursor: crosshair; }
.ce-m3d-card {
  position: relative;
  margin-top: 12px;
  padding: 14px 36px 14px 14px;
  background: #fff;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.ce-m3d-card[hidden] { display: none; }
.ce-m3d-card strong { display: block; margin-bottom: 4px; }
.ce-m3d-card-text { display: block; white-space: pre-line; }
.ce-m3d-card a { display: inline-block; margin-top: 6px; color: var(--accent, #1e73ff); }
.ce-m3d-card-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}
.ce-m3d-list-btn {
  display: block;
  width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ce-m3d-list-btn:hover, .ce-m3d-list-btn.is-active { background: rgba(30, 115, 255, .09); }
.ce-m3d-list-btn strong { display: block; }
.ce-m3d-list-text { display: block; white-space: pre-line; }
.ce-m3d-list-btn a { color: var(--accent, #1e73ff); }

/* model-viewer toggles the presence of data-visible while the hotspot faces the camera. */
.ce-m3d-pin:not([data-visible]) { opacity: 0; pointer-events: none; }

/* ============================================================
   model3d views / animations / SKU (P6)
   ============================================================ */
.ce-m3d-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ce-m3d-group { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-m3d-view-btn, .ce-m3d-anim-btn, .ce-m3d-autorotate {
  padding: 6px 12px;
  border: 1px solid var(--border, #d8dbe0);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.ce-m3d-view-btn:hover, .ce-m3d-anim-btn:hover, .ce-m3d-autorotate:hover { border-color: var(--accent, #1e73ff); }
.ce-m3d-autorotate[aria-pressed="true"] { background: var(--accent, #1e73ff); border-color: var(--accent, #1e73ff); color: #fff; }
.ce-m3d-skus { margin-top: 12px; }
.ce-m3d-skus-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ce-m3d-sku-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ce-m3d-sku {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border, #d8dbe0);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.ce-m3d-sku.is-selected { border-color: var(--accent, #1e73ff); box-shadow: 0 0 0 2px rgba(30, 115, 255, .18); }
.ce-m3d-sku:focus-visible { outline: 2px solid var(--accent, #1e73ff); outline-offset: 2px; }
.ce-m3d-sku-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); flex: none; }
.ce-m3d-sku-label { line-height: 1.2; }
.ce-m3d-sku-jan { font-size: 10px; color: var(--text3, #777); letter-spacing: .02em; }
