/* ==========================================================================
   Shop module styles — magazine / creative-brand aesthetic
   Palette: black #1d1d1d · gold #fbc210 · red #ec0e0e · greys #f6f6f6 / #eee
   Scoped with the `mn-` prefix so it never collides with global site styles.
   ========================================================================== */

:root {
  --mn-black: #1d1d1d;
  --mn-ink: #212529;
  --mn-gold: #fbc210;
  --mn-red: #ec0e0e;
  --mn-grey: #f6f6f6;
  --mn-line: #ececec;
  --mn-muted: #848484;
}

.mn-wrap {
  padding-top: 40px;
  padding-bottom: 70px;
}

/* ---- Editorial page header ------------------------------------------------ */
.mn-hero {
  background: var(--mn-black);
  color: #fff;
  padding: 54px 0;
  margin-bottom: 40px;
}
.mn-eyebrow {
  display: inline-block;
  background: var(--mn-gold);
  color: #000;
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 14px;
  margin-bottom: 16px;
}
.mn-hero h1 {
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.875rem);
  line-height: 1.05;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.mn-hero p {
  color: #cfcfcf;
  max-width: 640px;
  margin: 0;
  font-size: 11pt;
}
.mn-rule {
  height: 4px;
  width: 70px;
  background: var(--mn-red);
  margin: 22px 0 0;
}

