:root {
  --bg: #000000;
  --bg-elevated: #141414;
  --bg-card: rgba(150, 190, 210, 0.08);
  --border: rgba(180, 215, 235, 0.16);
  --border-strong: rgba(190, 220, 240, 0.22);
  --text: #f5f5f5;
  --text-muted: #9a9a9a;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  --radius-lg: 20px;
  --glass-bg: none;
  --glass-bg-solid: rgba(155, 195, 215, 0.1);
  --glass-blur: blur(24px) saturate(1.15);
  --toolbar-bg: var(--glass-bg-solid);
  --thumb-rail-bg: var(--glass-bg-solid);
  --size-idle-bg: rgba(155, 195, 215, 0.08);
  --size-idle-border: rgba(180, 215, 235, 0.2);
  --size-active-bg: #ffffff;
  --size-active-text: #0a0a0a;
  --cta-bg: rgba(255, 255, 255, 0.88);
  --cta-text: #0a0a0a;
  --cta-busy-bg: #e8e8e8;
  --spotlight: rgba(180, 210, 230, 0.1);
  --nav-height: 44px;
  --theme-duration: 0.55s;
  --theme-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --water-tint: rgba(140, 185, 210, 0.007);
  --font-body: "Figtree", system-ui, sans-serif;
  --font-display: "Syne", "Figtree", system-ui, sans-serif;
  --backdrop-x: 0px;
  --backdrop-y: 0px;
}

body.light {
  --bg: #eef3f6;
  --bg-elevated: #ffffff;
  --bg-card: rgba(220, 235, 245, 0.38);
  --border: rgba(120, 160, 185, 0.22);
  --border-strong: rgba(100, 150, 180, 0.28);
  --text: #111111;
  --text-muted: #5a6a75;
  --shadow: 0 12px 36px rgba(40, 70, 90, 0.1);
  --glass-bg: none;
  --glass-bg-solid: rgba(210, 230, 240, 0.4);
  --glass-blur: blur(24px) saturate(1.12);
  --toolbar-bg: var(--glass-bg-solid);
  --thumb-rail-bg: var(--glass-bg-solid);
  --size-idle-bg: rgba(210, 230, 240, 0.35);
  --size-idle-border: rgba(100, 150, 180, 0.25);
  --size-active-bg: #111111;
  --size-active-text: #ffffff;
  --cta-bg: rgba(20, 28, 34, 0.82);
  --cta-text: #ffffff;
  --cta-busy-bg: #2a2a2a;
  --spotlight: rgba(120, 170, 200, 0.08);
  --water-tint: rgba(160, 200, 220, 0.014);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background-color var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease);
}

h1,
h2,
.cta-label,
.hero-tagline,
.hero-verse__ref,
.brand-logo,
.search-panel__input,
.cart-dropdown__head h2 {
  font-family: var(--font-display);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: sjrnr-page-out 0.75s cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(root) {
  animation: sjrnr-page-in 0.75s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes sjrnr-page-out {
  to {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.015);
  }
}

@keyframes sjrnr-page-in {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.985);
  }
}

::view-transition-group(brand-logo) {
  animation-duration: 0.75s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

#liquidGlassCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* WebGL liquid glass draws the glass; keep chrome content, drop CSS frost */
body.liquid-glass-on .toolbar,
body.liquid-glass-on .search-btn,
body.liquid-glass-on .thumbs,
body.liquid-glass-on .info-card,
body.liquid-glass-on .hero-products-btn,
body.liquid-glass-on .scroll-indicator,
body.liquid-glass-on .size-btn,
body.liquid-glass-on .product-magnifier,
body.liquid-glass-on .cart-dropdown {
  background: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* Search stays glass-like but much less see-through */
body.liquid-glass-on .search-panel {
  background: rgba(10, 12, 16, 0.86) !important;
  background-image: none !important;
  backdrop-filter: blur(28px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.15) !important;
  box-shadow: var(--shadow) !important;
  border-color: var(--border) !important;
}

body.light.liquid-glass-on .search-panel {
  background: rgba(246, 249, 252, 0.9) !important;
}

body.liquid-glass-on .size-btn.is-selected {
  background: var(--size-active-bg) !important;
  color: var(--size-active-text);
  border-color: transparent !important;
}

body.liquid-glass-on .hero-products-btn:hover {
  background: var(--text) !important;
  color: var(--bg);
}

/* Theme toggle uses the same root VT; keep page nav animations as source of truth */
@media (prefers-reduced-motion: reduce) {
  :root {
    --theme-duration: 0.01ms;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}

/* Spotlight behind the product */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 55% at 50% 44%, var(--spotlight), transparent 68%);
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--theme-duration) var(--theme-ease);
}

