/* adaas.market — marketplace. Cyan. */
@import url("/shared/css/adaas-core.css");
/* Service inner page (shared with adaas.services) — the marketplace hosts the
   service detail design too, at /adaas.market/services/detail.html. */
@import url("/shared/css/adaas-service-detail.css");
:root { --accent: #06b6d4; }

/* ===========================================================================
   PRODUCT DETAIL — mirrors the service-detail design (editorial hero, tabbed
   panels, persistent facts + CTA rail) plus a preview/screenshot gallery.
   Core hero/badge/tagline/benefit classes come from adaas-core.css; only the
   detail-layout pieces below are product-local.
   =========================================================================== */
#prod-root { display: block; min-height: calc(100vh - 64px); }

.prod-detail-hero {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(28px, 6vw, 70px) clamp(20px, 4vw, 48px) 0;
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 52px); align-items: start;
}
/* Once the related rail is injected, split the hero into title + rail, like
   the related-services rail on the service detail page. */
.prod-detail-hero.has-related { grid-template-columns: minmax(0, 1fr) 300px; }
.prod-detail-hero .svc-hero-main { min-width: 0; }
.svc-hero-related { align-self: start; display: flex; flex-direction: column; }
.svc-hero-related-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); padding-bottom: 2px;
}
.svc-hero-related .svc-links { flex-direction: column; gap: 0; }
.svc-hero-related .svc-link-chip {
  display: block; width: 100%; border: 0; border-radius: 0;
  padding: 13px 0; border-top: 1px solid var(--line);
  transition: padding-left .2s ease;
}
.svc-hero-related .svc-link-chip .rel {
  display: block; font-family: var(--font-body); font-size: 9px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px;
}
.svc-hero-related .svc-link-chip .nm2 { font-family: var(--font-display); font-size: 14px; color: var(--ink-strong); transition: color .2s ease; }
.svc-hero-related .svc-link-chip:hover { padding-left: 6px; }
.svc-hero-related .svc-link-chip:hover .nm2 { color: var(--accent); }

/* Two-column body: preview + tabs on the left, sticky facts/CTA on the right. */
.svc-detail-body {
  max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
  padding-top: clamp(24px, 3.4vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(26px, 4vw, 52px); align-items: start;
}
.svc-detail-main { min-width: 0; }
.svc-detail-aside { position: sticky; top: 20px; align-self: start; }

.svc-tabbar { display: flex; gap: 2px; flex-wrap: wrap; margin-top: clamp(20px, 3vw, 34px); border-bottom: 1px solid var(--line); }
.svc-tabbtn {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--ink-dim); background: transparent; border: 0; cursor: pointer;
  padding: 13px 18px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  white-space: nowrap; border-radius: 8px 8px 0 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.svc-tabbtn:hover { color: var(--ink-strong); background: color-mix(in srgb, var(--ink-faint) 8%, transparent); }
.svc-tabbtn.is-active { color: var(--ink-strong); border-bottom-color: var(--accent); }

.svc-panels { padding-top: clamp(24px, 3.4vw, 38px); padding-bottom: clamp(48px, 6vw, 80px); }
.svc-panel { display: none; }
.svc-panel.is-active { display: block; animation: svcPanelIn .34s cubic-bezier(.2, .7, .3, 1); }
@keyframes svcPanelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.svc-panel-lede { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--ink-dim); max-width: 640px; margin: 0 0 26px; }

.svc-ov-main { display: flex; flex-direction: column; gap: 28px; }
/* Overview-tab labels (About, What you get, …) — handwriting script, no dash,
   consistent with the network's section eyebrows. */
.svc-ov-kicker {
  display: block;
  font-family: var(--font-script); font-weight: 600; font-size: 23px;
  letter-spacing: 0.01em; text-transform: none; color: var(--accent); margin-bottom: 8px;
}
.svc-ov-block > p { font-family: var(--font-body); font-size: 16px; line-height: 1.66; color: var(--ink); margin: 0; max-width: 700px; }

/* Facts + CTA rail. */
.svc-facts-card { display: flex; flex-direction: column; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.svc-facts-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.svc-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.svc-fact:first-of-type { padding-top: 0; }
.svc-fact .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.svc-fact .v { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink-strong); text-align: right; }
.svc-included-h { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }

