/* MH DIGITAL storefront — one intentional marketplace layer. */
:root {
  --shop-bg: #f5f7fb;
  --shop-surface: #ffffff;
  --shop-ink: #152238;
  --shop-muted: #586b82;
  --shop-line: #dde5ef;
  --shop-blue: #1267db;
  --shop-cyan: #0aa8c7;
  --shop-radius: 16px;
  --shop-shadow: 0 16px 36px rgba(0, 0, 0, .10);
}

html { scroll-padding-top: 132px; }
body.mh-marketplace-home {
  background: var(--shop-bg);
  color: var(--shop-ink);
  font-family: MHNunito, Nunito, system-ui, sans-serif;
}
body.mh-marketplace-home .noise,
body.mh-marketplace-home .grid-bg,
body.mh-marketplace-home .aurora { display: none; }
body.mh-marketplace-home .shell { width: min(1440px, calc(100% - 48px)); }

.store-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--shop-line);
}
.store-header-main {
  display: grid;
  grid-template-columns: 112px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 78px;
}
.store-brand, .store-logo { display: block; }
.store-logo {
  width: 112px;
  height: 64px;
  overflow: hidden;
}
.store-logo img { display: block; width: 112px; height: 64px; object-fit: contain; }
.store-logo .logo-dark { display: none; }
.store-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
  background: #f9fbfd;
  color: var(--shop-muted);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.store-search:focus-within { border-color: #78a9ec; box-shadow: 0 0 0 4px rgba(18,103,219,.12); background: #fff; }
.store-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: 0 0 auto; }
.store-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--shop-ink); font: inherit; font-size: 14px; }
.store-search input::placeholder { color: #536780; opacity: 1; }
.store-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.store-actions .btn, .store-actions .icon-btn {
  min-height: 42px;
  border-radius: 11px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.store-actions .btn { padding: 0 15px; }
.store-actions .icon-btn { width: 44px; height: 44px; border: 1px solid var(--shop-line); background: #fff; color: var(--shop-ink); }
.store-actions .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.store-actions .primary { background: var(--shop-blue); border-color: var(--shop-blue); color: #fff; }
.store-actions .btn:hover, .store-actions .icon-btn:hover { transform: translateY(-1px); border-color: #8fb8ee; }
.store-navigation { border-top: 1px solid #edf1f5; background: #fff; }
.store-navigation-inner { display: flex; align-items: center; gap: 7px; min-height: 47px; overflow-x: auto; scrollbar-width: none; }
.store-navigation-inner::-webkit-scrollbar { display: none; }
.category-chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #52647b;
  font: 800 12px/1 MHNunito, Nunito, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.category-chip:hover { background: #f0f5fb; color: var(--shop-ink); }
.category-chip.active { background: #e9f2ff; border-color: #c9dcf7; color: #0f55b3; }
.category-link span { font-size: 15px; vertical-align: -1px; }

body.mh-marketplace-home main > #productos {
  min-height: calc(100vh - 126px);
  padding: 36px 0 76px !important;
}
body.mh-marketplace-home #productos .section-head {
  display: flex !important;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 22px !important;
  padding: 0 !important;
}
body.mh-marketplace-home #productos .section-head h1 {
  margin: 0;
  max-width: 760px;
  color: var(--shop-ink) !important;
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.04em !important;
  font-weight: 850;
}
body.mh-marketplace-home #productos .section-head p {
  max-width: 390px;
  margin: 0 0 3px !important;
  color: var(--shop-muted) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

body.mh-marketplace-home .mh-shop-tools {
  position: static !important;
  display: grid !important;
  grid-template-columns: minmax(150px, .9fr) minmax(150px, .8fr) auto !important;
  align-items: end;
  gap: 10px !important;
  margin: 0 0 24px !important;
  padding: 11px !important;
  border: 1px solid var(--shop-line) !important;
  border-radius: var(--shop-radius) !important;
  background: var(--shop-surface) !important;
  box-shadow: 0 6px 20px rgba(24,47,80,.035);
}
body.mh-marketplace-home .mh-shop-tools label { display: grid; gap: 6px; min-width: 0; color: var(--shop-muted); font-size: 12px; font-weight: 800; }
body.mh-marketplace-home .mh-shop-tools input,
body.mh-marketplace-home .mh-shop-tools select {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px !important;
  border: 1px solid var(--shop-line) !important; border-radius: 10px !important;
  background: #fbfcfe !important; color: var(--shop-ink) !important; font: 700 13px MHNunito, Nunito, sans-serif;
}
body.mh-marketplace-home .mh-shop-tools input:focus-visible,
body.mh-marketplace-home .mh-shop-tools select:focus-visible { outline: 3px solid rgba(18,103,219,.15); border-color: #72a5eb !important; }
body.mh-marketplace-home .mh-filter-summary { display:flex; grid-column:1/-1; align-items:center; justify-content:space-between; gap:12px; min-height:44px; white-space:nowrap; color:var(--shop-muted); font-size:12px; }
body.mh-marketplace-home .mh-filter-summary output { color:var(--shop-ink); font-weight:850; }
body.mh-marketplace-home .mh-filter-summary .sm-btn {
  min-height:44px; padding:8px 12px; border:1px solid var(--shop-line); border-radius:10px;
  background:var(--shop-surface); color:var(--shop-ink); font:700 13px MHNunito,Nunito,sans-serif; cursor:pointer;
}
body.mh-marketplace-home .mh-filter-summary .sm-btn:hover { background:var(--shop-bg); }
body.mh-marketplace-home .mh-filter-summary .sm-btn:active { border-color:var(--shop-ink); }
body.mh-marketplace-home .mh-filter-summary .sm-btn:focus-visible,
body.mh-marketplace-home .mh-more-filters summary:focus-visible { outline:3px solid var(--shop-blue); outline-offset:3px; }
body.mh-marketplace-home .mh-more-filters summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:4px 8px; list-style:none; cursor:pointer; color:var(--shop-ink); font:700 13px MHNunito,Nunito,sans-serif; }
body.mh-marketplace-home .mh-more-filters summary::-webkit-details-marker { display:none; }
body.mh-marketplace-home .mh-more-filters[open] { grid-column:1/-1; }
body.mh-marketplace-home .mh-more-filters[open] summary { margin-bottom:12px; border-bottom:1px solid var(--shop-line); }
body.mh-marketplace-home .mh-more-filters-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
body.mh-marketplace-home #mh-demo-notice { margin:0 0 16px; color:var(--shop-muted); font-size:12px; line-height:1.45; }

body.mh-marketplace-home .products { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:16px !important; }
body.mh-marketplace-home .product-card,
body.mh-marketplace-home .product-card.featured {
  min-width: 0; grid-column:auto !important; display:flex !important; flex-direction:column;
  overflow:hidden; border:1px solid var(--shop-line) !important; border-radius:var(--shop-radius) !important;
  background:var(--shop-surface) !important; box-shadow:none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
body.mh-marketplace-home .product-card:hover { transform:translateY(-4px); border-color:#b8cee9 !important; box-shadow:var(--shop-shadow); }
body.mh-marketplace-home .product-img,
body.mh-marketplace-home .mh-product-photo {
  height:218px !important; min-height:218px !important; width:100%; padding:18px !important;
  object-fit:contain !important; background:#f3f6fa !important;
}
body.mh-marketplace-home .product-card .product-body { display:flex !important; flex:1; flex-direction:column; align-items:stretch !important; padding:17px !important; }
body.mh-marketplace-home .product-body h3 { margin:8px 0 0 !important; color:var(--shop-ink) !important; font-size:17px !important; line-height:1.25 !important; letter-spacing:-.022em !important; }
body.mh-marketplace-home .product-sub { min-height:36px; margin:8px 0 0; color:var(--shop-muted) !important; font-size:12px; line-height:1.5; }
body.mh-marketplace-home .status { align-self:flex-start; padding:4px 8px !important; border-radius:999px !important; background:#e9f7f0 !important; color:#17724e !important; font-size:12px !important; font-weight:850 !important; }
body.mh-marketplace-home .mh-product-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
body.mh-marketplace-home .mh-product-meta > span:not(.status) { padding:3px 7px; border:1px solid var(--shop-line); border-radius:999px; color:var(--shop-muted); font-size:12px; }
body.mh-marketplace-home .price-row { width:100%; margin-top:auto !important; padding-top:17px; }
body.mh-marketplace-home .price b { color:var(--shop-ink) !important; font-size:21px !important; letter-spacing:-.025em; font-variant-numeric:tabular-nums; }
body.mh-marketplace-home .price small { color:var(--shop-muted) !important; }
body.mh-marketplace-home .product-card .product-body > .btn { width:100%; min-height:44px; margin-top:15px !important; border-radius:10px; font-size:12px; }
body.mh-marketplace-home .catalog-skeleton {
  display:grid; grid-template-rows:218px 14px 12px 42px; gap:12px; padding:17px;
  border:1px solid var(--shop-line); border-radius:var(--shop-radius); background:var(--shop-surface);
}
body.mh-marketplace-home .catalog-skeleton > * { display:block; border-radius:8px; background:#e9eef5; }
body.mh-marketplace-home .catalog-skeleton > span { margin:-17px -17px 5px; border-radius:var(--shop-radius) var(--shop-radius) 8px 8px; background:#edf2f7; }
body.mh-marketplace-home .catalog-skeleton > i { width:78%; }
body.mh-marketplace-home .catalog-skeleton > i + i { width:52%; }
body.mh-marketplace-home .catalog-skeleton > b { width:100%; border-radius:10px; }
body.mh-marketplace-home .mh-empty-shop { grid-column:1/-1; padding:42px; border:1px dashed #c9d6e5; border-radius:var(--shop-radius); background:#fff; color:var(--shop-muted); text-align:center; }

body.mh-marketplace-home .footer { border-top:1px solid var(--shop-line); background:#fff; }
body.mh-marketplace-home .footer-in { min-height:88px; display:flex; align-items:center; justify-content:space-between; gap:24px; color:var(--shop-muted); font-size:12px; }
body.mh-marketplace-home .footer-brand .brand-badge { display:block; width:112px; height:64px; background:transparent !important; }
body.mh-marketplace-home .footer-brand .brand-badge img { width:112px; height:64px; object-fit:contain; }
body.mh-marketplace-home .footer-brand .logo-dark { display:none; }

.skip-link { position:fixed; left:16px; top:10px; z-index:100; padding:10px 14px; border-radius:10px; background:var(--shop-ink); color:var(--shop-surface); font-weight:850; transform:translateY(-160%); transition:transform 180ms ease; }
.skip-link:focus { transform:translateY(0); }

:focus-visible { outline:3px solid rgba(18,103,219,.5) !important; outline-offset:3px; }
[data-theme="dark"] body.mh-marketplace-home { --shop-bg:#0f1622; --shop-surface:#172130; --shop-ink:#edf4ff; --shop-muted:#aab8ca; --shop-line:#2a3a4d; --shop-shadow:0 18px 38px rgba(0,0,0,.30); }
[data-theme="dark"] .store-header, [data-theme="dark"] .store-navigation { background:#111a27; border-color:#27384c; }
[data-theme="dark"] .store-logo .logo-light { display:none; }
[data-theme="dark"] .store-logo .logo-dark { display:block; }
[data-theme="dark"] .store-search, [data-theme="dark"] body.mh-marketplace-home .mh-shop-tools input, [data-theme="dark"] body.mh-marketplace-home .mh-shop-tools select { background:#111a27 !important; }
[data-theme="dark"] .store-actions .icon-btn, [data-theme="dark"] .category-chip:hover { background:#1c293a; color:var(--shop-ink); border-color:var(--shop-line); }
[data-theme="dark"] .category-chip { color:#c6d3e2; }
[data-theme="dark"] .category-chip.active { background:#153761; border-color:#27558a; color:#d9ecff; }
[data-theme="dark"] .store-search input::placeholder { color:#b6c6da; }
[data-theme="dark"] body.mh-marketplace-home .product-img, [data-theme="dark"] body.mh-marketplace-home .mh-product-photo { background:#111a27 !important; }
[data-theme="dark"] body.mh-marketplace-home .catalog-skeleton > * { background:#26374c; }
[data-theme="dark"] body.mh-marketplace-home .catalog-skeleton > span { background:#203044; }
[data-theme="dark"] body.mh-marketplace-home .mh-empty-shop { background:var(--shop-surface); border-color:#3a5069; }
[data-theme="dark"] body.mh-marketplace-home .footer { background:#111a27; border-color:var(--shop-line); }
[data-theme="dark"] body.mh-marketplace-home .footer-brand .logo-light { display:none; }
[data-theme="dark"] body.mh-marketplace-home .footer-brand .logo-dark { display:block; }

@media (max-width: 980px) {
  .store-header-main { grid-template-columns:112px minmax(150px,1fr) auto; gap:16px; }
  body.mh-marketplace-home .products { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  body.mh-marketplace-home .mh-shop-tools { grid-template-columns:1fr 1fr auto !important; }
  body.mh-marketplace-home .mh-filter-summary { grid-column:1/-1; min-height:44px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top:116px; }
  body.mh-marketplace-home .shell { width:calc(100% - 28px); }
  .store-navigation { position:relative; }
  .store-navigation::after {
    content:"";
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    width:28px;
    pointer-events:none;
    background:linear-gradient(90deg,rgba(255,255,255,0),var(--shop-surface));
  }
  .store-header-main { grid-template-columns:112px 1fr; gap:8px 12px; min-height:64px; padding-block:7px; }
  .store-search { grid-row:2; grid-column:1/-1; height:40px; }
  .store-actions { gap:6px; }
  .store-actions .btn { padding:0 8px; font-size:12px; }
  .store-account { min-width:56px; }
  .store-actions .icon-btn { width:44px; height:44px; min-height:44px; }
  .store-navigation-inner { min-height:42px; }
  .category-chip { min-height:44px; font-size:12px; }
  body.mh-marketplace-home main > #productos { min-height:calc(100vh - 152px); padding:16px 0 54px !important; }
  body.mh-marketplace-home #productos .section-head { display:block !important; margin-bottom:17px !important; }
  body.mh-marketplace-home #productos .section-head h1 { font-size:26px !important; }
  body.mh-marketplace-home #productos .section-head p { display:none; }
  body.mh-marketplace-home .mh-more-filters-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.mh-marketplace-home .mh-shop-tools { grid-template-columns:1fr 1fr !important; gap:8px !important; padding:9px !important; }
  body.mh-marketplace-home .mh-filter-summary { grid-column:1/-1; }
  body.mh-marketplace-home .products { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
  body.mh-marketplace-home .product-img, body.mh-marketplace-home .mh-product-photo { height:158px !important; min-height:158px !important; padding:12px !important; }
  body.mh-marketplace-home .product-card .product-body { padding:13px !important; }
  body.mh-marketplace-home .product-body h3 { font-size:14px !important; }
  body.mh-marketplace-home .product-sub { display:none; }
  body.mh-marketplace-home .price b { font-size:17px !important; }
  body.mh-marketplace-home .product-card .product-body > .btn { min-height:44px; margin-top:11px !important; font-size:12px; }
  body.mh-marketplace-home .footer-in { align-items:flex-start; flex-direction:column; padding:16px 0 20px; gap:8px; }
}
@media (max-width: 400px) {
  .store-header-main { grid-template-columns:112px 1fr; }
  .store-logo, .store-logo img { width:112px; height:64px; }
  #themeToggle { display:inline-flex; }
  .store-actions { gap:5px; }
  .store-actions .btn { padding:0 7px; }
  .store-account { min-width:54px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; }
  body.mh-marketplace-home .product-card:hover, .store-actions .btn:hover, .store-actions .icon-btn:hover { transform:none; }
}
