/* MAKMEESHOP Marketplace Premium UI
   Scope: Marketplace views and navigation only. No business logic. */

body.page-marketplace,
body.page-admin-marketplace {
  --mm-surface: color-mix(in srgb, var(--panel-solid) 82%, transparent);
  --mm-surface-soft: rgba(255,255,255,.045);
  --mm-border: color-mix(in srgb, var(--line) 88%, rgba(255,255,255,.08));
  --mm-highlight: #ffad24;
  --mm-highlight-soft: rgba(255,173,36,.12);
  --mm-blue: var(--primary);
  --mm-blue-soft: rgba(53,167,255,.12);
  --mm-card-shadow: 0 18px 48px rgba(0,0,0,.22);
}

body.page-marketplace .section-pad,
body.page-admin-marketplace .section-pad {
  padding-top: 92px;
  padding-bottom: 72px;
}

body.page-marketplace .mm-page,
body.page-admin-marketplace .mm-page {
  width: min(1420px, calc(100% - 36px));
  max-width: 1420px;
}

body.page-marketplace .header-primary-nav a.active,
body.page-admin-marketplace .header-primary-nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255,173,36,.18), rgba(53,167,255,.12));
  border-color: rgba(255,173,36,.24);
}

body.page-marketplace .mm-page .glass,
body.page-admin-marketplace .mm-page .glass,
body.page-marketplace .mm-page .panel,
body.page-admin-marketplace .mm-page .panel {
  border: 1px solid var(--mm-border);
  box-shadow: var(--mm-card-shadow);
}

body.page-marketplace .mm-page .btn,
body.page-admin-marketplace .mm-page .btn {
  min-height: 44px;
  border-radius: 14px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
  font-weight: 700;
  white-space: normal;
}

body.page-marketplace .mm-page .btn-primary,
body.page-admin-marketplace .mm-page .btn-primary {
  color: #09111d !important;
  background: linear-gradient(135deg, #ffd36a, #ff9b21) !important;
  border-color: rgba(255,187,72,.64) !important;
  box-shadow: 0 12px 28px rgba(255,149,31,.2);
}

body.page-marketplace .mm-page .btn-primary:hover,
body.page-admin-marketplace .mm-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(255,149,31,.27);
}

body.page-marketplace .mm-page .btn-soft,
body.page-admin-marketplace .mm-page .btn-soft,
body.page-marketplace .mm-page .btn-ghost,
body.page-admin-marketplace .mm-page .btn-ghost {
  color: var(--text) !important;
  background: var(--mm-surface-soft) !important;
  border-color: var(--mm-border) !important;
}

body.page-marketplace .mm-page .btn-soft:hover,
body.page-admin-marketplace .mm-page .btn-soft:hover,
body.page-marketplace .mm-page .btn-ghost:hover,
body.page-admin-marketplace .mm-page .btn-ghost:hover {
  border-color: rgba(53,167,255,.34) !important;
  background: rgba(53,167,255,.11) !important;
}

body.page-marketplace .mm-page input,
body.page-marketplace .mm-page select,
body.page-marketplace .mm-page textarea,
body.page-admin-marketplace .mm-page input,
body.page-admin-marketplace .mm-page select,
body.page-admin-marketplace .mm-page textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--mm-border);
  background: color-mix(in srgb, var(--panel-solid) 76%, transparent);
  color: var(--text);
  padding: 10px 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body.page-marketplace .mm-page textarea,
body.page-admin-marketplace .mm-page textarea {
  min-height: 108px;
  resize: vertical;
}

body.page-marketplace .mm-page input:focus,
body.page-marketplace .mm-page select:focus,
body.page-marketplace .mm-page textarea:focus,
body.page-admin-marketplace .mm-page input:focus,
body.page-admin-marketplace .mm-page select:focus,
body.page-admin-marketplace .mm-page textarea:focus {
  border-color: rgba(53,167,255,.62);
  box-shadow: 0 0 0 4px rgba(53,167,255,.1);
}

body.page-marketplace .mm-page input::placeholder,
body.page-admin-marketplace .mm-page input::placeholder,
body.page-marketplace .mm-page textarea::placeholder,
body.page-admin-marketplace .mm-page textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

/* Storefront hero ------------------------------------------------------ */
.mm-storefront-hero {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr) !important;
  gap: clamp(22px, 3vw, 42px) !important;
  padding: clamp(26px, 4vw, 48px) !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(53,167,255,.18), transparent 34%),
    radial-gradient(circle at 8% 110%, rgba(255,173,36,.16), transparent 38%),
    linear-gradient(135deg, rgba(8,30,60,.93), rgba(7,19,38,.88)) !important;
}

.mm-storefront-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.62), transparent 82%);
}

.mm-storefront-hero > * { position: relative; z-index: 1; min-width: 0; }

.mm-storefront-hero .eyebrow {
  margin: 0 0 10px;
  color: #ffca69;
  letter-spacing: .18em;
  font-size: .76rem;
  font-weight: 800;
}

.mm-storefront-hero h1 {
  max-width: 900px;
  margin: 0 0 14px !important;
  font-size: clamp(32px, 4.4vw, 64px) !important;
  letter-spacing: -.055em !important;
  line-height: 1.04 !important;
}

.mm-storefront-hero > div:first-child > .muted {
  max-width: 780px;
  margin: 0;
  font-size: clamp(.98rem, 1.35vw, 1.12rem);
  line-height: 1.72;
}

.mm-storefront-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mm-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
}

.mm-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
}

.mm-trust-row b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #081923;
  background: #77e4ad;
  font-size: .72rem;
}

.mm-trust-row em { font-style: normal; }

.mm-storefront-hero .mm-hero-stats {
  display: grid;
  gap: 12px;
}

.mm-storefront-hero .mm-hero-stats article {
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 20px;
  background: rgba(3,16,34,.48);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
}

