/* ========================================================================
 * landing-multishop.css — Overlay MultiShop+ pour le profil public landing.
 *
 * Auto-contenu : aucune dépendance vers admin-multishop-add-product.css.
 * Préfixe `mshop-` (mirror admin `mapp-` / `msa-`). Tokens scopés sous
 * `.zh-mshop-overlay` pour ne pas polluer le reste de la landing.
 *
 * Breakpoints :
 *   < 768px   : 1 col stack, sidebar dessous, actions sticky bottom
 *   768-1099  : 2 cols étroits (form + sidebar 300px)
 *   ≥ 1100px  : 2 cols (form + sidebar 360px)
 * ======================================================================== */

.zh-mshop-overlay {
  --mshop-primary: #8d22ff;
  --mshop-primary-dk: #6d28d9;
  --mshop-primary-soft: #f3e8ff;
  --mshop-bg: #f6f5fb;
  --mshop-card: #ffffff;
  --mshop-text: #111827;
  --mshop-text-soft: #475569;
  --mshop-text-muted: #94a3b8;
  --mshop-border: #e5e7eb;
  --mshop-border-strong: #cbd5e1;
  --mshop-input-bg: #ffffff;
  --mshop-row-hover: #f8fafc;
  --mshop-red: #ef4444;
  --mshop-red-soft: #fee2e2;
  --mshop-green: #10b981;
  --mshop-radius: 16px;
  --mshop-radius-sm: 10px;
  --mshop-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);

  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(15, 8, 38, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  padding: 0;
}

.zh-mshop-overlay[hidden] { display: none; }

.zh-mshop-overlay-card {
  position: relative;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  background: var(--mshop-bg);
  border-radius: 0;
  box-shadow: 0 30px 80px rgba(15, 8, 38, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .zh-mshop-overlay { padding: 24px; }
  .zh-mshop-overlay-card {
    max-height: calc(100vh - 48px);
    border-radius: 22px;
  }
}

.zh-mshop-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(17, 24, 39, 0.06);
  color: var(--mshop-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 120ms ease, transform 120ms ease;
}
.zh-mshop-overlay-close:hover { background: rgba(17, 24, 39, 0.12); transform: scale(1.05); }
.zh-mshop-overlay-close svg { width: 18px; height: 18px; }

.mshop-root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Header overlay ─────────────────────────────────────────────────── */
.mshop-overlay-head {
  padding: 20px 20px 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--mshop-bg) 100%);
  border-bottom: 1px solid var(--mshop-border);
}
@media (min-width: 768px) { .mshop-overlay-head { padding: 24px 32px 14px; } }

.mshop-overlay-head-text { max-width: 780px; }
.mshop-overlay-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--mshop-text);
  letter-spacing: -0.01em;
}
@media (min-width: 768px) { .mshop-overlay-title { font-size: 24px; } }
.mshop-overlay-sub {
  margin: 0;
  font-size: 13px;
  color: var(--mshop-text-soft);
}

/* ─── Screens (ptype / form / success) ──────────────────────────────── */
.mshop-screen {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mshop-screen[hidden] { display: none; }

/* ──────────────────────────────────────────────────────────────────────
 * Screen A : popup COMPACT type-de-produit (mirror admin .msa-modal--ptype)
 * Quand `data-current-screen="ptype"` est sur l'overlay, la grande carte
 * plein-écran disparaît et le backdrop centre une petite modale (max 520px).
 * ────────────────────────────────────────────────────────────────────── */
.zh-mshop-overlay[data-current-screen="ptype"] .zh-mshop-overlay-card { display: none; }
.zh-mshop-overlay:not([data-current-screen="ptype"]) .zh-mshop-ptype-modal { display: none; }

.zh-mshop-overlay[data-current-screen="ptype"] {
  align-items: center;
  padding: 16px;
}

.zh-mshop-ptype-modal {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zh-mshop-ptype-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 0;
}

.zh-mshop-ptype-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  display: block;
  flex: 0 0 auto;
  animation: mshop-ptype-in 0.18s ease-out;
}
@keyframes mshop-ptype-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.zh-mshop-ptype-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 0;
}
.zh-mshop-ptype-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mshop-primary), rgba(141, 34, 255, 0.85));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 1 1 auto;
}
.zh-mshop-ptype-close {
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--mshop-text-soft);
  padding: 6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: background 120ms ease, color 120ms ease;
}
.zh-mshop-ptype-close:hover { background: var(--mshop-row-hover); color: var(--mshop-text); }
.zh-mshop-ptype-close svg { width: 20px; height: 20px; }