body.page-product .stage::before {
  opacity: 0.35;
}

.home-backdrop {
  position: absolute;
  inset: -4%;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.06);
}

.home-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--theme-duration) var(--theme-ease);
}

.home-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(160, 210, 230, 0.008), transparent 55%),
    radial-gradient(ellipse 70% 50% at 75% 70%, rgba(120, 180, 210, 0.006), transparent 50%),
    var(--water-tint);
  backdrop-filter: blur(1.6px) saturate(1.02);
  -webkit-backdrop-filter: blur(1.6px) saturate(1.02);
  transition: background-color var(--theme-duration) var(--theme-ease);
}

body.light .home-backdrop::after {
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(180, 215, 235, 0.018), transparent 55%),
    radial-gradient(ellipse 70% 50% at 75% 70%, rgba(150, 195, 220, 0.012), transparent 50%),
    var(--water-tint);
}

.home-backdrop__light {
  opacity: 0;
}

body.light .home-backdrop__dark {
  opacity: 0;
}

body.light .home-backdrop__light {
  opacity: 1;
}

/* Product liquid color backdrop */
.liquid-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.liquid-backdrop.is-ready {
  opacity: 1;
}

.liquid-backdrop__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .liquid-backdrop__grain {
    animation: none;
  }
}

.page-home {
  --chrome-reveal: 0;
  --logo-progress: 0;
  --logo-hero-size: min(420px, 58vw);
  --logo-nav-size: calc(var(--nav-height) * 1.3);
}

/* Hero logo lives in .brand-logo and docks to the top as you scroll */
.page-home .brand-logo {
  position: absolute;
  left: 50%;
  z-index: 25;
  top: calc(50% * (1 - var(--logo-progress)) + 24px * var(--logo-progress));
  height: calc(
    var(--logo-hero-size) * (1 - var(--logo-progress)) +
      var(--logo-nav-size) * var(--logo-progress)
  );
  transform: translate(-50%, calc(-50% * (1 - var(--logo-progress))));
  opacity: 1;
  pointer-events: auto;
  will-change: top, height, transform;
}

.hero-tagline {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: auto;
  top: auto;
  z-index: 8;
  margin: 0;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  color: var(--text);
  font-size: clamp(11px, 1.35vw, 14px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  opacity: calc(1 - var(--logo-progress));
  pointer-events: none;
  transition: color var(--theme-duration) var(--theme-ease);
}

body.grid-mode.page-home .hero-tagline {
  opacity: 0;
}

.page-home .brand-logo img {
  filter: drop-shadow(
    0 calc(18px * (1 - var(--logo-progress))) calc(40px * (1 - var(--logo-progress)))
      rgba(0, 0, 0, calc(0.55 * (1 - var(--logo-progress))))
  );
  mix-blend-mode: screen;
}

body.light.page-home .brand-logo img {
  mix-blend-mode: normal;
  filter: invert(1)
    drop-shadow(
      0 calc(18px * (1 - var(--logo-progress))) calc(40px * (1 - var(--logo-progress)))
        rgba(0, 0, 0, calc(0.18 * (1 - var(--logo-progress))))
    );
}

.hero-verse {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 8;
  max-width: min(340px, calc(100vw - 56px));
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 1.5px solid var(--text);
  color: var(--text);
  opacity: calc(1 - var(--logo-progress));
  pointer-events: none;
  transition: color var(--theme-duration) var(--theme-ease), border-color var(--theme-duration) var(--theme-ease);
}

.hero-verse__ref {
  display: block;
  margin: 0 0 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.hero-verse__ref-short,
.hero-products-btn__short {
  display: none;
}

.hero-verse__text {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text);
}

body.grid-mode.page-home .hero-verse {
  opacity: 0;
}

.hero-products-btn {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  padding: 11px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--glass-bg-solid);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: calc(1 - var(--logo-progress));
  pointer-events: none;
  cursor: pointer;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  transition:
    color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    background 0.2s ease,
    box-shadow var(--theme-duration) var(--theme-ease);
}

.hero-products-btn:hover {
  background: var(--text);
  color: var(--bg);
}

body.is-home-slide:not(.grid-mode) .hero-products-btn {
  pointer-events: auto;
}

body.grid-mode.page-home .hero-products-btn {
  opacity: 0;
  pointer-events: none;
}

.hero-products-btn svg {
  width: 14px;
  height: 14px;
}

.page-home .thumbs {
  opacity: var(--chrome-reveal);
  transform: translate3d(
    calc((1 - var(--chrome-reveal)) * -140px),
    -50%,
    0
  );
  pointer-events: none;
  will-change: transform, opacity;
  transition:
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    box-shadow var(--theme-duration) var(--theme-ease);
}

