/* Ecommerce page: 3D store showcase (store_stage) and interactive store builder (store_builder). */
:root { --ec-ink: #16161a; --ec-mut: #5d5d66; --ec-line: #e7e5ea; --ec-gold: #b8913a; --ec-ease: cubic-bezier(.2, .8, .2, 1); }

/* ---------- 3D store showcase ---------- */
.ec-stage { margin-top: 28px; }
.ec-stage-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 26px; }
.ec-stage-tabs button { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--ec-line); border-radius: 16px; background: #fff; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s var(--ec-ease); }
.ec-stage-tabs button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--c); transition: width .5s var(--ec-ease); }
.ec-stage-tabs button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -18px rgba(0,0,0,.4); }
.ec-stage-tabs button[aria-selected="true"] { border-color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: 0 16px 32px -20px color-mix(in srgb, var(--c) 80%, transparent); }
.ec-stage-tabs button[aria-selected="true"]::after { width: 100%; }
.ec-stage-tabs button:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.ec-stage-tabs b { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font: 700 .85rem var(--sv-font); }
.ec-stage-tabs button[aria-selected="true"] b { background: var(--c); color: #fff; }
.ec-stage-tabs span { display: flex; flex-direction: column; font: 700 .98rem var(--sv-font); color: var(--ec-ink); }
.ec-stage-tabs small { font: 500 .76rem var(--sv-font); color: var(--ec-mut); margin-top: 2px; }

.ec-stage-pane { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 34px; border-radius: 28px; background: radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--c) 14%, #fff), #fbfaf8 60%); border: 1px solid var(--ec-line); animation: ecIn .5s var(--ec-ease) both; }
.ec-stage-pane[hidden] { display: none; }
.ec-stage-scene { perspective: 1400px; }
.ec-stage-rig { position: relative; padding: 10px 70px 40px 0; transform-style: preserve-3d; transform: rotateY(var(--ry, -12deg)) rotateX(var(--rx, 6deg)); transition: transform .5s var(--ec-ease); }
.ec-laptop { transform: translateZ(0); }
.ec-laptop-screen { position: relative; border: 10px solid #1b1b1f; border-bottom-width: 14px; border-radius: 16px 16px 6px 6px; background: #fff; overflow: hidden; box-shadow: 0 40px 70px -40px rgba(0,0,0,.55); }
.ec-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: #f1f0f3; border-bottom: 1px solid #e3e1e6; }
.ec-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d4d1d8; }
.ec-bar i:first-child { background: #ff6159; } .ec-bar i:nth-child(2) { background: #ffbd2e; } .ec-bar i:nth-child(3) { background: #28c941; }
.ec-bar span { margin-left: 8px; padding: 2px 12px; border-radius: 999px; background: #fff; font: 500 .7rem var(--sv-font); color: var(--ec-mut); }
.ec-scroll { aspect-ratio: 16 / 10; overflow: hidden; }
.ec-scroll img { display: block; width: 100%; height: auto; transform: translateY(0); transition: transform 6s cubic-bezier(.45, 0, .55, 1); }
.ec-laptop:hover .ec-scroll img, .ec-stage-pane.is-scrolling .ec-scroll img { transform: translateY(calc(-100% + var(--vh, 300px))); }
.ec-laptop-base { height: 14px; margin: 0 -6%; border-radius: 0 0 14px 14px; background: linear-gradient(#d9d8dc, #a9a8ad); box-shadow: 0 18px 30px -18px rgba(0,0,0,.6); }
.ec-phone { position: absolute; right: 0; bottom: 0; width: 26%; aspect-ratio: 9 / 19; border: 7px solid #1b1b1f; border-radius: 26px; overflow: hidden; background: #fff; transform: translateZ(80px); box-shadow: 0 30px 50px -24px rgba(0,0,0,.6); }
.ec-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ec-live { position: absolute; left: 14px; top: -6px; display: inline-flex; gap: 7px; align-items: center; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.35); font: 700 .74rem var(--sv-font); color: var(--ec-ink); transform: translateZ(120px); }
.ec-live i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ecPulse 1.8s infinite; }
.ec-hint { margin: 6px 0 0; font-size: .76rem; color: var(--ec-mut); text-align: center; }
.ec-tag { margin: 0 0 6px; font: 700 .72rem var(--sv-font); letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.ec-stage-copy h3 { margin: 0 0 10px; font: 800 clamp(1.6rem, 2.6vw, 2.2rem)/1.1 var(--sv-font); color: var(--ec-ink) !important; }
.ec-stage-copy > p { margin: 0 0 16px; color: var(--ec-mut); line-height: 1.6; }
.ec-stage-copy ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.ec-stage-copy li { position: relative; padding: 10px 12px 10px 38px; border-radius: 12px; background: #fff; border: 1px solid var(--ec-line); font-weight: 600; font-size: .9rem; color: var(--ec-ink); }
.ec-stage-copy li::before { content: "\2713"; position: absolute; left: 11px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #fff; font: 700 .6rem/1 system-ui, sans-serif; }
.ec-visit { display: inline-flex; gap: 8px; align-items: center; padding: 12px 20px; border-radius: 999px; background: var(--c); color: #fff !important; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.ec-visit:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px var(--c); }

/* ---------- Interactive store builder ---------- */
.ec-build { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; margin-top: 28px; }
.ec-switches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ec-switches button { width: 100%; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ec-line); background: #fff; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.ec-switches button:hover { transform: translateX(3px); border-color: #cfcbd5; }
.ec-switches button:focus-visible { outline: 2px solid var(--ec-ink); outline-offset: 2px; }
.ec-switches button[aria-checked="false"] { background: #f7f6f8; }
.ec-switches button[aria-checked="false"] .ec-sw-copy { opacity: .55; }
.ec-sw-copy b { display: block; font: 700 .95rem var(--sv-font); color: var(--ec-ink); }
.ec-sw-copy small { display: block; margin-top: 2px; font-size: .8rem; color: var(--ec-mut); line-height: 1.45; }
.ec-sw { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #d4d1d8; transition: background .25s; }
.ec-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s var(--ec-ease); }
[aria-checked="true"] > .ec-sw { background: #16a34a; }
[aria-checked="true"] > .ec-sw::after { transform: translateX(18px); }
.ec-sw-meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--ec-ink); color: #fff; }
.ec-sw-meter span { font: 600 .8rem var(--sv-font); opacity: .8; }
.ec-sw-meter b { font: 800 1.1rem var(--sv-font); }
.ec-sw-meter i { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.ec-sw-meter em { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ec-gold), #f2d27a); transition: width .5s var(--ec-ease); }

.ec-build-scene { perspective: 1200px; display: grid; place-items: center; }
.ec-build-rig { position: relative; width: min(300px, 80%); transform-style: preserve-3d; transform: rotateY(var(--ry, -16deg)) rotateX(var(--rx, 8deg)); transition: transform .5s var(--ec-ease); }
.ec-ph { --b: var(--ec-ink); --bt: #fff; position: relative; display: grid; gap: 10px; padding: 14px 12px 16px; border: 9px solid #1b1b1f; border-radius: 38px; background: #faf9fb; box-shadow: 0 50px 80px -40px rgba(0,0,0,.55); transform-style: preserve-3d; font-family: var(--sv-font); }
.ec-build.brand-on .ec-ph { --b: #7a2e4d; --bt: #fff; }
.ec-ph > * { transition: opacity .35s, transform .45s var(--ec-ease), max-height .45s var(--ec-ease), margin .45s; }
.ec-ph-status { display: flex; justify-content: space-between; font: 700 .64rem var(--sv-font); color: var(--ec-ink); padding: 0 4px; }
.ec-ph-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--b); color: var(--bt); transition: background .4s; }
.ec-ph-head b { font-size: .95rem; letter-spacing: .02em; }
.ec-cart { position: relative; display: inline-flex; }
.ec-cart i { position: absolute; top: -7px; right: -9px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px; background: var(--ec-gold); color: #fff; font: 700 .58rem var(--sv-font); font-style: normal; }
.ec-cart.bump i { animation: ecBump .45s var(--ec-ease); }
.ec-ph-search { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--ec-line); font-size: .7rem; color: var(--ec-mut); }
.ec-ph-offer { padding: 8px 10px; border-radius: 10px; background: repeating-linear-gradient(135deg, #fff4d6 0 10px, #ffecb8 10px 20px); border: 1px dashed var(--ec-gold); font: 700 .68rem var(--sv-font); color: #7a5a12; text-align: center; transform: translateZ(30px); }
.ec-ph-card { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--ec-line); transform: translateZ(40px); box-shadow: 0 18px 30px -22px rgba(0,0,0,.4); }
.ec-ph-card img { width: 92px; height: 116px; object-fit: cover; border-radius: 10px; }
.ec-ph-info b { display: block; font-size: .8rem; line-height: 1.25; color: var(--ec-ink); }
.ec-ph-price { margin: 4px 0; font-size: .76rem; } .ec-ph-price strong { color: var(--ec-ink); } .ec-ph-price s { color: #9a98a0; }
.ec-ph-stars { margin: 0 0 4px; font-size: .62rem; color: var(--ec-mut); } .ec-ph-stars span { color: #f5a524; letter-spacing: 1px; }
.ec-ph-vars { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; }
.ec-ph-vars span { padding: 2px 6px; border-radius: 6px; border: 1px solid var(--ec-line); font: 700 .58rem var(--sv-font); color: var(--ec-ink); }
.ec-ph-vars span.on { background: var(--b); border-color: var(--b); color: var(--bt); }
.ec-ph-vars i { width: 13px; height: 13px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 2px #fff, 0 0 0 3px #ddd; }
.ec-ph-add { width: 100%; padding: 7px; border: 0; border-radius: 9px; background: var(--b); color: var(--bt); font: 700 .68rem var(--sv-font); cursor: pointer; transition: background .4s, transform .15s; }
.ec-ph-add:active { transform: scale(.96); }
.ec-ph-pay { padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--ec-line); transform: translateZ(25px); }
.ec-ph-pay small, .ec-ph-track small { display: block; margin-bottom: 6px; font: 700 .6rem var(--sv-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ec-mut); }
.ec-ph-pay div { display: flex; gap: 5px; flex-wrap: wrap; }
.ec-ph-pay span { padding: 4px 8px; border-radius: 7px; background: #f3f1f5; font: 700 .62rem var(--sv-font); color: var(--ec-ink); }
.ec-ph-pay span:first-child { background: #e7f6ec; color: #16793a; }
.ec-ph-track { padding: 10px; border-radius: 14px; background: var(--ec-ink); color: #fff; transform: translateZ(25px); }
.ec-ph-track small { color: rgba(255,255,255,.7); }
.ec-ph-track i { display: block; height: 5px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.ec-ph-track em { display: block; width: 66%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #86efac); animation: ecTrack 3s ease-in-out infinite alternate; }
.ec-ph-track span { display: block; margin-top: 6px; font: 700 .68rem var(--sv-font); }
.ec-float { position: absolute; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 20px 40px -20px rgba(0,0,0,.45); transition: opacity .35s, transform .5s var(--ec-ease); }
.ec-seo { left: -70%; top: 16%; width: 210px; transform: translateZ(90px); }
.ec-seo small { color: #188038; font-size: .62rem; } .ec-seo b { display: block; margin: 2px 0; font: 600 .78rem var(--sv-font); color: #1a0dab; } .ec-seo p { margin: 0; font-size: .64rem; color: #4d5156; line-height: 1.4; }
.ec-apps { right: -40%; bottom: 14%; display: grid; gap: 6px; padding: 8px; background: transparent; box-shadow: none; transform: translateZ(110px); }
.ec-apps span { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; background: #111; color: #fff; font-size: .52rem; letter-spacing: .04em; box-shadow: 0 14px 26px -14px rgba(0,0,0,.6); }
.ec-apps b { font: 700 .8rem var(--sv-font); letter-spacing: 0; }
.ec-toast { position: absolute; left: 50%; bottom: -18px; translate: -50% 0; padding: 8px 14px; border-radius: 999px; background: #16a34a; color: #fff; font: 700 .72rem var(--sv-font); white-space: nowrap; opacity: 0; transform: translateZ(130px) translateY(10px); transition: opacity .3s, transform .3s; pointer-events: none; }
.ec-toast.on { opacity: 1; transform: translateZ(130px) translateY(0); }

/* Switched-off features fold away. */
.ec-build:not(.offers-on) .fx-offers, .ec-build:not(.checkout-on) .fx-checkout, .ec-build:not(.shipping-on) .fx-shipping,
.ec-build:not(.reviews-on) .fx-reviews, .ec-build:not(.variants-on) .fx-variants { opacity: 0; max-height: 0; margin: -5px 0; overflow: hidden; padding-block: 0; border-width: 0; }
.ec-ph > .fx-offers, .ec-ph > .fx-checkout, .ec-ph > .fx-shipping { max-height: 120px; }
.ec-build:not(.seo-on) .fx-seo, .ec-build:not(.app-on) .ec-apps { opacity: 0; transform: translateZ(0) scale(.85); }
.ec-build:not(.app-on) .ec-ph-status { opacity: 0; }

@keyframes ecIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes ecPulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes ecBump { 40% { transform: scale(1.5); } }
@keyframes ecTrack { from { width: 40%; } to { width: 82%; } }

@media (max-width: 900px) {
  .ec-stage-pane { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; gap: 22px; }
  .ec-stage-rig { padding: 10px 40px 30px 0; }
  .ec-build { grid-template-columns: minmax(0, 1fr); }
  .ec-build-scene { order: -1; padding: 0 0 20px; }
  .ec-seo { left: -30%; width: 170px; }
  .ec-apps { right: -24%; }
}
@media (max-width: 520px) {
  .ec-seo { left: -6%; top: -8%; width: 160px; }
  .ec-apps { right: -6%; }
  .ec-build-rig { width: 76%; }
}
@media (prefers-reduced-motion: reduce) {
  .ec-stage-rig, .ec-build-rig { transform: none; }
  .ec-scroll img, .ec-ph-track em, .ec-live i { transition: none; animation: none; }
}

/* ---------- Hero: 3D deck of store screens (product_hero layout shop3d) ---------- */
.pp-hero.lay-shop3d .pp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.ec-hero { position: relative; perspective: 1600px; min-height: 440px; }
.ec-hero-rig { position: relative; height: 440px; transform-style: preserve-3d; transform: rotateY(var(--ry, -18deg)) rotateX(var(--rx, 8deg)); transition: transform .6s var(--ec-ease); }
.ec-deck { --z: calc(var(--p, 0) * -70px); position: absolute; left: 4%; top: 6%; width: 82%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer;
  box-shadow: 0 40px 70px -36px rgba(0,0,0,.55); transform: translate3d(calc(var(--p, 0) * 34px), calc(var(--p, 0) * -26px), var(--z)); opacity: calc(1 - var(--p, 0) * .18);
  transition: transform .8s var(--ec-ease), opacity .6s, filter .6s; filter: saturate(calc(1 - var(--p, 0) * .25)); }
.ec-deck img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.ec-deck:focus-visible { outline: 3px solid var(--pa, #111); outline-offset: 3px; }
.ec-deck[data-front] img { animation: ecPeek 7s ease-in-out .6s both; }
.ec-hero-phone { position: absolute; right: 0; bottom: 0; width: 26%; aspect-ratio: 9 / 19; border: 7px solid #1b1b1f; border-radius: 26px; overflow: hidden; background: #fff; transform: translateZ(140px); box-shadow: 0 30px 50px -24px rgba(0,0,0,.6); }
.ec-hero-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ec-hero-card { position: absolute; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.95); box-shadow: 0 22px 40px -20px rgba(0,0,0,.45); font-family: var(--sv-font); backdrop-filter: blur(6px); }
.ec-hero-card small { display: block; font: 700 .62rem var(--sv-font); letter-spacing: .1em; text-transform: uppercase; color: var(--ec-mut); }
.ec-hero-card.c1 { left: -4%; bottom: 10%; transform: translateZ(180px); animation: ecFloat 6s ease-in-out infinite; }
.ec-hero-card.c1 b { display: block; margin: 2px 0; font: 800 1.35rem var(--sv-font); color: var(--ec-ink); }
.ec-hero-card.c1 span { font-size: .72rem; color: #16793a; font-weight: 600; }
.ec-hero-card.c2 { right: 18%; top: -2%; transform: translateZ(120px); animation: ecFloat 7s ease-in-out -2s infinite; }
.ec-hero-card.c2 p { display: flex; gap: 5px; margin: 6px 0 0; }
.ec-hero-card.c2 i { padding: 4px 9px; border-radius: 8px; background: #f3f1f5; font: 700 .68rem var(--sv-font); font-style: normal; color: var(--ec-ink); }
.ec-hero-card.c2 i:first-child { background: #e7f6ec; color: #16793a; }
.ec-hero-card.c3 { left: -6%; top: 30%; display: flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; transform: translateZ(160px); }
.ec-hero-card.c3 b { display: inline-flex; gap: 6px; align-items: center; font: 700 .72rem var(--sv-font); color: #16793a; }
.ec-hero-card.c3 b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: ecPulse 1.8s infinite; }
.ec-hero-card.c3 span { font: 600 .74rem var(--sv-font); color: var(--ec-ink); transition: opacity .3s; }
.ec-hero-card.c3.swap span { opacity: 0; }
@keyframes ecFloat { 50% { translate: 0 -10px; } }
@keyframes ecPeek { 0%, 15% { object-position: top; } 60%, 100% { object-position: 0 35%; } }
@media (max-width: 900px) {
  .pp-hero.lay-shop3d .pp-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .ec-hero, .ec-hero-rig { min-height: 0; height: 320px; }
  .ec-hero-card.c2 { display: none; }
}
@media (max-width: 520px) {
  .ec-hero, .ec-hero-rig { height: 250px; }
  .ec-hero-card.c1 { left: 0; bottom: 0; padding: 8px 10px; } .ec-hero-card.c1 b { font-size: 1.05rem; }
  .ec-hero-card.c3 { left: 4%; top: -10%; }
}
@media (prefers-reduced-motion: reduce) { .ec-hero-rig { transform: none; } .ec-hero-card, .ec-deck[data-front] img { animation: none; } }

/* No "Chapter 01…" labels above section titles on this page. */
body:has(.ec-hero, .ec-stage, .ec-build) main .sv-sec > .wrap > .sv-title::before,
body:has(.ec-hero, .ec-stage, .ec-build) main .sv-sec .sv-title::before { content: none !important; display: none !important; }
@media (max-width: 520px) {
  .ec-hero-card.c3 { display: none; }
  .ec-build-rig .ec-float { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; margin-top: 12px; transform: none; }
  .ec-build-rig .ec-apps { display: flex; justify-content: center; gap: 8px; padding: 0; }
  .ec-build:not(.seo-on) .fx-seo, .ec-build:not(.app-on) .ec-apps { display: none; }
}