.mm-storefront-hero .mm-hero-stats i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffd273;
  background: linear-gradient(135deg, rgba(255,173,36,.2), rgba(53,167,255,.14));
  border: 1px solid rgba(255,193,85,.2);
  font-style: normal;
  font-size: 1.05rem;
}

.mm-storefront-hero .mm-hero-stats span {
  font-size: .82rem;
  line-height: 1.35;
}

.mm-storefront-hero .mm-hero-stats strong {
  max-width: 190px;
  text-align: right;
  font-size: 1.05rem;
  line-height: 1.28;
  color: var(--text);
  overflow-wrap: normal;
}

/* Storefront catalog --------------------------------------------------- */
.mm-filter-panel {
  margin-top: 20px !important;
  padding: clamp(18px, 2.6vw, 28px) !important;
  background: linear-gradient(145deg, rgba(9,28,55,.84), rgba(6,18,36,.78)) !important;
}

.mm-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.mm-section-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(22px, 2.7vw, 34px);
  letter-spacing: -.035em;
}

.mm-section-heading > p { max-width: 480px; margin: 0; text-align: right; }

.mm-filter-form {
  grid-template-columns: minmax(230px, 1.3fr) minmax(180px, .8fr) minmax(180px, .75fr) auto auto !important;
  gap: 12px !important;
}

.mm-filter-form label > span {
  min-height: 20px;
  font-size: .82rem !important;
  letter-spacing: .01em;
}

.mm-category-strip {
  margin-top: 8px;
  padding: 16px 2px 8px !important;
  gap: 9px !important;
}

.mm-category-chip {
  min-height: 42px;
  padding: 9px 14px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.04) !important;
  box-shadow: none;
}

.mm-category-chip:hover,
.mm-category-chip.is-active {
  color: var(--text);
  border-color: rgba(255,173,36,.38) !important;
  background: linear-gradient(135deg, rgba(255,173,36,.14), rgba(53,167,255,.08)) !important;
}

.mm-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.mm-product-card {
  min-width: 0;
  border-radius: 22px !important;
  background: linear-gradient(160deg, rgba(13,34,64,.88), rgba(7,21,42,.84)) !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mm-product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(53,167,255,.32) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.3) !important;
}

.mm-product-media { aspect-ratio: 16 / 10 !important; }
.mm-product-body { padding: 18px !important; gap: 11px !important; }
.mm-product-body h2 { font-size: 1.08rem !important; }
.mm-product-footer strong { white-space: nowrap; }

.mm-premium-empty {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 38px 24px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(53,167,255,.13), transparent 42%),
    linear-gradient(145deg, rgba(10,31,59,.82), rgba(7,20,40,.78)) !important;
}

.mm-premium-empty .mm-empty-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 24px;
  color: #ffd273;
  background: linear-gradient(135deg, rgba(255,173,36,.2), rgba(53,167,255,.15));
  border: 1px solid rgba(255,193,85,.22);
  font-size: 30px;
}

.mm-premium-empty h2 { margin: 0; font-size: clamp(24px, 3vw, 36px); }
.mm-premium-empty > p:not(.eyebrow) { max-width: 680px; margin: 4px auto 10px; color: var(--muted); }
.mm-premium-empty .hero-actions { justify-content: center; }

/* Shared Marketplace detail/order views ------------------------------- */
body.page-marketplace .mm-breadcrumb {
  padding: 10px 13px;
  border-radius: 14px;
  border: 1px solid var(--mm-border);
  background: rgba(255,255,255,.035);
}

body.page-marketplace .mm-detail-media,
body.page-marketplace .mm-detail-summary,
body.page-marketplace .mm-detail-info > .panel,
body.page-marketplace .mm-order-card,
body.page-marketplace .mm-order-main > .panel,
body.page-marketplace .mm-order-side > .panel {
  background: linear-gradient(155deg, rgba(12,32,61,.88), rgba(7,20,39,.82));
}

body.page-marketplace .mm-detail-summary h1,
body.page-marketplace .mm-order-main h1,
body.page-marketplace .mm-order-main h2 {
  letter-spacing: -.045em;
}

body.page-marketplace .mm-facts div,
body.page-marketplace .mm-order-facts div,
body.page-marketplace .mm-submitted-fields div {
  min-width: 0;
  background: rgba(255,255,255,.035);
}

body.page-marketplace .mm-code,
body.page-admin-marketplace .mm-code {
  max-width: min(100%, 340px);
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  color: #cfe9ff;
}

/* Admin hero ----------------------------------------------------------- */
.mm-admin-dashboard-hero {
  position: relative;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: 20px !important;
  align-items: start !important;
  padding: clamp(22px, 3vw, 34px) !important;
  margin-bottom: 16px !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(53,167,255,.15), transparent 34%),
    linear-gradient(135deg, rgba(10,32,63,.92), rgba(7,21,42,.86)) !important;
}

.mm-admin-dashboard-hero h1 {
  max-width: 950px;
  margin: 2px 0 10px !important;
  font-size: clamp(28px, 3.7vw, 50px) !important;
  letter-spacing: -.055em !important;
}

.mm-admin-dashboard-hero > div:first-child > p:last-child {
  max-width: 880px;
  margin: 0;
  font-size: .98rem;
  line-height: 1.65;
}

.mm-admin-dashboard-hero .mm-head-actions {
  align-self: start;
  flex-wrap: wrap;
}

.mm-admin-quick-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  padding-top: 18px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.mm-admin-quick-links button {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  color: var(--text);
  border: 1px solid var(--mm-border);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  text-align: left;
}

.mm-admin-quick-links button:hover {
  border-color: rgba(53,167,255,.32);
  background: rgba(53,167,255,.1);
}

.mm-admin-quick-links span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #ffd273;
  background: linear-gradient(135deg, rgba(255,173,36,.18), rgba(53,167,255,.12));
}

