/* =========================================================================
   Marketplace — drawn like a store.

   Rebuilt after the owner put two real stores beside the first version
   (2026-09-24): the first was a headline and a grid; a store is layers.
   Top to bottom: a promo strip, the brand-green head with the search box,
   the trust bar, category tabs, then three columns — filters and stats on
   the left, the shelf in the middle, recent / offer / why-us on the right —
   folding to one column on a phone with a sign-in bar fixed to the bottom.

   Two prefixes live here:
     .mk-   the store (includes/market-shelf.php, includes/market-card.php)
     .mkt-  one product and My Purchases (product.php, my-purchases.php)

   Nothing is centred in a narrow measure. The store runs edge to edge and
   the columns share the width; on a phone the grid is flush to both sides
   with a hairline between tiles, exactly as the reference does it.
   ====================================================================== */

.mkt, .mk {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--c-surface-soft);
  color: var(--c-ink);
}

/*
 * clip, not hidden. Both stop a stray wide child scrolling the page, but
 * `hidden` makes this element a scroll container, and a scroll container is
 * what position:sticky sticks to — so the side columns stuck to this box
 * instead of the screen and scrolled away exactly as before. `clip` does the
 * same clipping without becoming one.
 */
.mkt { overflow-x: clip; }

/* The dashboard shell already provides a top bar; inside it the page starts
   under the shell's own chrome and clears the phone tab bar at the bottom. */
.mkt--in { padding-bottom: 96px; }

/*
 * The dashboard shell pads every page's column (34px a side on a laptop,
 * 16px on a phone) and gives own-chrome pages 26px of top room. Both are
 * exactly the space this page must not have, so the marketplace pages
 * (slug 'market') zero them. The bottom padding is kept for the tab bar.
 */
.page--market .dash__content,
.page.is-own-chrome.page--market .dash__content {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}

/* On the open page the sign-in bar sits over the bottom of the screen. */
@media (max-width: 899px) {
  .mk--out, .mkt--out { padding-bottom: 76px; }
}

/* ------------------------------------------------------------- buttons */

.mk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.mk-btn--white { background: #fff; color: var(--c-green); }
.mk-btn--white:hover { background: var(--c-chip); }
.mk-btn--gold { background: var(--c-gold); color: var(--c-heading); }
.mk-btn--gold:hover { background: var(--c-gold-deep); }

/* --------------------------------------------------------------- strip

   Three short claims across the very top, the way the reference opens with
   "Free shipping · Price adjustment · Get the app". */

.mk-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}

.mk-strip__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--c-heading);
  text-decoration: none;
  border-right: 1px solid var(--c-line);
}
.mk-strip__cell:last-child { border-right: 0; }
.mk-strip__cell > svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--c-gold-deep); }
.mk-strip__cell > span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mk-strip__cell strong { font-size: .88rem; font-weight: 800; color: var(--c-green-deep); white-space: nowrap; }
.mk-strip__cell small { font-size: .74rem; color: var(--c-muted); white-space: nowrap; }

@media (max-width: 759px) {
  .mk-strip { display: flex; overflow-x: auto; scrollbar-width: none; }
  .mk-strip::-webkit-scrollbar { display: none; }
  .mk-strip__cell { flex: 0 0 auto; padding: 9px 14px; }
}

/* ---------------------------------------------------------------- head

   The store's own bar: quick links, the search box, and the member's corner. */

.mk-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--c-green);
  color: #fff;
}

.mk-head__links { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.mk-head__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mk-head__links a:hover { background: rgba(255, 255, 255, .14); }
.mk-head__links svg { width: 17px; height: 17px; }

.mk-search {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06);
}
.mk-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .96rem;
  color: var(--c-ink);
}
.mk-search__input::placeholder { color: var(--c-muted); }
.mk-search__input:focus { outline: none; }
.mk-search__go {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  border: 0;
  background: var(--c-forest);
  color: #fff;
  cursor: pointer;
}
.mk-search__go svg { width: 20px; height: 20px; }
.mk-search__go:hover { background: var(--c-forest-deep); }