.zh-mshop-ptype-title {
  margin: 0;
  padding: 8px 22px 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--mshop-text);
}
.zh-mshop-ptype-sub {
  margin: 0;
  padding: 0 22px 16px;
  font-size: 13.5px;
  color: var(--mshop-text-soft);
  line-height: 1.45;
}

.zh-mshop-ptype-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 0 22px;
}
@media (min-width: 460px) {
  .zh-mshop-ptype-grid { grid-template-columns: 1fr 1fr; }
}

.zh-mshop-ptype-tile {
  position: relative;
  background: #fafafc;
  border: 1.5px solid var(--mshop-border);
  border-radius: 16px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  transition: border-color 180ms ease, transform 120ms ease, box-shadow 180ms ease;
}
.zh-mshop-ptype-tile:not(:disabled):hover {
  border-color: var(--mshop-primary);
  box-shadow: 0 6px 18px rgba(141, 34, 255, 0.12);
  transform: translateY(-1px);
}
.zh-mshop-ptype-tile:focus-visible {
  outline: none;
  border-color: var(--mshop-primary);
  box-shadow: 0 0 0 4px var(--mshop-primary-soft);
}
.zh-mshop-ptype-tile--disabled {
  cursor: not-allowed;
  opacity: 0.85;
}
.zh-mshop-ptype-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mshop-primary-soft);
  color: var(--mshop-primary);
}
.zh-mshop-ptype-icon svg { width: 26px; height: 26px; }
.zh-mshop-ptype-label {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--mshop-text);
}
.zh-mshop-ptype-hint {
  margin: 0;
  font-size: 12px;
  color: var(--mshop-text-soft);
  line-height: 1.4;
}
.zh-mshop-ptype-badge {
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(141, 34, 255, 0.1);
  color: var(--mshop-primary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zh-mshop-ptype-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
}

/* ────────────── Screen B : Form ─────────────── */
.mshop-screen--form {
  padding: 18px 16px 28px;
  background: var(--mshop-bg);
}
@media (min-width: 768px) {
  .mshop-screen--form { padding: 20px 32px 36px; }
}

.mshop-form-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
@media (min-width: 768px) { .mshop-form-head { margin-bottom: 22px; } }

.mshop-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--mshop-border);
  background: #ffffff;
  border-radius: 999px;
  color: var(--mshop-text-soft);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  width: fit-content;
}
.mshop-back:hover { background: var(--mshop-row-hover); color: var(--mshop-text); }
.mshop-back svg { width: 14px; height: 14px; }

.mshop-form-title {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 700;
  color: var(--mshop-text);
}
@media (min-width: 768px) { .mshop-form-title { font-size: 24px; } }
.mshop-form-subtitle {
  margin: 0;
  color: var(--mshop-text-soft);
  font-size: 13.5px;
}

.mshop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 1100px) {
  .mshop-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
  }
}
@media (min-width: 768px) and (max-width: 1099.9px) {
  .mshop-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
  }
}

.mshop-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 768px) { .mshop-main { gap: 18px; } }

.mshop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 1100px) {
  .mshop-sidebar { position: sticky; top: 0; }
}

/* ─── Cards & sections ─────────────────────────────────────────────── */
.mshop-card {
  background: var(--mshop-card);
  border-radius: var(--mshop-radius);
  border: 1px solid var(--mshop-border);
  padding: 16px;
  box-shadow: var(--mshop-shadow);
}
@media (min-width: 768px) { .mshop-card { padding: 20px; } }

.mshop-card-head { margin-bottom: 12px; }
.mshop-section-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--mshop-text);
}
@media (min-width: 768px) { .mshop-section-title { font-size: 16px; } }
.mshop-section-sub {
  margin: 0;
  color: var(--mshop-text-soft);
  font-size: 12.5px;
}

/* ─── Fields ──────────────────────────────────────────────────────── */
.mshop-field {
  display: block;
  margin-bottom: 14px;
}
.mshop-field:last-child { margin-bottom: 0; }
.mshop-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mshop-text);
  margin-bottom: 6px;
}
.mshop-field-help {
  display: block;
  font-size: 11.5px;
  color: var(--mshop-text-muted);
  margin-top: 4px;
}
.mshop-field-error {
  display: block;
  font-size: 12px;
  color: var(--mshop-red);
  min-height: 16px;
  margin-top: 4px;
}
.mshop-field.is-invalid .mshop-input,
.mshop-field.is-invalid .mshop-textarea {
  border-color: var(--mshop-red);
  background: #fff1f2;
}