body.cart-open .thumbs,
body.cart-open.page-home .thumbs,
body.cart-open.grid-mode.page-home .thumbs {
  transform: translate3d(calc(-100% - 48px), -50%, 0);
  opacity: 0;
  pointer-events: none;
}

.page-home .thumbs.is-interactive {
  pointer-events: auto;
}

.page-home .info-card {
  opacity: var(--chrome-reveal);
  transform: translate3d(
    calc((1 - var(--chrome-reveal)) * 160px),
    -50%,
    0
  );
  pointer-events: none;
  will-change: transform, opacity;
  transition:
    background-color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    box-shadow var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease);
}

.page-home .info-card.is-interactive {
  pointer-events: auto;
}

body.grid-mode.page-home {
  --chrome-reveal: 1;
  --logo-progress: 1;
}

body.grid-mode.page-home .thumbs,
body.grid-mode.page-home .info-card {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.toolbar {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: var(--toolbar-bg);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: max-content;
  transition:
    width var(--toolbar-expand-dur, 0.85s) cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    box-shadow var(--theme-duration) var(--theme-ease);
}

.toolbar__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.toolbar__reveal {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  flex: 0 0 auto;
  width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}

.toolbar.is-expanded .toolbar__reveal {
  flex: 1 1 auto;
  width: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.toolbar__reveal-space {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar__expand {
  flex: none;
  margin-left: 0;
}

.toolbar__expand .icon-plus,
.toolbar__expand .icon-minus {
  grid-area: 1 / 1;
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.toolbar__expand .icon-minus {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

.toolbar.is-expanded .toolbar__expand .icon-plus {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

.toolbar.is-expanded .toolbar__expand .icon-minus {
  opacity: 1;
  transform: none;
}

#magnifyToggle[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

body.light #magnifyToggle[aria-pressed="true"] {
  background: rgba(0, 0, 0, 0.08);
}

.brand-logo {
  position: absolute;
  top: 24px;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
  display: block;
  height: calc(var(--nav-height) * 1.3);
  text-decoration: none;
  view-transition-name: brand-logo;
}

.brand-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  transition: filter var(--theme-duration) var(--theme-ease), opacity var(--theme-duration) var(--theme-ease);
}

body.light .brand-logo img {
  mix-blend-mode: normal;
  filter: invert(1);
}

.tool-btn {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  transition:
    background 0.2s ease,
    color var(--theme-duration) var(--theme-ease);
}

.tool-btn--label {
  width: auto;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tool-btn:hover {
  background: rgba(160, 200, 220, 0.14);
  color: var(--text);
}

body.light .tool-btn:hover {
  background: rgba(140, 180, 205, 0.2);
}

.tool-btn svg {
  width: 16px;
  height: 16px;
}

.icon-moon,
.icon-sun {
  grid-area: 1 / 1;
  transition:
    opacity 0.4s var(--theme-ease),
    transform 0.4s var(--theme-ease);
}

.icon-sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.65);
}

body.light .icon-moon {
  opacity: 0;
  transform: rotate(60deg) scale(0.65);
}

body.light .icon-sun {
  opacity: 1;
  transform: none;
}

.icon-scroll,
.icon-grid {
  grid-area: 1 / 1;
}

.icon-grid {
  display: none;
}

body.grid-mode .icon-scroll {
  display: none;
}

body.grid-mode .icon-grid {
  display: block;
}

.search-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--toolbar-bg);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  transition:
    background-color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    box-shadow var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease);
}

.search-btn:hover {
  background: rgba(160, 200, 220, 0.16);
  color: var(--text);
}

body.light .search-btn:hover {
  background: rgba(140, 180, 205, 0.28);
}

.search-btn svg {
  width: 18px;
  height: 18px;
}

/* Vertical pill rail of view thumbnails */
.thumbs {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border-radius: 18px;
  background: var(--thumb-rail-bg);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  transition:
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    background-color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    box-shadow var(--theme-duration) var(--theme-ease);
}

.thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.thumb:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.light .thumb:hover {
  background: rgba(0, 0, 0, 0.05);
}

.thumb.is-active {
  border-color: var(--text);
}

.hero {
  position: relative;
  z-index: 5;
  width: min(520px, 48vw);
  height: min(520px, 62vh);
  display: grid;
  place-items: center;
}