.svc-cta {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px 8px 8px 20px; border-radius: 14px; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--ink-strong);
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box, var(--rainbow) border-box;
  background-size: auto, 220% 100%; animation: aFieldSweep 8s linear infinite;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.svc-cta-label { flex: 1 1 auto; text-align: center; }
.svc-cta-mono { flex: 0 0 auto; width: 34px; height: 34px; position: relative; overflow: visible; }
/* Soft neutral-gray radial glow behind the 3-D glyph so it gains depth (esp. light theme). */
.svc-cta-mono::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 150%; height: 150%; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(120, 120, 120, .42) 0%, transparent 66%);
  opacity: .45; filter: blur(5px);
  transition: opacity .25s ease;
}
html[data-theme="light"] .svc-cta-mono::before {
  background: radial-gradient(circle, rgba(110, 110, 110, .5) 0%, transparent 68%);
  opacity: .8;
}
.svc-cta:hover .svc-cta-mono::before { opacity: 1; }
.svc-cta:hover { filter: brightness(1.06) saturate(1.12); box-shadow: 0 18px 38px -18px rgba(0, 0, 0, .78); }

/* Secondary action — neutral hairline live-demo link under the primary CTA. */
.svc-cta-2 {
  margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 10px 18px; border-radius: 14px; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--ink-dim);
  border: 1px solid var(--line); background: var(--bg-soft);
  transition: border-color .2s ease, color .2s ease;
}
.svc-cta-2:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--ink-strong); }
.svc-cta-2-ic { display: inline-flex; }
.svc-cta-2-ic svg { width: 16px; height: 16px; }

/* ---- Preview / screenshot placeholder gallery -------------------------- */
.prod-preview { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.prod-preview-stage {
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 50% -20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%),
    var(--surface);
  overflow: hidden;
}
.prod-shot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; color: var(--ink-faint);
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; background-position: center;
}
.prod-preview-stage .prod-shot { aspect-ratio: 16 / 9; }
.prod-shot-ic { display: inline-flex; }
.prod-shot-ic svg { width: 34px; height: 34px; color: color-mix(in srgb, var(--accent) 70%, var(--ink-faint)); }
.prod-shot-num { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink-dim); }
.prod-shot-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }

.prod-preview-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.prod-thumb {
  padding: 0; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; transition: border-color .2s ease, transform .2s ease;
}
.prod-thumb .prod-shot { aspect-ratio: 16 / 10; background-size: 16px 16px; }
.prod-thumb .prod-shot-ic svg { width: 20px; height: 20px; }
.prod-thumb:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-2px); }
.prod-thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Real screenshots — fill the 16:9 stage / 16:10 thumbs. */
.prod-preview-stage .prod-shot-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.prod-thumb .prod-shot-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.prod-preview-cap { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--ink-dim); min-height: 16px; }
.prod-preview-cap:empty { display: none; }

/* System requirements — a hairline-ruled spec list. */
.prod-specs { margin: 0; display: grid; gap: 0; }
.prod-spec { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.prod-spec:first-child { border-top: 0; }
.prod-spec dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.prod-spec dd { margin: 0; font-family: var(--font-body); font-size: 14.5px; color: var(--ink-strong); }

/* Quickstart — labelled steps with copy-paste code lines. */
.prod-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 20px; }
.prod-step { counter-increment: step; padding-left: 44px; position: relative; }
.prod-step::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent);
}
.prod-step-label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink-strong); margin: 3px 0 10px; }
.prod-code {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft);
}
.prod-code code { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: pre; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-strong); }
.prod-copy {
  flex: 0 0 auto; cursor: pointer; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim); transition: border-color .2s ease, color .2s ease;
}
.prod-copy:hover { border-color: var(--accent); color: var(--accent); }
.prod-step-note { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-dim); }

