body.hg-market-page {
  margin: 0;
  background: #f5f7fa;
  color: #172c40;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

body.hg-market-page main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.hg-public-store.hg-marketplace {
  width: calc(100% - 19px);
  max-width: 1800px;
  margin: 9.5px auto 24px;
  padding: 0;
  --hg-columns: 2;
  --hg-primary: #194e9a;
  --hg-text: #172c40;
  --hg-muted: #61758c;
  --hg-border: #dbe3ed;
  --hg-surface: #fff;
  --hg-radius: 16px;
}

.hg-marketplace * {
  box-sizing: border-box;
}

.hg-marketplace a {
  color: inherit;
}

.hg-marketplace h1,
.hg-marketplace h2,
.hg-marketplace h3 {
  font-family: inherit;
}

.hg-marketplace .hg-market-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  height: auto;
  padding: 10px 15px;
  border: 1px solid #ccdaea;
  border-radius: 9px;
  background: #fff;
  color: #19466f;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.hg-marketplace .hg-market-button--solid {
  background: #194e9a;
  color: #fff;
  border-color: #194e9a;
}

.hg-market-kicker {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #62788c;
  font-weight: 700;
}

.hg-market-columns {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 24px;
}

.hg-market-columns>section {
  min-width: 0;
}

.hg-market-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  margin-bottom: 12px;
}

.hg-market-section-heading h2 {
  font-size: 25px;
  margin: 4px 0;
  line-height: 1.2;
}

.hg-market-section-heading>a,
.hg-market-section-heading>span {
  font-size: 12px;
  color: #61758c;
}

.hg-market-store-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  align-items: start;
}

.hg-marketplace .hg-public-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  grid-auto-rows: 1fr;
}

.hg-marketplace .hg-public-card-body {
  padding: 14px;
  gap: 10px;
}

.hg-marketplace .hg-public-card h3 {
  font-size: 16px;
}

.hg-marketplace .hg-public-price {
  font-size: 19px;
}

.hg-marketplace .hg-public-card-actions {
  gap: 7px;
}

.hg-marketplace .hg-public-card-actions .hg-public-action {
  font-size: 12px;
  padding: 9px;
  min-height: 40px;
}

.hg-market-location:empty {
  display: none;
}

.hg-marketplace .hg-country-selector {
  margin: 0 0 20px;
  background: #eaf1fa;
  border: 1px solid #ceddef;
}

.hg-marketplace .hg-country-selector label {
  flex: 1;
}

.hg-market-footer {
  padding: 22px 14px;
  text-align: center;
  color: #61758c;
  font-size: 13px;
  border-top: 1px solid #dbe3ed;
  margin-top: 32px;
}

.hg-market-footer p {
  margin: 0;
}

.hg-account-card {
  width: min(430px,100%);
  padding: 30px;
  background: white;
  border: 1px solid #dbe3ed;
  border-radius: 18px;
  margin: 35px auto;
}

.hg-account-card h2 {
  font-size: 28px;
  margin: 20px 0 12px;
}

.hg-account-card p {
  font-size: 14px;
}

.hg-account-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.hg-account-card input:not([type=checkbox]) {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #bccdde;
  border-radius: 9px;
  font: inherit;
  line-height: 1.5;
}

.hg-account-card input[type=submit] {
  background: #194e9a;
  color: white;
  border: 0;
  cursor: pointer;
}

.hg-account-card .login-remember label {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media(min-width:1500px) {
  .hg-market-store-grid,
  .hg-marketplace .hg-public-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

@media(max-width:900px) {
  .hg-market-store-grid,
  .hg-marketplace .hg-public-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .hg-market-columns {
    gap: 14px;
  }
}

@media(max-width:600px) {
  .hg-market-columns {
    gap: 10px;
  }

  .hg-market-section-heading {
    align-items: start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 78px;
  }

  .hg-market-section-heading h2 {
    font-size: 20px;
  }

  .hg-market-kicker {
    font-size: 9px;
  }

  .hg-marketplace .hg-public-card-body {
    padding: 10px;
    gap: 8px;
  }

  .hg-marketplace .hg-public-card h3 {
    font-size: 14px;
  }

  .hg-marketplace .hg-public-card-body p {
    font-size: 11px;
  }

  .hg-marketplace .hg-public-price {
    font-size: 16px;
  }

  .hg-marketplace .hg-public-card-actions .hg-public-action {
    font-size: 11px;
    min-height: 40px;
    padding: 8px 6px;
  }

  .hg-marketplace .hg-card-gallery-controls span {
    display: none;
  }

  .hg-marketplace .hg-card-gallery-controls button {
    padding: 3px 7px;
    min-height: 28px;
  }

  .hg-store-card-copy {
    padding: 9px;
  }

  .hg-store-card h3 {
    font-size: 14px!important;
  }

  .hg-store-card-meta {
    font-size: 10px;
  }

  .hg-store-card-offers {
    gap: 5px;
  }
}

@media(max-width:540px){
  /* Keep Stores left and Offers right: subgrid assigns these two explicit lanes. */
  .hg-marketplace .hg-market-columns{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px}
  .hg-marketplace .hg-market-section-heading{min-width:0;overflow-wrap:anywhere}
  .hg-marketplace .hg-market-section-heading h2{font-size:18px;line-height:1.3}
  .hg-marketplace .hg-market-section-heading>a{line-height:1.5}
  .hg-marketplace .hg-store-card .hg-public-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .hg-marketplace .hg-store-card .hg-store-card-meta{font-size:10px}
  .hg-marketplace .hg-store-card .hg-store-card-open{min-height:44px!important}
  .hg-marketplace .hg-public-card .hg-public-card-actions .hg-public-action{min-height:44px}
  .hg-marketplace .hg-public-card .hg-offer-value-row{flex-wrap:wrap;gap:3px 7px}
  body.hg-market-page .hg-account-card{width:min(100%,450px);padding:clamp(18px,5vw,26px);margin:22px auto}
}

.hg-marketplace .hg-account-error{color:#8c2d3d;background:#fff2f3;border:1px solid #eebdc5;border-radius:9px;padding:12px 14px;font-size:13px;line-height:1.55;margin:10px 0 18px}
.hg-account-card :is(input#user_login,input#user_pass){font-size:16px}
.hg-account-card input#wp-submit{min-height:46px;width:100%;border-radius:9px;font-weight:700}
.hg-account-card a{color:#1855a0;text-decoration:underline;text-underline-offset:2px}
