/* Mnory 2026 card system */
:root {
  --mn-ink: #172033;
  --mn-muted: #697386;
  --mn-line: #e5e9f0;
  --mn-surface: #fff;
  --mn-soft: #f5f7fb;
  --mn-brand: #2563eb;
  --mn-brand-dark: #173ea5;
  --mn-teal: #0f766e;
  --mn-radius: 20px;
  --mn-shadow: 0 12px 36px rgba(20, 32, 58, .08);
}

.theme-toggle-btn {
  display: grid;
  place-items: center;
}
.theme-toggle-btn .material-icons { font-size: 20px; }
.fab-menu-items .theme-toggle-btn {
  background: linear-gradient(135deg, #334155 0%, #1e293b 55%, #0f172a 100%);
  color: #fff;
  flex: 0 0 52px;
  visibility: visible;
  opacity: 1;
}
.fab-menu-items .theme-toggle-btn:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 55%, #1e293b 100%);
}

.mn-product-card {
  background: var(--mn-surface);
  border: 1px solid var(--mn-line);
  border-radius: var(--mn-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(20, 32, 58, .055);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.mn-product-card:hover { transform: translateY(-6px); border-color: #cbd5e1; box-shadow: var(--mn-shadow); }
.mn-product-media { position: relative; aspect-ratio: 4 / 4.7; overflow: hidden; background: #f1f3f7; }
.mn-product-image-link { display: block; width: 100%; height: 100%; }
.mn-product-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease, opacity .4s ease; }
.mn-product-image--hover { opacity: 0; }
.mn-product-card:hover .mn-product-image--main { transform: scale(1.045); }
.mn-product-card:hover .mn-product-image--hover { opacity: 1; transform: scale(1.045); }
.mn-product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #aab2c0; }
.mn-product-placeholder .material-icons { font-size: 3rem; }
.mn-product-badges { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 3; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mn-badge {
  display: inline-flex; gap: 5px; align-items: center;
  padding: 6px 11px 6px 9px; color: #fff; border-radius: 999px;
  font-size: .68rem; font-weight: 750; letter-spacing: .02em; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 4px 14px rgba(20,32,58,.18), inset 0 1px 0 rgba(255,255,255,.25);
  backdrop-filter: blur(4px);
}
[dir="rtl"] .mn-badge { padding: 6px 9px 6px 11px; }
.mn-badge i { font-size: .72em; opacity: .95; }
.mn-badge b { font-weight: 800; }
.mn-badge--sale { background: linear-gradient(135deg, #ff5b5b, #dc2626 65%, #b91c1c); box-shadow: 0 4px 16px rgba(220,38,38,.38), inset 0 1px 0 rgba(255,255,255,.25); }
.mn-badge--new { background: linear-gradient(135deg, #4f8bff, var(--mn-brand) 65%, var(--mn-brand-dark)); box-shadow: 0 4px 16px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.mn-badge--best { background: linear-gradient(135deg, #f59e0b, #b45309 70%); box-shadow: 0 4px 16px rgba(180,83,9,.32), inset 0 1px 0 rgba(255,255,255,.25); }
.mn-badge--dark { background: linear-gradient(135deg, #4b5568, var(--mn-ink) 70%); }
.mn-product-actions { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 3; display: grid; gap: 8px; transform: translateX(12px); opacity: 0; transition: .25s ease; }
[dir="rtl"] .mn-product-actions { transform: translateX(-12px); }
.mn-product-card:hover .mn-product-actions, .mn-product-card:focus-within .mn-product-actions { opacity: 1; transform: none; }
.mn-icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; border: 1px solid rgba(23,32,51,.1); background: rgba(255,255,255,.94); color: var(--mn-ink); box-shadow: 0 5px 16px rgba(20,32,58,.12); transition: .2s ease; backdrop-filter: blur(8px); }
.mn-icon-btn:hover, .mn-icon-btn.active { background: var(--mn-ink); border-color: var(--mn-ink); color: #fff; transform: scale(1.05); }
.mn-product-body { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.mn-product-eyebrow { color: var(--mn-brand); text-transform: uppercase; letter-spacing: .09em; font-size: .64rem; font-weight: 700; margin-bottom: 5px; }
.mn-product-title { color: var(--mn-ink); text-decoration: none; font-size: .96rem; font-weight: 650; line-height: 1.42; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-product-title:hover { color: var(--mn-brand); }
.mn-product-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: .72rem; color: var(--mn-muted); }
.mn-rating i { color: #f59e0b; }
.mn-rating small { color: #9aa3b1; }
.mn-stock { display: inline-flex; align-items: center; gap: 5px; color: #16794b; white-space: nowrap; }
.mn-stock i { font-size: .38rem; }
.mn-stock--out { color: #b42318; }
.mn-product-footer { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-top: auto; padding-top: 14px; }
.mn-product-price { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.mn-product-price-main { display: flex; align-items: baseline; gap: 4px; line-height: 1; white-space: nowrap; }
.mn-price-symbol { color: var(--mn-brand); font-size: .78rem; font-weight: 800; align-self: flex-start; margin-top: 1px; }
.mn-price-amount { color: var(--mn-ink); font-size: 1.22rem; font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.mn-price-currency { color: #7b8494; font-size: .58rem; font-weight: 750; letter-spacing: .055em; }
.mn-product-price-sale { display: flex; align-items: center; gap: 6px; line-height: 1; }
.mn-product-price-sale del { color: #939cab; font-size: .68rem; }
.mn-product-price-sale span { color: #b42318; background: #fff0ed; border-radius: 999px; padding: 3px 6px; font-size: .56rem; font-weight: 750; white-space: nowrap; }
.mn-product-arrow { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--mn-ink); background: var(--mn-soft); text-decoration: none; flex: 0 0 auto; transition: .2s; }
.mn-product-arrow:hover { color: #fff; background: var(--mn-brand); }
[dir="rtl"] .mn-product-arrow i, [dir="rtl"] .mn-profile-cta i { transform: rotate(180deg); }

.mn-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mn-profile-card { background: #fff; border: 1px solid var(--mn-line); border-radius: 22px; overflow: hidden; min-width: 0; box-shadow: 0 5px 22px rgba(20,32,58,.055); transition: .3s ease; }
.mn-profile-card:hover { transform: translateY(-5px); box-shadow: var(--mn-shadow); border-color: #cbd5e1; }
.mn-profile-cover { height: 80px; position: relative; padding: 14px; display: flex; justify-content: space-between; align-items: flex-start; background: linear-gradient(135deg, #e7efff, #d9e4fb 55%, #c7ddff); }
.mn-freelancer-card .mn-profile-cover { background: linear-gradient(135deg, #e1f4f1, #d5ebe9 55%, #bfe2dd); }
.mn-company-card .mn-profile-cover { background: linear-gradient(135deg, #eeeafa, #e5def5 55%, #d9cff2); }
.mn-profile-type, .mn-availability, .mn-trusted, .mn-premium-badge { padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.72); color: #41506a; font-size: .66rem; font-weight: 700; backdrop-filter: blur(8px); }
.mn-availability { color: #087a55; }
.mn-availability i { font-size: .42rem; }
.mn-trusted { color: #6240a0; }
.mn-premium-badge { color: #9a6700; }
.mn-profile-content { padding: 0 18px 18px; display: flex; flex-direction: column; min-height: 250px; }
.mn-profile-avatar { width: 68px; height: 68px; margin-top: -34px; margin-bottom: 11px; border: 4px solid white; border-radius: 50%; background: #eef2f7; box-shadow: 0 6px 16px rgba(20,32,58,.13); display: grid; place-items: center; position: relative; overflow: visible; }
.mn-profile-avatar--square { border-radius: 17px; }
.mn-profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.mn-profile-avatar .material-icons { color: #64748b; font-size: 2rem; }
.mn-verified { position: absolute; inset-inline-end: -5px; inset-block-end: -3px; width: 22px; height: 22px; border: 3px solid white; border-radius: 50%; display: grid; place-items: center; background: var(--mn-brand); color: white; font-size: .55rem; }
.mn-profile-content h3 { margin: 0 0 3px; font-size: 1rem; font-weight: 720; line-height: 1.3; }
.mn-profile-content h3 a { color: var(--mn-ink); text-decoration: none; }
.mn-profile-content h3 a:hover { color: var(--mn-brand); }
.mn-profile-subtitle { color: var(--mn-muted); font-size: .76rem; line-height: 1.45; margin: 0 0 12px; min-height: 2.15em; }
.mn-profile-rating { display: flex; align-items: center; gap: 5px; color: var(--mn-ink); font-size: .75rem; margin-bottom: 12px; }
.mn-profile-rating i { color: #f59e0b; }
.mn-profile-rating span { color: var(--mn-muted); margin-inline-start: 3px; }
.mn-profile-tags, .mn-profile-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.mn-profile-tags span, .mn-profile-meta span { border: 1px solid var(--mn-line); background: var(--mn-soft); color: #566176; padding: 5px 8px; border-radius: 8px; font-size: .66rem; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mn-profile-meta i { color: var(--mn-brand); margin-inline-end: 3px; }
.mn-profile-bottom { margin-top: auto; }
.mn-profile-price { margin-bottom: 10px; color: var(--mn-ink); }
.mn-profile-price strong { font-size: 1.05rem; }
.mn-profile-price span { color: var(--mn-muted); font-size: .7rem; }
.mn-profile-cta { margin-top: auto; min-height: 38px; padding: 8px 11px; border-radius: 11px; display: flex; align-items: center; justify-content: space-between; background: var(--mn-ink); color: #fff; text-decoration: none; font-size: .73rem; font-weight: 650; transition: .2s; }
.mn-profile-cta:hover { background: var(--mn-brand); color: #fff; }
.mn-empty-state { grid-column: 1 / -1; padding: 40px; border: 1px dashed #cbd5e1; border-radius: 20px; text-align: center; color: var(--mn-muted); }
.mn-empty-state i { font-size: 1.8rem; margin-bottom: 8px; }
.mn-empty-state p { margin: 0; }

@media (max-width: 767px) {
  .mn-product-card { border-radius: 14px; }
  .mn-product-body { padding: 10px; }
  .mn-product-title { font-size: .79rem; }
  .mn-product-summary { margin-top: 6px; }
  .mn-stock { display: none; }
  .mn-product-badges { inset-block-start: 8px; inset-inline-start: 8px; gap: 4px; }
  .mn-badge { font-size: .58rem; padding: 5px 9px 5px 7px; gap: 3px; }
  [dir="rtl"] .mn-badge { padding: 5px 7px 5px 9px; }
  .mn-price-amount { font-size: 1rem; }
  .mn-price-currency { font-size: .5rem; }
  .mn-product-price-sale span { display: none; }
  .mn-product-arrow { width: 28px; height: 28px; }
  .mn-product-actions { opacity: 1; transform: none; }
  .mn-icon-btn { width: 32px; height: 32px; border-radius: 10px; }
  .mn-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .mn-profile-card { border-radius: 16px; }
  .mn-profile-cover { height: 64px; padding: 9px; }
  .mn-profile-content { padding: 0 11px 11px; min-height: 220px; }
  .mn-profile-avatar { width: 56px; height: 56px; margin-top: -28px; margin-bottom: 8px; border-width: 3px; }
  .mn-profile-content h3 { font-size: .8rem; }
  .mn-profile-subtitle { font-size: .67rem; }
  .mn-profile-rating { font-size: .66rem; }
  .mn-profile-type, .mn-availability, .mn-trusted, .mn-premium-badge { font-size: .56rem; padding: 4px 6px; }
  .mn-profile-tags span, .mn-profile-meta span { font-size: .58rem; padding: 4px 6px; }
  .mn-profile-cta { font-size: .65rem; min-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .mn-product-card, .mn-product-image, .mn-profile-card, .mn-icon-btn { transition: none !important; }
}

body.dark-mode .mn-product-card, body.dark-mode .mn-profile-card { background: #151a24; border-color: #303846; }
body.dark-mode .mn-product-title, body.dark-mode .mn-product-price strong, body.dark-mode .mn-profile-content h3 a, body.dark-mode .mn-profile-rating, body.dark-mode .mn-profile-price { color: #f1f5f9; }
body.dark-mode .mn-product-body, body.dark-mode .mn-profile-content { color: #e2e8f0; }
body.dark-mode .mn-product-arrow, body.dark-mode .mn-profile-tags span, body.dark-mode .mn-profile-meta span { background: #242b37; border-color: #354052; color: #cbd5e1; }
body.dark-mode .mn-product-media, body.dark-mode .mn-product-placeholder { background: #202733; }
body.dark-mode .mn-product-title:hover, body.dark-mode .mn-profile-content h3 a:hover { color: #8fb5ff; }
body.dark-mode .mn-profile-subtitle, body.dark-mode .mn-product-summary, body.dark-mode .mn-profile-rating span, body.dark-mode .mn-profile-price span { color: #98a4b6; }
body.dark-mode .mn-profile-cover { background: linear-gradient(135deg, #202d48, #1d2940 55%, #223958); }
body.dark-mode .mn-freelancer-card .mn-profile-cover { background: linear-gradient(135deg, #153735, #183331 55%, #19413d); }
body.dark-mode .mn-company-card .mn-profile-cover { background: linear-gradient(135deg, #2f2743, #302941 55%, #3b2e54); }
body.dark-mode .mn-profile-avatar { border-color: #151a24; background: #252d3a; }
body.dark-mode .mn-verified { border-color: #151a24; }
body.dark-mode .mn-profile-type, body.dark-mode .mn-availability, body.dark-mode .mn-trusted, body.dark-mode .mn-premium-badge { background: rgba(15,20,29,.65); color: #d6deea; }
body.dark-mode .fab-menu-items .theme-toggle-btn {
  color: #172033;
  background: linear-gradient(135deg, #fff7d6 0%, #fde68a 55%, #fbbf24 100%);
  border-color: rgba(255,255,255,.35);
}
body.dark-mode .mn-price-amount { color: #f1f5f9; }
body.dark-mode .mn-price-symbol { color: #8fb5ff; }
body.dark-mode .mn-price-currency { color: #8995a7; }
body.dark-mode .mn-product-price-sale span { color: #ffb4a8; background: #47211d; }

/* Promo registration menu — explicit light-theme palette. */
body:not(.dark-mode) .promo-banner .promo-register-menu {
  --bs-dropdown-bg: #fff;
  --bs-dropdown-color: #172033;
  --bs-dropdown-link-color: #172033;
  --bs-dropdown-link-hover-color: #172033;
  --bs-dropdown-link-hover-bg: #f3f6fb;
  min-width: 280px;
  padding: 8px;
  background: #fff !important;
  color: #172033 !important;
  border: 1px solid #e2e7ef !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 50px rgba(15,23,42,.16), 0 4px 14px rgba(15,23,42,.08) !important;
}
body:not(.dark-mode) .promo-register-menu .dropdown-header {
  color: #7b8494 !important;
  padding: 7px 10px 9px !important;
  font-weight: 750;
}
body:not(.dark-mode) .promo-register-menu .promo-reg-item {
  min-height: 52px;
  padding: 8px 10px !important;
  color: #172033 !important;
  background: transparent !important;
  border: 1px solid transparent;
  border-radius: 11px !important;
}
body:not(.dark-mode) .promo-register-menu .promo-reg-item strong {
  color: #172033 !important;
  font-size: .82rem;
  font-weight: 720;
}
body:not(.dark-mode) .promo-register-menu .promo-reg-item small,
body:not(.dark-mode) .promo-register-menu .promo-reg-item .text-muted {
  color: #748094 !important;
  margin-top: 2px;
  font-size: .68rem;
}
body:not(.dark-mode) .promo-register-menu .promo-reg-item:hover,
body:not(.dark-mode) .promo-register-menu .promo-reg-item:focus {
  color: #172033 !important;
  background: #f3f6fb !important;
  border-color: #e4eaf3;
  transform: translateX(2px) !important;
}
[dir="rtl"] body:not(.dark-mode) .promo-register-menu .promo-reg-item:hover,
[dir="rtl"] body:not(.dark-mode) .promo-register-menu .promo-reg-item:focus {
  transform: translateX(-2px) !important;
}
body:not(.dark-mode) .promo-register-menu .promo-reg-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.05);
}
body:not(.dark-mode) .promo-register-menu .promo-reg-icon .material-icons {
  color: inherit !important;
}
