/* ==========================================================================
   MNS Marketplace
   Theme tokens come from style.css (:root footer variables).
   Rules: 8-10px radius, uniform borders (no one-sided accents), Bootstrap grid.
   Root font-size is 10px, so 1rem = 10px.
   ========================================================================== */

.mkt-page {
  --mkt-radius: 10px;
  --mkt-radius-sm: 8px;
  --mkt-teal: var(--footer-primary-color, #14b8a6);
  --mkt-teal-deep: var(--footer-accent-color, #0d9488);
  --mkt-surface: linear-gradient(160deg, rgba(30, 41, 59, 0.78) 0%, rgba(15, 23, 42, 0.92) 100%);
  --mkt-border: var(--footer-border-color, rgba(20, 184, 166, 0.2));
  --mkt-border-strong: rgba(20, 184, 166, 0.45);
  --mkt-text: var(--footer-text-primary, #fff);
  --mkt-text-2: var(--footer-text-secondary, rgba(255, 255, 255, 0.9));
  --mkt-text-3: var(--footer-text-tertiary, rgba(255, 255, 255, 0.7));

  padding: 2.4rem 0 5.6rem;
  color: var(--mkt-text-2);
}

.mkt-page i,
.mkt-page svg.svg-inline--fa {
  color: inherit;
  fill: currentColor;
}

/* ---------- Buttons ---------- */
.mkt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem 1.6rem;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--mkt-radius-sm, 8px);
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.mkt-btn-primary {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  border-color: #14b8a6;
  color: #fff;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.25);
}

.mkt-btn-primary:hover,
.mkt-btn-primary:focus {
  color: #fff;
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.mkt-btn-ghost {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.4);
  color: #5eead4;
}

.mkt-btn-ghost:hover,
.mkt-btn-ghost:focus {
  background: rgba(20, 184, 166, 0.18);
  border-color: #14b8a6;
  color: #fff;
  transform: translateY(-2px);
}

.mkt-btn-lg {
  padding: 1.3rem 2.2rem;
  font-size: 1.5rem;
}

.mkt-btn-block {
  display: flex;
  width: 100%;
}

/* ---------- Chips / icon tiles ---------- */
.mkt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 8px;
}

.mkt-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  font-size: 1.9rem;
  color: #5eead4;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--mkt-border-strong);
  border-radius: var(--mkt-radius-sm, 8px);
  backdrop-filter: blur(6px);
}

.mkt-icon-tile--lg {
  width: 6.4rem;
  height: 6.4rem;
  font-size: 2.8rem;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.mkt-hero {
  position: relative;
  overflow: hidden;
  padding: 4.4rem 3.6rem;
  margin-bottom: 4.8rem;
  background:
    radial-gradient(circle at 85% 10%, rgba(20, 184, 166, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 5% 100%, rgba(13, 148, 136, 0.22) 0%, transparent 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(13, 148, 136, 0.28) 100%);
  border: 1px solid var(--mkt-border-strong);
  border-radius: var(--mkt-radius);
  box-shadow: var(--footer-shadow-intense, 0 10px 25px rgba(20, 184, 166, 0.2));
}

.mkt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
  padding: 0.6rem 1.2rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 8px;
}

.mkt-hero-title {
  margin: 0 0 1.4rem;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--mkt-text);
}

.mkt-hero-text {
  max-width: 56rem;
  margin: 0 0 2.6rem;
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--mkt-text-3);
}

.mkt-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.mkt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.mkt-stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.8rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  backdrop-filter: blur(8px);
}

.mkt-stat strong {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--mkt-text);
}

.mkt-stat span {
  font-size: 1.3rem;
  color: var(--mkt-text-3);
}

.mkt-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  margin-bottom: 0.6rem;
  font-size: 1.6rem;
  color: #5eead4 !important;
  background: rgba(20, 184, 166, 0.14);
  border-radius: var(--mkt-radius-sm, 8px);
}

.mkt-stat--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 1.4rem;
}