.scroll-indicator {
  position: absolute;
  right: calc(100% + 20px);
  top: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 999px;
  background: var(--glass-bg-solid);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transform: translateY(-50%);
  opacity: var(--chrome-reveal);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.page-home .scroll-indicator {
  pointer-events: none;
}

.page-home .scroll-indicator.is-interactive {
  pointer-events: auto;
}

body.grid-mode.page-home .scroll-indicator {
  opacity: 0;
  pointer-events: none;
}

.scroll-dot {
  --dot-size: 8px;
  --dot-fill: 0;
  position: relative;
  width: var(--dot-size);
  height: calc(var(--dot-size) * (1 + var(--dot-fill)));
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--text);
  opacity: 0.32;
  cursor: pointer;
  will-change: height;
  transition: opacity 0.25s ease;
}

.scroll-dot.is-active {
  opacity: 1;
}

.scroll-dot:focus-visible {
  outline: 1.5px solid var(--text);
  outline-offset: 3px;
}

.hero-viewport {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, 48vw);
  height: 100vh;
  height: 100dvh;
  transform: translate(-50%, -50%);
  overflow: hidden;
  pointer-events: none;
}

.hero-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  will-change: transform;
  pointer-events: auto;
  transform: translateZ(0);
}

.hero-track.is-animating {
  /* Snap easing is handled in JS via rAF lerp */
  transition: none;
}

.hero-slide {
  flex: none;
  width: min(520px, 48vw);
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

/* Soft elliptical ground shadow — taller soft falloff behind the product */
.hero-slide:not(.hero-slide--home)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 0;
  width: min(82%, 440px);
  height: min(78%, 520px);
  transform: translate(-50%, -48%);
  pointer-events: none;
  background: radial-gradient(
    ellipse 48% 62% at 50% 55%,
    rgba(0, 0, 0, 0.48) 0%,
    rgba(0, 0, 0, 0.28) 28%,
    rgba(0, 0, 0, 0.12) 52%,
    rgba(0, 0, 0, 0.04) 70%,
    transparent 84%
  );
  filter: blur(22px);
}

body.light .hero-slide:not(.hero-slide--home)::after {
  background: radial-gradient(
    ellipse 48% 62% at 50% 55%,
    rgba(40, 50, 70, 0.3) 0%,
    rgba(40, 50, 70, 0.16) 30%,
    rgba(40, 50, 70, 0.07) 52%,
    rgba(40, 50, 70, 0.02) 70%,
    transparent 84%
  );
}

body.grid-mode .hero-slide:not(.hero-slide--home)::after {
  opacity: 0.55;
  filter: blur(16px);
  height: min(62%, 360px);
}

.hero-slide--home {
  width: min(640px, 70vw);
}

.hero-product-link {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  text-decoration: none;
  color: inherit;
}

.hero-product-link .hero-image {
  grid-area: 1 / 1;
}

.hero-image--front {
  opacity: 0;
  pointer-events: none;
}

.hero-slide.is-showing-front .hero-image--back {
  opacity: 0;
}

.hero-slide.is-showing-front .hero-image--front {
  opacity: 1;
}

.hero-slide .hero-image--back,
.hero-slide .hero-image--front {
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.is-face-instant .hero-image--back,
.hero-slide.is-face-instant .hero-image--front {
  transition: none;
}

.thumb--home img {
  object-fit: contain;
  mix-blend-mode: screen;
  padding: 2px;
}

body.light .thumb--home img {
  mix-blend-mode: normal;
  filter: invert(1);
}

.hero-image {
  position: relative;
  z-index: 1;
  width: min(520px, 48vw);
  height: min(520px, 62vh);
  object-fit: contain;
  /* Soft layered glow — no hard rectangular clip */
  filter:
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18))
    drop-shadow(0 22px 40px rgba(0, 0, 0, 0.22));
}

.product-magnifier {
  --loupe-size: 148px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: var(--loupe-size);
  height: var(--loupe-size);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100vw, -100vh, 0);
  transition: opacity 0.16s ease;
  will-change: transform, opacity;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.product-magnifier.is-visible {
  opacity: 1;
}

.product-magnifier__glass {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background-color: transparent;
  background-repeat: no-repeat;
  border: none;
  overflow: hidden;
  opacity: 0.92;
}

.product-magnifier__cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.product-magnifier__cross::before,
.product-magnifier__cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  border-radius: 1px;
}

.product-magnifier__cross::before {
  width: 12px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.product-magnifier__cross::after {
  width: 1.5px;
  height: 12px;
  transform: translate(-50%, -50%);
}

.magnify-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 61;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100vw, -100vh, 0);
  transition: opacity 0.12s ease;
  will-change: transform, opacity;
}

.magnify-cursor.is-visible {
  opacity: 1;
}

.magnify-cursor.is-over-product {
  opacity: 0;
}

.magnify-cursor::before,
.magnify-cursor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
  border-radius: 1px;
}

