/* ==========================================================================
   Ultra Demark — Marketplace (v2)
   A full technology store: platforms, verticals, modules, devices, templates,
   services. Catalogue-first, with a persistent quote list.
   ========================================================================== */

.mkt {
  --navy: #062d49;
  --navy-deep: #041f34;
  --ink: #0b1e2f;
  --body: #4d6376;
  --line: #e2eaf1;
  --line-soft: #eef3f7;
  --wash: #f6f9fb;
  --accent: #2f9be0;
  --accent-deep: #0a5ea8;
  --gold: #d1a658;
  background: #fff;
  color: var(--body);
  -webkit-font-smoothing: antialiased;
}
.mkt-wrap { width: min(1280px, 100%); margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.mkt h1, .mkt h2, .mkt h3, .mkt h4 { color: var(--ink); letter-spacing: -0.03em; margin: 0; }

/* ---------------------------------------------------------------- hero */
.mkt-hero {
  position: relative; overflow: hidden; color: #c9dfec;
  background:
    radial-gradient(110% 130% at 88% 0%, rgba(47,155,224,.34) 0%, rgba(4,31,52,0) 58%),
    radial-gradient(80% 100% at 8% 100%, rgba(0,138,69,.22) 0%, rgba(4,31,52,0) 60%),
    linear-gradient(158deg, #07304e 0%, var(--navy-deep) 66%, #04161f 100%);
}
.mkt-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(78% 70% at 40% 12%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(78% 70% at 40% 12%, #000, transparent 76%);
}
.mkt-hero-in { position: relative; z-index: 2; padding: 56px 0 0; }
.mkt-hero-in h1, .mkt-hero-in .mkt-lede { max-width: 22ch; }
.mkt-hero-in .mkt-lede { max-width: 58ch; }
.mkt-crumbs { display: flex; gap: 9px; align-items: center; font-size: 12px; color: #7fa3bb; margin-bottom: 26px; }
.mkt-crumbs a { color: #9dbcd0; text-decoration: none; }
.mkt-crumbs a:hover { color: #fff; }
.mkt-hero h1 {
  color: #fff; font-size: clamp(32px, 3.6vw, 50px); line-height: 1.05; font-weight: 800; text-wrap: balance;
}
.mkt-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #fff 10%, #9fe6c4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mkt-hero p.mkt-lede { margin: 20px 0 0; font-size: 16.5px; line-height: 1.74; color: #b3cfe0; max-width: 60ch; }

/* search bar */
.mkt-searchbar {
  position: relative; z-index: 2; margin-top: 32px;
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px; padding: 9px; backdrop-filter: blur(6px);
}
.mkt-searchbar input {
  height: 48px; border: 0; border-radius: 9px; padding: 0 18px 0 44px; font-size: 15px;
  background: rgba(255,255,255,.96) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23517389' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
  color: #0b1e2f; font-family: inherit;
}
.mkt-searchbar input:focus { outline: 2px solid #9fe6c4; outline-offset: 1px; }
.mkt-searchbar select,
.mkt-searchbar .mkt-search-go {
  height: 48px; border-radius: 9px; border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.1); color: #eaf4fa; font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 0 16px;
}
.mkt-searchbar select option { color: #0b1e2f; }
.mkt-searchbar .mkt-search-go {
  background: linear-gradient(180deg, #37a7ea, #2f9be0); border-color: transparent; color: #fff;
  padding: 0 26px; cursor: pointer; font-weight: 700;
}
.mkt-searchbar .mkt-search-go:hover { filter: brightness(1.06); }

/* category strip under the hero */
.mkt-cats {
  position: relative; z-index: 2; margin-top: 30px;
  display: grid; grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(255,255,255,.13);
}
.mkt-cat {
  display: block; text-align: left; padding: 20px 18px 24px; text-decoration: none;
  border-right: 1px solid rgba(255,255,255,.08); color: #cfe3ee;
  transition: background .16s ease;
}
.mkt-cat:last-child { border-right: 0; }
.mkt-cat:hover { background: rgba(255,255,255,.06); }
.mkt-cat b { display: block; font-size: 14.5px; color: #fff; font-weight: 700; }
.mkt-cat span { display: block; margin-top: 5px; font-size: 11.5px; color: #8fb0c6; }
.mkt-cat b, .mkt-cat i { display: block; }
.mkt-cat i {
  display: block; margin-top: 9px; font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #9fe6c4; line-height: 1.4;
}

/* ---------------------------------------------------------------- trust strip */
.mkt-trust {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.mkt-trust div { background: #fff; padding: 20px 24px; display: flex; gap: 11px; align-items: flex-start; }
.mkt-trust div > div { display: block; }
.mkt-trust b, .mkt-trust span { display: block; }
.mkt-trust svg { flex: 0 0 auto; margin-top: 2px; color: #008a45; }
.mkt-trust b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 700; }
.mkt-trust span { display: block; font-size: 12.5px; color: var(--body); margin-top: 2px; }

/* ---------------------------------------------------------------- catalogue */
.mkt-body { padding: 44px 0 80px; }
.mkt-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }

.mkt-side { position: sticky; top: 100px; }
.mkt-side h4 {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8299ab;
  font-weight: 800; margin: 0 0 12px;
}
.mkt-side [data-mkt-groups] { display: grid; gap: 6px; }
.mkt-side .mkt-chip {
  width: 100%; justify-content: space-between; height: 38px; border-radius: 9px;
  padding: 0 12px; font-size: 12.8px; text-align: left;
}
.mkt-side .mkt-chip i { margin-left: auto; }
.mkt-side section + section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.mkt-radio { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 14px; cursor: pointer; color: var(--ink); }
.mkt-radio input { accent-color: #2f9be0; width: 15px; height: 15px; }
.mkt-range-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 8px; }
.mkt-range-head b { color: var(--ink); }
.mkt-side input[type="range"] { width: 100%; accent-color: #2f9be0; }
.mkt-side .mkt-note { font-size: 11.5px; line-height: 1.6; color: #7b8fa1; margin: 12px 0 0; }

/* quote list panel */
.mkt-quote-panel {
  margin-top: 28px; padding: 18px 18px 16px; border-radius: 14px;
  background: linear-gradient(160deg, #f7fbfd, #eef5fa); border: 1px solid #dbe8f1;
}
.mkt-quote-panel h4 { color: #0a5ea8; }
.mq-empty { margin: 0; font-size: 12.5px; line-height: 1.6; color: #5b7385; }
.mq-panel-lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.mq-panel-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink); }
.mq-panel-lines b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mq-panel-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-top: 1px solid #d5e4ee; padding-top: 11px; font-size: 11.5px; color: #5b7385;
}
.mq-panel-total b { font-size: 16px; color: #0b1e2f; letter-spacing: -0.02em; }
.mq-panel-note { margin: 10px 0 0; font-size: 11px; line-height: 1.55; color: #7b8fa1; }
.mkt-panel-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px;
  margin-top: 14px; border: 0; cursor: pointer;
  border-radius: 9px; background: linear-gradient(180deg, #37a7ea, #2f9be0); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; text-decoration: none;
}
.mkt-panel-cta:disabled { opacity: .55; cursor: not-allowed; }
.mkt-quote-panel .mkt-panel-cta:hover { filter: brightness(1.06); }

/* toolbar */
.mkt-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.mkt-count { font-size: 13.5px; color: #6c8194; }
.mkt-count b { color: var(--ink); font-size: 15px; letter-spacing: -0.01em; }
.mkt-sort { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #6c8194; }
.mkt-sort select {
  height: 40px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  padding: 0 12px; font-family: inherit; font-size: 13.5px; color: var(--ink); font-weight: 600;
}
.mkt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.mkt-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: #35566e; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mkt-chip i {
  font-style: normal; font-size: 11px; font-weight: 800; color: #8299ab;
  background: #f0f5f9; border-radius: 999px; padding: 1px 7px;
}
.mkt-chip:hover { border-color: #bcd3e2; color: #0a5ea8; }
.mkt-chip.is-on { background: #062d49; border-color: #062d49; color: #fff; }
.mkt-chip.is-on i { background: rgba(255,255,255,.16); color: #cfe3ee; }

/* grid */
.mkt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mkt-tile {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mkt-tile:hover { transform: translateY(-3px); box-shadow: 0 26px 52px -34px rgba(6,45,73,.45); border-color: #cbdde9; }
.mkt-tile.is-featured::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #2f9be0, rgba(47,155,224,0));
}
.mkt-tile-open { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; }
.mkt-tile-open:focus-visible { outline: 2px solid #2f9be0; outline-offset: 3px; border-radius: 16px; }
.mkt-tile-top { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.mkt-tile-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; color: #fff; flex: 0 0 auto;
  background: linear-gradient(145deg, var(--tone, #2f9be0), color-mix(in srgb, var(--tone, #2f9be0) 62%, #062d49));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.mkt-tile-kind {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: #8299ab;
  line-height: 1.3;
}
.mkt-tile h3 { font-size: 16.5px; font-weight: 800; }
.mkt-tile p { margin: 8px 0 0; font-size: 13.8px; line-height: 1.6; color: var(--body); }
.mkt-tile-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft);
  position: relative; z-index: 2;
}
.mkt-tile-price { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.mkt-tile-price small { display: block; font-size: 11px; font-weight: 600; color: #8299ab; letter-spacing: 0; margin-top: 2px; }
.mkt-tile-add {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid #cfe0ec; background: #fff;
  color: #0a5ea8; font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mkt-tile-add:hover { background: #eaf4fc; border-color: #9ecdec; }
.mkt-tile-add[aria-pressed="true"] { background: #008a45; border-color: #008a45; color: #fff; }
.mkt-none { grid-column: 1 / -1; padding: 40px 0; font-size: 15px; color: var(--body); }
.mkt-none a { color: #0a5ea8; font-weight: 700; }

/* ---------------------------------------------------------------- sections below */
.mkt-sec { padding: 72px 0; background: var(--wash); border-top: 1px solid var(--line-soft); }
.mkt-sec--white { background: #fff; }
.mkt-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; font-weight: 800; color: #0a5ea8; margin-bottom: 16px;
}
.mkt-eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .5; }
.mkt-h2 { font-size: clamp(25px, 2.8vw, 36px); line-height: 1.14; font-weight: 800; }
.mkt-intro { max-width: 62ch; margin-top: 14px; font-size: 15.6px; line-height: 1.72; }

.mkt-bundles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.mkt-bundle {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px 24px;
  display: flex; flex-direction: column;
}
.mkt-bundle-k { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; color: #0a5ea8; }
.mkt-bundle h3 { font-size: 19px; font-weight: 800; margin: 11px 0 8px; }
.mkt-bundle p { margin: 0; font-size: 14.2px; line-height: 1.66; }
.mkt-bundle ul { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 9px; }
.mkt-bundle li { position: relative; padding-left: 22px; font-size: 13.8px; line-height: 1.5; color: var(--ink); }
.mkt-bundle li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #008a45; font-weight: 800; font-size: 12px;
}
.mkt-bundle-foot {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mkt-bundle-foot b { font-size: 17px; color: var(--ink); letter-spacing: -0.02em; }
.mkt-bundle-foot span { display: block; font-size: 11px; color: #8299ab; font-weight: 600; margin-top: 2px; }
.mkt-bundle .uv-btn { height: 42px; font-size: 13px; }

.mkt-terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.mkt-term { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px; }
.mkt-term h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; }
.mkt-term p { margin: 0; font-size: 14px; line-height: 1.66; }

/* ---------------------------------------------------------------- drawer */
.mkt-drawer { position: fixed; inset: 0; z-index: 90; background: rgba(4,24,38,.5); backdrop-filter: blur(3px); }
.mkt-drawer[hidden] { display: none; }
.mkt-drawer-inner {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 92vw);
  background: #fff; padding: 40px 40px 32px; overflow-y: auto;
  box-shadow: -30px 0 80px -30px rgba(3,24,38,.5);
  animation: mkt-slide .22s ease both;
}
@keyframes mkt-slide { from { transform: translateX(28px); opacity: .6 } to { transform: none; opacity: 1 } }
.mkt-drawer-x {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: #4d6376; font-size: 20px; line-height: 1;
  cursor: pointer;
}
.mkt-drawer-x:hover { background: #f2f7fa; }
.mkt-drawer-k {
  display: inline-block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 800; color: var(--tone, #0a5ea8);
  background: color-mix(in srgb, var(--tone, #0a5ea8) 12%, #fff);
  border-radius: 999px; padding: 5px 11px;
}
.mkt-drawer-inner h2 { font-size: 26px; font-weight: 800; margin: 16px 0 0; letter-spacing: -0.03em; }
.mkt-drawer-blurb { margin: 12px 0 0; font-size: 15px; line-height: 1.7; }
.mkt-drawer-price { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 0; }
.mkt-drawer-price b { font-size: 24px; letter-spacing: -0.03em; color: var(--ink); }
.mkt-drawer-price span { font-size: 12.5px; color: #8299ab; font-weight: 600; }
.mkt-drawer-list {
  list-style: none; margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
}
.mkt-drawer-list li { position: relative; padding-left: 20px; font-size: 13.8px; line-height: 1.5; color: var(--ink); }
.mkt-drawer-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 2px;
  background: #2f9be0;
}
.mkt-drawer-meta { margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 14px; }
.mkt-drawer-meta div { display: grid; grid-template-columns: 104px 1fr; gap: 14px; }
.mkt-drawer-meta dt { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: #8299ab; padding-top: 2px; }
.mkt-drawer-meta dd { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink); }
.mkt-drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.mkt-drawer-actions .uv-btn { height: 46px; font-size: 13.5px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .mkt-grid { grid-template-columns: repeat(2, 1fr); }
  .mkt-bundles, .mkt-terms { grid-template-columns: 1fr 1fr; }
  .mkt-cats { grid-template-columns: repeat(3, 1fr); }
  .mkt-cat:nth-child(3n) { border-right: 0; }
}
@media (max-width: 980px) {
  .mkt-layout { grid-template-columns: 1fr; gap: 24px; }
  .mkt-side { position: static; }
  .mkt-trust { grid-template-columns: 1fr 1fr; }
  .mkt-searchbar { grid-template-columns: 1fr; }
  .mkt-searchbar .mkt-search-go { width: 100%; }
}
@media (max-width: 700px) {
  .mkt-wrap { padding: 0 20px; }
  .mkt-hero-in { padding-top: 40px; }
  .mkt-hero h1 { font-size: clamp(27px, 7.6vw, 34px); }
  .mkt-cats { grid-template-columns: 1fr 1fr; }
  .mkt-cat { padding: 16px 14px 18px; }
  .mkt-cat:nth-child(2n) { border-right: 0; }
  .mkt-trust { grid-template-columns: 1fr; }
  .mkt-grid, .mkt-bundles, .mkt-terms { grid-template-columns: 1fr; }
  .mkt-body { padding: 32px 0 60px; }
  .mkt-sec { padding: 52px 0; }
  .mkt-drawer-inner { width: 100%; padding: 34px 22px 28px; }
  .mkt-drawer-list { grid-template-columns: 1fr; }
  .mkt-drawer-meta div { grid-template-columns: 1fr; gap: 4px; }
  .mkt-toolbar { gap: 10px; }
}

/* measured header height, set from JS, so the sticky rail and the drawer clear it */
.mkt-side { top: calc(var(--ud-header, 100px) + 16px); }
.mkt-drawer-inner { padding-top: calc(var(--ud-header, 100px) + 26px); }
@media (max-width: 980px) { .mkt-side { top: auto; } }

/* the CTA card is dark, so its typography must be light regardless of section scope */
.mkt-cta-band .uv-cta-card h2,
.marketplace-cta h2 { color: #fff !important; }
.mkt-cta-band .uv-cta-card p { color: #aecadd !important; }
.mkt-cta-band .uv-cta-card .uv-eyebrow { color: #9fe6c4 !important; }
