/* Reference-inspired homepage content, loaded after the legacy homepage styles. */
:root {
  --home-shell-width: min(95%, 1480px);
}

body.home-page.light-theme .nav-container,
body.home-page.light-theme .hp-dashboard-hero,
body.home-page.light-theme .hp-reference-content,
body.home-page.light-theme .footer-wrapper {
  width: var(--home-shell-width) !important;
  max-width: 1480px !important;
}

body.home-page .hp-newest-section,
body.home-page .hp-popular-section,
body.home-page .hp-split-section,
body.home-page .hp-insights-section,
body.home-page .hp-compare-section,
body.home-page .hp-market-section,
body.home-page .hp-bottom-grid {
  display: none !important;
}

.hp-reference-content {
  width: min(1420px, calc(100% - 48px));
  margin: 34px auto 70px;
  display: grid;
  gap: 28px;
  color: #211d31;
}

body.home-page.light-theme footer.footer-main {
  margin-top: 42px !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.hp-ref-panel {
  padding: 24px 28px 26px;
  border: 1px solid rgba(98, 87, 166, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .46);
  box-shadow: 0 14px 36px rgba(72, 62, 123, .06);
}

.hp-ref-heading,
.hp-ref-panel-head > span {
  color: #6d5fd1;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.hp-ref-heading {
  margin-bottom: 26px;
  text-align: center;
}

.hp-how-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 22px;
}

.hp-how-grid > a {
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease;
}

.hp-how-grid > a:hover {
  transform: translateY(-3px);
}

.hp-how-grid > i {
  color: #b9acf4;
  font-size: 1.15rem;
  font-style: normal;
}

.hp-how-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #6e5ce1;
  background: linear-gradient(145deg, #e7d8ff, #eef0ff);
  box-shadow: 0 10px 24px rgba(94, 76, 177, .1);
  font-size: 1.4rem;
  font-weight: 800;
}

.hp-how-grid h3 {
  margin: 0 0 7px;
  font-size: .91rem;
}

.hp-how-grid p {
  max-width: 190px;
  margin: auto;
  color: #74707d;
  font-size: .72rem;
  line-height: 1.5;
}