.mk-head__me { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.mk-head__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mk-head__btn:hover { background: rgba(255, 255, 255, .26); }
.mk-head__btn svg { width: 17px; height: 17px; }
.mk-head__btn--wallet { background: var(--c-gold); color: var(--c-heading); }
.mk-head__btn--wallet:hover { background: var(--c-gold-deep); }

@media (max-width: 899px) {
  .mk-head { gap: 10px; padding: 10px 12px; }
  .mk-head__links { display: none; }
  .mk-search { height: 42px; }
}
@media (max-width: 479px) {
  .mk-head__btn span { display: none; }
  .mk-head__btn { padding: 10px 11px; }
  .mk-head__btn--wallet span { display: inline; }
}

/* --------------------------------------------------------------- trust */

.mk-trust {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  background: var(--c-forest);
  color: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}
.mk-trust::-webkit-scrollbar { display: none; }
.mk-trust__why,
.mk-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 11px 14px;
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
}
.mk-trust__why { font-weight: 800; padding-left: 0; }
.mk-trust__item { border-left: 1px solid rgba(255, 255, 255, .22); }
.mk-trust svg { width: 16px; height: 16px; color: var(--c-gold); }
@media (min-width: 900px) {
  .mk-trust__why { margin-right: auto; }
}

/* ---------------------------------------------------------------- tabs */

.mk-tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.mk-tabs::-webkit-scrollbar { display: none; }
.mk-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: 0 0 auto;
  padding: 13px 10px 11px;
  border-bottom: 3px solid transparent;
  color: var(--c-muted);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mk-tab small { font-size: .72rem; font-weight: 600; color: var(--c-muted-soft); }
.mk-tab:hover { color: var(--c-heading); }
.mk-tab.is-on { color: var(--c-heading); border-bottom-color: var(--c-green); }

/* ---------------------------------------------------------------- body */

.mk-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0 0;
}
@media (min-width: 900px) {
  .mk-body { grid-template-columns: minmax(0, 1fr) 272px; padding: 14px 14px 0; }
}
/*
 * 1280, not 1180. The left column costs the shelf 236px, and at 1180 that
 * dropped it to two cards across — fewer than a 900px screen gets, so the
 * grid got *worse* as the window grew. Three columns only once there is
 * room for four cards beside them.
 */
@media (min-width: 1280px) {
  .mk-body { grid-template-columns: 236px minmax(0, 1fr) 272px; }
}

.mk-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mk-side--l { display: none; }
@media (min-width: 1280px) { .mk-side--l { display: flex; } }
@media (max-width: 899px) { .mk-side--r { padding: 0 10px 8px; } }

/*
 * Both side columns follow the scroll. Without this they run out after a
 * screenful and leave a tall empty gutter beside the grid for the rest of
 * the page — the thing that most made the first version look unfinished.
 * align-self stops the column stretching to the row's full height, which is
 * what position:sticky needs in order to move at all.
 */
@media (min-width: 900px) {
  .mk-side {
    position: sticky;
    top: 12px;
    align-self: start;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .mk-side::-webkit-scrollbar { width: 6px; }
  .mk-side::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 3px; }
}

.mk-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Boxes down either side. */
.mk-box {
  padding: 14px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: var(--c-surface);
}
.mk-box__title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.mk-box__title svg { width: 15px; height: 15px; color: var(--c-green); }
.mk-box--green {
  background: linear-gradient(160deg, var(--c-green) 0%, var(--c-forest) 100%);
  border-color: transparent;
  color: #fff;
}
.mk-box--green .mk-box__title { color: #fff; letter-spacing: 0; text-transform: none; font-size: .98rem; font-weight: 800; }
.mk-box__alt { display: block; margin-top: 10px; font-size: .8rem; color: rgba(255, 255, 255, .85); }
.mk-box--green .mk-btn { width: 100%; }

.mk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mk-list__link {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  color: var(--c-ink);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.mk-list__link:hover { border-color: var(--c-green); }
.mk-list__link.is-on { border-color: var(--c-green); background: var(--c-chip); color: var(--c-chip-ink); }

.mk-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  color: var(--c-muted);
  font-size: .84rem;
  text-decoration: none;
}
.mk-stat strong { font-size: 1rem; font-weight: 800; color: var(--c-green); }

/* -------------------------------------------------------- the headline */

.mk-headline { text-align: center; padding: 6px 12px 0; }
.mk-headline__top {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 800;
  color: var(--c-gold-deep);
}
.mk-headline__top span { color: var(--c-gold); }
.mk-headline__big {
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-heading);
}

/* --------------------------------------------------------------- tiles */