.mm-admin-quick-links b { min-width: 0; font-size: .88rem; }

/* Admin stats ---------------------------------------------------------- */
.mm-admin-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 12px !important;
  overflow: visible !important;
  margin-bottom: 16px !important;
}

.mm-admin-stats article {
  min-width: 0 !important;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(13,34,64,.86), rgba(7,21,42,.82)) !important;
}

.mm-admin-stats article i {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffd273;
  background: linear-gradient(135deg, rgba(255,173,36,.2), rgba(53,167,255,.12));
  border: 1px solid rgba(255,173,36,.18);
  font-style: normal;
}

.mm-admin-stats article > div { min-width: 0; }
.mm-admin-stats span { font-size: .76rem !important; line-height: 1.3; }
.mm-admin-stats strong {
  margin-top: 4px !important;
  font-size: clamp(1.05rem, 1.7vw, 1.36rem) !important;
  line-height: 1.18;
  white-space: nowrap;
}

/* Admin navigation and panels ---------------------------------------- */
.mm-admin-shell {
  grid-template-columns: 270px minmax(0,1fr) !important;
  gap: 16px !important;
}

.mm-admin-tabs {
  top: 88px !important;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 12px !important;
  border-radius: 22px !important;
  background: linear-gradient(160deg, rgba(12,32,61,.9), rgba(7,20,39,.86)) !important;
  scrollbar-width: thin;
}

.mm-admin-tab-group + .mm-admin-tab-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.mm-admin-tab-group > p {
  margin: 0 8px 7px;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.mm-admin-tab-group > div { display: grid; gap: 5px; }

.mm-admin-tab {
  min-height: 46px;
  display: grid !important;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px !important;
  padding: 6px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  background: transparent !important;
}

.mm-admin-tab > span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.055) !important;
}

.mm-admin-tab b {
  min-width: 0;
  font-size: .88rem;
  font-weight: 650;
  white-space: normal;
}

.mm-admin-tab em {
  color: var(--muted);
  font-style: normal;
  opacity: .65;
}

.mm-admin-tab:hover,
.mm-admin-tab.is-active {
  color: var(--text);
  border-color: rgba(53,167,255,.22) !important;
  background: linear-gradient(135deg, rgba(255,173,36,.13), rgba(53,167,255,.1)) !important;
  box-shadow: none !important;
}

.mm-admin-tab.is-active > span {
  color: #101927;
  background: linear-gradient(135deg, #ffd36a, #ff9b21) !important;
}

.mm-admin-panels { min-width: 0; }
.mm-admin-panel {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 28px) !important;
  border-radius: 22px !important;
  background: linear-gradient(155deg, rgba(12,32,61,.88), rgba(7,20,39,.84)) !important;
}

.mm-admin-panel .panel-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mm-admin-panel .panel-head h2 {
  margin: 2px 0 0;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -.04em;
}

.mm-dashboard-grid,
.mm-action-grid {
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 12px !important;
}

.mm-dashboard-grid > article,
.mm-action-grid > article {
  min-width: 0;
  padding: 18px !important;
  border-radius: 17px !important;
  border: 1px solid var(--mm-border);
  background: rgba(255,255,255,.035) !important;
}

.mm-dashboard-grid > article strong,
.mm-action-grid > article strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1rem;
}

.mm-dashboard-grid > article p,
.mm-action-grid > article p,
.mm-action-grid > article small {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.mm-form-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 13px !important;
  align-items: start;
}

.mm-admin-form {
  min-width: 0;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--mm-border);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}

.mm-admin-form label {
  min-width: 0;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  align-content: start;
}

.mm-admin-form label > span {
  min-height: 20px;
  font-size: .78rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
  color: var(--muted) !important;
}

.mm-admin-form .mm-span-2,
.mm-form-grid .mm-span-2 { grid-column: span 2; }

.mm-admin-form > .btn { justify-self: start; min-width: 148px; }
.mm-admin-form input[type="checkbox"],
.mm-admin-form input[type="radio"] { width: auto !important; min-height: 0; }

.mm-secret-box {
  background: rgba(0,0,0,.2) !important;
  border-color: rgba(255,173,36,.2) !important;
}

.mm-data-table {
  min-width: 920px !important;
  table-layout: auto;
}

.mm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  border: 1px solid var(--mm-border);
  border-radius: 16px;
  background: rgba(3,14,29,.22);
  scrollbar-width: thin;
}

.mm-data-table th,
.mm-data-table td {
  padding: 12px 13px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  vertical-align: middle;
}

.mm-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  font-size: .72rem;
  letter-spacing: .035em;
}

.mm-data-table tbody tr:hover td { background: rgba(53,167,255,.035); }
.mm-data-table td.mm-wrap-cell { min-width: 260px; white-space: normal !important; }
.mm-data-table .btn { min-height: 36px !important; padding: 7px 10px !important; border-radius: 11px !important; }

.mm-row-actions summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--mm-border);
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  cursor: pointer;
}

