/* /apps: three apps, one card each on every screen: icon, name and tagline, one line on what it does,
   the price, "Install free", and a live storefront demo (always open on desktop, a toggle on phones). */

.apps-hero {
  padding: 16px 0 56px;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(194, 155, 103, .12), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.apps-hero__head { display: flex; flex-direction: column; gap: 6px; }
.apps-hero__title { font: 400 30px/1.08 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.apps-hero__lede { margin-top: 6px; max-width: 40em; color: var(--ink-2); font-size: 17px; line-height: 1.5; }
.apps-hero__video, .apps-hero__video:visited {
  display: none; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink-2); font-size: 16px; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(211, 198, 177, .4); text-underline-offset: 5px;
}
.apps-hero__play { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold-hi); }
.apps-hero__play .icon { width: 13px; height: 13px; fill: currentColor; margin-left: 2px; }
.apps-hero__video:hover, .apps-hero__video:focus-visible { color: var(--ink); text-decoration-color: var(--gold-hi); }

.apps { display: grid; gap: 10px; margin-top: 16px; }
.app {
  display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; scroll-margin-top: 84px;
  background: linear-gradient(180deg, #1d1712 0%, #15100c 100%);
  transition: border-color .3s, transform .4s var(--ease), box-shadow .4s var(--ease);
}
.app:hover { border-color: var(--gold-hi); transform: translateY(-3px); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 1); }
.app__id { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0; }
.app__icon { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .9); }
.app__plate { order: 0; }
.app__name { display: flex; flex-direction: column; gap: 3px; font: 500 21px/1.05 var(--serif); letter-spacing: -.01em; }
.app__sub { font: 600 14px/1.2 var(--sans); color: var(--gold-hi); letter-spacing: .01em; }

/* The plate: a lit stage for the storefront demo; the product photo lives inside the demo, as on a real store */
.app__plate {
  position: relative; display: grid; place-items: center; padding: 18px 16px;
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(220, 187, 138, .16), transparent 70%),
    linear-gradient(180deg, #2a2017 0%, #1a140f 100%);
  border-block: 1px solid rgba(134, 112, 79, .55);
}
.app__ui { width: 100%; max-width: 340px; padding: 12px 14px 14px; border-radius: 14px; background: #fff; color: #1f1a14; font-size: 15px; line-height: 1.3; box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .95), 0 2px 0 rgba(255, 255, 255, .06); transition: transform .5s var(--ease); }
.app:hover .app__ui { transform: translateY(-3px); }
.app__demo-tag { margin-bottom: 8px; color: #5b5249; font-size: 14px; font-weight: 600; }
.demo-prod { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; }
.demo-prod__img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: #222; }
.demo-prod__img--small { width: 64px; height: 64px; }
.demo-prod__text { display: grid; gap: 4px; min-width: 0; }
.demo-prod__name { font-size: 16px; font-weight: 600; }

.app__body { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 12px; }
.app__actions { display: flex; align-items: stretch; gap: 8px; margin-top: 2px; }
.app__on { display: none; }
.app__demo-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 12px 0 14px; border-radius: 999px;
  color: var(--ink); background: rgba(194, 155, 103, .08); border: 1.5px solid var(--rule); font: 700 15px/1 var(--sans); cursor: pointer;
  transition: background-color .25s, border-color .25s;
}
.app__demo-btn .icon { width: 16px; height: 16px; color: var(--gold-hi); }
.app__demo-play { fill: currentColor; }
.app__demo-btn:hover, .app__demo-btn:focus-visible { background: rgba(194, 155, 103, .18); border-color: var(--gold-hi); }
.app__chev { transition: transform .3s var(--ease); }
.app__demo-btn[aria-expanded="true"] .app__chev { transform: rotate(180deg); }
.js .app.is-folded .app__plate, .js .app.is-folded .app__store { display: none; }
.app__edge { font: 400 16.5px/1.3 var(--serif); color: var(--ink); text-wrap: pretty; }
.app__price { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; }
.app__price .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--gold-hi); }
.app__cta { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font-size: 16px; gap: 8px; }
.app__store { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin: 0 16px; padding: 12px 0 8px; border-top: 1px solid rgba(134, 112, 79, .45); color: var(--ink-2); font-size: 14px; line-height: 1.3; }
.app__fact { grid-column: 1; display: inline-flex; align-items: center; gap: 7px; }
.app__fact .icon { width: 15px; height: 15px; color: var(--gold-hi); }
.app__listing, .app__listing:visited { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-left: 8px; color: var(--gold-hi); font-weight: 700; text-decoration: none; }
.app__listing .icon { width: 15px; height: 15px; }
.app__listing:hover, .app__listing:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.apps__after { margin-top: 20px; }
.apps__note { color: var(--ink-3); font-size: 14px; }