.mshop-input,
.mshop-textarea {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--mshop-text);
  background: var(--mshop-input-bg);
  border: 1px solid var(--mshop-border-strong);
  border-radius: var(--mshop-radius-sm);
  padding: 10px 12px;
  line-height: 1.4;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  box-sizing: border-box;
}
.mshop-input:focus,
.mshop-textarea:focus {
  outline: none;
  border-color: var(--mshop-primary);
  box-shadow: 0 0 0 3px var(--mshop-primary-soft);
}
.mshop-input::placeholder,
.mshop-textarea::placeholder { color: var(--mshop-text-muted); }
.mshop-textarea { resize: vertical; min-height: 88px; }

.mshop-input-prefix { position: relative; display: block; }
.mshop-input-prefix .mshop-prefix {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--mshop-text-soft);
  pointer-events: none;
}
.mshop-input-prefix .mshop-input { padding-left: 26px; }

.mshop-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 540px) { .mshop-field-row { grid-template-columns: 1fr 1fr; gap: 14px; } }
.mshop-field-row--3 { grid-template-columns: 1fr; }
@media (min-width: 540px) { .mshop-field-row--3 { grid-template-columns: 1fr 1fr 1fr; } }
.mshop-field-row .mshop-field { margin-bottom: 0; }

/* ─── Media zone ──────────────────────────────────────────────────── */
.mshop-media {
  border: 2px dashed var(--mshop-border-strong);
  border-radius: var(--mshop-radius-sm);
  padding: 18px;
  background: #fafbff;
  cursor: pointer;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease;
}
.mshop-media:hover,
.mshop-media:focus,
.mshop-media.is-dragover {
  border-color: var(--mshop-primary);
  background: var(--mshop-primary-soft);
  outline: none;
}
.mshop-media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--mshop-text-soft);
}
.mshop-media-empty svg { width: 36px; height: 36px; color: var(--mshop-text-muted); }
.mshop-media-empty p { margin: 0; font-size: 13px; }

.mshop-media-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.mshop-media-grid[hidden] { display: none; }

.mshop-media-tile {
  position: relative;
  border-radius: var(--mshop-radius-sm);
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--mshop-border);
  aspect-ratio: 1 / 1;
}
.mshop-media-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-color: #f1f5f9;
}
.mshop-media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.mshop-media-main-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--mshop-primary);
  color: #ffffff;
  padding: 3px 6px;
  border-radius: 4px;
}
.mshop-media-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mshop-media-remove:hover { background: var(--mshop-red); }
.mshop-media-remove svg { width: 12px; height: 12px; }
.mshop-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mshop-media-overlay[hidden] { display: none; }
.mshop-spinner-sm {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: mshop-spin 0.85s linear infinite;
}

@keyframes mshop-spin { to { transform: rotate(360deg); } }

/* ─── Variants ────────────────────────────────────────────────────── */
.mshop-variants { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }
.mshop-variant-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  background: var(--mshop-row-hover);
  border-radius: var(--mshop-radius-sm);
  border: 1px solid var(--mshop-border);
  align-items: end;
}
@media (min-width: 540px) {
  .mshop-variant-row { grid-template-columns: 1fr 1.4fr 36px; gap: 10px; }
}
.mshop-variant-row .mshop-field { margin-bottom: 0; }
.mshop-variant-remove {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--mshop-border);
  background: #ffffff;
  color: var(--mshop-text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
}
.mshop-variant-remove:hover { background: var(--mshop-red-soft); color: var(--mshop-red); border-color: var(--mshop-red); }
.mshop-variant-remove svg { width: 14px; height: 14px; }

.mshop-add-row {
  align-self: flex-start;
}

/* ─── Sidebar : Preview / Publishing / Share ──────────────────────── */
.mshop-sidebar-card { padding: 16px; }