.mm-row-actions[open] {
  min-width: min(420px, 80vw);
  padding: 12px;
  border: 1px solid var(--mm-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
}

/* Light mode ----------------------------------------------------------- */
html[data-theme="light"] body.page-marketplace,
html[data-theme="light"] body.page-admin-marketplace {
  --mm-surface: rgba(255,255,255,.95);
  --mm-surface-soft: rgba(36,91,159,.055);
  --mm-card-shadow: 0 16px 42px rgba(39,84,143,.12);
}

html[data-theme="light"] .mm-storefront-hero,
html[data-theme="light"] .mm-filter-panel,
html[data-theme="light"] .mm-product-card,
html[data-theme="light"] .mm-premium-empty,
html[data-theme="light"] .mm-admin-dashboard-hero,
html[data-theme="light"] .mm-admin-stats article,
html[data-theme="light"] .mm-admin-tabs,
html[data-theme="light"] .mm-admin-panel,
html[data-theme="light"] body.page-marketplace .mm-detail-media,
html[data-theme="light"] body.page-marketplace .mm-detail-summary,
html[data-theme="light"] body.page-marketplace .mm-detail-info > .panel,
html[data-theme="light"] body.page-marketplace .mm-order-card,
html[data-theme="light"] body.page-marketplace .mm-order-main > .panel,
html[data-theme="light"] body.page-marketplace .mm-order-side > .panel {
  color: #07111f;
  background: rgba(255,255,255,.94) !important;
  border-color: rgba(35,76,129,.13) !important;
}

html[data-theme="light"] .mm-storefront-hero .mm-hero-stats article,
html[data-theme="light"] .mm-admin-quick-links button,
html[data-theme="light"] .mm-dashboard-grid > article,
html[data-theme="light"] .mm-action-grid > article,
html[data-theme="light"] .mm-admin-form,
html[data-theme="light"] .mm-table-wrap,
html[data-theme="light"] .mm-category-chip {
  background: rgba(31,88,160,.045) !important;
  border-color: rgba(35,76,129,.12) !important;
}

html[data-theme="light"] .mm-storefront-hero::after { opacity: .18; }
html[data-theme="light"] .mm-storefront-hero .mm-hero-stats strong,
html[data-theme="light"] .mm-admin-stats strong,
html[data-theme="light"] .mm-admin-tab,
html[data-theme="light"] .mm-admin-quick-links button { color: #07111f; }
html[data-theme="light"] .mm-code { color: #164d84 !important; background: rgba(27,81,145,.08) !important; }
html[data-theme="light"] .mm-data-table th { background: #f3f8ff; }
html[data-theme="light"] .mm-data-table tbody tr:hover td { background: rgba(40,102,181,.035); }

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
  .mm-product-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
  .mm-filter-form { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .mm-filter-form > .btn { width: 100%; }
  .mm-admin-stats { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .mm-form-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

@media (max-width: 980px) {
  body.page-marketplace .section-pad,
  body.page-admin-marketplace .section-pad { padding-top: 78px; }

  .mm-storefront-hero,
  .mm-admin-dashboard-hero { grid-template-columns: 1fr !important; }

  .mm-storefront-hero .mm-hero-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mm-storefront-hero .mm-hero-stats article {
    grid-template-columns: 40px minmax(0,1fr);
  }
  .mm-storefront-hero .mm-hero-stats strong {
    grid-column: 1 / -1;
    max-width: none;
    text-align: left;
  }

  .mm-admin-dashboard-hero .mm-head-actions { justify-content: flex-start; }
  .mm-admin-quick-links { grid-template-columns: repeat(2, minmax(0,1fr)); }

  .mm-admin-shell { grid-template-columns: 1fr !important; }
  .mm-admin-tabs {
    position: static !important;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex !important;
    gap: 10px !important;
    padding: 10px !important;
  }
  .mm-admin-tab-group {
    min-width: max-content;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .mm-admin-tab-group > p { display: none; }
  .mm-admin-tab-group > div { display: flex; gap: 7px; }
  .mm-admin-tab {
    min-width: max-content;
    grid-template-columns: 30px auto !important;
    padding: 6px 10px !important;
  }
  .mm-admin-tab em { display: none; }
  .mm-admin-tab > span { width: 30px !important; height: 30px !important; }
}

@media (max-width: 760px) {
  body.page-marketplace .mm-page,
  body.page-admin-marketplace .mm-page { width: calc(100% - 18px); }

  .mm-storefront-hero,
  .mm-admin-dashboard-hero {
    padding: 20px !important;
    border-radius: 22px !important;
  }

  .mm-storefront-hero h1 { font-size: clamp(29px, 9vw, 42px) !important; }
  .mm-storefront-actions .btn,
  .mm-admin-dashboard-hero .mm-head-actions .btn { width: 100%; }

  .mm-storefront-hero .mm-hero-stats { grid-template-columns: 1fr; }
  .mm-storefront-hero .mm-hero-stats article {
    grid-template-columns: 42px minmax(0,1fr) auto;
  }
  .mm-storefront-hero .mm-hero-stats strong {
    grid-column: auto;
    text-align: right;
  }

  .mm-section-heading { display: grid; gap: 7px; }
  .mm-section-heading > p { text-align: left; }
  .mm-filter-form { grid-template-columns: 1fr !important; }
  .mm-product-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 12px !important; }
  .mm-product-body { padding: 14px !important; }
  .mm-product-footer { align-items: flex-end; }

  .mm-admin-quick-links { grid-template-columns: 1fr 1fr; }
  .mm-admin-stats { grid-template-columns: 1fr 1fr !important; gap: 9px !important; }
  .mm-admin-stats article { padding: 12px !important; }
  .mm-admin-stats article i { width: 36px; height: 36px; flex-basis: 36px; }

  .mm-admin-panel { padding: 16px !important; }
  .mm-admin-panel .panel-head { display: grid !important; align-items: start !important; }
  .mm-admin-panel .panel-head .btn { width: 100%; }
  .mm-dashboard-grid,
  .mm-action-grid,
  .mm-form-grid { grid-template-columns: 1fr !important; }
  .mm-admin-form .mm-span-2,
  .mm-form-grid .mm-span-2 { grid-column: auto; }
  .mm-admin-form > .btn { width: 100%; justify-self: stretch; }

  .mm-detail-grid,
  .mm-detail-content-grid,
  .mm-order-layout { grid-template-columns: 1fr !important; }
  .mm-detail-media { min-height: 280px !important; }
  .mm-order-card { position: static !important; }
  .mm-facts,
  .mm-order-facts,
  .mm-submitted-fields { grid-template-columns: 1fr !important; }
}

@media (max-width: 520px) {
  .mm-product-grid { grid-template-columns: 1fr !important; }
  .mm-admin-quick-links { grid-template-columns: 1fr !important; }
  .mm-admin-stats { grid-template-columns: 1fr !important; }
  .mm-storefront-hero .mm-hero-stats article {
    grid-template-columns: 40px minmax(0,1fr);
  }
  .mm-storefront-hero .mm-hero-stats strong {
    grid-column: 1 / -1;
    text-align: left;
  }
  .mm-trust-row { display: grid; }
  .mm-premium-empty .hero-actions { display: grid; width: 100%; }
  .mm-premium-empty .hero-actions .btn { width: 100%; }
}

/* =====================================================================
   MAKMEESHOP v14.3 — Marketplace storefront refinement
   Scope is isolated to .mm-storefront-v143 so Marketplace admin/detail
   views keep their existing behavior and layout.
   ===================================================================== */
.mm-storefront-v143 {
  --mm-v143-gap: clamp(14px, 1.8vw, 22px);
  display: grid;
  gap: var(--mm-v143-gap);
}

.mm-storefront-v143 .mm-market-hero {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(24px, 3vw, 38px);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 20%, rgba(53,167,255,.14), transparent 34%),
    linear-gradient(135deg, rgba(10,31,59,.92), rgba(7,20,39,.88));
}

.mm-storefront-v143 .mm-market-hero-copy {
  min-width: 0;
  max-width: 820px;
}

.mm-storefront-v143 .mm-market-hero .eyebrow,
.mm-storefront-v143 .mm-catalog-head .eyebrow,
.mm-storefront-v143 .mm-compact-empty .eyebrow {
  margin: 0 0 7px;
  color: #ffca69;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.mm-storefront-v143 .mm-market-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(30px, 3.7vw, 50px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.mm-storefront-v143 .mm-market-hero .muted {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: clamp(.92rem, 1.1vw, 1.02rem);
  line-height: 1.65;
}

.mm-storefront-v143 .mm-market-hero-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 10px;
  width: min(100%, 370px);
}

.mm-storefront-v143 .mm-market-hero-actions .btn:first-child {
  grid-column: 1 / -1;
}

.mm-storefront-v143 .mm-market-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mm-storefront-v143 .mm-market-stats article {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(12,32,61,.86), rgba(7,20,39,.8));
}

.mm-storefront-v143 .mm-stat-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,173,36,.2);
  border-radius: 13px;
  color: #ffd273;
  background: linear-gradient(135deg, rgba(255,173,36,.18), rgba(53,167,255,.12));
}

.mm-storefront-v143 .mm-market-stats article > div {
  min-width: 0;
}

.mm-storefront-v143 .mm-market-stats small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.3;
}

