/* Merchant profile page — magaza/[slug].astro */

/* ── Layout ─────────────────────────────────────────────────── */
body {
  background: var(--color-bg, #0f172a);
  color: var(--color-text, #e2e8f0);
  font-family: 'Inter', system-ui, sans-serif;
  margin: 0;
}

.mz-header {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(15,23,42,.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mz-back {
  color: var(--color-accent, #38bdf8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.mz-back:hover { text-decoration: underline; }

.mz-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Hero ────────────────────────────────────────────────────── */
.mz-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.mz-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}

.mz-logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e40af, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mz-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mz-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #f8fafc;
}

.mz-tier-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  width: fit-content;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.mz-domain {
  font-size: 13px;
  color: var(--color-accent, #38bdf8);
  text-decoration: none;
}
.mz-domain:hover { text-decoration: underline; }

/* ── Stats ───────────────────────────────────────────────────── */
.mz-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.mz-stat-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
}

.mz-stat-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.1;
}

.mz-stat-unit {
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
}

.mz-stat-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── CTA row ─────────────────────────────────────────────────── */
.mz-cta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.mz-search-btn,
.mz-visit-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}

.mz-search-btn {
  background: var(--color-accent, #38bdf8);
  color: #0f172a;
}

.mz-visit-btn {
  background: rgba(255,255,255,.07);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.12);
}

.mz-search-btn:hover,
.mz-visit-btn:hover { opacity: .85; }

/* ── Product section ─────────────────────────────────────────── */
.mz-section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #f1f5f9;
}

.mz-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.mz-product-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
  display: flex;
  flex-direction: column;
}

.mz-product-card:hover {
  border-color: rgba(56,189,248,.4);
  transform: translateY(-2px);
}

.mz-product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: rgba(255,255,255,.03);
}

.mz-product-img--empty {
  aspect-ratio: 1;
  background: rgba(255,255,255,.03);
}

.mz-product-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.mz-product-brand {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.mz-product-name {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mz-product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent, #38bdf8);
  margin: 4px 0 0;
}

/* Skeleton loaders */
.mz-skeleton-row {
  display: contents;
}

.mz-skeleton-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  aspect-ratio: 1.1;
  animation: mz-pulse 1.5s ease-in-out infinite;
}

@keyframes mz-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.mz-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #64748b;
  padding: 48px 0;
  font-size: 14px;
}

/* ── Load more ───────────────────────────────────────────────── */
.mz-load-more-wrap {
  text-align: center;
  margin-top: 24px;
}

.mz-load-more-btn {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.mz-load-more-btn:hover { background: rgba(255,255,255,.12); }

/* ── Footer ──────────────────────────────────────────────────── */
.mz-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #475569;
}

.mz-footer a {
  color: var(--color-accent, #38bdf8);
  text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mz-main { padding: 20px 16px 48px; }
  .mz-name { font-size: 22px; }
  .mz-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mz-stat-value { font-size: 20px; }
  .mz-product-grid { grid-template-columns: repeat(2, 1fr); }
}
