/* Shop hero art (template-parts/landing/scenes/shop.php).
 * A Tik4 product as three isometric layers (core, features, design). One 10s
 * loop: the block opens into an exploded view (8-25%), the layers get their
 * labels (20-27%), the page is drawn on the top layer (24-44%) and the
 * modules light up (28-48%); a cursor adds the product to the cart (44-60%),
 * a dot flies to the cart and the badge counts it (60-70%); the layers snap
 * back into one block (78-90%) with a pulse. Without motion the exploded
 * view stays with everything drawn. SVG units: the art's viewBox is 740 x 540
 * and sits at left 7cqi / top 17cqi / width 86cqi (1 unit = .1162cqi).
 * Sizes are cqi of .lx-stack. Keep this file ASCII.
 */

.lx-page-hero.is-shop .lx-page-hero-art { display: grid; place-items: center; min-height: 0; }

.lx-stack { --px: 0; --py: 0; position: relative; isolation: isolate; width: min(100%, 540px); aspect-ratio: 1; margin-inline: auto; container-type: inline-size; user-select: none; }
.lx-stack .lx-page-ring { width: 92%; }
.lx-stack-glow { position: absolute; inset: 16% 10% 8%; z-index: 0; display: block; border-radius: 50%; background: radial-gradient(circle at 50% 56%, color-mix(in srgb, var(--t4-teal) 22%, transparent), color-mix(in srgb, var(--t4-blue) 12%, transparent) 46%, transparent 70%); filter: blur(10px); pointer-events: none; }