.mm-storefront-v143 .mm-market-stats strong {
  display: block;
  margin-top: 3px;
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
  line-height: 1.15;
  white-space: nowrap;
}

.mm-storefront-v143 .mm-catalog-panel {
  position: sticky;
  top: 78px;
  z-index: 20;
  margin: 0;
  padding: clamp(16px, 2vw, 22px);
  border-radius: 22px;
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  backdrop-filter: blur(18px);
}

.mm-storefront-v143 .mm-catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.mm-storefront-v143 .mm-catalog-head h2 {
  margin: 0;
  font-size: clamp(21px, 2.1vw, 29px);
  letter-spacing: -.035em;
}

.mm-storefront-v143 .mm-catalog-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .78rem;
}

.mm-storefront-v143 .mm-catalog-head-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.mm-storefront-v143 .mm-catalog-head-meta b {
  color: var(--text);
  font-weight: 650;
}

.mm-storefront-v143 .mm-favorite-filter {
  min-height: 36px !important;
  padding: 7px 11px !important;
  border-radius: 11px !important;
  font-size: .78rem;
}

.mm-storefront-v143 .mm-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) minmax(170px, .9fr) minmax(170px, .82fr) auto;
  align-items: end;
  gap: 11px;
}

.mm-storefront-v143 .mm-filter-toolbar label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.mm-storefront-v143 .mm-filter-toolbar label > span {
  min-height: 18px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.25;
}

.mm-storefront-v143 .mm-filter-toolbar input,
.mm-storefront-v143 .mm-filter-toolbar select {
  min-height: 44px;
  height: 44px;
  border-radius: 12px;
  color-scheme: dark;
}

.mm-storefront-v143 .mm-filter-toolbar select {
  padding-right: 38px;
  cursor: pointer;
}

.mm-storefront-v143 .mm-filter-toolbar select option {
  color: #eef6ff;
  background: #10213a;
}

.mm-storefront-v143 .mm-control-shell {
  position: relative;
  min-width: 0;
}

.mm-storefront-v143 .mm-control-shell i {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-style: normal;
  pointer-events: none;
}

.mm-storefront-v143 .mm-control-shell input {
  padding-left: 38px;
}

.mm-storefront-v143 .mm-filter-submit {
  min-width: 108px;
  min-height: 44px !important;
  height: 44px;
  white-space: nowrap !important;
}

.mm-storefront-v143 .mm-category-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.mm-storefront-v143 .mm-category-row-title {
  display: grid;
  gap: 2px;
  min-width: max-content;
}

.mm-storefront-v143 .mm-category-row-title span {
  color: var(--text);
  font-size: .8rem;
  font-weight: 750;
}

.mm-storefront-v143 .mm-category-row-title small {
  color: var(--muted);
  font-size: .66rem;
}

.mm-storefront-v143 .mm-category-strip {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 2px 2px 5px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.mm-storefront-v143 .mm-category-chip {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 38px;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  scroll-snap-align: start;
}

.mm-storefront-v143 .mm-category-chip b {
  white-space: nowrap !important;
  font-size: .77rem;
  font-weight: 650;
}

.mm-storefront-v143 .mm-results-section {
  min-width: 0;
}

.mm-storefront-v143 .mm-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 2px 13px;
}