.mk-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 10px;
}
@media (min-width: 900px) { .mk-tiles { padding: 0; } }
.mk-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  color: #fff;
}
.mk-tile > svg { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--c-gold); }
.mk-tile strong { font-size: .95rem; font-weight: 800; }
.mk-tile small { font-size: .76rem; color: rgba(255, 255, 255, .82); }
.mk-tile--a { background: linear-gradient(140deg, #0A5C2E 0%, #004824 100%); }
.mk-tile--b { background: linear-gradient(140deg, #00842A 0%, #006B22 100%); }
.mk-tile--c { background: linear-gradient(140deg, #1B8A3C 0%, #0A5C2E 100%); }
@media (max-width: 599px) {
  .mk-tiles { grid-template-columns: 1fr 1fr; }
  .mk-tile--c { display: none; }
  .mk-tile { padding: 12px 12px; }
  .mk-tile strong { font-size: .86rem; }
  .mk-tile small { font-size: .7rem; }
}

/* --------------------------------------------------------------- chips

   The left column's filters, where there is no left column. */

.mk-chips { display: flex; gap: 8px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.mk-chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .mk-chips { padding: 0; } }
/* They are the left column's filters in chip form, so they go when it comes. */
@media (min-width: 1280px) { .mk-chips { display: none; } }
.mk-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mk-chip.is-on { border-color: var(--c-green); background: var(--c-green); color: #fff; }

/* ------------------------------------------------------ trending row */

.mk-row { padding: 0 10px; }
@media (min-width: 900px) { .mk-row { padding: 0; } }
.mk-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mk-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-left: 10px;
  border-left: 4px solid var(--c-green);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-heading);
}
.mk-row__flame { font-size: 1.05rem; }
.mk-row__all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--c-green);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mk-row__all svg { width: 15px; height: 15px; }
/*
 * The scrollbar is hidden, not styled: a raw grey bar under the row read as
 * a rendering fault rather than an invitation to scroll. The half-cut card
 * at the right edge is the affordance instead, the way a store does it.
 */
.mk-row__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mk-row__track::-webkit-scrollbar { display: none; }
.mk-row__track .mk-card { flex: 0 0 196px; scroll-snap-align: start; }
@media (max-width: 599px) { .mk-row__track .mk-card { flex-basis: 158px; } }

/* --------------------------------------------------------------- shelf */

.mk-shelf__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0 10px;
  margin-bottom: 8px;
}
@media (min-width: 900px) { .mk-shelf__head { padding: 0; } }
.mk-shelf__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding-left: 10px;
  border-left: 4px solid var(--c-gold);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-heading);
}
.mk-shelf__title small { font-size: .8rem; font-weight: 600; color: var(--c-muted); }
.mk-sort { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.mk-sort::-webkit-scrollbar { display: none; }
.mk-sort__opt {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.mk-sort__opt.is-on { border-color: var(--c-heading); background: var(--c-heading); color: #fff; }

.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 10px;
}
/* On a phone the tiles run flush to both edges with a hairline between,
   like the reference's two-up grid. */
@media (max-width: 599px) {
  .mk-grid { grid-template-columns: 1fr 1fr; gap: 3px; background: var(--c-line); }
  .mk-grid .mk-card { border: 0; border-radius: 0; }
}

.mk-empty {
  margin: 0;
  padding: 44px 16px;
  text-align: center;
  color: var(--c-muted);
  background: var(--c-surface);
  border: 1px dashed var(--c-line);
  border-radius: 12px;
}
.mk-empty a { color: var(--c-green); font-weight: 700; }

/* ---------------------------------------------------------------- card */

.mk-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: var(--c-surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mk-card:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(11, 59, 38, .12);
}
.mk-card:focus-visible { outline: 3px solid var(--c-green-bright); outline-offset: -3px; }

.mk-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--c-surface-soft);
  overflow: hidden;
}
.mk-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Stands in for a product with no picture yet. */
.mk-card__none {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--c-muted);
}
.mk-card__none svg { width: 34%; height: 34%; opacity: .45; }

.mk-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  color: #fff;
}
.mk-badge svg { width: 11px; height: 11px; }
.mk-badge--off  { background: var(--c-down); }
.mk-badge--best { background: var(--c-gold); color: var(--c-heading); }
.mk-badge--new  { background: var(--c-green); }
.mk-badge--big  { top: 14px; left: 14px; padding: 8px 12px; font-size: .95rem; border-radius: 8px; }
/* Inline beside a price, not pinned to a corner. */
.mkt-price .mk-badge { position: static; vertical-align: middle; font-size: .78rem; margin-left: 6px; }