/* Changelog — release notes newest first. */
.prod-changelog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.prod-release { padding: 20px 0; border-top: 1px solid var(--line); }
.prod-release:first-child { border-top: 0; padding-top: 0; }
.prod-release-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.prod-release-v { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--ink-strong); }
.prod-release-d { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.prod-release-notes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prod-release-notes li { font-size: 14.5px; color: var(--ink-dim); }

@media (max-width: 860px) {
  .prod-detail-hero.has-related { grid-template-columns: 1fr; gap: 26px; }
  .svc-detail-body { grid-template-columns: 1fr; gap: 30px; }
  .svc-detail-aside { position: static; }
}
@media (max-width: 560px) {
  .prod-preview-thumbs { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================================
   MARKETPLACE LANDING — the primary page IS the catalogue, laid out like a
   streaming service. A large PREVIEW pane on top reflects the selected item; a
   stack of category ROWS below are infinite horizontal shelves of cover tiles.
   Hover/tap a tile to preview it; "See details" opens the dedicated page. The
   monogram sits behind; the whole thing owns the screen under the top bar.
   =========================================================================== */

/* Full-height veil grounds the catalogue: darkens the top (so the selected-item
   text stays legible over the monogram) and the bottom (so the shelves read),
   while letting the monogram breathe through the middle. */
.landing-market::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(8, 9, 12, 0.82) 0%,
    rgba(8, 9, 12, 0.52) 12%,
    rgba(8, 9, 12, 0.42) 30%,
    rgba(8, 9, 12, 0.40) 50%,
    rgba(9, 9, 12, 0.74) 70%,
    rgba(8, 8, 10, 0.95) 86%,
    #08080a 100%);
}
html[data-theme="light"] .landing-market::after {
  background: linear-gradient(to bottom,
    rgba(233, 231, 225, 0.80) 0%,
    rgba(233, 231, 225, 0.5) 12%,
    rgba(233, 231, 225, 0.4) 30%,
    rgba(233, 231, 225, 0.38) 50%,
    rgba(233, 231, 225, 0.74) 70%,
    rgba(233, 231, 225, 0.94) 86%,
    #e6e4de 100%);
}
.landing-market .landing-top { z-index: 4; }
.landing-market .landing-top .wordmark-logo { display: inline-flex; align-items: center; }
.landing-market .landing-top .brand-logotype { height: 20px; width: auto; }

/* The catalogue owns everything under the top bar. */
.mkt {
  position: absolute; left: 0; right: 0; top: clamp(58px, 8vh, 76px); bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: clamp(10px, 2vh, 20px);
  padding: clamp(10px, 2vh, 24px) clamp(22px, 4vw, 52px) clamp(16px, 3vh, 30px);
  min-height: 0;
}

/* ---- Header: static search (bottom-left) + dynamic selected-item info (right) -- */
.mkt-head {
  flex: 0 0 auto; min-height: 176px;
  display: flex; align-items: stretch; justify-content: space-between;
  gap: clamp(18px, 4vw, 52px);
}
.mkt-info {
  min-width: 0; max-width: 720px; margin-left: auto; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-end; text-align: right;
}
/* Static left column: intro on top, search + filters clustered at the bottom. */
.mkt-aside { display: flex; flex-direction: column; min-width: 0; max-width: 480px; }
.mkt-intro { display: flex; flex-direction: column; gap: 7px; }
.mkt-intro-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
  text-shadow: 0 1px 14px var(--stage-bg);
}
.mkt-intro-title {
  font-family: var(--font-script); font-weight: 700;
  font-size: clamp(30px, 3.4vw, 44px); line-height: 1.0; letter-spacing: 0;
  color: #dc382a; margin: 1px 0 2px;
  text-shadow: 0 1px 16px var(--stage-bg), 0 0 4px var(--stage-bg);
}
.mkt-intro-lede {
  font-family: var(--font-body); font-size: 13px; line-height: 1.5; color: var(--ink-dim);
  margin: 0; max-width: 330px;
  text-shadow: 0 1px 14px var(--stage-bg), 0 0 3px var(--stage-bg);
}
/* The interactive cluster (search + facets + hint), anchored to the column base. */
.mkt-controls {
  margin-top: auto; padding-top: 18px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.mkt-info-cat {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--pv-accent, var(--accent)); margin-bottom: 10px; min-height: 13px;
}
.mkt-info-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(24px, 3.1vw, 40px); line-height: 1.02; letter-spacing: -0.03em;
  color: var(--ink-strong); margin: 0;
}
.mkt-info-meta {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-faint); text-transform: capitalize; margin-top: 8px; min-height: 14px;
}
.mkt-info-dek {
  font-family: var(--font-body); font-size: clamp(13px, 1.3vw, 15px); line-height: 1.5;
  color: var(--ink-dim); margin: 10px 0 0; max-width: 620px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mkt-info-cta {
  align-self: flex-end;
  display: inline-flex; align-items: center; gap: 9px; margin-top: clamp(12px, 1.8vh, 20px);
  padding: 10px 20px; border-radius: 0; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: var(--pv-accent, var(--accent));
  background: transparent;
  border: 1px solid var(--pv-accent, var(--accent));
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.mkt-info-cta:hover {
  background: var(--pv-accent, var(--accent)); color: #fff; transform: translateY(-1px);
}
.mkt-info-cta span { transition: transform .2s ease; }
.mkt-info-cta:hover span { transform: translateX(4px); }

/* ---- Hero stage: a big preview backdrop for the SELECTED item ----------- */
/* When the selected item carries an `image` or `video`, it fills the top of the
   catalogue behind the header text and OVER the monogram (like a streaming
   backdrop). It sits above the monogram + veil but below the header text, and
   dissolves into the page toward the bottom and the right (where the text is). */
.landing-market { --stage-bg: #08080a; }
html[data-theme="light"] .landing-market { --stage-bg: #e6e4de; }
.mkt-stage {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  height: clamp(240px, 65vh, 600px);
  overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
  /* Dissolve the whole stage (media + scrims) into the page toward the bottom
     with an alpha mask, so the video/image fades out into the background
     instead of ending on a hard, visible line. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 20%, rgba(0,0,0,0) 70%);
}
.mkt-stage.is-on { opacity: 1; }
.mkt-stage-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%; display: block;
  animation: mktStageIn .8s cubic-bezier(.2, .7, .3, 1);
}
@keyframes mktStageIn { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
/* A YouTube background embed for a hero ad (e.g. the GITEX creative). An iframe
   can't object-fit:cover, so oversize it to a 16:9 box built off the full-bleed
   width and let the banner's overflow:hidden crop it. Non-interactive. */
.mkt-stage-yt {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100vw; height: 56.25vw; min-width: 100%; min-height: 100%;
  border: 0; pointer-events: none; display: block;
  animation: mktStageIn .8s cubic-bezier(.2, .7, .3, 1);
}
/* Image-less hero ad: tint the stage with the creative's accent instead. */
.mkt-stage--tint::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(130% 100% at 80% 6%, color-mix(in srgb, var(--stage-accent, var(--accent)) 60%, transparent), transparent 60%),
    linear-gradient(120deg, color-mix(in srgb, var(--stage-accent, var(--accent)) 30%, transparent), transparent 58%);
}
.mkt-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--stage-bg) 26%, transparent) 0%,
      color-mix(in srgb, var(--stage-bg) 8%, transparent) 24%,
      color-mix(in srgb, var(--stage-bg) 16%, transparent) 70%,
      transparent 100%),
    linear-gradient(to left,
      color-mix(in srgb, var(--stage-bg) 42%, transparent) 0%,
      color-mix(in srgb, var(--stage-bg) 12%, transparent) 34%,
      transparent 72%),
    linear-gradient(to right,
      color-mix(in srgb, var(--stage-bg) 60%, transparent) 0%,
      color-mix(in srgb, var(--stage-bg) 38%, transparent) 22%,
      color-mix(in srgb, var(--stage-bg) 16%, transparent) 38%,
      transparent 54%);
}
/* Keep the header text and top bar above the stage art. */
.landing-market .landing-top { z-index: 4; }
.mkt-head, .mkt-rows { position: relative; z-index: 1; }