.hp-ref-panel-head {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-ref-panel-head a {
  padding: 8px 11px;
  border-radius: 8px;
  color: #575080;
  background: #f0edff;
  font-size: .68rem;
  font-weight: 800;
  text-decoration: none;
}

.hp-ref-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.hp-ref-categories a {
  min-width: 0;
  padding: 9px 9px 13px;
  display: grid;
  text-align: center;
  border: 1px solid rgba(94, 82, 161, .1);
  border-radius: 12px;
  color: #252131;
  background: rgba(250, 249, 255, .76);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.hp-ref-categories a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(71, 61, 125, .11);
}

.hp-ref-categories img {
  width: 100%;
  height: 116px;
  margin-bottom: 10px;
  object-fit: contain;
  border-radius: 9px;
  background: linear-gradient(145deg, #f6f4ff, #ececff);
}

.hp-ref-categories strong {
  font-size: .8rem;
}

.hp-ref-categories small {
  margin-top: 4px;
  color: #8b8795;
  font-size: .64rem;
}

.hp-discovery-panel {
  padding-bottom: 28px;
}

.hp-recent-finds,
.hp-popular-finds {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.hp-recent-finds > a {
  position: relative;
  min-width: 0;
  padding: 9px 9px 13px;
  display: grid;
  border: 1px solid rgba(94, 82, 161, .09);
  border-radius: 12px;
  color: #292535;
  background: rgba(250, 249, 255, .76);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.hp-recent-finds > a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(71, 61, 125, .11);
}

.hp-recent-finds img {
  width: 100%;
  height: 132px;
  margin-bottom: 10px;
  object-fit: contain;
  border-radius: 9px;
  background: linear-gradient(145deg, #f6f4ff, #ececff);
}

.hp-recent-finds strong {
  overflow: hidden;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-recent-finds small {
  margin-top: 5px;
  overflow: hidden;
  color: #8b8795;
  font-size: .59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-recent-finds em {
  margin-top: 5px;
  color: #42c879;
  font-size: .67rem;
  font-style: normal;
  font-weight: 850;
}

.hp-new-find {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 15px;
  padding: 4px 6px;
  border-radius: 5px;
  color: #fff;
  background: #7061e9;
  font-size: .49rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.hp-popular-head {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(86, 77, 137, .09);
}

.hp-popular-finds > a {
  position: relative;
  height: 122px;
  overflow: hidden;
  border-radius: 11px;
  color: #fff;
  background: #292536;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(42, 37, 72, .1);
}

.hp-popular-finds img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.hp-popular-finds > a:hover img {
  transform: scale(1.06);
}

.hp-popular-finds > a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(25, 21, 36, .82));
}

.hp-popular-finds span {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 9px;
  left: 10px;
  display: grid;
  gap: 2px;
}

.hp-popular-finds strong {
  font-size: .75rem;
}

.hp-popular-finds small {
  color: rgba(255, 255, 255, .75);
  font-size: .57rem;
}

.hp-ref-sellers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

.hp-ref-sellers a {
  min-width: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(94, 82, 161, .09);
  border-radius: 11px;
  color: #282432;
  background: rgba(250, 249, 255, .74);
  text-decoration: none;
}

.hp-ref-sellers a > b {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #17141f;
  font-size: .72rem;
}

.hp-ref-sellers a > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hp-ref-sellers strong {
  overflow: hidden;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-ref-sellers em {
  color: #f0a900;
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
}

.hp-ref-sellers small {
  color: #87838f;
  font-size: .61rem;
}

.hp-community-banner {
  min-height: 176px;
  padding: 28px 42px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 255, 255, .76), transparent 28%),
    linear-gradient(112deg, #eee6ff, #d9dcff 54%, #e7d8ff);
  box-shadow: 0 18px 40px rgba(76, 65, 137, .09);
}

.hp-community-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hp-community-visual img {
  width: 64px;
  height: 64px;
  padding: 15px;
  border-radius: 18px;
  object-fit: contain;
  background: linear-gradient(145deg, #7767f3, #5e55e7);
  box-shadow: 0 13px 28px rgba(91, 78, 208, .24);
}

.hp-community-visual span {
  color: #6d5cd5;
  font-size: 1.35rem;
}

.hp-community-banner > div:nth-child(2) > span {
  color: #6759c4;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.hp-community-banner h2 {
  margin: 5px 0 9px;
  font-size: 1.65rem;
}

.hp-community-banner p {
  max-width: 560px;
  margin: 0;
  color: #65616f;
  font-size: .79rem;
  line-height: 1.55;
}

.hp-community-actions {
  display: grid;
  justify-items: center;
  gap: 11px;
}

.hp-community-actions a {
  color: #55506b;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
}

.hp-community-actions a:first-child {
  min-height: 46px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #7767f3, #5e55e7);
  box-shadow: 0 12px 25px rgba(89, 76, 210, .22);
}

.hp-community-actions img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

@media (max-width: 980px) {
  :root {
    --home-shell-width: calc(100% - 28px);
  }

  .hp-how-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hp-how-grid > i {
    display: none;
  }

  .hp-ref-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hp-recent-finds,
  .hp-popular-finds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hp-ref-sellers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-community-banner {
    grid-template-columns: auto 1fr;
  }

  .hp-community-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .hp-reference-content {
    width: var(--home-shell-width) !important;
    gap: 18px;
  }

  .hp-ref-panel {
    padding: 21px 15px;
  }

  .hp-how-grid,
  .hp-ref-categories,
  .hp-recent-finds,
  .hp-popular-finds,
  .hp-ref-sellers {
    grid-template-columns: 1fr 1fr;
  }

  .hp-community-banner {
    padding: 25px 20px;
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 479.98px) {
  :root {
    --home-shell-width: calc(100% - 24px);
  }
}