/* SalePilot demo: before, sale live, ended */
.demo-sale__steps { display: flex; gap: 4px; margin-bottom: 12px; }
.demo-sale__step { flex: 1; padding-top: 6px; border-top: 3px solid #8b8278; color: #5b5249; font-size: 14px; font-weight: 600; transition: border-color .4s, color .4s; }
.demo-sale[data-state="before"] .demo-sale__step--before,
.demo-sale[data-state="live"] .demo-sale__step--live,
.demo-sale[data-state="ended"] .demo-sale__step--ended { border-color: #1f1a14; color: #1f1a14; }
.demo-sale__price { position: relative; display: block; height: 28px; }
.demo-sale__now { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.demo-sale__now--sale { color: #a3231b; opacity: 0; transform: translateY(6px); }
.demo-sale__was { color: #5b5249; font-weight: 400; font-size: 16px; text-decoration-thickness: 1.5px; }
.demo-sale__badge { padding: 3px 8px; border-radius: 999px; background: #1f1a14; color: #fff; font-size: 14px; font-weight: 700; }
/* Sequential crossfade: the outgoing price is gone before the incoming one starts, so the two never overlap.
   The regular price stays hidden for the whole live phase and returns only once the sale has ended. */
.demo-sale__now--regular { transition-duration: .22s; transition-delay: .26s; }
.demo-sale__now--sale { transition-duration: .22s; transition-delay: 0s; }
.demo-sale[data-state="live"] .demo-sale__now--regular { opacity: 0; transform: translateY(-6px); transition-delay: 0s; visibility: hidden; transition-property: opacity, transform, visibility; }
.demo-sale[data-state="live"] .demo-sale__now--sale { opacity: 1; transform: none; transition-delay: .26s; }

.demo-sale__step { position: relative; }
.demo-sale__run { position: absolute; left: 0; top: -3px; width: 100%; height: 3px; background: #a3231b; transform: scaleX(0); transform-origin: left; }
.demo-sale[data-state="live"] .demo-sale__run { animation: run 3s linear both; }
.demo-sale[data-state="ended"] .demo-sale__run { transform: scaleX(1); background: #1f1a14; }
@keyframes run { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.demo-sale__badge { transition: transform .4s var(--ease); }
.demo-sale[data-state="live"] .demo-sale__badge { animation: pop .5s var(--ease) .15s both; }
@keyframes pop { from { transform: scale(.6); } to { transform: none; } }

/* BundlePilot demo */
.demo-bundle__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.demo-bundle__rows { display: grid; }
.demo-bundle__row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; opacity: 0; transform: translateX(-6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.demo-bundle__row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bundle__row .icon { width: 15px; height: 15px; color: #1d6b3c; stroke-width: 2.5; }
.demo-bundle__row b { font-weight: 700; }
.demo-bundle[data-step="1"] .demo-bundle__row:nth-child(-n+1),
.demo-bundle[data-step="2"] .demo-bundle__row:nth-child(-n+2),
.demo-bundle[data-step="3"] .demo-bundle__row { opacity: 1; transform: none; }
.demo-bundle__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 8px; border-top: 1px solid #8b8278; font-size: 15px; font-weight: 600; }
.demo-bundle__total b { font-size: 19px; }
.demo-bundle__was { position: relative; color: #5b5249; font-weight: 400; text-decoration: none; }
.demo-bundle__was::after { content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 1.5px; background: #5b5249; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease) .35s; }
.demo-bundle[data-step="3"] .demo-bundle__was::after { transform: none; }
.demo-bundle__total > span:last-child { transition: opacity .35s var(--ease); }
.demo-bundle:not([data-step="3"]) .demo-bundle__total > span:last-child { opacity: 0; }
.demo-bundle__total b { display: inline-block; transition: opacity .4s var(--ease) .7s, transform .5s var(--ease) .7s; }
.demo-bundle:not([data-step="3"]) .demo-bundle__total b { opacity: 0; transform: translateY(6px); }

/* BulkPilot demo */
.demo-bulk__opts { display: grid; gap: 6px; }
.demo-bulk__opt { position: relative; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; padding: 7px 10px; border-radius: 8px; border: 1.5px solid #8b8278; background: #f4f2ee; font-size: 14px; transition: border-color .35s, box-shadow .35s, background-color .35s; }
.demo-bulk__opt b { font-size: 14px; }
.demo-bulk__opt s { color: #5b5249; text-decoration-thickness: 1.5px; }
.demo-bulk[data-pick="2"] .demo-bulk__opt--2,
.demo-bulk[data-pick="3"] .demo-bulk__opt--3 { border-color: #1f1a14; background: #fff; box-shadow: 0 0 0 1.5px #1f1a14; }
.demo-bulk__opt::after { content: ""; position: absolute; inset: -2px; border-radius: 10px; box-shadow: 0 0 0 0 rgba(31, 26, 20, .35); opacity: 0; pointer-events: none; }
.demo-bulk[data-pick="2"] .demo-bulk__opt--2::after, .demo-bulk[data-pick="3"] .demo-bulk__opt--3::after { animation: ping .9s var(--ease) both; }
@keyframes ping { from { opacity: 1; box-shadow: 0 0 0 0 rgba(31, 26, 20, .35); } to { opacity: 0; box-shadow: 0 0 0 10px rgba(31, 26, 20, 0); } }

@media (min-width: 640px) {
  .apps-hero__title { font-size: 40px; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .apps-hero { padding: 40px 0 64px; }
  .apps-hero__head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; }
  .apps-hero__title { font-size: 54px; line-height: 1.04; }
  .apps-hero__lede { margin-top: 14px; font-size: 19px; }
  .apps-hero__video, .apps-hero__video:visited { display: inline-flex; flex: none; }
  .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
  /* Desktop order: who it is, the demo, what it does, price, Install; the demo is always open */
  .app__id { order: 0; padding: 20px 24px 16px; gap: 14px; }
  .app__body { gap: 12px; }
  .app__edge { line-height: 1.35; }
  .app__plate { order: 1; height: 214px; padding: 18px 24px; }
  .app__body { order: 2; flex: 1; padding: 18px 24px 8px; gap: 12px; }
  .app__store { order: 3; display: grid; margin: 0 24px; }
  .js .app.is-folded .app__plate, .js .app.is-folded .app__store { display: grid; }
  .app__demo-btn { display: none; }
  .app__on { display: inline; }
  .app__icon { width: 56px; height: 56px; border-radius: 14px; }
  .app__name { font-size: 27px; }
  .app__edge { font-size: 20px; min-height: 2.7em; }
  .app__price { font-size: 16px; }
  .app__cta { min-height: 56px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .app:hover, .app:hover .app__ui { transform: none; }
  .demo-sale__run { transform: scaleX(1); animation: none !important; }
}

/* Facts from each public App Store listing, under the app name (no rating until a listing has reviews) */
.app__head { display: grid; gap: 6px; min-width: 0; }
.app__facts { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.app__factline { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; line-height: 1.3; }
.app__factline .icon { width: 15px; height: 15px; color: var(--gold-hi); }
.app__id { align-items: flex-start; padding-top: 14px; }
.apps__note { display: flex; align-items: center; gap: 8px; }
.apps__note .icon { width: 16px; height: 16px; color: var(--gold-hi); }
@media (min-width: 1024px) { .app__factline { font-size: 15px; } .app__head { gap: 8px; } }
/* One row: release year left, listing link right, both centred */
.app__listing, .app__listing:visited { grid-row: 1; }
.app__store { padding: 6px 0 6px; }
@media (min-width: 1024px) {
  .app__facts { flex-direction: column; gap: 4px; }
  .app__price { min-height: 2.7em; }
}

/* ---------- iter7: approved copy only. Name, "Free plan available", the one line, Open on the Shopify App Store,
   a price-free demo, then "Listed on the Shopify App Store" and the release year. The newest app wears "New". ---------- */
.apps-hero__head { display: grid; gap: 4px; }
.app__name { gap: 4px; }
.app__title { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.app__badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px;
  background: linear-gradient(180deg, #f6dcaa 0%, #dcbb8a 100%); color: #1a130b;
  font: 700 14px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 240, 210, .35), 0 6px 16px -6px rgba(226, 181, 108, .6);
}
.app--new { border-color: var(--gold-hi); box-shadow: 0 0 0 1px rgba(220, 187, 138, .35), 0 30px 60px -40px rgba(226, 181, 108, .55); }
.app__free { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; line-height: 1.3; }
.app__free .icon { width: 15px; height: 15px; color: var(--gold-hi); }
.app__body { gap: 12px; padding: 10px 14px 14px; }
.app__cta, .app__cta:visited { width: 100%; min-height: 52px; padding: 0 16px; font-size: 16px; gap: 9px; }
.app__cta > span { min-width: 0; }
.app__plate { order: 0; }
.app__store { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 14px; margin: 0 14px; padding: 10px 0 12px; border-top: 1px solid rgba(134, 112, 79, .45); }
.app__fact { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; }
.apps__note { margin-top: 4px; }
.apps__yt, .apps__yt:visited { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink-2); font-size: 16px; text-decoration: underline; text-decoration-color: rgba(211, 198, 177, .45); text-underline-offset: 5px; }
.apps__yt .icon { flex: none; width: 20px; height: 20px; color: var(--gold-hi); }
.apps__yt:hover, .apps__yt:focus-visible { color: var(--ink); text-decoration-color: var(--gold-hi); }
@media (max-width: 1023px) {
  .app__id { order: 0; }
  .app__body { order: 1; }
  .app__plate { order: 2; }
  .app__store { order: 3; }
}
@media (min-width: 1024px) {
  .apps-hero__head { gap: 8px; }
  .app__id { padding: 22px 24px 18px; }
  .app__free { font-size: 15px; }
  .app__badge { min-height: 26px; font-size: 14px; }
  .app__plate { order: 1; }
  .app__body { order: 2; padding: 20px 24px 10px; gap: 18px; }
  .app__edge { min-height: 4.1em; }
  .app__cta, .app__cta:visited { min-height: 56px; font-size: 17px; }
  .app__store { order: 3; margin: 0 24px; padding: 12px 0 16px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .app--new { transition: none; } }
.demo-sale__now { font-size: 17px; }
.demo-sale__now--regular { color: #1f1a14; font-weight: 600; }
.demo-sale__now--sale .demo-sale__badge { margin-right: 2px; }
.app__cta .btn__arrow { margin-left: 2px; flex: none; }
@media (max-width: 1023px) { .app__store { border-top: 0; padding-top: 12px; } }