.mk-card__play {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  backdrop-filter: blur(3px);
}
.mk-card__play svg { width: 13px; height: 13px; }

.mk-card__kind {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--c-heading);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.mk-card__body { display: flex; flex-direction: column; gap: 5px; padding: 10px 10px 11px; }

.mk-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-ink);
}

.mk-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .74rem;
  color: var(--c-muted);
  white-space: nowrap;
  overflow: hidden;
}
.mk-card__meta > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.mk-card__sold { flex: 0 0 auto; }

.mk-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.mk-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--c-heading);
}
.mk-card__was { font-size: .76rem; font-weight: 500; color: var(--c-muted-soft); }
.mk-card__get { font-size: .84rem; font-weight: 800; color: var(--c-green); }
.mk-card__cart {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--c-heading);
  border-radius: 50%;
  color: var(--c-heading);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mk-card__cart svg { width: 14px; height: 14px; }
.mk-card:hover .mk-card__cart { background: var(--c-green); border-color: var(--c-green); color: #fff; }

/* ----------------------------------------------------- right column */

.mk-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mk-recent__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.mk-recent__item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--c-surface-soft); }
.mk-recent__item > span { display: flex; flex-direction: column; min-width: 0; }
.mk-recent__item strong { font-size: .86rem; font-weight: 600; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-recent__item small { font-size: .74rem; color: var(--c-muted); }
.mk-recent__item:hover strong { color: var(--c-green); }

/* The .mk-offer card was removed on 2026-09-25; its rules went with it. */

.mk-why { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.mk-why li, .mk-why a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .86rem;
  color: var(--c-ink);
  text-decoration: none;
}
.mk-why svg { width: 16px; height: 16px; color: var(--c-green); flex: 0 0 auto; }
.mk-why a:hover { color: var(--c-green); }

/* ------------------------------------------------------- sign-in bar */

.mk-signin {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--c-forest);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .18);
}
.mk-signin > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.mk-signin svg { width: 18px; height: 18px; color: var(--c-gold); }
@media (min-width: 900px) { .mk-signin { display: none; } }

/* ------------------------------------------------ "More like this" */

.mk-more { padding: 18px 10px 24px; }
@media (min-width: 900px) { .mk-more { padding: 22px 16px 28px; } }
.mk-grid--row { grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr)); }

/* =========================================================================
   One product (product.php, and the open preview) and My Purchases
   ====================================================================== */

/* The small top bar inside the dashboard shell. */
.mkt-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px clamp(14px, 4vw, 40px);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}
.mkt-bar__back {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--c-line);
  border-radius: 11px;
  color: var(--c-heading);
}
.mkt-bar__back svg { width: 17px; height: 17px; }
.mkt-bar__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--c-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-bar__mine {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--c-chip);
  color: var(--c-chip-ink);
  font-size: .87rem;
  font-weight: 700;
  text-decoration: none;
}
.mkt-bar__mine svg { width: 15px; height: 15px; }

/* Create Product. The one thing a member comes here to do, so it keeps its
   words at every width — a phone shrinks the padding, never the label. */
.mkt-bar__sell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 10px 17px;
  border: 0;
  border-radius: 999px;
  background: var(--c-green);
  color: #fff;
  font: inherit;
  font-size: .87rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}
.mkt-bar__sell:hover { background: var(--c-forest-deep); }
.mkt-bar__sell svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* The little category label. */
.mkt-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--c-chip);
  color: var(--c-chip-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Media and words side by side on a wide screen, stacked on a phone. */
.mkt-solo {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  background: var(--c-surface);
}
@media (min-width: 900px) {
  .mkt-solo { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; }
}
.mkt-solo__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06170D;
}
@media (min-width: 900px) {
  .mkt-solo__media { aspect-ratio: auto; min-height: 460px; }
}
.mkt-solo__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
}
.mkt-solo__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 5vw, 64px) clamp(32px, 6vw, 64px);
}
.mkt-solo__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mkt-solo__sold { font-size: .82rem; font-weight: 600; color: var(--c-muted); }
.mkt-solo__title {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--c-heading);
}
.mkt-solo__tag { margin: 0; font-size: 1.04rem; line-height: 1.55; color: var(--c-muted); }
.mkt-solo__text { margin-top: 6px; font-size: .97rem; line-height: 1.72; color: var(--c-ink); }
.mkt-solo__alt { margin: 0; font-size: .88rem; color: var(--c-muted); }
.mkt-solo__alt a { color: var(--c-green); font-weight: 700; }