.mm-storefront-v143 .mm-results-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
}

.mm-storefront-v143 .mm-results-head p {
  margin: 4px 0 0;
  font-size: .84rem;
}

.mm-storefront-v143 .mm-product-grid,
.mm-storefront-v143 .mm-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 0;
}

.mm-storefront-v143 .mm-product-card {
  min-width: 0;
  border-radius: 20px !important;
  background: linear-gradient(160deg, rgba(13,34,64,.9), rgba(7,21,42,.86)) !important;
}

.mm-storefront-v143 .mm-product-media {
  aspect-ratio: 16 / 9 !important;
}

.mm-storefront-v143 .mm-product-placeholder {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  font-size: 34px;
}

.mm-storefront-v143 .mm-card-badges {
  right: 54px;
  left: 10px;
  top: 10px;
  flex-wrap: wrap;
}

.mm-storefront-v143 .mm-card-badges span {
  padding: 4px 7px;
  font-size: .65rem;
}

.mm-storefront-v143 .mm-favorite-form {
  top: 10px;
  right: 10px;
  z-index: 3;
}

.mm-storefront-v143 .mm-favorite-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.mm-storefront-v143 .mm-product-body {
  gap: 10px !important;
  padding: 15px !important;
}

.mm-storefront-v143 .mm-product-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mm-storefront-v143 .mm-product-title-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-storefront-v143 .mm-product-sku {
  flex: 0 1 auto;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .68rem;
}

.mm-storefront-v143 .mm-product-body h2 {
  min-width: 0;
  min-height: 2.7em;
  font-size: 1rem !important;
  line-height: 1.35;
}

.mm-storefront-v143 .mm-product-body h2 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.mm-storefront-v143 .mm-card-description {
  min-height: 3em;
  -webkit-line-clamp: 2;
  font-size: .82rem;
  line-height: 1.5;
}

.mm-storefront-v143 .mm-product-facts {
  display: grid;
  grid-template-columns: minmax(82px, .7fr) minmax(0, 1.3fr);
  gap: 8px;
  margin: 0;
}

.mm-storefront-v143 .mm-product-facts > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--mm-border);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.mm-storefront-v143 .mm-product-facts dt {
  color: var(--muted);
  font-size: .66rem;
}

.mm-storefront-v143 .mm-product-facts dd {
  min-width: 0;
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
}

.mm-storefront-v143 .mm-product-status-row {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.mm-storefront-v143 .mm-product-status-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

.mm-storefront-v143 .mm-product-footer {
  min-width: 0;
  gap: 9px;
}

.mm-storefront-v143 .mm-product-footer strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.15rem;
  white-space: nowrap;
}

.mm-storefront-v143 .mm-product-footer .btn {
  min-height: 36px !important;
  flex: 0 0 auto;
  padding: 7px 10px !important;
  border-radius: 11px !important;
  font-size: .75rem;
  white-space: nowrap !important;
}

.mm-storefront-v143 .mm-compact-empty {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(20px, 2.8vw, 30px) !important;
  text-align: left;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(10,31,59,.82), rgba(7,20,40,.78)) !important;
}

.mm-storefront-v143 .mm-compact-empty .mm-empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,193,85,.22);
  border-radius: 18px;
  color: #ffd273;
  background: linear-gradient(135deg, rgba(255,173,36,.18), rgba(53,167,255,.13));
  font-size: 24px;
}

.mm-storefront-v143 .mm-empty-copy {
  min-width: 0;
}

.mm-storefront-v143 .mm-compact-empty h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
}

.mm-storefront-v143 .mm-compact-empty p:not(.eyebrow) {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.mm-storefront-v143 .mm-empty-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-storefront-v143 .mm-empty-actions .btn {
  min-height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
}

.mm-storefront-v143 .mm-skeleton-grid[hidden] {
  display: none !important;
}

.mm-storefront-v143.is-catalog-loading .mm-skeleton-grid {
  display: grid !important;
}

.mm-storefront-v143.is-catalog-loading [data-mm-products] {
  display: none !important;
}

.mm-storefront-v143 .mm-skeleton-card {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(13,34,64,.9), rgba(7,21,42,.86));
}

.mm-storefront-v143 .mm-skeleton-card > span {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: rgba(255,255,255,.055);
}

.mm-storefront-v143 .mm-skeleton-card > div {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.mm-storefront-v143 .mm-skeleton-card i {
  position: relative;
  display: block;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.055);
}

.mm-storefront-v143 .mm-skeleton-card i:nth-child(1) { width: 42%; }
.mm-storefront-v143 .mm-skeleton-card i:nth-child(2) { width: 88%; height: 18px; }
.mm-storefront-v143 .mm-skeleton-card i:nth-child(3) { width: 72%; }
.mm-storefront-v143 .mm-skeleton-card i:nth-child(4) { width: 56%; height: 32px; }
.mm-storefront-v143 .mm-skeleton-card i::after,
.mm-storefront-v143 .mm-skeleton-card > span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  animation: mm-v143-shimmer 1.15s infinite;
}

@keyframes mm-v143-shimmer {
  100% { transform: translateX(100%); }
}

html[data-theme="light"] .mm-storefront-v143 .mm-market-hero,
html[data-theme="light"] .mm-storefront-v143 .mm-market-stats article,
html[data-theme="light"] .mm-storefront-v143 .mm-product-card,
html[data-theme="light"] .mm-storefront-v143 .mm-compact-empty,
html[data-theme="light"] .mm-storefront-v143 .mm-skeleton-card {
  color: #07111f;
  background: rgba(255,255,255,.95) !important;
  border-color: rgba(35,76,129,.13) !important;
}