.magnify-cursor::before {
  width: 14px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.magnify-cursor::after {
  width: 1.5px;
  height: 14px;
  transform: translate(-50%, -50%);
}

body.light .product-magnifier {
  background: rgba(175, 210, 230, 0.28);
  box-shadow: 0 12px 28px rgba(40, 80, 110, 0.12);
}

body.light .product-magnifier__glass {
  background-color: rgba(200, 225, 240, 0.12);
  border-color: rgba(120, 165, 195, 0.28);
}

body.light .product-magnifier__cross::before,
body.light .product-magnifier__cross::after,
body.light .magnify-cursor::before,
body.light .magnify-cursor::after {
  background: rgba(20, 20, 20, 0.72);
  box-shadow: none;
}

body.grid-mode .product-magnifier,
body.is-home-slide .product-magnifier,
body:not(.magnify-on) .product-magnifier,
body:not(.magnify-on) .magnify-cursor {
  opacity: 0 !important;
  visibility: hidden;
}

body.magnify-on,
body.magnify-on * {
  cursor: none !important;
}

@media (hover: none), (pointer: coarse) {
  .product-magnifier,
  .magnify-cursor {
    display: none !important;
  }

  body.magnify-on,
  body.magnify-on * {
    cursor: auto !important;
  }
}

/* Light mode: soft shadow only — no rectangular mask cut on the product plate */
body.light .hero-image {
  filter:
    drop-shadow(0 8px 14px rgba(30, 40, 55, 0.12))
    drop-shadow(0 18px 36px rgba(30, 40, 55, 0.16));
  -webkit-mask-image: none;
  mask-image: none;
}

body.light .thumb img {
  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent,
      rgba(0, 0, 0, 0.4) 3%,
      #000 10%,
      #000 90%,
      rgba(0, 0, 0, 0.4) 97%,
      transparent
    ),
    linear-gradient(
      to bottom,
      transparent,
      rgba(0, 0, 0, 0.4) 3%,
      #000 10%,
      #000 90%,
      rgba(0, 0, 0, 0.4) 97%,
      transparent
    );
  mask-image:
    linear-gradient(
      to right,
      transparent,
      rgba(0, 0, 0, 0.4) 3%,
      #000 10%,
      #000 90%,
      rgba(0, 0, 0, 0.4) 97%,
      transparent
    ),
    linear-gradient(
      to bottom,
      transparent,
      rgba(0, 0, 0, 0.4) 3%,
      #000 10%,
      #000 90%,
      rgba(0, 0, 0, 0.4) 97%,
      transparent
    );
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Grid mode — product covers left, info card top-right */
body.grid-mode {
  --grid-gap: 10px;
  --grid-rows: 3;
  --grid-top: 100px;
  --grid-bottom: 28px;
  --grid-area-h: calc(100vh - var(--grid-top) - var(--grid-bottom));
  --grid-row-h: calc(
    (var(--grid-area-h) - (var(--grid-rows) - 1) * var(--grid-gap)) / var(--grid-rows)
  );
}

body.grid-mode .thumbs {
  display: none;
}

body.grid-mode .stage {
  place-items: stretch;
}

body.grid-mode .hero {
  position: absolute;
  left: 28px;
  top: var(--grid-top);
  right: 340px;
  bottom: var(--grid-bottom);
  width: auto;
  height: auto;
  max-height: none;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
}

body.grid-mode .hero-viewport {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  max-height: none;
  transform: none;
  overflow: visible;
  pointer-events: auto;
}

body.grid-mode .hero-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--grid-row-h);
  gap: var(--grid-gap);
  height: auto;
  align-content: start;
  transform: none !important;
  transition: none;
}

body.grid-mode .hero-slide {
  width: 100%;
  height: var(--grid-row-h);
  max-height: var(--grid-row-h);
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  user-select: none;
  overflow: hidden;
}