.mkt-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 0;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--c-green);
}
.mkt-price__was { font-size: .5em; font-weight: 500; color: var(--c-muted-soft); }

.mkt-short {
  margin: 0;
  padding: 11px 15px;
  border-radius: var(--r-md, 12px);
  background: rgba(246, 70, 93, .09);
  color: #B3283A;
  font-size: .92rem;
  font-weight: 600;
}
.mkt-buy { margin: 0; width: 100%; }

.mkt-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 15px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--c-green);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.mkt-cta:hover { background: var(--c-green-deep); transform: translateY(-1px); }
.mkt-cta svg { width: 17px; height: 17px; }
.mkt-cta--ghost { background: var(--c-surface); border: 1.5px solid var(--c-green); color: var(--c-green); }
.mkt-cta--ghost:hover { background: var(--c-chip); transform: translateY(-1px); }

/* Pay now beside Contact Seller.

   .mkt-cta is width:100% and .mkt-solo__body is a column, so two of them
   dropped in as siblings stack instead of pairing. The wrapper is what makes
   them share a row; .mkt-buy is a form, so it is a flex child here too, not a
   thing wrapped around one. They fall back to stacked when there is no room
   for two. */
.mkt-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 460px;
}
.mkt-pair > * { flex: 1 1 172px; width: auto; max-width: none; }
.mkt-pair .mkt-cta { max-width: none; padding-left: 18px; padding-right: 18px; }

.mkt-owned {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--c-chip);
  color: var(--c-chip-ink);
  font-weight: 700;
  font-size: .93rem;
}
.mkt-owned svg { width: 17px; height: 17px; }
.mkt-goods { display: flex; flex-direction: column; gap: 12px; width: 100%; }

.mkt-secret {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md, 12px);
  background: var(--c-surface-soft);
}
.mkt-secret__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.mkt-secret__label svg { width: 14px; height: 14px; }
.mkt-secret__body,
.mkt-own__secret {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 9px;
  background: var(--c-surface);
  border: 1px dashed var(--c-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .87rem;
  line-height: 1.6;
  color: var(--c-ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.mkt-secret__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.mkt-secret__copy svg { width: 14px; height: 14px; }

/* My Purchases */
.mkt-mine { display: grid; gap: 1px; width: 100%; background: var(--c-line); border-bottom: 1px solid var(--c-line); }
.mkt-own {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 18px clamp(14px, 4vw, 40px);
  background: var(--c-surface);
}
@media (max-width: 520px) { .mkt-own { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; } }
.mkt-own__shot { display: block; aspect-ratio: 1 / 1; border-radius: var(--r-md, 12px); overflow: hidden; background: var(--c-surface-soft); }
.mkt-own__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-own__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mkt-own__title { margin: 0; font-size: 1.04rem; font-weight: 700; line-height: 1.3; }
.mkt-own__title a { color: var(--c-heading); text-decoration: none; }
.mkt-own__when { margin: 0; font-size: .85rem; color: var(--c-muted); }
.mkt-own__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mkt-own__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--c-green);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-green);
  font-family: inherit;
  font-size: .87rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.mkt-own__btn:hover { background: var(--c-chip); }
.mkt-own__btn svg { width: 15px; height: 15px; }
.mkt-own__btn--main { background: var(--c-green); color: #fff; }
.mkt-own__btn--main:hover { background: var(--c-green-deep); }

.mkt-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 72px clamp(16px, 5vw, 80px);
  text-align: center;
  background: var(--c-surface);
}
.mkt-none__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--c-chip); color: var(--c-chip-ink); }
.mkt-none__mark svg { width: 27px; height: 27px; }
.mkt-none__line { margin: 0; color: var(--c-muted); }
.mkt-none .mkt-cta { max-width: 300px; }