html[data-theme="light"] .mm-storefront-v143 .mm-catalog-panel {
  background: rgba(255,255,255,.96) !important;
  border-color: rgba(35,76,129,.13) !important;
}

html[data-theme="light"] .mm-storefront-v143 .mm-filter-toolbar input,
html[data-theme="light"] .mm-storefront-v143 .mm-filter-toolbar select {
  color-scheme: light;
}

html[data-theme="light"] .mm-storefront-v143 .mm-filter-toolbar select option {
  color: #07111f;
  background: #ffffff;
}

html[data-theme="light"] .mm-storefront-v143 .mm-category-row {
  border-top-color: rgba(35,76,129,.1);
}

html[data-theme="light"] .mm-storefront-v143 .mm-product-facts > div,
html[data-theme="light"] .mm-storefront-v143 .mm-product-status-row span {
  background: rgba(31,88,160,.045);
}

@media (max-width: 1280px) {
  .mm-storefront-v143 .mm-product-grid,
  .mm-storefront-v143 .mm-skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mm-storefront-v143 .mm-market-hero {
    align-items: flex-start;
  }

  .mm-storefront-v143 .mm-market-hero-actions {
    width: min(100%, 320px);
    grid-template-columns: 1fr;
  }

  .mm-storefront-v143 .mm-market-hero-actions .btn:first-child {
    grid-column: auto;
  }

  .mm-storefront-v143 .mm-market-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-storefront-v143 .mm-filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-storefront-v143 .mm-filter-submit {
    width: 100%;
  }

  .mm-storefront-v143 .mm-category-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mm-storefront-v143 .mm-category-row-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .mm-storefront-v143 .mm-product-grid,
  .mm-storefront-v143 .mm-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-storefront-v143 .mm-compact-empty {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mm-storefront-v143 .mm-empty-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .mm-storefront-v143 .mm-catalog-panel {
    position: static;
  }

  .mm-storefront-v143 .mm-market-hero {
    display: grid;
    padding: 21px;
  }

  .mm-storefront-v143 .mm-market-hero-actions {
    width: 100%;
  }

  .mm-storefront-v143 .mm-catalog-head,
  .mm-storefront-v143 .mm-results-head {
    display: grid;
    align-items: start;
  }

  .mm-storefront-v143 .mm-catalog-head-meta {
    justify-content: flex-start;
  }

  .mm-storefront-v143 .mm-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .mm-storefront-v143 .mm-product-grid,
  .mm-storefront-v143 .mm-skeleton-grid {
    grid-template-columns: 1fr;
  }

  .mm-storefront-v143 .mm-compact-empty {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .mm-storefront-v143 .mm-empty-actions {
    grid-column: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .mm-storefront-v143 .mm-market-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mm-storefront-v143 .mm-market-stats article {
    align-items: flex-start;
    padding: 12px;
  }

  .mm-storefront-v143 .mm-stat-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .mm-storefront-v143 .mm-market-stats strong {
    font-size: 1.05rem;
  }

  .mm-storefront-v143 .mm-catalog-panel {
    padding: 15px;
  }

  .mm-storefront-v143 .mm-category-row-title small {
    display: none;
  }

  .mm-storefront-v143 .mm-empty-actions {
    display: grid;
  }

  .mm-storefront-v143 .mm-empty-actions .btn {
    width: 100%;
  }
}

/* MAKMEESHOP v14.4 — Marketplace collapsible category sidebar and empty-state repair
   Scope: marketplace.php presentation only. */
.mm-storefront-v144 .mm-catalog-panel {
  z-index: 30;
}

.mm-storefront-v144 .mm-results-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.mm-storefront-v144 .mm-sidebar-trigger {
  min-height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
}

.mm-storefront-v144 .mm-sidebar-trigger > span:first-child {
  font-size: 1rem;
  line-height: 1;
}

.mm-storefront-v144 .mm-market-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 268px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
  transition: grid-template-columns .22s ease, gap .22s ease;
}

.mm-storefront-v144 .mm-product-pane {
  min-width: 0;
  width: 100%;
}

.mm-storefront-v144 .mm-category-sidebar {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-width: 268px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(13,34,64,.94), rgba(7,21,42,.9));
  transition: opacity .18s ease, transform .22s ease, visibility .18s ease;
}

@media (min-width: 1101px) {
  .mm-storefront-v144 .mm-category-sidebar {
    position: sticky;
    top: 278px;
    max-height: calc(100vh - 300px);
  }
}

.mm-storefront-v144 .mm-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 17px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.mm-storefront-v144 .mm-sidebar-head > div {
  min-width: 0;
}

.mm-storefront-v144 .mm-sidebar-head .eyebrow {
  margin: 0 0 4px;
  font-size: .63rem;
  letter-spacing: .13em;
  white-space: nowrap;
}

.mm-storefront-v144 .mm-sidebar-head h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.mm-storefront-v144 .mm-sidebar-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .7rem;
}

.mm-storefront-v144 .mm-sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--mm-border);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255,255,255,.05);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.mm-storefront-v144 .mm-category-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: none;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(129,166,205,.38) transparent;
  overscroll-behavior: contain;
}

.mm-storefront-v144 .mm-category-list::-webkit-scrollbar {
  width: 6px;
}

.mm-storefront-v144 .mm-category-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(129,166,205,.34);
}

.mm-storefront-v144 .mm-category-item {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.mm-storefront-v144 .mm-category-item:hover,
.mm-storefront-v144 .mm-category-item:focus-visible {
  border-color: rgba(53,167,255,.26);
  background: rgba(53,167,255,.08);
  transform: translateX(2px);
  outline: none;
}

.mm-storefront-v144 .mm-category-item.is-active {
  border-color: rgba(255,182,60,.34);
  background: linear-gradient(135deg, rgba(255,173,36,.15), rgba(53,167,255,.09));
  box-shadow: inset 3px 0 0 #ffad24;
}

.mm-storefront-v144 .mm-category-item-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #ffd273;
  background: rgba(255,255,255,.045);
  font-size: .9rem;
}