/* ---- Buttons -------------------------------------------------------------- */
.mn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  height: auto;
  padding: 8px 22px;
  border: 1px solid var(--mn-black);
  background: transparent;
  color: var(--mn-black);
  font-size: 10pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 0;
  cursor: pointer;
  transition: .2s ease;
}
.mn-btn:hover { background: var(--mn-black); color: #fff; }
.mn-btn-primary { background: var(--mn-red); border-color: var(--mn-red); color: #fff; }
.mn-btn-primary:hover { background: #c00b0b; border-color: #c00b0b; color: #fff; }
.mn-btn-dark { background: var(--mn-black); color: #fff; }
.mn-btn-dark:hover { background: #000; color: var(--mn-gold); }
.mn-btn-gold { background: var(--mn-gold); border-color: var(--mn-gold); color: #000; }
.mn-btn-gold:hover { background: #e0ad00; border-color: #e0ad00; color: #000; }
.mn-btn-sm { min-height: 38px; padding: 8px 14px; }
.mn-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- Store directory ------------------------------------------------------ */
/* .mn-store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 26px; } */
.mn-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.mn-store-card {
  border: 1px solid var(--mn-line);
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: .25s ease;
}
.mn-store-card:hover { box-shadow: 0 18px 40px rgba(0,0,0,.10); transform: translateY(-4px); }
.mn-store-banner {
  height: 132px;
  background: linear-gradient(135deg, #1d1d1d 0%, #333 55%, #fbc210 140%);
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 26px;
}
.mn-store-banner.alt { background: linear-gradient(135deg, #ec0e0e 0%, #1d1d1d 70%); }
.mn-store-banner.tri { background: linear-gradient(135deg, #1d1d1d 0%, #ec0e0e 60%, #fbc210 140%); }
.mn-store-initial {
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  border: 3px solid rgba(255,255,255,.85);
  padding: 6px 16px;
}
.mn-store-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.mn-store-name { font-size: 19px; font-weight: 800; color: var(--mn-ink); margin: 0 0 8px; }
.mn-store-desc { color: #5f5f5f; font-size: 10pt; flex: 1; margin-bottom: 18px; }
.mn-store-meta {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--mn-line); padding-top: 16px; margin-top: auto;
  flex-wrap: wrap; gap: 8px;
}
.mn-store-count { font-size: 9pt; text-transform: uppercase; letter-spacing: .5px; color: var(--mn-muted); }
.mn-store-count b { color: var(--mn-ink); }

/* ---- Shop layout + filter sidebar ---------------------------------------- */
.mn-layout { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 34px; align-items: start; }
.mn-layout > * { min-width: 0; }
@media (max-width: 992px) { .mn-layout { grid-template-columns: 1fr; } }

.mn-sidebar { border: 1px solid var(--mn-line); }
.mn-sidebar-head {
  background: var(--mn-black); color: #fff; padding: 16px 20px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 10pt;
}
.mn-filter-block { padding: 18px 20px; border-bottom: 1px solid var(--mn-line); }
.mn-filter-block:last-child { border-bottom: none; }
.mn-filter-title {
  font-size: 9pt; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 700; color: var(--mn-ink); margin-bottom: 12px;
}
.mn-filter-link { display: block; color: #555; font-size: 10pt; padding: 5px 0; }
.mn-filter-link:hover { color: var(--mn-red); }
.mn-filter-link.active { color: var(--mn-red); font-weight: 700; }
.mn-filter-input {
  width: 100%; height: 40px; border: 1px solid #ddd; padding: 0 12px;
  font-size: 10pt; margin-bottom: 10px; border-radius: 0;
}
.mn-price-row { display: flex; gap: 8px; }
.mn-price-row > * { min-width: 0; flex: 1 1 0; }
.mn-check { display: flex; align-items: center; gap: 8px; font-size: 10pt; color: #555; }

/* ---- Product grid & cards ------------------------------------------------- */
.mn-grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.mn-grid-head h2 { font-weight: 800; font-size: 24px; margin: 0; }
.mn-grid-head .mn-count { color: var(--mn-muted); font-size: 10pt; }
.mn-sort { max-width: 100%; height: 40px; border: 1px solid #ddd; padding: 0 10px; font-size: 10pt; border-radius: 0; }

/* .mn-product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 26px; } */
.mn-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; }
.mn-product-card { border: 1px solid var(--mn-line); background: #fff; display: flex; flex-direction: column; transition: .25s ease; }
.mn-product-card,
.mn-product-body { min-width: 0; }
.mn-product-card:hover { box-shadow: 0 18px 40px rgba(0,0,0,.10); transform: translateY(-4px); }
.mn-product-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--mn-grey); }
.mn-product-media img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.mn-product-card:hover .mn-product-media img { transform: scale(1.06); }
.mn-product-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.mn-product-cat { font-size: 8.5pt; text-transform: uppercase; letter-spacing: 1px; color: var(--mn-muted); margin-bottom: 6px; }
.mn-product-name { font-size: 15px; font-weight: 700; color: var(--mn-ink); margin: 0 0 8px; overflow-wrap: anywhere; }
.mn-product-name a { color: inherit; }
.mn-product-name a:hover { color: var(--mn-red); }
.mn-product-price { font-size: 15px; font-weight: 800; color: var(--mn-black); margin: auto 0 14px; }
.mn-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--mn-gold); color: #000; font-size: 8.5pt; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px;
}
.mn-badge-out { background: var(--mn-red); color: #fff; }
.mn-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mn-card-actions .mn-btn { flex: 1 1 120px; min-width: 0; white-space: normal; }

.mn-empty {
  border: 1px dashed #d8d8d8; background: var(--mn-grey); padding: 50px 30px;
  text-align: center; color: var(--mn-muted);
  overflow-wrap: anywhere;
}

/* ---- Breadcrumb / back link ---------------------------------------------- */
.mn-crumb { font-size: 9.5pt; text-transform: uppercase; letter-spacing: .5px; color: var(--mn-muted); margin-bottom: 22px; }
.mn-crumb a { color: var(--mn-muted); }
.mn-crumb a:hover { color: var(--mn-red); }

/* ---- Single product ------------------------------------------------------- */
.mn-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.mn-detail > * { min-width: 0; }
@media (max-width: 992px) { .mn-detail { grid-template-columns: 1fr; gap: 28px; } }
.mn-gallery-main { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--mn-grey); border: 1px solid var(--mn-line); }
.mn-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.mn-gallery-thumbs img { width: 84px; height: 84px; object-fit: cover; border: 1px solid var(--mn-line); cursor: pointer; }
.mn-detail-cat { font-size: 9pt; text-transform: uppercase; letter-spacing: 1px; color: var(--mn-muted); }
.mn-detail h1 { font-weight: 800; font-size: clamp(1.6rem, 4vw, 2rem); margin: 8px 0 14px; line-height: 1.15; overflow-wrap: anywhere; }
.mn-detail-price { font-size: 26px; font-weight: 800; color: var(--mn-red); margin-bottom: 6px; }
.mn-detail-stock { font-size: 10pt; color: var(--mn-muted); margin-bottom: 22px; }
.mn-detail-desc { color: #444; font-size: 10.5pt; line-height: 1.7; margin-bottom: 24px; }
.mn-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.mn-tag {
  border: 1px solid #ddd; padding: 4px 12px; font-size: 9pt; color: #555;
  text-transform: uppercase; letter-spacing: .5px;
}
.mn-tag:hover { border-color: var(--mn-red); color: var(--mn-red); }
.mn-buy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.mn-buy-row .mn-btn { flex: 1 1 180px; white-space: normal; }
.mn-qty { width: 84px; height: 44px; border: 1px solid #ddd; padding: 0 12px; border-radius: 0; text-align: center; }
.mn-seller {
  border-top: 1px solid var(--mn-line); margin-top: 10px; padding-top: 18px;
  font-size: 10pt; color: #555;
}
.mn-seller a { color: var(--mn-red); font-weight: 700; }

/* ---- Reviews -------------------------------------------------------------- */
.mn-section-title { font-weight: 800; font-size: 22px; margin: 54px 0 20px; }
.mn-review { border-bottom: 1px solid var(--mn-line); padding: 18px 0; }
.mn-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.mn-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--mn-black); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase;
}
.mn-review-name { font-weight: 700; color: var(--mn-ink); }
.mn-review-date { font-size: 9pt; color: var(--mn-muted); }
.mn-review-body { color: #444; font-size: 10.5pt; line-height: 1.6; }
.mn-form-card { border: 1px solid var(--mn-line); padding: clamp(16px, 4vw, 26px); background: #fff; }
.mn-form-card textarea,
.mn-form-card input[type="text"] {
  width: 100%; border: 1px solid #ddd; padding: 12px; font-size: 10pt; border-radius: 0;
}

/* ---- Cart ---------------------------------------------------------------- */
.mn-cart-table { width: 100%; border-collapse: collapse; }
.mn-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mn-table-scroll:focus-visible { outline: 2px solid var(--mn-red); outline-offset: 2px; }
.mn-table-scroll > .mn-cart-table { min-width: 620px; }
.mn-table-scroll > .mn-m-table { min-width: 640px; }
.mn-cart-table th {
  text-align: left; font-size: 9pt; text-transform: uppercase; letter-spacing: 1px;
  color: var(--mn-muted); border-bottom: 2px solid var(--mn-black); padding: 12px 10px;
}
.mn-cart-table td { border-bottom: 1px solid var(--mn-line); padding: 16px 10px; vertical-align: middle; }
.mn-cart-thumb { width: 74px; height: 74px; object-fit: cover; border: 1px solid var(--mn-line); }
.mn-cart-name { font-weight: 700; color: var(--mn-ink); }
.mn-cart-summary { border: 1px solid var(--mn-line); padding: clamp(16px, 4vw, 26px); background: var(--mn-grey); }
.mn-cart-summary .row-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; font-size: 10.5pt; }
.mn-cart-summary .total { font-size: 20px; font-weight: 800; }
.mn-icon-btn { background: none; border: none; color: var(--mn-muted); cursor: pointer; font-size: 14pt; }
.mn-icon-btn:hover { color: var(--mn-red); }

/* ---- Pagination ---------------------------------------------------------- */
.mn-pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.mn-pager-link {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--mn-line); color: var(--mn-ink); font-weight: 700; font-size: 10pt; padding: 0 12px;
}
.mn-pager-link:hover { border-color: var(--mn-black); }
.mn-pager-link.active { background: var(--mn-black); border-color: var(--mn-black); color: var(--mn-gold); }

/* ---- Alerts -------------------------------------------------------------- */
.mn-alert { padding: 14px 18px; margin-bottom: 24px; font-size: 10pt; border-left: 4px solid; }
.mn-alert-ok { background: #f2fbf3; border-color: #1f9d4d; color: #14622f; }
.mn-alert-warn { background: #fff8e6; border-color: var(--mn-gold); color: #7a5b00; }
.mn-alert-err { background: #fdf1f1; border-color: var(--mn-red); color: #9c0d0d; }

/* ==========================================================================
   Merchant portal (/merchant) — reuses the public design tokens above.
   ========================================================================== */
.mn-m-body { background: var(--mn-grey); }

.mn-m-head { background: var(--mn-black); color: #fff; }
.mn-m-head-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.mn-m-brand { display: flex; align-items: center; gap: 14px; }
.mn-m-brand-mark {
  width: 46px; height: 46px; background: var(--mn-gold); color: #000;
  font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center;
}
.mn-m-brand-name { font-weight: 800; font-size: 17px; line-height: 1.1; }
.mn-m-brand-sub { font-size: 8.5pt; text-transform: uppercase; letter-spacing: 1px; color: #bdbdbd; }
.mn-m-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mn-m-head .mn-btn { border-color: rgba(255,255,255,.4); color: #fff; }
.mn-m-head .mn-btn:hover { background: #fff; color: #000; }
.mn-m-head .mn-btn-gold { border-color: var(--mn-gold); color: #000; }
.mn-m-head .mn-btn-gold:hover { background: #e0ad00; color: #000; }
.mn-m-head .mn-btn-dark { border-color: rgba(255,255,255,.4); }

.mn-m-shell {
  max-width: 1200px; margin: 0 auto; padding: 26px 20px 70px;
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; align-items: start;
}
@media (max-width: 900px) {
  .mn-m-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .mn-m-main.container { padding-right: 0; padding-left: 0; }
}
.mn-m-main { min-width: 0; }

.mn-m-nav { background: #fff; border: 1px solid var(--mn-line); display: flex; flex-direction: column; }
.mn-m-nav a {
  padding: 13px 18px; font-size: 10pt; font-weight: 600; color: #555;
  border-left: 3px solid transparent; display: flex; align-items: center; gap: 10px;
}
.mn-m-nav a:hover { color: var(--mn-ink); background: var(--mn-grey); }
.mn-m-nav a.active { color: var(--mn-red); border-left-color: var(--mn-red); background: #fff6f6; }
.mn-m-nav i { width: 18px; text-align: center; }
@media (max-width: 900px) {
  .mn-m-nav { flex-direction: row; overflow-x: auto; }
  .mn-m-nav a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .mn-m-nav a.active { border-bottom-color: var(--mn-red); }
}

.mn-m-page-title { font-weight: 800; font-size: clamp(1.35rem, 4vw, 1.625rem); margin: 0 0 6px; overflow-wrap: anywhere; }
.mn-m-page-sub { color: var(--mn-muted); font-size: 10pt; margin-bottom: 24px; overflow-wrap: anywhere; }
.mn-m-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.mn-m-toolbar > * { min-width: 0; max-width: 100%; }
.mn-m-order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }

.mn-m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
.mn-m-stat { background: #fff; border: 1px solid var(--mn-line); padding: 20px 22px; }
.mn-m-stat-num { font-size: 28px; font-weight: 800; color: var(--mn-black); line-height: 1.1; }
.mn-m-stat-label { font-size: 9pt; text-transform: uppercase; letter-spacing: 1px; color: var(--mn-muted); margin-top: 6px; }

.mn-m-card { background: #fff; border: 1px solid var(--mn-line); padding: clamp(14px, 3vw, 22px) clamp(12px, 3.3vw, 24px); min-width: 0; }
.mn-m-card + .mn-m-card { margin-top: 22px; }
.mn-terms-body { max-height: 420px; overflow-y: auto; border: 1px solid var(--mn-line); padding: 18px 20px; font-size: 10pt; line-height: 1.7; background: #fafafa; }

.mn-m-table { width: 100%; border-collapse: collapse; }
.mn-m-table th,
.mn-m-table td { overflow-wrap: anywhere; }
.mn-m-table th {
  text-align: left; font-size: 9pt; text-transform: uppercase; letter-spacing: 1px;
  color: var(--mn-muted); border-bottom: 2px solid var(--mn-black); padding: 11px 10px;
}
.mn-m-table td { border-bottom: 1px solid var(--mn-line); padding: 13px 10px; vertical-align: middle; font-size: 10pt; }
.mn-m-thumb { width: 54px; height: 54px; object-fit: cover; border: 1px solid var(--mn-line); }

.mn-m-pill { display: inline-block; font-size: 8.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px; white-space: nowrap; }
.mn-m-pill-ok { background: #e8f7ec; color: #14622f; }
.mn-m-pill-warn { background: #fff6da; color: #7a5b00; }
.mn-m-pill-err { background: #fdecec; color: #9c0d0d; }
.mn-m-pill-muted { background: #eee; color: #555; }

.mn-m-form label { font-size: 9.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--mn-ink); margin-bottom: 6px; display: block; }
.mn-m-form .form-control, .mn-m-form select, .mn-m-form textarea {
  border-radius: 0; border: 1px solid #ddd; font-size: 10pt; padding: 10px 12px;
}
.mn-m-form .form-control:focus, .mn-m-form select:focus, .mn-m-form textarea:focus {
  border-color: var(--mn-black); box-shadow: none;
}
.mn-m-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.mn-m-grid-2 > * { min-width: 0; }
@media (max-width: 700px) { .mn-m-grid-2 { grid-template-columns: 1fr; } }

.mn-m-foot { background: var(--mn-black); color: #bdbdbd; font-size: 9.5pt; }
.mn-m-foot-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.mn-m-foot a { color: var(--mn-gold); }

@media (max-width: 420px) {
  .mn-m-shell { padding-right: 12px; padding-left: 12px; }
  .mn-m-card { padding-right: 8px; padding-left: 8px; }
  .mn-store-body,
  .mn-product-body { padding-right: 14px; padding-left: 14px; }
  .mn-card-actions .mn-btn,
  .mn-buy-row .mn-btn { flex-basis: 100%; }
  .mn-gallery-thumbs { gap: 8px; }
  .mn-btn-sm { min-height: 44px; }
}
