/* Marketplace catalogue */

.dz-marketplace-catalogue {
  --mc-red: #e30613;
  --mc-ink: #111113;
  --mc-text: #2c2c30;
  --mc-muted: #6b6b78;
  --mc-faint: #a0a0ad;
  --mc-bg: #ffffff;
  --mc-surface: #f3f3f6;
  --mc-border: rgba(0,0,0,.08);
  --mc-border-hover: rgba(0,0,0,.16);
  --mc-radius: 16px;
  --mc-shadow: 0 2px 8px rgba(0,0,0,.04);
  --mc-shadow-hover: 0 16px 44px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --mc-font: 'Inter', system-ui, -apple-system, sans-serif;
  --mc-font-display: 'Plus Jakarta Sans', var(--mc-font);
  --mc-filter-width: 300px;

  width: 100%;
  padding: clamp(4rem, 7vw, 7rem) clamp(1.25rem, 5vw, 5rem) clamp(5rem, 8vw, 8rem);
  background: #f8f8fa;
  color: var(--mc-ink);
  overflow: clip;
  -webkit-font-smoothing: antialiased;
}

.dz-marketplace-catalogue *, .dz-marketplace-catalogue *::before, .dz-marketplace-catalogue *::after { box-sizing: border-box; }
.dz-marketplace-catalogue [hidden] { display: none !important; }

.dz-mc__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* container */
.dz-mc__container { width: 100%; max-width: 1280px; margin-inline: auto; }