/* Frosted search field with an animated rainbow hairline border. */
.mkt-search {
  position: relative; flex: 0 0 auto; align-self: stretch;
  display: inline-flex; align-items: center; gap: 10px;
  width: 100%; max-width: 340px; padding: 11px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
  border: 0;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.mkt-search::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: var(--rainbow); background-size: 220% 100%;
  animation: aFieldSweep 8s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.mkt-search:focus-within::before { filter: brightness(1.16) saturate(1.1); }
.mkt-search-ico { flex: 0 0 auto; color: var(--ink-faint); }
.mkt-search input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink-strong);
}
.mkt-search input::placeholder { color: var(--ink-faint); }
.mkt-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Frosted grey filter chips beside the search — quick category facets. */
.mkt-filters {
  flex: 0 0 auto; align-self: stretch;
  display: flex; flex-wrap: wrap; gap: 7px;
  max-width: 460px;
}
.mkt-chip {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.03em; color: var(--ink); cursor: pointer;
  padding: 6px 13px; border-radius: 999px; line-height: 1;
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mkt-chip:hover { color: var(--ink-strong); border-color: color-mix(in srgb, var(--accent) 46%, var(--line)); }
.mkt-chip[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Quiet interaction hint beneath the facets. */
.mkt-hint {
  margin: 2px 0 0; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.02em; color: var(--ink-faint);
  text-shadow: 0 1px 12px var(--stage-bg);
}

/* ---- Category rows (infinite horizontal shelves) ------------------------ */
.mkt-rows {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 20px);
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 4px;
}
.mkt-rows::-webkit-scrollbar { display: none; }
.mkt-rows.is-in .mkt-row { animation: mktRowIn .5s cubic-bezier(.2, .7, .3, 1) backwards; }
.mkt-rows.is-in .mkt-row:nth-child(2) { animation-delay: .06s; }
.mkt-rows.is-in .mkt-row:nth-child(3) { animation-delay: .12s; }
.mkt-rows.is-in .mkt-row:nth-child(4) { animation-delay: .18s; }
.mkt-rows.is-in .mkt-row:nth-child(5) { animation-delay: .24s; }
@keyframes mktRowIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.mkt-row { --row-accent: var(--accent); padding-inline: 16px; }
.mkt-row-title {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(14px, 1.5vw, 17px);
  letter-spacing: 0.01em; color: var(--row-accent);
}
.mkt-row-title-count { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-faint); }