.mkt-stat--wide .mkt-stat-icon {
  margin: 0;
  flex-shrink: 0;
}

.mkt-stat--wide strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.6rem;
  font-weight: 600;
}

/* ---------- Sections ---------- */
.mkt-section {
  margin-bottom: 5.2rem;
  scroll-margin-top: 9rem;
}

.mkt-section-head {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 2.4rem;
}

.mkt-section-head h2 {
  margin: 0 0 0.3rem;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--mkt-text);
}

.mkt-section-head p {
  margin: 0;
  font-size: 1.4rem;
  color: var(--mkt-text-3);
}

.mkt-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.6rem;
  height: 4.6rem;
  flex-shrink: 0;
  font-size: 2rem;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid var(--mkt-border-strong);
  border-radius: var(--mkt-radius-sm, 8px);
}

.mkt-count {
  margin-left: auto;
  min-width: 3.4rem;
  padding: 0.5rem 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid var(--mkt-border);
  border-radius: 8px;
}

.mkt-empty {
  padding: 3rem;
  text-align: center;
  color: var(--mkt-text-3);
  background: var(--mkt-surface);
  border: 1px dashed var(--mkt-border-strong);
  border-radius: var(--mkt-radius);
}

/* ---------- Card ---------- */
.mkt-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.mkt-card:hover {
  transform: translateY(-5px);
  border-color: var(--mkt-border-strong);
  box-shadow: var(--footer-shadow-hover, 0 6px 20px rgba(20, 184, 166, 0.3));
}

.mkt-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1220;
}

.mkt-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.mkt-card:hover .mkt-card-media img {
  transform: scale(1.06);
}

.mkt-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 40%, rgba(15, 23, 42, 0.85) 100%);
  pointer-events: none;
}

.mkt-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(94, 234, 212, 0.55);
  background: linear-gradient(135deg, #0f172a 0%, rgba(13, 148, 136, 0.35) 100%);
}

.mkt-card-media .mkt-chip {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
}

.mkt-card-media .mkt-icon-tile {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
}

.mkt-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.8rem;
}

.mkt-card-title {
  margin: 0 0 0.8rem;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.mkt-card-title a {
  color: var(--mkt-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mkt-card-title a:hover {
  color: #5eead4;
}

.mkt-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 1.8rem;
  font-size: 1.4rem;
  line-height: 1.65;
  color: var(--mkt-text-3);
}

.mkt-card-foot {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: auto;
  padding-top: 1.6rem;
  position: relative;
}

.mkt-card-foot::before,
.mkt-points::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--mkt-border);
}

.mkt-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mkt-card-actions .mkt-btn {
  padding: 0.9rem 1rem;
}

.mkt-price {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mkt-price-label {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mkt-text-3);
}

.mkt-price-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #5eead4;
}

.mkt-price--lg {
  margin-bottom: 1.6rem;
}

.mkt-price--lg .mkt-price-value {
  font-size: 2.4rem;
}

/* Wide card (digital items) */
@media (min-width: 768px) {
  .mkt-card--wide {
    flex-direction: row;
  }

  .mkt-card--wide .mkt-card-media {
    flex: 0 0 40%;
    aspect-ratio: auto;
    min-height: 26rem;
  }

  .mkt-card--wide .mkt-card-body {
    padding: 2.2rem;
  }
}

/* ---------- Steps ---------- */
.mkt-step {
  height: 100%;
  padding: 2.2rem;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
}

.mkt-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.8rem;
  height: 3.8rem;
  margin-bottom: 1.4rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  border-radius: var(--mkt-radius-sm, 8px);
  box-shadow: var(--footer-shadow, 0 4px 15px rgba(20, 184, 166, 0.2));
}

.mkt-step h3 {
  margin: 0 0 0.6rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--mkt-text);
}

.mkt-step p {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.65;
  color: var(--mkt-text-3);
}