/* header */
.dz-mc__header { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

.dz-mc__title {
  max-width: 760px;
  margin: 0;
  font-family: var(--mc-font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 800;
  line-height: .97;
  letter-spacing: -.04em;
  color: var(--mc-ink);
}

.dz-mc__title span { color: var(--mc-red); }

.dz-mc__intro {
  max-width: 520px;
  margin: 1.2rem 0 0;
  font-family: var(--mc-font);
  font-size: .9rem;
  line-height: 1.65;
  color: var(--mc-muted);
}

/* toolbar : search left, filter flush right (aligned with 2nd card column) */
.dz-mc__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 1.75rem;
}

/* search */
.dz-mc__search-form { flex: 1 1 auto; width: 100%; max-width: 460px; min-width: 0; }

.dz-mc__search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--mc-border);
  border-radius: 12px;
  background: var(--mc-bg);
  box-shadow: var(--mc-shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.dz-mc__search:hover { border-color: var(--mc-border-hover); }

.dz-mc__search:focus-within {
  border-color: var(--mc-ink);
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}

.dz-mc__search-icon {
  width: 18px; height: 18px;
  margin-left: 16px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  color: var(--mc-faint);
  flex: 0 0 auto;
}

.dz-mc__search-input {
  width: 100%; height: 100%;
  padding: 0 48px 0 12px;
  border: 0; outline: 0; background: transparent;
  font-family: var(--mc-font);
  font-size: .87rem;
  color: var(--mc-ink);
}
.dz-mc__search-input::placeholder { color: var(--mc-faint); }

.dz-mc__search-clear {
  position: absolute; right: 12px;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  padding: 0; border: 0; border-radius: 6px;
  background: var(--mc-surface);
  color: var(--mc-muted);
  cursor: pointer;
  transition: background .15s ease;
}
.dz-mc__search-clear:hover { background: #e8e8ec; }
.dz-mc__search-clear svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* reset (sits next to the search, left side) */
.dz-mc__reset {
  display: inline-flex; align-items: center; gap: 5px;
  flex: 0 0 auto;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  background: var(--mc-bg);
  font-family: var(--mc-font);
  font-size: .75rem; font-weight: 600;
  color: var(--mc-muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.dz-mc__reset svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dz-mc__reset:hover { border-color: var(--mc-red); color: var(--mc-red); }
.dz-mc__reset:focus-visible { outline: 2px solid var(--mc-red); outline-offset: 2px; }

/* filter : fixed width, pushed to the right edge */
.dz-mc__filter {
  position: relative;
  flex: 0 0 var(--mc-filter-width);
  width: var(--mc-filter-width);
  margin-left: auto;
}

.dz-mc__filter-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 52px; padding: 0 18px;
  border: 1.5px solid var(--mc-border);
  border-radius: 12px;
  background: var(--mc-bg);
  box-shadow: var(--mc-shadow);
  font-family: var(--mc-font);
  font-size: .87rem; font-weight: 700;
  text-align: left;
  color: var(--mc-ink);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, border-radius .15s ease;
}
.dz-mc__filter-btn:hover { border-color: var(--mc-border-hover); }
.dz-mc__filter-btn:focus-visible { outline: 2px solid var(--mc-red); outline-offset: 2px; }
.dz-mc__filter-btn[aria-expanded="true"] { border-color: var(--mc-ink); }

.dz-mc__filter-btn.is-active { border-color: var(--mc-ink); background: var(--mc-ink); color: #fff; }

.dz-mc__filter-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.dz-mc__filter-label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dz-mc__filter-caret { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.dz-mc__filter-btn[aria-expanded="true"] .dz-mc__filter-caret { transform: rotate(180deg); }

/* panel : same width as the button, same right edge */
.dz-mc__filter-panel {
  position: absolute; z-index: 10;
  top: calc(100% + 8px); left: 0; right: 0;
  max-height: min(60vh, 360px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  background: var(--mc-bg);
  box-shadow: 0 16px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.05);
  animation: dz-mc-panel .16s ease both;
}
@keyframes dz-mc-panel { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.dz-mc__filter-option { display: block; position: relative; }

.dz-mc__filter-radio { position: absolute; width: 1px; height: 1px; opacity: 0; }

.dz-mc__filter-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px 0 14px;
  border-radius: 8px;
  font-family: var(--mc-font);
  font-size: .85rem; font-weight: 600;
  color: var(--mc-text);
  cursor: pointer;
  transition: background .15s ease;
}
.dz-mc__filter-row:hover { background: var(--mc-surface); }

.dz-mc__filter-text { flex: 1; min-width: 0; }



.dz-mc__filter-check {
  width: 14px; height: 14px; flex: 0 0 auto;
  fill: none; stroke: var(--mc-red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
}

.dz-mc__filter-radio:checked + .dz-mc__filter-row { background: var(--mc-surface); color: var(--mc-ink); font-weight: 700; }

.dz-mc__filter-radio:checked + .dz-mc__filter-row .dz-mc__filter-check { opacity: 1; }
.dz-mc__filter-radio:focus-visible + .dz-mc__filter-row { outline: 2px solid var(--mc-red); outline-offset: -2px; }

/* grid : 2 colonnes */
.dz-mc__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 0; padding: 0;
  list-style: none;
}

.dz-mc__item { display: flex; min-width: 0; }

/* card */
.dz-mc__card {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%;
  padding: 26px;
  border: 1.5px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: var(--mc-bg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

@media (hover:hover) {
  .dz-mc__card:hover {
    border-color: rgba(0,0,0,.12);
    box-shadow: var(--mc-shadow-hover);
    transform: translateY(-3px);
  }
  .dz-mc__card:hover .dz-mc__cta { color: var(--mc-red); }
  .dz-mc__card:hover .dz-mc__cta span::after { width: 100%; }
  .dz-mc__card:hover .dz-mc__cta svg { transform: translateX(3px); }
}

.dz-mc__body {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.dz-mc__brand {
  display: grid; place-items: center;
  width: 64px; height: 64px; flex: 0 0 64px;
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  background: var(--mc-bg);
  overflow: hidden;
}
.dz-mc__brand img { display: block; width: 100%; height: 100%; padding: 6px; object-fit: contain; }

.dz-mc__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.dz-mc__name {
  margin: 0;
  font-family: var(--mc-font-display);
  font-size: 1.2rem; font-weight: 800;
  line-height: 1.2; letter-spacing: -.02em;
  color: var(--mc-ink);
}

.dz-mc__positioning {
  margin: .35rem 0 0;
  font-family: var(--mc-font);
  font-size: .83rem; font-weight: 600; line-height: 1.4;
  color: var(--mc-text);
}

.dz-mc__description {
  display: -webkit-box;
  margin: .5rem 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-family: var(--mc-font);
  font-size: .8rem; line-height: 1.55;
  color: var(--mc-muted);
}

/* card footer */
.dz-mc__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--mc-border);
}

.dz-mc__provider { display: flex; flex-direction: column; gap: 2px; font-family: var(--mc-font); min-width: 0; }
.dz-mc__provider span { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mc-faint); }
.dz-mc__provider strong { font-size: .8rem; font-weight: 700; color: var(--mc-text); }

.dz-mc__cta {
  position: static;
  display: inline-flex; align-items: center; gap: .35rem;
  flex: 0 0 auto;
  padding: 6px 0;
  font-family: var(--mc-font);
  font-size: .8rem; font-weight: 700;
  color: var(--mc-ink);
  text-decoration: none;
  transition: color .2s ease;
}

.dz-mc__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.dz-mc__cta span { position: relative; }

.dz-mc__cta span::after {
  content: "";
  position: absolute; left: 0; bottom: 1px;
  width: 0; height: 1.5px;
  background: var(--mc-red);
  transition: width .2s ease;
}

.dz-mc__cta svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s ease;
}

/* empty state */
.dz-mc__empty {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
  border: 1.5px dashed rgba(0,0,0,.12);
  border-radius: var(--mc-radius);
  background: var(--mc-bg);
  text-align: center;
}

.dz-mc__empty-mark {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--mc-surface);
}
.dz-mc__empty-mark svg { width: 24px; height: 24px; color: var(--mc-faint); }

.dz-mc__empty-title { margin: 0; font-family: var(--mc-font-display); font-size: 1.15rem; font-weight: 800; }

.dz-mc__empty-text {
  max-width: 360px;
  margin: .5rem 0 1.5rem;
  font-family: var(--mc-font);
  font-size: .82rem; line-height: 1.55;
  color: var(--mc-muted);
}

.dz-mc__empty-button {
  min-height: 40px; padding: 0 18px;
  border: 0; border-radius: 8px;
  background: var(--mc-ink);
  font-family: var(--mc-font);
  font-size: .78rem; font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.dz-mc__empty-button:hover { background: var(--mc-red); }

/* pagination */
.dz-mc__pagination { display: flex; justify-content: center; margin-top: 2.5rem; }

.dz-mc__load-more {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 44px; padding: 0 22px;
  border: 1.5px solid var(--mc-border);
  border-radius: 10px;
  background: var(--mc-bg);
  font-family: var(--mc-font);
  font-size: .8rem; font-weight: 700;
  color: var(--mc-ink);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dz-mc__load-more:hover { background: var(--mc-ink); border-color: var(--mc-ink); color: #fff; }
.dz-mc__load-more svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dz-mc__sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* responsive */
@media (max-width: 1100px) {
  .dz-marketplace-catalogue { --mc-filter-width: 260px; }
}

@media (max-width: 820px) {
  .dz-marketplace-catalogue { padding-inline: 20px; }
  .dz-mc__grid { grid-template-columns: 1fr; gap: 16px; }

  /* search full width, then filter full width, reset after */
  .dz-mc__toolbar { flex-wrap: wrap; }
  .dz-mc__search-form { order: 1; flex: 1 1 100%; max-width: none; }
  .dz-mc__filter { order: 2; flex: 1 1 0; width: auto; min-width: 0; margin-left: 0; }
  .dz-mc__reset { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .dz-marketplace-catalogue * { transition: none !important; animation: none !important; }
}