body.grid-mode .hero-product-link {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

body.grid-mode .hero-product-link .hero-image,
body.grid-mode .hero-image {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  margin: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
  -webkit-mask-image: none;
  mask-image: none;
  transition: outline-color 0.2s ease, transform 0.25s ease;
}

body.light.grid-mode .hero-image {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
  -webkit-mask-image: none;
  mask-image: none;
}

body.grid-mode .hero-image:hover {
  transform: scale(1.02);
}

body.grid-mode .hero-image.is-grid-active {
  outline: none;
}

body.grid-mode .hero-slide.is-grid-active .hero-image,
body.grid-mode .hero-slide.is-grid-active .hero-image--back {
  outline: none;
}

body.grid-mode .hero-slide.is-grid-active .hero-product-link::before,
body.grid-mode .hero-slide.is-grid-active .hero-product-link::after {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  width: 2px;
  background: var(--text);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}

body.grid-mode .hero-slide.is-grid-active .hero-product-link::before {
  left: 18%;
}

body.grid-mode .hero-slide.is-grid-active .hero-product-link::after {
  right: 18%;
}

.hero-card-title {
  display: none;
}

body.grid-mode .hero-card-title {
  display: block;
  flex: 0 0 auto;
  margin: 4px 2px 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Home logo tile is display-only in scroll; hide it in the product grid */
body.grid-mode .hero-slide--home {
  display: none;
}

body.grid-mode.page-home .hero-product-link {
  cursor: pointer;
  pointer-events: auto;
}

body.grid-mode.page-home .hero-slide {
  cursor: pointer;
}

/* In grid, show the lead cover only */
body.grid-mode .hero-image--front {
  display: none;
}

body.grid-mode .hero-image--back {
  opacity: 1 !important;
}

body.grid-mode .hero-slide.is-showing-front .hero-image--front {
  display: block;
  opacity: 1 !important;
}

body.grid-mode .hero-slide.is-showing-front .hero-image--back {
  display: none;
}

body.grid-mode .info-card {
  top: var(--grid-top);
  right: 40px;
  transform: none;
  max-height: calc(100vh - 128px);
}

body.grid-mode.page-home .info-card {
  top: var(--grid-top);
  transform: none;
}

.info-card {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 16;
  width: 264px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 20px 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  color: #ffffff;
  transition:
    background-color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease),
    box-shadow var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease);
}

.info-card h1 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: #ffffff;
}

.specs {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: #ffffff;
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.specs li {
  position: relative;
  padding-left: 12px;
  color: #ffffff;
}

.specs li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #ffffff;
}

.size-block {
  margin-bottom: 14px;
}

.size-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.size-label span {
  font-weight: 500;
  opacity: 0.8;
}

.sizes {
  display: flex;
  gap: 6px;
}

.size-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--size-idle-border);
  background: var(--size-idle-bg);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  transition:
    background var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease),
    border-color var(--theme-duration) var(--theme-ease);
}

.size-btn:hover {
  border-color: var(--text);
}