/* Deep-link filter (?filter=…): the requested shelf is pinned to the top and
   the whole line is highlighted as the filtered result, with a frosted tag.
   Editorial marking — a soft full-width tint (NO border ring, which used to
   collide with the flush tiles/title) plus an accent hairline under the title.
   Every .mkt-row already carries a 16px inline inset, so the band spans the
   full shelf width while the title/tiles sit comfortably inside it — and all
   rows (filtered or not) keep their first tile on the same vertical line. */
.mkt-row--filter {
  padding-block: 10px 8px; margin: 0;
  border-radius: 14px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--row-accent) 11%, transparent),
    color-mix(in srgb, var(--row-accent) 4%, transparent)
  );
}
.mkt-row--filter .mkt-row-title {
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--row-accent) 26%, transparent);
}
.mkt-row-filter-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--row-accent);
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--row-accent) 34%, var(--line));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.mkt-rail { position: relative; }
.mkt-rail-track {
  display: flex; gap: clamp(12px, 1.3vw, 18px);
  /* NB: no CSS `scroll-behavior: smooth` here — it would make wireRail's
     programmatic parking (`scrollLeft = blockW`) and the seamless-loop wrap
     (`scrollLeft += blockW`) ANIMATE, which on a big shelf reads as the rail
     auto-scrolling to the end. Chevron buttons pass `behavior:"smooth"` to
     scrollBy() explicitly, so their smooth scroll is unaffected. */
  overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 2px 6px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.mkt-rail-track::-webkit-scrollbar { display: none; }

.mkt-chev {
  position: absolute; top: calc(50% - 8px); transform: translateY(-50%); z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); color: var(--ink-strong);
  background: color-mix(in srgb, var(--surface-2) 74%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 22px; line-height: 1;
  transition: border-color .2s ease, background .2s ease, opacity .2s ease;
}
/* Sit flush to the shelf edges (never outset) so they can't bleed past the
   rows container and create a few-pixel horizontal drag of the whole shelf. */
.mkt-chev--prev { left: 0; }
.mkt-chev--next { right: 0; }
.mkt-chev:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--surface-2) 92%, transparent); }
.mkt-chev[hidden] { display: none; }