/* =========================================================================
   Phones: bring the whole store down a step (owner, 2026-09-26)

   Members said the page felt zoomed in and that they would view it at 80%.
   The type and the chrome were sized for a laptop and only reflowed, not
   rescaled — so the search box showed "Searc", the trust bar ran off the
   edge, and the tabs took a third of the screen before a single product.

   Everything here is inside the phone breakpoint, so nothing above it moves.
   ====================================================================== */

@media (max-width: 599px) {
  /* Head: a smaller bar, and the wallet pill no longer eats half of it. */
  .mk-head { padding: 8px 10px; gap: 8px; }
  .mk-search { height: 38px; }
  .mk-search__input { padding: 0 14px; font-size: .88rem; }
  .mk-search__go { flex-basis: 44px; }
  .mk-search__go svg { width: 17px; height: 17px; }
  .mk-head__btn { padding: 8px 10px; font-size: .8rem; gap: 5px; }
  .mk-head__btn svg { width: 15px; height: 15px; }

  /* Strip and trust bar: smaller, and they still scroll if they must. */
  .mk-strip__cell { padding: 7px 12px; gap: 8px; }
  .mk-strip__cell > svg { width: 18px; height: 18px; }
  .mk-strip__cell strong { font-size: .8rem; }
  .mk-strip__cell small { font-size: .68rem; }

  .mk-trust { padding: 0 10px; }
  .mk-trust__why, .mk-trust__item { padding: 8px 10px; font-size: .78rem; gap: 6px; }
  .mk-trust svg { width: 14px; height: 14px; }

  /* Tabs: less height before the first product. */
  .mk-tabs { padding: 0 8px; }
  .mk-tab { padding: 10px 8px 8px; font-size: .84rem; }

  /* The headline over the shelf. */
  .mk-headline { padding: 4px 12px 0; }
  .mk-headline__top { font-size: .92rem; }
  .mk-headline__big { font-size: 1.12rem; letter-spacing: .03em; }

  /* Feature tiles and quick-filter chips. */
  .mk-tile { padding: 10px; column-gap: 9px; }
  .mk-tile > svg { width: 21px; height: 21px; }
  .mk-tile strong { font-size: .8rem; }
  .mk-tile small { font-size: .66rem; }
  .mk-chip { padding: 7px 12px; font-size: .78rem; }

  /* Row and shelf headings. */
  .mk-row__title, .mk-shelf__title { font-size: .95rem; padding-left: 8px; border-left-width: 3px; }
  .mk-row__all { font-size: .8rem; }
  .mk-sort__opt { padding: 5px 10px; font-size: .72rem; }

  /* Cards: the title and price were laptop-sized. */
  .mk-card__body { padding: 8px 9px 10px; gap: 4px; }
  .mk-card__title { font-size: .82rem; min-height: 2.4em; }
  .mk-card__meta { font-size: .68rem; }
  .mk-card__price { font-size: .92rem; }
  .mk-card__was { font-size: .7rem; }
  .mk-card__get { font-size: .78rem; }
  .mk-card__cart { width: 28px; height: 28px; }
  .mk-card__cart svg { width: 12px; height: 12px; }
  .mk-badge { font-size: .64rem; padding: 3px 6px; }

  /* Right-column boxes. */
  .mk-box { padding: 12px; }
  .mk-box__title { font-size: .68rem; }
  .mk-recent__item img { width: 42px; height: 42px; }
  .mk-recent__item strong { font-size: .8rem; }
  .mk-recent__item small { font-size: .68rem; }

  /* The bar over the bottom of the screen. */
  .mk-signin { padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); font-size: .82rem; }
  .mk-btn { padding: 9px 15px; font-size: .82rem; }

  /* One product. */
  .mkt-bar { padding: 10px 12px; gap: 9px; }
  .mkt-bar__title { font-size: .94rem; }
  /* The button keeps its words; the title gives up the room instead. */
  .mkt-bar__sell { padding: 9px 13px; font-size: .8rem; gap: 6px; }
  .mkt-bar__sell svg { width: 15px; height: 15px; }
  .mkt-solo__body { gap: 11px; }
  .mkt-solo__tag { font-size: .92rem; }
  .mkt-solo__text { font-size: .88rem; }
  .mkt-cta { padding: 13px 22px; font-size: .92rem; }
  /* Below this width two buttons would each be too narrow to read, so the
     pair stacks and each one spans the row. */
  .mkt-pair { gap: 9px; }
  .mkt-pair > * { flex: 1 1 100%; }
}