/* The stack (SVG) */
.lx-stack-art { position: absolute; top: 17cqi; left: 7cqi; z-index: 2; width: 86cqi; }
.lx-stack-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.lx-stack-layer.is-top { transform: translateY(-60px); }
.lx-stack-layer.is-mid { transform: translateY(-26px); }
.lx-stack-comet { stroke-dasharray: 14 200; stroke-dashoffset: -40; }
.lx-stack-node, .lx-stack-snap, .lx-stack-cube { transform-box: fill-box; transform-origin: center; }
.lx-stack-snap { opacity: 0; }
.lx-stack-mod { --c: #19c3c0; fill: var(--c); stroke: rgb(255 255 255 / 70%); stroke-width: 1.5; }
.lx-stack-mod.is-2 { --c: #0090dd; }
.lx-stack-mod.is-3 { --c: #08a4a7; }
.lx-stack-mod.is-4 { --c: #2aa3df; }
.lx-stack-line { stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.lx-stack-port { opacity: .85; }

/* Layer labels: they sit on the leader lines drawn in the SVG. */
.lx-stack-tag { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 1.5cqi; padding: 1.2cqi 2.2cqi; border: 1px solid var(--t4-line); border-radius: 2.6cqi; background: color-mix(in srgb, var(--t4-surface) 90%, transparent); box-shadow: var(--lx-lift); color: var(--t4-ink); font-size: clamp(9.5px, 2.3cqi, 12.5px); font-weight: 800; line-height: 1.6; white-space: nowrap; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lx-stack-tag i { display: block; flex: none; width: 1.7cqi; height: 1.7cqi; border-radius: .45cqi; background: var(--c); transform: rotate(45deg); box-shadow: 0 0 0 .6cqi color-mix(in srgb, var(--c) 18%, transparent); }
.lx-stack-tag.is-top { --c: #0090dd; right: 0; bottom: 71cqi; }
.lx-stack-tag.is-mid { --c: #7cafc2; left: 0; bottom: 57.5cqi; }
.lx-stack-tag.is-base { --c: #102e3c; right: 0; bottom: 37.7cqi; }

/* Product card: a cursor adds it to the cart. */
.lx-stack-product { position: absolute; top: 1.5cqi; left: 1.5cqi; z-index: 5; width: 36cqi; }
.lx-stack-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.5cqi 1.8cqi; padding: 2cqi; border: 1px solid var(--t4-line); border-radius: 3.4cqi; background: color-mix(in srgb, var(--t4-surface) 95%, transparent); box-shadow: var(--lx-lift); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lx-stack-thumb { display: grid; place-items: center; width: 8.6cqi; height: 8.6cqi; border-radius: 2.4cqi; background: linear-gradient(135deg, #2aa3df, var(--t4-blue) 60%, #05527d); color: #fff; box-shadow: 0 1.2cqi 2.2cqi -1.2cqi color-mix(in srgb, var(--t4-blue) 85%, transparent); }
.lx-stack-thumb :is(svg, img) { width: 62%; height: auto; color: #fff; }
.lx-stack-meta { display: grid; gap: .2cqi; min-width: 0; }
.lx-stack-meta strong { overflow: hidden; color: var(--t4-ink); font-size: clamp(10px, 2.5cqi, 13.5px); font-weight: 850; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.lx-stack-meta small { overflow: hidden; color: var(--t4-muted); font-size: clamp(8.5px, 1.85cqi, 10.5px); font-weight: 600; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.lx-stack-buy { position: relative; grid-column: 1 / -1; display: block; height: 6.4cqi; overflow: hidden; border-radius: 1.9cqi; background: var(--t4-blue); color: #fff; }
.lx-stack-buy b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1cqi; font-size: clamp(9px, 2.1cqi, 11.5px); font-weight: 800; white-space: nowrap; }
.lx-stack-buy .is-done { background: var(--t4-teal); opacity: 0; }
.lx-stack-buy svg { width: 2.9cqi; height: 2.9cqi; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lx-stack-cursor { position: absolute; top: 0; left: 0; z-index: 2; display: block; width: 4.6cqi; height: 4.6cqi; opacity: 0; pointer-events: none; transform: translate(30cqi, 27cqi); }
.lx-stack-cursor svg { display: block; width: 100%; height: 100%; overflow: visible; fill: var(--t4-ink); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 .5cqi .8cqi rgb(16 46 60 / 30%)); }
.lx-stack-fly { position: absolute; top: 18.4cqi; left: 19cqi; z-index: 6; display: block; width: 2.6cqi; height: 2.6cqi; border-radius: 50%; background: var(--t4-teal); box-shadow: 0 0 0 .8cqi color-mix(in srgb, var(--t4-teal) 25%, transparent), 0 0 2cqi var(--t4-teal); opacity: 0; pointer-events: none; }

/* Cart and update chips */
.lx-stack .lx-stack-cart { top: 6cqi; right: 3cqi; z-index: 5; gap: 8px; }
.lx-stack .lx-stack-cart svg, .lx-stack-chip svg { width: 16px; height: 16px; fill: none; stroke: var(--t4-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lx-stack-badge { display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--t4-teal); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; opacity: 0; scale: .3; }
.lx-stack .lx-stack-chip.is-update { bottom: 6cqi; left: 4cqi; z-index: 5; gap: 8px; }

.lx-stack .lx-spark.is-1 { top: 31cqi; left: 6cqi; }
.lx-stack .lx-spark.is-2 { top: 3cqi; right: 34cqi; --s: 2.4cqi; --c: var(--t4-blue); }
.lx-stack .lx-spark.is-3 { right: 8cqi; bottom: 14cqi; --s: 2.6cqi; }

/* Dark */
[data-theme="dark"] .lx-stack-layer.is-base .lx-stack-face { fill: #1a4255; stroke: #5d93a8; }
[data-theme="dark"] .lx-stack-layer.is-base .lx-stack-side { fill: #0f2c3a; }
[data-theme="dark"] .lx-stack-layer.is-mid .lx-stack-face { fill: #b5d9e2; }
[data-theme="dark"] .lx-stack-layer.is-base path.lx-stack-lead { stroke: #7fb3c6; }
[data-theme="dark"] .lx-stack-layer.is-base circle.lx-stack-lead { fill: #7fb3c6; }
[data-theme="dark"] .lx-stack-tag.is-base { --c: #5d93a8; }
[data-theme="dark"] .lx-stack-floor { opacity: .2; }
[data-theme="dark"] .lx-stack-cursor svg { fill: #f0f5f2; stroke: #10212b; }

@container (max-width: 420px) {
  .lx-stack-meta small, .lx-stack .lx-stack-chip.is-update { display: none; }
  .lx-stack-tag { padding: 1cqi 1.8cqi; }
}

@media (prefers-reduced-motion: no-preference) {
  .lx-stack-layer.is-top { animation: lx-stack-top 10s cubic-bezier(.45, 0, .2, 1) infinite; }
  .lx-stack-layer.is-mid { animation: lx-stack-mid 10s cubic-bezier(.45, 0, .2, 1) infinite; }
  .lx-stack-guide { animation: lx-stack-guide 10s ease infinite; }
  .lx-stack-snap { animation: lx-stack-snap 10s ease-out infinite; }
  .lx-stack-lead { animation: lx-stack-lead 10s ease infinite; }
  .lx-stack-tag { animation: lx-stack-tag 10s var(--t4-ease) infinite both; }
  .lx-stack-tag.is-mid { animation-delay: .15s; }
  .lx-stack-tag.is-base { animation-delay: .3s; }
  .lx-stack-ui { animation: lx-stack-ui 10s var(--t4-ease) infinite both; }
  .lx-stack-ui.is-logo { animation-delay: .35s; }
  .lx-stack-ui.is-bar { animation-delay: .7s; }
  .lx-stack-ui.is-body { animation-delay: 1.05s; }
  .lx-stack-line { animation: lx-stack-line 10s ease infinite both; }
  .lx-stack-line.is-2 { animation-delay: .3s; }
  .lx-stack-mod { animation: lx-stack-mod 10s ease infinite both; }
  .lx-stack-mod.is-2 { animation-delay: .45s; }
  .lx-stack-mod.is-3 { animation-delay: .9s; }
  .lx-stack-mod.is-4 { animation-delay: 1.35s; }
  .lx-stack-port { animation: lx-stack-port 1.6s ease-in-out infinite; }
  .lx-stack-port.is-2 { animation-delay: -.55s; }
  .lx-stack-port.is-3 { animation-delay: -1.1s; }
  .lx-stack-comet { animation: lx-stack-comet 5s linear infinite; }
  .lx-stack-node { animation: lx-stack-node 2.6s ease-in-out infinite; }
  .lx-stack-cube.is-a { animation: lx-stack-cube 6s ease-in-out infinite; }
  .lx-stack-cube.is-b { animation: lx-stack-cube 7.4s -2.6s ease-in-out infinite; }
  .lx-stack-card { animation: lx-scene-float 6.8s ease-in-out infinite; }
  .lx-stack-buy { animation: lx-stack-press 10s ease infinite; }
  .lx-stack-buy .is-add { animation: lx-stack-add 10s ease infinite; }
  .lx-stack-buy .is-done { animation: lx-stack-done 10s var(--t4-ease) infinite; }
  .lx-stack-cursor { animation: lx-stack-cursor 10s var(--t4-ease) infinite; }
  .lx-stack-fly { animation: lx-stack-fly 10s ease-in-out infinite; }
  .lx-stack-badge { animation: lx-stack-badge 10s var(--t4-ease) infinite; }
  .lx-stack .lx-hero-chip { animation: lx-scene-float 7s ease-in-out infinite, lx-scene-in .9s .6s var(--t4-ease) backwards; }
  .lx-stack .lx-stack-chip.is-update { animation-delay: -3s, .75s; }
  .lx-stack-chip.is-update svg { animation: lx-spin 3s linear infinite; }
  .lx-stack-product { animation: lx-scene-in 1s .45s var(--t4-ease) backwards; }
  .lx-stack-art { animation: lx-scene-in 1s .1s var(--t4-ease) backwards; }
}

/* The block: assembled (layers resting on each other) <-> exploded view. */
@keyframes lx-stack-top {
  0%, 8% { transform: translateY(94px); }
  19% { transform: translateY(-68px); }
  24% { transform: translateY(-60px); }
  51% { transform: translateY(-66px); }
  78% { transform: translateY(-60px); }
  90%, 100% { transform: translateY(94px); }
}
@keyframes lx-stack-mid {
  0%, 10% { transform: translateY(47px); }
  21% { transform: translateY(-31px); }
  26% { transform: translateY(-26px); }
  53% { transform: translateY(-30px); }
  78% { transform: translateY(-26px); }
  88%, 100% { transform: translateY(47px); }
}
@keyframes lx-stack-guide { 0%, 14% { opacity: 0; } 22%, 76% { opacity: 1; } 84%, 100% { opacity: 0; } }
@keyframes lx-stack-snap { 0%, 89% { opacity: 0; transform: scale(.9); } 91% { opacity: .9; } 100% { opacity: 0; transform: scale(1.2); } }
@keyframes lx-stack-lead { 0%, 20% { opacity: 0; } 27%, 74% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes lx-stack-tag {
  0%, 20% { opacity: 0; transform: translateY(1.4cqi) scale(.94); }
  27%, 74% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0; transform: translateY(.8cqi) scale(.97); }
}
/* The page drawn on the top layer, then the modules of the middle one. */
@keyframes lx-stack-ui { 0%, 24% { opacity: 0; transform: translateY(-8px); } 30%, 84% { opacity: 1; transform: none; } 89%, 100% { opacity: 0; transform: none; } }
@keyframes lx-stack-line { 0%, 33% { stroke-dashoffset: 100; } 43%, 84% { stroke-dashoffset: 0; } 89%, 100% { stroke-dashoffset: 100; } }
@keyframes lx-stack-mod { 0%, 28% { fill: #b9d9e0; } 32%, 82% { fill: var(--c); } 88%, 100% { fill: #b9d9e0; } }
@keyframes lx-stack-port { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes lx-stack-comet { from { stroke-dashoffset: 14; } to { stroke-dashoffset: -100; } }
@keyframes lx-stack-node { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(1.6); } }
@keyframes lx-stack-cube { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
/* Add to cart */
@keyframes lx-stack-cursor {
  0%, 42% { opacity: 0; transform: translate(31cqi, 28cqi); }
  46% { opacity: 1; transform: translate(31cqi, 28cqi); }
  55% { opacity: 1; transform: translate(17cqi, 14.4cqi); }
  57% { opacity: 1; transform: translate(17cqi, 14.4cqi) scale(.84); }
  59% { opacity: 1; transform: translate(17cqi, 14.4cqi); }
  68%, 100% { opacity: 0; transform: translate(31cqi, 27cqi); }
}
@keyframes lx-stack-press { 0%, 55% { scale: 1; } 57% { scale: .94; } 60%, 100% { scale: 1; } }
@keyframes lx-stack-add { 0%, 57% { opacity: 1; } 59%, 93% { opacity: 0; } 96%, 100% { opacity: 1; } }
@keyframes lx-stack-done { 0%, 57% { opacity: 0; transform: translateY(100%); } 60%, 93% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes lx-stack-fly {
  0%, 58% { opacity: 0; transform: translate(0, 0) scale(.6); }
  60% { opacity: 1; transform: translate(0, 0) scale(1); }
  64% { opacity: 1; transform: translate(28cqi, -17cqi) scale(1); }
  68% { opacity: 1; transform: translate(57.5cqi, -9.6cqi) scale(.55); }
  70%, 100% { opacity: 0; transform: translate(57.5cqi, -9.6cqi) scale(.3); }
}
@keyframes lx-stack-badge { 0%, 67% { opacity: 0; scale: .3; } 70% { opacity: 1; scale: 1.35; } 74%, 94% { opacity: 1; scale: 1; } 97%, 100% { opacity: 0; scale: .3; } }

@media (max-width: 767px) {
  .lx-stack { width: min(100%, 460px); }
}
