/* =====================================================
   MERCHANT PROFILE PAGE (/shop/{name})
   Extracted from inline <style> in html/searchresults.php
   for easier maintenance. Loaded only when rendering the
   merchant profile block.
   ===================================================== */

/* Layout grid (left details + right reviews) */
.mp-header-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}
@media (max-width: 991px) {
  .mp-header-grid { grid-template-columns: 1fr; }
}

/* Card surface */
.mp-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

/* Detail header */
.mp-detail-top { display: flex; align-items: flex-start; gap: 1rem; }
.mp-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: .5rem;
  overflow: hidden;
  background: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mp-logo-fallback { color: #fff; font-weight: 700; font-size: 1.25rem; letter-spacing: .03em; }
.mp-detail-info { flex: 1; min-width: 0; }
.mp-name-row { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; margin-bottom: .25rem; }
.mp-name { font-size: 1.375rem; font-weight: 700; color: #0f172a; margin: 0; line-height: 1.2; }
.mp-verified {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .5rem;
  background: #10b981;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 999px;
}
.mp-verified i { font-size: .8125rem; }
.mp-tagline { color: #475569; font-size: .9375rem; margin: 0; line-height: 1.45; }

.mp-editorial {
  margin: 1rem 0 0;
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
}
.mp-editorial .mp-section-title { margin-bottom: .5rem; }
.mp-editorial-body {
  color: #334155;
  font-size: .9375rem;
  line-height: 1.65;
  margin: 0;
}
.mp-editorial-body p { margin: 0 0 .5rem; }
.mp-editorial-body p:last-child { margin-bottom: 0; }

/* Section dividers and titles */
.mp-divider { height: 1px; background: #f1f5f9; margin: 1rem 0; }
.mp-section-title { font-size: .9375rem; font-weight: 600; color: #0f172a; margin: 0 0 .625rem; }
.mp-section-title-sm { font-size: .8125rem; color: #64748b; margin-top: 1rem; font-weight: 500; }

/* Tile grid (delivery/products stats) */
.mp-tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .625rem; }
.mp-tile { padding: .75rem .875rem; border: 1px solid #e2e8f0; border-radius: .5rem; background: #fff; }
.mp-tile-label {
  font-size: .75rem;
  color: #64748b;
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.mp-tile-label i { color: #94a3b8; }
.mp-tile-value { font-size: 1.25rem; font-weight: 700; color: #0f172a; line-height: 1.1; }
.mp-tile-value-sm { font-size: 1rem; }
.mp-tile-sub { font-size: .8125rem; color: #475569; margin-bottom: .25rem; }
.mp-tile-pill {
  display: inline-block;
  padding: .15rem .5rem;
  background: #d1fae5;
  color: #065f46;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: .25rem;
  margin-top: .125rem;
}
.mp-pill-free { background: #d1fae5; color: #065f46; }

/* Free shipping note */
.mp-shipping-note {
  margin-top: .75rem;
  padding: .625rem .875rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: .375rem;
  font-size: .8125rem;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.mp-shipping-note i { color: #10b981; }

/* Category chips */
.mp-chip-row { display: flex; flex-wrap: wrap; gap: .375rem; }
.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .3125rem .625rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: .8125rem;
  color: #334155;
  text-decoration: none;
  transition: all .15s;
}
.mp-chip:hover { background: #02b290; border-color: #02b290; color: #fff; }
.mp-chip-count { color: #94a3b8; font-size: .75rem; }
.mp-chip:hover .mp-chip-count { color: #fff; }

/* Reviews header */
.mp-reviews-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.mp-reviews-title { font-size: 1.0625rem; font-weight: 600; color: #0f172a; margin: 0; }
.mp-write-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .75rem;
  background: #0f172a;
  color: #fff;
  font-size: .8125rem;
  font-weight: 500;
  border-radius: .375rem;
  text-decoration: none;
  transition: background .15s;
}
.mp-write-btn:hover { background: #1e293b; color: #fff; text-decoration: none; }

/* Rating summary block */
.mp-rating-summary { display: flex; gap: 1rem; align-items: flex-start; }
.mp-rating-big { flex-shrink: 0; text-align: center; }
.mp-rating-number { font-size: 2.25rem; font-weight: 700; color: #0f172a; line-height: 1; }
.mp-rating-stars { color: #f59e0b; margin: .25rem 0; font-size: .875rem; letter-spacing: .05em; }
.mp-rating-meta { font-size: .6875rem; color: #94a3b8; max-width: 110px; line-height: 1.3; }
.mp-rating-bars { flex: 1; display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.mp-bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: .5rem;
  align-items: center;
}
.mp-bar-label { font-size: .75rem; color: #475569; }
.mp-bar-value { font-size: .75rem; color: #0f172a; font-weight: 600; }
.mp-bar-track { grid-column: 1 / -1; height: 4px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.mp-bar-fill { height: 100%; background: #0f172a; border-radius: 999px; transition: width .3s; }

/* Resolution rate panel */
.mp-resolution-rate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .125rem;
  padding: .625rem .875rem;
  margin-top: .75rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: .375rem;
}
.mp-resolution-value { font-size: 1.375rem; font-weight: 700; color: #10b981; line-height: 1; }
.mp-resolution-label { font-size: .75rem; color: #065f46; }

/* Empty reviews state */
.mp-no-reviews { text-align: center; padding: 1.5rem .5rem; color: #94a3b8; }
.mp-no-reviews i { font-size: 1.75rem; color: #cbd5e1; margin-bottom: .5rem; display: block; }
.mp-no-reviews p { margin: 0; font-size: .8125rem; }

/* External ratings list (shared with focal Trustpilot card below) */
.mp-external-list { display: flex; flex-direction: column; gap: .625rem; }
.mp-external-item { display: flex; flex-direction: column; gap: .125rem; }
.mp-ext-empty { font-size: .75rem; color: #94a3b8; font-style: italic; }
.mp-ext-icon {
  width: 22px;
  height: 22px;
  border-radius: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  color: #fff;
}
.mp-external-tp .mp-ext-icon { background: #00b67a; }
.mp-external-gl .mp-ext-icon { background: #fbbc05; color: #fff; }
.mp-ext-info { display: flex; flex-direction: column; line-height: 1.2; }
.mp-ext-name { font-size: .75rem; color: #64748b; }
.mp-ext-score { font-size: .875rem; font-weight: 700; color: #0f172a; }

/* Focal Trustpilot card */
.mp-tp-card {
  padding: .875rem 1rem;
  border: 1px solid #00b67a;
  border-radius: .5rem;
  background: linear-gradient(135deg, #f0fdf9 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  gap: .625rem;
  box-shadow: 0 1px 3px rgba(0, 182, 122, .1);
}
.mp-tp-card.mp-tp-empty { border-color: #e2e8f0; background: #f8fafc; box-shadow: none; }
.mp-tp-brand { display: flex; align-items: center; gap: .5rem; }
.mp-tp-logo {
  width: 28px;
  height: 28px;
  border-radius: .375rem;
  background: #00b67a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8125rem;
  flex-shrink: 0;
}
.mp-tp-name { font-size: .9375rem; font-weight: 700; color: #00b67a; letter-spacing: .01em; }
.mp-tp-body { display: flex; flex-direction: column; gap: .375rem; align-items: flex-start; }
.mp-tp-body-empty { padding: .25rem 0; }
.mp-tp-score {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: .125rem;
}
.mp-tp-score-max { font-size: .9375rem; font-weight: 600; color: #94a3b8; }
.mp-tp-stars { color: #00b67a; font-size: 1rem; letter-spacing: .1em; }
.mp-tp-count { font-size: .8125rem; color: #475569; }
.mp-tp-count strong { color: #0f172a; font-weight: 700; }
.mp-tp-link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  margin-top: .125rem;
  font-size: .75rem;
  font-weight: 600;
  color: #00b67a;
  text-decoration: none;
  transition: color .15s;
}
.mp-tp-link:hover { color: #008a5b; text-decoration: underline; }
.mp-tp-link i { font-size: .6875rem; }