.mshop-preview-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mshop-text-soft);
  margin-bottom: 12px;
}
.mshop-preview-head svg { width: 14px; height: 14px; }
.mshop-preview-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.mshop-preview { display: flex; flex-direction: column; gap: 10px; }
.mshop-preview-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eef2ff;
  border-radius: var(--mshop-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
.mshop-preview-image video { width: 100%; height: 100%; object-fit: cover; }
.mshop-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mshop-text-muted);
}
.mshop-preview-placeholder svg { width: 36px; height: 36px; }
.mshop-preview-image.has-image .mshop-preview-placeholder { display: none; }

.mshop-preview-body { display: flex; flex-direction: column; gap: 6px; }
.mshop-preview-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--mshop-text);
}
.mshop-preview-name.is-placeholder { color: var(--mshop-text-muted); font-weight: 500; font-style: italic; }
.mshop-preview-price-row { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.mshop-preview-price-row[hidden] { display: none; }
.mshop-preview-price { font-size: 16px; font-weight: 700; color: var(--mshop-primary-dk); }
.mshop-preview-compare { font-size: 13px; color: var(--mshop-text-muted); text-decoration: line-through; }
.mshop-preview-compare[hidden] { display: none; }
.mshop-preview-discount {
  font-size: 11px;
  font-weight: 700;
  background: #fee2e2;
  color: #b91c1c;
  padding: 2px 6px;
  border-radius: 999px;
}
.mshop-preview-discount[hidden] { display: none; }
.mshop-preview-desc { margin: 0; font-size: 12.5px; color: var(--mshop-text-soft); }
.mshop-preview-desc[hidden] { display: none; }

/* ─── Publishing / Status ─────────────────────────────────────────── */
.mshop-store-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--mshop-row-hover);
  border-radius: var(--mshop-radius-sm);
  margin-bottom: 14px;
}
.mshop-store-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--mshop-text); }
.mshop-store-sub { margin: 0; font-size: 11.5px; color: var(--mshop-text-muted); }
.mshop-toggle-locked {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mshop-green); color: #fff; border-radius: 999px;
}
.mshop-toggle-locked svg { width: 14px; height: 14px; }

.mshop-status { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mshop-status .mshop-field-label { margin-bottom: 2px; }

.mshop-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--mshop-radius-sm);
}
.mshop-radio:hover { background: var(--mshop-row-hover); }
.mshop-radio input { position: absolute; opacity: 0; pointer-events: none; }
.mshop-radio-bullet {
  width: 16px; height: 16px;
  border: 1.5px solid var(--mshop-border-strong);
  border-radius: 999px;
  display: inline-block; flex: 0 0 16px;
  position: relative;
  transition: border-color 120ms ease;
}
.mshop-radio input:checked + .mshop-radio-bullet { border-color: var(--mshop-primary); }
.mshop-radio input:checked + .mshop-radio-bullet::after {
  content: ""; position: absolute; inset: 3px; border-radius: 999px; background: var(--mshop-primary);
}
.mshop-radio-label { font-size: 13px; color: var(--mshop-text); }
.mshop-status-help[hidden] { display: none; }