.mm-storefront-v144 .mm-category-item-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.mm-storefront-v144 .mm-category-item-copy b,
.mm-storefront-v144 .mm-category-item-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-storefront-v144 .mm-category-item-copy b {
  font-size: .78rem;
  font-weight: 680;
  line-height: 1.35;
}

.mm-storefront-v144 .mm-category-item-copy small {
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.3;
}

.mm-storefront-v144 .mm-results-section.is-sidebar-collapsed .mm-market-layout {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0;
}

.mm-storefront-v144 .mm-results-section.is-sidebar-collapsed .mm-category-sidebar {
  width: 0;
  max-width: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-12px);
}

.mm-storefront-v144 .mm-product-grid,
.mm-storefront-v144 .mm-skeleton-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 238px), 1fr));
  width: 100%;
}

.mm-storefront-v144 .mm-grid-empty {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.mm-storefront-v144 .mm-grid-empty > *,
.mm-storefront-v144 .mm-grid-empty .mm-empty-copy,
.mm-storefront-v144 .mm-grid-empty .mm-empty-copy > * {
  min-width: 0;
  max-width: 100%;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.mm-storefront-v144 .mm-grid-empty .eyebrow {
  display: block;
  white-space: nowrap;
}

.mm-storefront-v144 .mm-grid-empty h2 {
  width: auto;
  white-space: normal !important;
}

.mm-storefront-v144 .mm-grid-empty .mm-empty-actions {
  min-width: max-content;
}

.mm-storefront-v144 .mm-sidebar-overlay[hidden] {
  display: none !important;
}

html[data-theme="light"] .mm-storefront-v144 .mm-category-sidebar {
  color: #07111f;
  background: rgba(255,255,255,.96);
  border-color: rgba(35,76,129,.13);
}

html[data-theme="light"] .mm-storefront-v144 .mm-sidebar-head {
  border-bottom-color: rgba(35,76,129,.1);
}

html[data-theme="light"] .mm-storefront-v144 .mm-category-item {
  color: #07111f;
}

html[data-theme="light"] .mm-storefront-v144 .mm-category-item:hover,
html[data-theme="light"] .mm-storefront-v144 .mm-category-item:focus-visible {
  border-color: rgba(31,111,207,.22);
  background: rgba(31,111,207,.065);
}

html[data-theme="light"] .mm-storefront-v144 .mm-category-item.is-active {
  border-color: rgba(220,132,0,.3);
  background: linear-gradient(135deg, rgba(255,174,38,.14), rgba(31,111,207,.07));
}

html[data-theme="light"] .mm-storefront-v144 .mm-category-item-icon,
html[data-theme="light"] .mm-storefront-v144 .mm-sidebar-close {
  color: #9b5b00;
  border-color: rgba(35,76,129,.12);
  background: rgba(31,88,160,.045);
}

@media (max-width: 1100px) {
  .mm-storefront-v144 .mm-market-layout {
    grid-template-columns: minmax(220px, 245px) minmax(0, 1fr);
    gap: 14px;
  }

  .mm-storefront-v144 .mm-category-sidebar {
    position: static;
    max-width: 245px;
    max-height: none;
  }

  .mm-storefront-v144 .mm-category-list {
    max-height: 520px;
  }

  .mm-storefront-v144 .mm-product-grid,
  .mm-storefront-v144 .mm-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mm-storefront-v144 .mm-results-head {
    align-items: start;
  }

  .mm-storefront-v144 .mm-results-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .mm-storefront-v144 .mm-market-layout,
  .mm-storefront-v144 .mm-results-section.is-sidebar-collapsed .mm-market-layout {
    display: block;
  }

  .mm-storefront-v144 .mm-category-sidebar,
  .mm-storefront-v144 .mm-results-section.is-sidebar-collapsed .mm-category-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1002;
    width: min(86vw, 330px);
    max-width: min(86vw, 330px);
    max-height: none;
    border-radius: 0 22px 22px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-105%);
    transition: opacity .2s ease, transform .24s ease, visibility .2s ease;
  }

  .mm-storefront-v144 .mm-results-section.is-mobile-sidebar-open .mm-category-sidebar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .mm-storefront-v144 .mm-sidebar-head {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .mm-storefront-v144 .mm-sidebar-close {
    display: grid;
  }

  .mm-storefront-v144 .mm-category-list {
    max-height: calc(100vh - 112px);
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .mm-storefront-v144 .mm-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(1,8,18,.64);
    backdrop-filter: blur(4px);
    cursor: pointer;
  }

  .mm-storefront-v144 .mm-product-grid,
  .mm-storefront-v144 .mm-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-storefront-v144 .mm-grid-empty {
    grid-template-columns: 1fr !important;
    justify-items: start;
    gap: 14px;
  }

  .mm-storefront-v144 .mm-grid-empty .mm-empty-actions {
    grid-column: auto;
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .mm-storefront-v144 .mm-product-grid,
  .mm-storefront-v144 .mm-skeleton-grid {
    grid-template-columns: 1fr;
  }

  .mm-storefront-v144 .mm-results-actions .btn {
    flex: 1 1 auto;
  }

  .mm-storefront-v144 .mm-grid-empty .mm-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mm-storefront-v144 .mm-grid-empty .mm-empty-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-storefront-v144 .mm-market-layout,
  .mm-storefront-v144 .mm-category-sidebar,
  .mm-storefront-v144 .mm-category-item {
    transition: none !important;
  }
}

@media (max-width: 760px) {
  body.mm-mobile-sidebar-open {
    overflow: hidden !important;
  }
}

/* MAKMEESHOP v14.5 — provider-backed marketplace integration keeps provider identity server-side only. */