.size-btn.is-selected {
  background: var(--size-active-bg);
  color: var(--size-active-text);
  border-color: var(--size-active-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  transition:
    background var(--theme-duration) var(--theme-ease),
    color var(--theme-duration) var(--theme-ease),
    transform 0.15s ease;
}

.cta:hover {
  transform: translateY(-1px);
}

.cta:active {
  transform: translateY(0);
}

.cta.is-busy {
  background: var(--cta-busy-bg);
  cursor: progress;
}

.cta-price {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .info-card {
    right: 24px;
  }

  .hero,
  .hero-viewport,
  .hero-slide,
  .hero-image {
    width: min(440px, 46vw);
  }

  .hero,
  .hero-image {
    height: min(440px, 58vh);
  }
}

@media (max-width: 860px) {
  .stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      max(14px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
    gap: 14px;
    overflow: auto;
    overflow-x: hidden;
  }

  .stage::before {
    background:
      radial-gradient(ellipse 70% 34% at 50% 30%, var(--spotlight), transparent 68%);
  }

  .brand-logo {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    align-self: center;
    height: 34px;
    margin: 8px 0 0;
    order: 2;
  }

  /* Product pages keep a small in-flow logo */
  .page-product .brand-logo {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    height: 34px !important;
    width: auto !important;
    max-width: 120px;
    transform: none !important;
  }

  /* Home: logo docks from center → between nav + search via --logo-progress */
  .page-home {
    --chrome-reveal: 0;
    --logo-progress: 0;
    --logo-hero-size: min(52vw, 240px);
    --logo-nav-size: 34px;
    --logo-nav-top: calc(max(14px, env(safe-area-inset-top)) + 29px);
    --logo-dock-x: 50%;
  }

  .page-home .brand-logo {
    position: absolute !important;
    /* Hero: viewport center → Dock: midpoint of nav↔search gap */
    left: calc(
      50% * (1 - var(--logo-progress)) + var(--logo-dock-x) * var(--logo-progress)
    ) !important;
    top: calc(
      48% * (1 - var(--logo-progress)) + var(--logo-nav-top) * var(--logo-progress)
    ) !important;
    height: calc(
      var(--logo-hero-size) * (1 - var(--logo-progress)) +
        var(--logo-nav-size) * var(--logo-progress)
    ) !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    z-index: 25;
    pointer-events: auto;
    opacity: 1 !important;
    order: unset;
    will-change: top, left, height;
  }

  .page-home .brand-logo img {
    height: 100% !important;
    width: auto;
    max-width: none;
    object-fit: contain;
  }

  .page-home .thumbs,
  .page-home .info-card,
  .page-home .scroll-indicator {
    opacity: var(--chrome-reveal) !important;
    transform: none !important;
  }

  .page-home .thumbs.is-interactive,
  .page-home .info-card.is-interactive,
  .page-home .scroll-indicator.is-interactive {
    pointer-events: auto !important;
  }

  body.grid-mode.page-home {
    --logo-progress: 1;
    --chrome-reveal: 1;
  }

  /* Compact toolbar — no expand / magnify */
  .toolbar__reveal,
  .toolbar__expand,
  #magnifyToggle {
    display: none !important;
  }

  .toolbar {
    position: relative;
    top: auto;
    left: auto;
    align-self: flex-start;
    width: max-content;
    max-width: calc(100% - 56px);
    justify-content: flex-start;
    padding: 6px;
    order: 1;
  }

  .page-home .toolbar {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    z-index: 22;
    order: unset;
  }

  .toolbar.is-expanded {
    width: max-content;
    max-width: calc(100% - 56px);
  }

  .tool-btn,
  .search-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .tool-btn--label {
    width: auto;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }

  .search-btn {
    /* Match full toolbar pill height (44px btn + 6px pad × 2 + 1px border × 2) */
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    margin: 0;
    z-index: 22;
  }

  .search-btn svg {
    width: 18px;
    height: 18px;
  }

  /* —— Mobile home: big logo + corner verse / shop —— */
  body.page-home.is-home-slide:not(.grid-mode) .stage {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    gap: 0;
  }

  body.page-home.is-home-slide:not(.grid-mode) .thumbs,
  body.page-home.is-home-slide:not(.grid-mode) .scroll-indicator,
  body.page-home.is-home-slide:not(.grid-mode) .info-card,
  body.page-home.is-home-slide:not(.grid-mode) .hero-tagline {
    visibility: hidden;
    pointer-events: none !important;
  }

  /* Swipe layer — collapses at home, grows as logo docks */
  body.page-home:not(.grid-mode) .hero {
    height: calc(min(calc(100vw - 32px), 420px) * min(1, var(--logo-progress) / 0.4));
    opacity: min(1, var(--logo-progress) / 0.4);
    overflow: hidden;
  }

  body.page-home.is-home-slide:not(.grid-mode) .hero {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    bottom: 72px;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    opacity: max(0.02, var(--logo-progress));
    z-index: 4;
    order: unset;
    pointer-events: auto;
  }

  .page-home .hero-verse {
    position: absolute;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(22px, env(safe-area-inset-bottom));
    right: auto;
    top: auto;
    max-width: 42%;
    margin: 0;
    padding: 0;
    border: none;
    order: unset;
    opacity: calc(1 - var(--logo-progress));
    z-index: 12;
    pointer-events: none;
  }

  .page-home .hero-verse__ref {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .page-home .hero-verse__ref-short {
    display: inline;
  }

  .page-home .hero-verse__ref-full,
  .page-home .hero-verse__text {
    display: none;
  }

  .page-home .hero-products-btn {
    position: absolute;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    left: auto;
    top: auto;
    margin: 0;
    transform: none;
    order: unset;
    opacity: calc(1 - var(--logo-progress));
    z-index: 12;
    pointer-events: none;
    padding: 12px 18px;
    font-size: 12px;
  }

  body.page-home.is-home-slide:not(.grid-mode) .hero-products-btn {
    pointer-events: auto;
  }

  .page-home .hero-products-btn__full,
  .page-home .hero-products-btn svg {
    display: none;
  }

  .page-home .hero-products-btn__short {
    display: inline;
  }

  body.page-home:not(.is-home-slide) .hero-verse,
  body.page-home.grid-mode .hero-verse,
  body.page-home:not(.is-home-slide) .hero-products-btn,
  body.page-home.grid-mode .hero-products-btn,
  body.page-home .hero-tagline {
    display: none;
  }

  .thumbs {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-self: center;
    max-width: 100%;
    order: 4;
    padding: 8px;
    z-index: 12;
  }

  body.cart-open .thumbs,
  body.cart-open.page-home .thumbs,
  body.cart-open.grid-mode.page-home .thumbs {
    transform: translate3d(0, 12px, 0);
    opacity: 0;
    pointer-events: none;
  }

  .hero {
    position: relative;
    width: min(100%, 420px);
    max-width: 100%;
    height: min(calc(100vw - 32px), 420px);
    aspect-ratio: auto;
    margin: 4px auto 0;
    order: 3;
  }

  /* Leave room under absolute toolbar / docked logo */
  .page-home:not(.grid-mode) .hero {
    margin-top: 72px;
  }

  body.page-home.is-home-slide:not(.grid-mode) .hero {
    margin-top: 0;
  }

  .scroll-indicator {
    right: auto;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 8px;
    z-index: 12;
  }

  .hero-viewport {
    position: absolute;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
    overflow: hidden;
    pointer-events: auto;
    border-radius: 16px;
    touch-action: pan-y;
  }

  .hero-track {
    width: 100%;
  }

  .hero-slide {
    width: 100%;
    height: var(--slide-h, 100%);
    min-height: var(--slide-h, 100%);
  }

  .hero-image {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .hero-slide:not(.hero-slide--home)::after {
    width: min(88%, 360px);
    height: min(70%, 360px);
    filter: blur(16px);
  }

  body.grid-mode .hero {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
    max-height: none;
    margin: 0 auto;
    padding-right: 0;
    order: 3;
  }

  body.grid-mode .hero-viewport {
    height: auto;
    overflow: visible;
    border-radius: 0;
  }

  body.grid-mode .hero-slide {
    height: auto;
  }

  body.grid-mode .hero-image {
    max-height: none;
    height: auto;
  }

  body.grid-mode .hero-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    height: auto;
    gap: 12px;
  }

  body.grid-mode .hero-slide {
    height: auto;
  }

  body.grid-mode .hero-image {
    max-height: none;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  body.grid-mode .hero-card-title {
    font-size: 11px;
  }

  body.grid-mode .info-card,
  .info-card {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin: 0 auto;
    order: 6;
    padding: 18px 16px 14px;
    z-index: 12;
    opacity: 1;
    pointer-events: auto;
  }

  .size-btn {
    min-width: 44px;
    height: 44px;
  }

  .cta {
    min-height: 48px;
    padding: 14px 16px;
    font-size: 12px;
  }

  .search-panel {
    top: max(12px, env(safe-area-inset-top));
    width: calc(100vw - 24px);
    max-height: min(78dvh, 560px);
    border-radius: 18px;
  }

  .cart-dropdown {
    border-radius: 18px;
  }

  .cart-line {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 10px 4px;
  }

  .cart-line img {
    width: 44px;
    height: 44px;
  }

  .liquid-backdrop {
    position: fixed;
    inset: 0;
  }
}

@media (max-width: 480px) {
  .toolbar__reveal-space .tool-btn--label {
    font-size: 11px;
    padding: 0 8px;
  }

  .hero-verse__text {
    font-size: 14px;
  }

  body.grid-mode .hero-track {
    gap: 8px;
  }
}

/* —— Search + cart overlays —— */
.overlay-root {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.light .overlay-scrim {
  background: rgba(238, 243, 246, 0.55);
}

.search-panel {
  position: absolute;
  left: 50%;
  top: min(18vh, 140px);
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 1;
}

body.light .search-panel {
  background: rgba(246, 249, 252, 0.9);
}

/* Let WebGL liquid glass show through the search panel */
body.liquid-glass-on .search-root .overlay-scrim {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.search-panel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.search-panel__bar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.55;
}

.search-panel__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  outline: none;
}

.search-panel__input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-panel__close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 8px;
}

.search-panel__results {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
}

.search-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.light .search-result:hover {
  background: rgba(0, 0, 0, 0.05);
}

.search-result img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.search-result strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.search-result em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted);
}