/* ─── Share to social ─────────────────────────────────────────────── */
.mshop-share { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mshop-share li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--mshop-radius-sm);
  background: var(--mshop-row-hover);
}
.mshop-share li label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; min-width: 0; }
.mshop-share-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--mshop-border);
  flex: 0 0 24px;
  overflow: hidden;
}
.mshop-share-icon img { width: 16px; height: 16px; object-fit: contain; }
.mshop-share-name { font-size: 13px; color: var(--mshop-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mshop-share-empty { margin: 0; font-size: 12.5px; color: var(--mshop-text-muted); }

/* ─── Buttons + actions (mirror admin .mapp-btn) ───────────────────── */
.mshop-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--mshop-radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 180ms ease, transform 120ms ease, border-color 180ms ease, box-shadow 180ms ease;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.mshop-btn:focus-visible { outline: 2px solid var(--mshop-primary); outline-offset: 2px; }
.mshop-btn:active { transform: scale(0.98); }
.mshop-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.mshop-btn--primary {
  background: var(--mshop-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(141, 34, 255, 0.28);
}
.mshop-btn--primary:hover:not(:disabled) { background: var(--mshop-primary-dk); }
.mshop-btn--ghost {
  background: transparent;
  color: var(--mshop-text-soft);
  border-color: var(--mshop-border);
}
.mshop-btn--ghost:hover:not(:disabled) { background: var(--mshop-row-hover); color: var(--mshop-text); }
.mshop-btn[disabled],
.mshop-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.mshop-btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: mshop-spin 0.8s linear infinite;
  margin-left: 4px;
}
.mshop-btn--ghost .mshop-btn-spinner { border-color: rgba(17, 24, 39, 0.18); border-top-color: var(--mshop-text); }

.mshop-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
@media (min-width: 1100px) {
  .mshop-actions {
    position: sticky;
    bottom: 0;
    padding: 8px 0;
    background: linear-gradient(180deg, transparent 0%, var(--mshop-bg) 30%);
  }
}
.mshop-actions .mshop-btn { width: 100%; padding: 12px 16px; font-size: 14px; }
.mshop-actions-help {
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--mshop-text-muted);
}

/* Sticky footer actions on mobile (more compact) */
@media (max-width: 767.9px) {
  .mshop-actions {
    position: sticky;
    bottom: 0;
    background: var(--mshop-bg);
    padding: 10px 12px;
    margin: 0 -16px -28px;
    border-top: 1px solid var(--mshop-border);
    z-index: 4;
  }
  .mshop-actions-help { padding: 0 4px; }
}

/* ─── Stripe modal (gate before save) ─────────────────────────────── */
.mshop-modal {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}
.mshop-modal[hidden] { display: none; }
.mshop-modal-backdrop { position: absolute; inset: 0; }
.mshop-modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--mshop-radius);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mshop-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 4px;
}
.mshop-modal-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--mshop-primary-soft);
  color: var(--mshop-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.mshop-modal-icon svg { width: 20px; height: 20px; }
.mshop-modal-title { flex: 1; margin: 0; font-size: 16px; font-weight: 700; color: var(--mshop-text); }
.mshop-modal-close {
  width: 30px; height: 30px;
  border-radius: 999px; border: none;
  background: rgba(17, 24, 39, 0.06);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.mshop-modal-close svg { width: 14px; height: 14px; }
.mshop-modal-body { padding: 12px 18px 14px; }
.mshop-modal-text { margin: 0 0 12px; font-size: 13.5px; color: var(--mshop-text); line-height: 1.45; }
.mshop-modal-info {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: var(--mshop-primary-soft);
  border-radius: var(--mshop-radius-sm);
  font-size: 12.5px;
  color: var(--mshop-primary-dk);
}
.mshop-modal-info svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.mshop-modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--mshop-border);
}
.mshop-modal-foot .mshop-btn { padding: 9px 14px; }

/* ─── Connect busy (post-Stripe-confirm overlay during poll) ──────── */
.mshop-connect-busy {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  display: flex; align-items: center; justify-content: center;
  z-index: 11;
}
.mshop-connect-busy[hidden] { display: none; }
.mshop-connect-busy-inner {
  text-align: center;
  max-width: 420px;
  padding: 24px;
}
.mshop-connect-busy-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--mshop-primary-soft);
  border-top-color: var(--mshop-primary);
  border-radius: 999px;
  animation: mshop-spin 0.85s linear infinite;
  margin: 0 auto 14px;
}
.mshop-connect-busy-title { font-size: 15px; font-weight: 700; color: var(--mshop-text); margin-bottom: 6px; }
.mshop-connect-busy-hint { margin: 0 0 16px; font-size: 13px; color: var(--mshop-text-soft); line-height: 1.5; }
.mshop-connect-busy-cancel {
  background: transparent;
  border: 1px solid var(--mshop-border-strong);
  color: var(--mshop-text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
.mshop-connect-busy-cancel:hover { background: var(--mshop-row-hover); }

/* ─── Success screen ──────────────────────────────────────────────── */
.mshop-screen--success {
  align-items: center;
  justify-content: center;
  padding: 36px 20px 60px;
}
.mshop-success-card {
  text-align: center;
  max-width: 460px;
}
.mshop-success-icon {
  width: 72px; height: 72px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--mshop-green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.mshop-success-title { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: var(--mshop-text); }
.mshop-success-body { margin: 0 0 20px; color: var(--mshop-text-soft); font-size: 14px; }
.mshop-success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ─── Toasts ──────────────────────────────────────────────────────── */
.mshop-toasts {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
  width: min(420px, calc(100% - 32px));
}
.mshop-toast {
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  animation: mshop-toast-in 0.2s ease;
}
.mshop-toast--success { background: var(--mshop-green); }
.mshop-toast--error { background: var(--mshop-red); }
.mshop-toast--info { background: var(--mshop-primary); }

@keyframes mshop-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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