/* ---- Cover tiles -------------------------------------------------------- */
.mkt-card {
  scroll-snap-align: start; flex: 0 0 auto;
  width: clamp(190px, 20.5vw, 264px);
  padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left;
  --card-accent: var(--accent);
}
.mkt-card-face {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  aspect-ratio: 16 / 10; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 0;
  background: color-mix(in srgb, var(--surface-2) 52%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.mkt-card:hover .mkt-card-face,
.mkt-card:focus-visible .mkt-card-face {
  transform: translateY(-3px); outline: none;
  border-color: color-mix(in srgb, var(--card-accent) 60%, var(--line));
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  box-shadow: 0 18px 34px -22px color-mix(in srgb, var(--card-accent) 82%, transparent);
}
/* Image-backed tiles: use the product's cover as a muted backdrop behind the
   copy. A dark bottom gradient keeps the name/tagline legible; it lifts a touch
   on hover/active. Copy is raised above the image via z-index. */
.mkt-card--bg .mkt-card-face::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--card-bg);
  background-size: cover; background-position: center;
  opacity: 0.5; filter: saturate(0.95);
  transition: opacity .2s ease;
}
.mkt-card--bg .mkt-card-face::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface-2) 8%, transparent) 0%,
    color-mix(in srgb, var(--surface-2) 68%, transparent) 100%);
}
.mkt-card--bg:hover .mkt-card-face::before,
.mkt-card--bg:focus-visible .mkt-card-face::before,
.mkt-card--bg.is-active .mkt-card-face::before { opacity: 0.72; }
.mkt-card--bg .mkt-card-kind,
.mkt-card--bg .mkt-card-body { position: relative; z-index: 1; }
.mkt-card.is-active .mkt-card-face {
  border-color: var(--card-accent);
  box-shadow: 0 0 0 1px var(--card-accent) inset, 0 18px 34px -22px color-mix(in srgb, var(--card-accent) 70%, transparent);
}
.mkt-card-kind {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--card-accent); min-height: 12px;
}
/* "New" stamp: a handwritten italic mark in ADAAS red, so a fresh drop is easy
   to spot on a shelf. It sits top-right at rest and fades on hover/active so it
   never collides with the quick-open (→) affordance revealed there. */
.mkt-card-new {
  position: absolute; top: 6px; right: 11px; z-index: 2;
  font-family: var(--font-script); font-style: italic; font-weight: 700;
  font-size: 20px; line-height: 1; color: #dc382a;
  transform: rotate(-8deg); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.mkt-card:hover .mkt-card-new,
.mkt-card:focus-visible .mkt-card-new,
.mkt-card.is-active .mkt-card-new {
  opacity: 0; transform: rotate(-8deg) translateY(-2px);
}
.mkt-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mkt-card-name {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.18;
  color: var(--ink-strong);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mkt-card-tag {
  font-family: var(--font-body); font-size: 11.5px; line-height: 1.35; color: var(--ink-faint);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Quick-open chip: a frosted grey glass affordance that skips the preview and
   opens the item's detail page directly. Revealed on hover/focus of the tile. */
.mkt-card-go {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1; color: var(--ink-strong);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-2px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.mkt-card:hover .mkt-card-go,
.mkt-card:focus-visible .mkt-card-go,
.mkt-card.is-active .mkt-card-go {
  opacity: 1; transform: none; pointer-events: auto;
}
.mkt-card-go:hover {
  background: color-mix(in srgb, var(--card-accent) 22%, var(--surface-2));
  border-color: color-mix(in srgb, var(--card-accent) 60%, var(--line));
  color: var(--card-accent);
}

/* ---- Ad placements ------------------------------------------------------ */
/* The creative itself is a self-contained .adaas-ad component styled by the
   shared /shared/css/adaas-ads.css. The marketplace only owns its FOOTPRINT in
   the shelf: give it the same width + scroll-snap as a product tile so a
   placement is indistinguishable in size from the cards around it. */
.mkt-rail-track > .adaas-ad {
  flex: 0 0 auto; scroll-snap-align: start;
  width: clamp(190px, 20.5vw, 264px);
}

.mkt-empty {
  padding: 30px 2px; font-family: var(--font-body); font-size: 13.5px; color: var(--ink-faint);
}

@media (max-width: 820px) {
  .mkt-head { flex-direction: column; gap: 14px; min-height: 0; }
  .mkt-aside { max-width: none; order: 1; }
  .mkt-intro { display: none; }
  .mkt-info { margin-left: 0; align-items: flex-start; text-align: left; }
  .mkt-info-cta { align-self: flex-start; }
  .mkt-controls { margin-top: 0; padding-top: 0; }
  .mkt-search { align-self: stretch; width: auto; max-width: none; }
  .mkt-filters { max-width: none; }
  .mkt-info-name { font-size: clamp(22px, 7vw, 34px); }
  .mkt-card,
  .mkt-rail-track > .adaas-ad { width: clamp(150px, 46vw, 200px); }
}