.search-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.cart-dropdown {
  position: fixed;
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 420px);
  border-radius: 22px;
  background: var(--glass-bg-solid);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transform-origin: top center;
  transition:
    width var(--toolbar-expand-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    height var(--cart-drop-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    max-height var(--cart-drop-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear var(--cart-drop-dur, 1s);
}

.cart-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    width var(--toolbar-expand-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    height var(--cart-drop-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    max-height var(--cart-drop-dur, 1s) cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.cart-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
  flex: none;
}

.cart-dropdown__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cart-dropdown__close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.cart-dropdown__close svg {
  width: 14px;
  height: 14px;
}

.cart-dropdown__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 8px 8px;
  min-height: 0;
}

.cart-empty {
  margin: 18px 6px 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.cart-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}

.cart-line img {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.cart-line__meta {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cart-line__meta strong {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line__meta span {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line__qty {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-line__qty button {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.cart-line__qty em {
  font-style: normal;
  font-size: 11px;
  min-width: 1ch;
  text-align: center;
}

.cart-line__remove {
  grid-column: 3;
  grid-row: 1 / 3;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  align-self: center;
}

.cart-dropdown__foot {
  flex: none;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-dropdown__sub {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.cart-dropdown__checkout {
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--cta-bg);
  color: var(--cta-text);
  cursor: pointer;
}

.cart-dropdown__checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .home-backdrop {
    transform: none !important;
    inset: 0;
  }
}

@media (hover: none), (pointer: coarse) {
  .home-backdrop {
    transform: none;
    inset: 0;
  }
}
