/* Marketplace (marketplace.html / marketplace.js) - product-level catalog
   across every approved exporter, with a "Negotiate" sheet that launches
   the RFQ flow. Builds on main.css's tokens; everything here is mk-scoped. */

.mk-main { max-width: 1440px; }
/* Several mk elements set their own display, which would otherwise beat the [hidden] attribute. */
.mk-main [hidden] { display: none !important; }

.mk-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px;
}

/* ---------- Hero ---------- */
.mk-hero {
  position: relative; overflow: hidden;
  border-radius: 16px;
  padding: 40px 44px 32px;
  background:
    radial-gradient(1200px 300px at 100% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(120deg, #f15a2c 0%, #ff7a3d 55%, #ffb35c 100%);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(241, 90, 44, 0.55);
}
.mk-hero::after {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px;
  border-radius: 50%; border: 48px solid rgba(255, 255, 255, 0.09); pointer-events: none;
}
.mk-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.mk-hero .mk-eyebrow { color: rgba(255, 255, 255, 0.85); }
.mk-hero h1 { margin: 0 0 10px; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.15; letter-spacing: -0.01em; }
.mk-hero-sub { margin: 0 0 24px; font-size: 15px; color: rgba(255, 255, 255, 0.9); max-width: 620px; }

.mk-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 6px 6px 6px 16px;
  box-shadow: 0 8px 24px -10px rgba(16, 24, 40, 0.35);
}
.mk-search > svg { width: 20px; height: 20px; color: var(--text-faint); flex-shrink: 0; }
.mk-search input {
  flex: 1; min-width: 0; border: none; background: transparent; padding: 12px 4px; font-size: 15px;
}
.mk-search input:focus { outline: none; box-shadow: none; }
.mk-search .btn-primary { padding: 12px 26px; border-radius: 8px; }

.mk-trust {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; font-weight: 600;
}
.mk-trust li { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, 0.95); }
.mk-trust svg { width: 16px; height: 16px; }

/* ---------- Category rail ---------- */
.mk-cats {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 20px 0 24px; padding: 2px 2px 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
          mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.mk-cats::-webkit-scrollbar { display: none; }
.mk-cat {
  flex-shrink: 0; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mk-cat:hover { border-color: var(--accent); color: var(--accent); }
.mk-cat.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Layout ---------- */
.mk-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }

/* ---------- Filters ---------- */
.mk-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; box-shadow: var(--shadow-card);
}
.mk-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mk-filters-head h2 { margin: 0; font-size: 15px; }
.mk-filters-close { display: none; }
.mk-filter-group { padding-top: 18px; min-width: 0; }
.mk-filter-group + .mk-filter-group { border-top: 1px solid var(--border); margin-top: 18px; }
.mk-filter-group > label:not(.mk-radio), .mk-filter-title {
  display: block; padding: 0; margin: 0 0 10px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted);
}
.mk-filter-group input[type="number"], .mk-filter-group select { padding: 10px 12px; }
.mk-hint { margin: 6px 0 0; font-size: 12px; color: var(--text-faint); }

.mk-radio {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 0;
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; text-transform: none; letter-spacing: 0;
}
.mk-radio input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.mk-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-seg button {
  padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg);
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer;
}
.mk-seg button:hover { color: var(--text); border-color: var(--text-faint); }
.mk-seg button.active { background: rgba(241, 90, 44, 0.1); border-color: var(--accent); color: var(--accent); }

.mk-filter-cta {
  margin-top: 22px; padding: 16px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(241, 90, 44, 0.08), rgba(255, 179, 92, 0.12));
  text-align: center;
}
.mk-filter-cta p { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.mk-filter-cta .btn-secondary { width: 100%; background: var(--surface); font-size: 13px; padding: 9px 12px; }
.mk-filter-cta .btn-secondary:hover { text-decoration: none; }

.mk-link {
  background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent); cursor: pointer;
}
.mk-link:hover { text-decoration: underline; }
.mk-icon-btn {
  background: none; border: none; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 2px 6px;
}
.mk-filters-scrim { display: none; }

/* ---------- Sponsored slots (css/ads.css styles the banners themselves) ---------- */
.mk-ad-slot--top { margin: -8px 0 24px; }
.mk-ad-slot--side { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Toolbar ---------- */
.mk-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-bottom: 12px;
}
.mk-toolbar-left, .mk-toolbar-right { display: flex; align-items: center; gap: 12px; }
.mk-result-count { margin: 0; font-size: 14px; color: var(--text-muted); }
.mk-result-count strong { color: var(--text); }
.mk-sort-label { margin: 0; font-size: 13px; white-space: nowrap; }
.mk-toolbar select { width: auto; padding: 9px 34px 9px 12px; background-color: var(--surface); }
.mk-filters-toggle { display: none; padding: 9px 14px; }
.mk-filters-toggle svg { width: 16px; height: 16px; }
.mk-count-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px;
}