/* ---------- Closing CTA ---------- */
.mkt-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 3.2rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(13, 148, 136, 0.35) 100%);
  border: 1px solid var(--mkt-border-strong);
  border-radius: var(--mkt-radius);
  box-shadow: var(--footer-shadow, 0 4px 15px rgba(20, 184, 166, 0.2));
}

.mkt-cta h2 {
  margin: 0 0 0.4rem;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--mkt-text);
}

.mkt-cta p {
  margin: 0;
  font-size: 1.5rem;
  color: var(--mkt-text-3);
}

/* ---------- Detail page ---------- */
.mkt-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.4rem;
  font-size: 1.35rem;
  color: var(--mkt-text-3);
}

.mkt-breadcrumb a {
  color: #5eead4;
  text-decoration: none;
}

.mkt-breadcrumb a:hover {
  color: #fff;
}

.mkt-breadcrumb-sep {
  font-size: 1rem;
  opacity: 0.6;
}

.mkt-panel {
  padding: 3rem;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.mkt-panel--flush {
  padding: 0;
  overflow: hidden;
}

.mkt-detail-head {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-bottom: 2rem;
}

.mkt-detail-title {
  margin: 0.8rem 0 0;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--mkt-text);
}

.mkt-detail-lead {
  margin: 0 0 2.4rem;
  padding: 1.6rem 1.8rem;
  font-size: 1.55rem;
  line-height: 1.7;
  color: var(--mkt-text-2);
  background: rgba(20, 184, 166, 0.07);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius-sm, 8px);
}

.mkt-prose {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--mkt-text-2);
}

.mkt-prose h1,
.mkt-prose h2,
.mkt-prose h3,
.mkt-prose h4 {
  margin: 2.6rem 0 1rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--mkt-text);
}

.mkt-prose h3:first-child,
.mkt-prose h2:first-child {
  margin-top: 0;
}

.mkt-prose p {
  margin: 0 0 1.2rem;
}

.mkt-prose ul,
.mkt-prose ol {
  margin: 0 0 1.4rem;
  padding-left: 2.2rem;
}

.mkt-prose li {
  margin-bottom: 0.6rem;
}

.mkt-prose li::marker {
  color: #14b8a6;
  font-weight: 700;
}

.mkt-prose strong {
  color: var(--mkt-text);
}

.mkt-prose a {
  color: #5eead4;
}

.mkt-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--mkt-radius-sm, 8px);
}

.mkt-aside {
  position: sticky;
  top: 9rem;
}

.mkt-aside-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0b1220;
}

.mkt-aside-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mkt-aside-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2.2rem;
}

.mkt-points {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 1.6rem 0 0;
  position: relative;
}

.mkt-points li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-size: 1.35rem;
  color: var(--mkt-text-3);
}

.mkt-points li i {
  color: #14b8a6;
  font-size: 1.2rem;
}

/* ---------- Home popup modal ---------- */
.marketplace-modal .modal-content {
  background: var(--footer-dark-bg, rgba(15, 23, 42, 0.95));
  border: 1px solid var(--footer-border-color, rgba(20, 184, 166, 0.2));
  border-radius: 10px;
  overflow: hidden;
}

.marketplace-modal .modal-body {
  padding: 0;
}

.marketplace-modal img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.marketplace-modal-cta {
  padding: 1.2rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .mkt-aside {
    position: static;
  }

  .mkt-hero {
    padding: 3rem 2rem;
  }

  .mkt-hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 575.98px) {
  .mkt-hero-title {
    font-size: 2.6rem;
  }

  .mkt-hero-actions .mkt-btn {
    width: 100%;
  }

  .mkt-section-head h2 {
    font-size: 2.2rem;
  }

  .mkt-panel {
    padding: 2rem;
  }

  .mkt-detail-title {
    font-size: 2.4rem;
  }

  .mkt-detail-head {
    align-items: flex-start;
  }

  .mkt-cta {
    padding: 2.4rem 2rem;
  }

  .mkt-cta .mkt-btn {
    width: 100%;
  }
}
