/* MercadilloGeek 2.9 · contraste editorial, búsquedas compactas y perfil visual */

/* Nuestra historia: contraste AA reforzado sobre una superficie oscura uniforme. */
.mg-story-page {
  background: #090d1b;
  border: 1px solid #263255;
  border-radius: 28px;
  box-shadow: 0 24px 70px #090d1b26;
  color: #f8faff;
  margin-bottom: 64px;
  margin-top: 28px;
  overflow: hidden;
  padding-inline: clamp(22px, 5vw, 72px);
}
.mg-story-page .mg-back { color: #7ee7ff !important; font-weight: 850; }
.mg-story-page .mg-label { color: #b7ff50 !important; }
.mg-story-page h1, .mg-story-page h2, .mg-story-page h3 { color: #fff !important; text-shadow: 0 2px 14px #000; }
.mg-story-page > header > p { color: #edf2ff !important; font-weight: 650; text-shadow: 0 2px 10px #000; }
.mg-story-page > header > img, .mg-story-body figure img {
  background: #050713;
  box-shadow: 0 18px 50px #0008;
  filter: brightness(.88) contrast(1.08);
}
.mg-story-body section {
  background: #11182c;
  border: 1px solid #2b385d;
  border-radius: 18px;
  box-shadow: 0 14px 35px #0003;
  padding: clamp(20px, 4vw, 38px);
}
.mg-story-body p { color: #edf2ff !important; font-weight: 520; }
.mg-story-body p strong { color: #fff; }
.mg-story-body figcaption { color: #dbe5ff !important; font-size: 13px; font-weight: 700; }
.mg-story-body blockquote { background: #15231b !important; border-color: #83d632 !important; }
.mg-story-body blockquote b { color: #fff !important; }
.mg-story-body blockquote span { color: #b8ff61 !important; }
.mg-story-page .mg-story-cta { background: #080d1c; border: 1px solid #35446e; }
.mg-story-page .mg-story-cta span { color: #fff; }
.mg-story-page .mg-secondary { background: #fff; border-color: #fff; color: #11182c !important; }

/* Página de resultados: encabezado breve y tarjetas que nunca se estiran. */
.mg-search-summary {
  align-items: center;
  background: linear-gradient(120deg, #11182c, #1c2450);
  border: 1px solid #344370;
  border-radius: 20px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: 64px 1fr auto;
  margin-block: 32px;
  padding: 24px 28px;
}
.mg-search-summary-icon {
  align-items: center;
  background: #9cff18;
  border-radius: 16px;
  color: #142007;
  display: flex;
  font-size: 32px;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  width: 64px;
}
.mg-search-summary .mg-label { color: #b7ff50; }
.mg-search-summary h1 { color: #fff; font-size: clamp(25px, 4vw, 40px); letter-spacing: -1.5px; margin: 5px 0; overflow-wrap: anywhere; }
.mg-search-summary p { color: #dbe4ff; font-size: 13px; margin: 0; }
.mg-search-summary .mg-secondary { background: #fff; border-color: #fff; color: #11182c; white-space: nowrap; }
.mg-products-search { padding-top: 38px; }
.mg-search-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px)) !important;
  gap: 16px !important;
  justify-content: start;
}
.mg-search-grid .mg-card { width: 100%; }
.mg-search-grid .mg-visual { height: 164px; font-size: 58px; }
.mg-search-grid .mg-card-info { padding: 14px; }
.mg-search-grid .mg-card-info h3 { font-size: 15px; line-height: 1.28; margin: 9px 0 5px; }
.mg-search-grid .mg-card-info > strong { font-size: 19px; }
.mg-search-grid .mg-seller { margin-top: 12px; padding-top: 10px; }
.mg-search-grid .mg-seller > span { display: none; }
.mg-search-grid .mg-avatar { --mg-avatar-size: 28px !important; }
.mg-search-grid .mg-product-category { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Perfil: actividad primero, seguridad al final y métricas con identidad propia. */
.mg-profile-overview-head {
  align-items: center;
  background: linear-gradient(120deg, #101728, #1e2750);
  border: 1px solid #34436c;
  border-radius: 18px;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 24px 0 18px;
  padding: 22px 24px;
}
.mg-profile-overview-head .mg-label { color: #b7ff50; }
.mg-profile-overview-head h2 { color: #fff; font-size: 28px; margin: 5px 0; }
.mg-profile-overview-head p { color: #d5def3 !important; font-size: 13px !important; margin: 0; }
.mg-overview-signal { background: #152819; border: 1px solid #4d9b52; border-radius: 999px; color: #8ef39a; flex: 0 0 auto; font: 850 10px monospace; padding: 9px 12px; }
.mg-profile-stats-votes { gap: 12px; }
.mg-profile-stats-votes > div {
  border: 1px solid #dfe4ee !important;
  border-radius: 16px;
  min-height: 150px;
  padding: 18px 12px !important;
  position: relative;
}
.mg-profile-stats-votes > div > i:not(.mg-drive-icon) {
  align-items: center;
  border-radius: 11px;
  display: flex;
  font-size: 19px;
  font-style: normal;
  height: 38px;
  justify-content: center;
  margin-bottom: 7px;
  width: 38px;
}
.mg-profile-stats-votes > div > b { font-size: 30px; line-height: 1; }
.mg-profile-stats-votes .mg-stat-purchases { background: linear-gradient(145deg, #f1f6ff, #fff); }
.mg-profile-stats-votes .mg-stat-purchases > i { background: #dce9ff; color: #265bb2; }
.mg-profile-stats-votes .mg-stat-sales { background: linear-gradient(145deg, #ecfbf2, #fff); }
.mg-profile-stats-votes .mg-stat-sales > i { background: #d2f3df; color: #147344; }
.mg-profile-stats-votes .mg-stat-listings { background: linear-gradient(145deg, #fff6e9, #fff); }
.mg-profile-stats-votes .mg-stat-listings > i { background: #ffe6bf; color: #a65b12; }
.mg-profile-stats-votes .mg-stat-messages { background: linear-gradient(145deg, #f7efff, #fff); }
.mg-profile-stats-votes .mg-stat-messages > i { background: #ead7ff; color: #7040a8; }
.mg-account-security-bottom { margin-bottom: 70px; margin-top: 50px; position: relative; }
.mg-account-security-bottom::before { color: #7c8290; content: "SEGURIDAD Y ACCESO"; display: block; font: 850 11px monospace; letter-spacing: 1.3px; padding: 0 0 12px; position: absolute; transform: translateY(-30px); }

@media (max-width: 900px) {
  .mg-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .mg-profile-overview-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .mg-story-page { border-radius: 18px; margin-top: 14px; padding-inline: 14px; }
  .mg-story-body section { padding: 19px 16px; }
  .mg-search-summary { grid-template-columns: 48px 1fr; padding: 18px; }
  .mg-search-summary-icon { border-radius: 12px; font-size: 25px; height: 48px; width: 48px; }
  .mg-search-summary .mg-secondary { grid-column: 1 / -1; text-align: center; width: 100%; }
  .mg-products-search { padding-top: 28px; }
  .mg-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .mg-search-grid .mg-visual { height: 120px; }
  .mg-search-grid .mg-card-info { padding: 11px; }
  .mg-search-grid .mg-meta time, .mg-search-grid .mg-seller { display: none; }
  .mg-search-grid .mg-product-category { font-size: 9px !important; max-width: 100%; }
  .mg-search-grid .mg-card-info h3 { font-size: 14px; }
  .mg-profile-overview-head { padding: 18px; }
  .mg-profile-stats-votes > div { min-height: 138px; }
}
@media (max-width: 390px) {
  .mg-search-grid { grid-template-columns: 1fr !important; }
  .mg-search-grid .mg-card { display: grid; grid-template-columns: 122px 1fr; }
  .mg-search-grid .mg-visual { height: 100%; min-height: 142px; }
}