.mk-view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.mk-view-toggle button {
  display: grid; place-items: center; width: 38px; height: 36px; border: none; background: transparent;
  color: var(--text-faint); cursor: pointer;
}
.mk-view-toggle button + button { border-left: 1px solid var(--border); }
.mk-view-toggle button.active { color: var(--accent); background: rgba(241, 90, 44, 0.08); }
.mk-view-toggle svg { width: 16px; height: 16px; }

.mk-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.mk-active-filters:empty { display: none; }
.mk-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text); cursor: pointer;
}
.mk-pill span { font-size: 15px; line-height: 1; color: var(--text-faint); }
.mk-pill:hover { border-color: var(--accent); }
.mk-pill:hover span { color: var(--accent); }

/* ---------- Product grid ---------- */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }

.mk-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: mk-fade-in 0.3s ease both;
}
.mk-card:hover {
  transform: translateY(-3px); border-color: transparent;
  box-shadow: 0 14px 32px -12px rgba(16, 24, 40, 0.22), 0 0 0 1px rgba(16, 24, 40, 0.04);
}
@keyframes mk-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mk-card-media {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: none; cursor: pointer;
  background: linear-gradient(145deg, #f3f5f9, #e9edf3); overflow: hidden;
}
.mk-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.mk-card:hover .mk-card-media img { transform: scale(1.04); }
.mk-card-media .mk-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #b5bdcc; }
.mk-card-media .mk-placeholder svg { width: 44%; height: 44%; }
.mk-card-tag {
  position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px);
  font-size: 11px; font-weight: 700; color: var(--text); max-width: calc(100% - 20px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mk-card-quick {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px; border-radius: 8px;
  background: rgba(16, 24, 40, 0.78); color: #fff; font-size: 12.5px; font-weight: 600; text-align: center;
  opacity: 0; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s;
}
.mk-card:hover .mk-card-quick, .mk-card-media:focus-visible .mk-card-quick { opacity: 1; transform: none; }

.mk-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 16px; flex: 1; }
.mk-card-title {
  margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
  background: none; border: none; padding: 0; text-align: left; font-family: inherit; cursor: pointer;
}
.mk-card-title:hover { color: var(--accent); }

.mk-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.mk-price-from { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.mk-price-amount { font-size: 19px; font-weight: 750; color: var(--text); letter-spacing: -0.01em; }
.mk-price-unit { font-size: 12.5px; color: var(--text-muted); }
.mk-price-negotiable {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--accent);
}
.mk-price-negotiable svg { width: 15px; height: 15px; }

.mk-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mk-specs li {
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px;
}
.mk-specs li strong { color: var(--text); font-weight: 700; }

.mk-supplier {
  display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12.5px; min-width: 0;
}
.mk-flag { font-size: 16px; line-height: 1; flex-shrink: 0; }
.mk-supplier a { color: var(--text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-supplier a:hover { color: var(--accent); text-decoration: none; }
.mk-verified {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; margin-left: auto;
  font-size: 11px; font-weight: 700; color: var(--success);
}
.mk-verified svg { width: 13px; height: 13px; }

.mk-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.mk-card-actions .btn-primary { flex: 1; padding: 10px 12px; border-radius: 8px; }
.mk-card-actions .btn-primary svg { width: 15px; height: 15px; }
.mk-card-actions .btn-secondary { padding: 10px; border-radius: 8px; }
.mk-card-actions .btn-secondary svg { width: 16px; height: 16px; }
.mk-card-actions a:hover { text-decoration: none; }
/* Priced listing, importer viewing: Buy now on its own row, Negotiate + message below. */
.mk-card-actions--buy { flex-wrap: wrap; }
.mk-card-actions--buy .mk-buy { flex: 1 1 100%; }
.mk-card-actions--buy .mk-negotiate-secondary { flex: 1; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; }
.mk-card-actions--buy .mk-negotiate-secondary svg { width: 15px; height: 15px; }
.mk-buy { background: #12233d; }
.mk-buy:hover { background: #0b1628; }
.mk-buy svg { width: 16px; height: 16px; }

/* List view */
.mk-grid.is-list { grid-template-columns: 1fr; gap: 12px; }
.mk-grid.is-list .mk-card { flex-direction: row; }
.mk-grid.is-list .mk-card-media { width: 200px; flex-shrink: 0; aspect-ratio: auto; min-height: 180px; }
.mk-grid.is-list .mk-card-body { padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 8px 24px; }
.mk-grid.is-list .mk-card-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mk-grid.is-list .mk-card-side { display: flex; flex-direction: column; gap: 10px; justify-content: center; border-left: 1px solid var(--border); padding-left: 20px; }
.mk-grid.is-list .mk-card-title { min-height: 0; font-size: 16px; }
.mk-grid.is-list .mk-card-desc { display: -webkit-box; }
.mk-grid.is-list .mk-supplier { border-top: none; padding-top: 0; margin-top: 0; }
.mk-card-main, .mk-card-side { display: contents; }
/* Grid view flattens main/side into one column - price sits right under the title. */
.mk-card-title { order: 1; }
.mk-card-desc { order: 2; }
.mk-card-side .mk-price { order: 3; }
.mk-specs { order: 4; }
.mk-supplier { order: 5; }
.mk-card-actions { order: 6; }
.mk-card-desc {
  display: none; margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Skeletons */
.mk-skel { pointer-events: none; animation: none; }
.mk-skel .mk-card-media, .mk-skel-line {
  background: linear-gradient(90deg, #eef1f6 0%, #f7f9fc 50%, #eef1f6 100%);
  background-size: 200% 100%; animation: mk-shimmer 1.2s linear infinite;
}
.mk-skel-line { height: 12px; border-radius: 6px; }
@keyframes mk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Empty / more */
.mk-empty {
  text-align: center; padding: 56px 24px; background: var(--surface);
  border: 1px dashed var(--border); border-radius: 12px;
}
.mk-empty > svg { width: 56px; height: 56px; color: var(--text-faint); }
.mk-empty h3 { margin: 12px 0 6px; font-size: 17px; }
.mk-empty p { margin: 0 auto 20px; max-width: 420px; color: var(--text-muted); font-size: 14px; }
.mk-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.mk-empty-actions a:hover { text-decoration: none; }
.mk-more { display: flex; justify-content: center; margin-top: 28px; }
#mk-sentinel { height: 1px; }

/* ---------- Quick view ---------- */
.mk-quickview { width: min(980px, calc(100vw - 32px)); padding: 0; border-radius: 16px; border: none; position: relative; }
.mk-dialog-close { position: absolute; top: 10px; right: 12px; z-index: 2; background: rgba(255, 255, 255, 0.9); border-radius: 50%; width: 36px; height: 36px; padding: 0; }
.mk-qv-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mk-qv-gallery { background: #f3f5f9; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.mk-qv-hero { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: linear-gradient(145deg, #eef1f6, #e2e7ef); display: grid; place-items: center; color: #b5bdcc; }
.mk-qv-hero img { width: 100%; height: 100%; object-fit: contain; } /* the whole original photo */
.mk-qv-hero svg { width: 40%; height: 40%; }
.mk-qv-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.mk-qv-thumbs button { flex-shrink: 0; width: 60px; height: 60px; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #fff; }
.mk-qv-thumbs button.active { border-color: var(--accent); }
.mk-qv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.mk-qv-info { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mk-qv-info h2 { margin: 0; font-size: 22px; line-height: 1.25; padding-right: 32px; }
.mk-qv-info .mk-price-amount { font-size: 26px; }
.mk-qv-desc { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.mk-qv-specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; padding: 14px 16px; background: var(--bg); border-radius: 10px; }
.mk-qv-specs dt { color: var(--text-muted); }
.mk-qv-specs dd { margin: 0; font-weight: 600; }
.mk-qv-supplier { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.mk-avatar {
  flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #f15a2c, #ffb35c); color: #fff; font-weight: 800; font-size: 15px;
}
.mk-qv-supplier-name { font-weight: 700; font-size: 14px; }
.mk-qv-supplier-meta { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-qv-supplier > a { margin-left: auto; font-size: 13px; font-weight: 600; white-space: nowrap; }
.mk-qv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.mk-qv-actions .btn-primary { flex: 1 1 100%; padding: 13px 18px; font-size: 15px; }
.mk-qv-actions .btn-secondary { flex: 1 1 140px; }
.mk-qv-actions a:hover { text-decoration: none; }
.mk-qv-actions svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- Negotiate sheet ---------- */
.mk-sheet {
  margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(560px, 100vw); max-width: 100vw;
  padding: 0; border: none; background: var(--surface); color: var(--text);
  box-shadow: -20px 0 50px -20px rgba(16, 24, 40, 0.35);
}
.mk-sheet[open] { animation: mk-slide-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.mk-sheet::backdrop { background: rgba(16, 24, 40, 0.5); backdrop-filter: blur(2px); }
@keyframes mk-slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.mk-sheet-inner { display: flex; flex-direction: column; height: 100%; }
.mk-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.mk-sheet-head h2 { margin: 0; font-size: 20px; }
.mk-sheet-scroll { flex: 1; overflow-y: auto; padding: 20px 24px 28px; }
.mk-sheet-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px;
  border-top: 1px solid var(--border); background: var(--bg-elevated);
}
.mk-sheet-foot .btn-primary svg { width: 16px; height: 16px; }

.mk-ng-product { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 20px; }
.mk-ng-thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: linear-gradient(145deg, #eef1f6, #e2e7ef); display: grid; place-items: center; color: #b5bdcc; }
.mk-ng-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mk-ng-thumb svg { width: 50%; height: 50%; }
.mk-ng-product-name { font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.mk-ng-product-meta { font-size: 12.5px; color: var(--text-muted); margin: 0; }

.mk-ng-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.mk-ng-grid label { margin: 0 0 7px; }
.mk-ng-grid input, .mk-ng-grid select, .mk-ng-grid textarea { padding: 11px 13px; }
.mk-ng-span2 { grid-column: 1 / -1; }
.mk-ng-qty { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.mk-ng-moq { margin: -6px 0 0; font-size: 12.5px; color: var(--text-muted); }
.mk-ng-moq.is-warn { color: var(--warning); font-weight: 600; }
.mk-req { color: var(--accent); }
.mk-ng-grid .is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }

/* Who should quote: only this supplier, or broadcast */
.mk-ng-audience { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.mk-ng-audience-title { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.mk-ng-option {
  display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface);
  font-weight: 400; color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
.mk-ng-option:hover { border-color: var(--text-faint); }
.mk-ng-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(241, 90, 44, 0.12); }
.mk-ng-option input { width: 16px; height: 16px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.mk-ng-option > span { display: flex; flex-direction: column; gap: 2px; }
.mk-ng-option strong { font-size: 14px; }
.mk-ng-option small { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }

.mk-ng-howto { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: rgba(2, 132, 199, 0.06); border: 1px solid rgba(2, 132, 199, 0.18); }
.mk-ng-howto h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #0369a1; }
.mk-ng-howto ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.mk-ng-howto li + li { margin-top: 6px; }
.mk-ng-howto strong { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .mk-layout { grid-template-columns: 1fr; }
  /* The filter panel becomes a drawer; the sidebar ad stays in the page flow, above the results. */
  .mk-side { display: contents; }
  .mk-filters-toggle { display: inline-flex; }
  .mk-filters {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: min(320px, 88vw);
    border-radius: 0 16px 16px 0; overflow-y: auto; transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .mk-filters.is-open { transform: none; }
  .mk-filters-close { display: inline-block; }
  .mk-filters-head .mk-link { margin-left: auto; margin-right: 8px; }
  .mk-filters-scrim.is-open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(16, 24, 40, 0.45); }
}
@media (max-width: 760px) {
  .mk-hero { padding: 28px 20px 24px; border-radius: 12px; }
  .mk-search .btn-primary { padding: 12px 16px; }
  .mk-qv-body { grid-template-columns: 1fr; }
  .mk-qv-info { padding: 20px; }
  .mk-grid.is-list .mk-card { flex-direction: column; }
  .mk-grid.is-list .mk-card-media { width: 100%; aspect-ratio: 16 / 10; min-height: 0; }
  .mk-grid.is-list .mk-card-body { grid-template-columns: 1fr; }
  .mk-grid.is-list .mk-card-side { border-left: none; padding-left: 0; }
  .mk-sort-label { display: none; }
}
@media (max-width: 560px) {
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mk-card-body { padding: 10px 10px 12px; }
  .mk-card-actions a.btn-secondary { display: none; } /* the message icon; Negotiate stays */
  .mk-price-amount { font-size: 16px; }
  .mk-ng-grid, .mk-ng-qty { grid-template-columns: 1fr; }
  .mk-trust { display: none; }
  .mk-view-toggle { display: none; }
  .mk-toolbar-right { flex: 1; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .mk-card, .mk-sheet[open], .mk-skel .mk-card-media, .mk-skel-line { animation: none; }
  .mk-card:hover { transform: none; }
}

/* ---------- Buy now: pay in full or finance ---------- */
.mk-paychoice { width: min(620px, calc(100vw - 32px)); position: relative; }
.mk-paychoice h2 { margin: 0 0 8px; font-size: 22px; padding-right: 32px; }
.mk-pc-product { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; }
.mk-pc-product strong { color: var(--text); }
.mk-pc-options { display: flex; flex-direction: column; gap: 12px; }
.mk-pc-option {
  display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.mk-pc-option:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(241, 90, 44, 0.12); transform: translateY(-1px); }
.mk-pc-icon { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.mk-pc-icon svg { width: 22px; height: 22px; }
.mk-pc-icon--full { background: #12233d; color: #fff; }
.mk-pc-icon--finance { background: rgba(241, 90, 44, 0.12); color: var(--accent); }
.mk-pc-text { display: flex; flex-direction: column; gap: 4px; }
.mk-pc-text strong { font-size: 16px; }
.mk-pc-text small { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.mk-pc-text em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-top: 2px; }
