/* =====================================================
   PAYLANCE — Marketplace hero (index.html)
   Premium entry · glass search · floating cards
   ===================================================== */

:root {
  --mph-blue: #245BFF;
  --mph-blue-hover: #1a4ae6;
  --mph-blue-soft: rgba(36, 91, 255, 0.08);
  --mph-bg: #F5F7FB;
  --mph-text: #1D1D1F;
  --mph-muted: #6E6E73;
  --mph-border: rgba(0, 0, 0, 0.06);
  --mph-radius-lg: 28px;
  --mph-radius-xl: 32px;
  --mph-shadow: 0 24px 64px -28px rgba(16, 24, 40, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.mph-body {
  background: var(--mph-bg);
  color: var(--mph-text);
  overflow-x: hidden;
}

/* ── Page shell ── */
.mph-shell {
  padding: 20px 20px 48px;
}

.mph-page {
  max-width: 1280px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--mph-radius-xl);
  box-shadow: var(--mph-shadow);
  overflow: hidden;
}

/* ── Hero ── */
.mph-hero {
  position: relative;
  padding: 48px 48px 36px;
  min-height: 420px;
  overflow: hidden;
}

.mph-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mph-hero__bg svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.mph-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
  align-items: start;
}

.mph-hero__copy {
  padding-top: 12px;
  max-width: 420px;
}

.mph-hero__title {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 14px;
  color: var(--mph-text);
}

.mph-hero__title em {
  font-style: normal;
  color: var(--mph-blue);
}

.mph-hero__sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--mph-muted);
  margin-bottom: 28px;
  max-width: 340px;
}

/* Social proof */
.mph-social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.mph-social__avatars {
  display: flex;
  align-items: center;
}

.mph-social__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  object-fit: cover;
  margin-left: -10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mph-social__av:first-child { margin-left: 0; }

.mph-social__plus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mph-blue);
  color: #fff;
  display: grid;
  place-items: center;
  margin-left: -6px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(36, 91, 255, 0.35);
}

.mph-social__stat b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mph-social__stat span {
  font-size: 12px;
  color: var(--mph-muted);
  font-weight: 500;
}

/* Hero visual + floating cards */
.mph-hero__visual {
  position: relative;
  min-height: 320px;
}

.mph-float {
  position: absolute;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 40px -12px rgba(16, 24, 40, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: mphFloat 6s ease-in-out infinite;
}

.mph-float img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mph-float--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mph-float--logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mph-float--phone {
  width: 88px;
  height: 110px;
  top: 8px;
  left: 12%;
  transform: rotate(-12deg);
  animation-delay: 0s;
}

.mph-float--laptop {
  width: 120px;
  height: 78px;
  top: 0;
  left: 38%;
  transform: rotate(6deg);
  animation-delay: -1.2s;
}

.mph-float--headphones {
  width: 96px;
  height: 96px;
  top: 4px;
  right: 8%;
  transform: rotate(10deg);
  animation-delay: -2.4s;
}

.mph-float--part {
  width: 82px;
  height: 82px;
  bottom: 38%;
  left: 4%;
  transform: rotate(-8deg);
  animation-delay: -0.8s;
}

.mph-float--car {
  width: 130px;
  height: 86px;
  bottom: 32%;
  left: 32%;
  transform: rotate(-4deg);
  animation-delay: -1.8s;
}

.mph-float--chair {
  width: 100px;
  height: 100px;
  bottom: 34%;
  right: 6%;
  transform: rotate(8deg);
  animation-delay: -3s;
}

@keyframes mphFloat {
  0%, 100% { transform: translateY(0) rotate(var(--mph-rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--mph-rot, 0deg)); }
}

.mph-float--phone { --mph-rot: -12deg; }
.mph-float--laptop { --mph-rot: 6deg; }
.mph-float--headphones { --mph-rot: 10deg; }
.mph-float--part { --mph-rot: -8deg; }
.mph-float--car { --mph-rot: -4deg; }
.mph-float--chair { --mph-rot: 8deg; }

/* Glass search */
.mph-search-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 92%);
  z-index: 5;
}

.mph-search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 8px 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px -12px rgba(36, 91, 255, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.mph-search:focus-within {
  box-shadow: 0 16px 48px -12px rgba(36, 91, 255, 0.2), 0 0 0 3px rgba(36, 91, 255, 0.1);
  border-color: rgba(36, 91, 255, 0.25);
}

.mph-search__icon {
  color: #AEAEB2;
  flex-shrink: 0;
  display: flex;
}

.mph-search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: 500 16px/1.2 'Geist Sans', sans-serif;
  color: var(--mph-text);
  min-width: 0;
}

.mph-search__input::placeholder { color: #AEAEB2; }

.mph-search__divider {
  width: 1px;
  height: 28px;
  background: rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.mph-search__mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #6E6E73;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.mph-search__mic:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--mph-text);
}

/* ── Category chips ── */
.mph-chips {
  padding: 8px 48px 28px;
  border-bottom: 1px solid var(--mph-border);
}

.mph-chips__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mph-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid #E8E8ED;
  font: 600 14px/1 'Geist Sans', sans-serif;
  color: var(--mph-text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
}

.mph-chip svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.mph-chip:hover {
  border-color: #D2D2D7;
  transform: translateY(-1px);
}

.mph-chip.is-active {
  border-color: var(--mph-blue);
  color: var(--mph-blue);
  box-shadow: 0 0 0 3px var(--mph-blue-soft);
}

.mph-chip.is-active svg { stroke: var(--mph-blue); }

.mph-chips__more {
  position: relative;
}

.mph-chip--more svg.mph-chip__dots {
  width: 16px;
  height: 16px;
  stroke: none;
  fill: currentColor;
}

.mph-chip--more.is-open svg:last-child {
  transform: rotate(180deg);
}

.mph-chips__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #E8E8ED;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 16px 48px -12px rgba(16, 24, 40, 0.18);
  z-index: 40;
}

.mph-chips__dropdown[hidden] { display: none; }

.mph-chips__dropdown .mph-chip {
  display: flex;
  width: 100%;
  border-radius: 10px;
  border-color: transparent;
  box-shadow: none;
  font-weight: 500;
}

.mph-chips__dropdown .mph-chip:hover {
  background: var(--mph-bg);
  transform: none;
}

/* ── Main grid ── */
.mph-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 32px 48px 56px;
  align-items: start;
}

.mph-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.mph-section-head h2 {
  font: 700 20px/1.2 'Geist Sans', sans-serif;
  letter-spacing: -0.02em;
}

.mph-section-head__chev {
  color: #AEAEB2;
  display: flex;
}

.mph-section-head__link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  transition: color 0.15s;
}

.mph-section-head__link:hover { color: var(--mph-blue); }
.mph-section-head__link:hover .mph-section-head__chev { color: var(--mph-blue); }

/* Popular categories */
.mph-popular__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.mph-cat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ECECF0;
  border-radius: var(--mph-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.mph-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(16, 24, 40, 0.14);
  border-color: #D8D8DE;
}

.mph-cat-card__img {
  aspect-ratio: 1;
  background: #ECECF0;
  overflow: hidden;
}

.mph-cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mph-cat-card__body {
  padding: 14px 16px 18px;
}

.mph-cat-card__name {
  font: 700 14px/1.25 'Geist Sans', sans-serif;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.mph-cat-card__count {
  font: 500 12px/1.3 'Geist Sans', sans-serif;
  color: var(--mph-muted);
}

/* Trending sidebar */
.mph-trending {
  background: #FAFBFD;
  border: 1px solid #ECECF0;
  border-radius: var(--mph-radius-lg);
  padding: 20px 18px;
}

.mph-trending__title {
  font: 700 16px/1.2 'Geist Sans', sans-serif;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.mph-trending__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mph-trending__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  font: 500 13.5px/1.3 'Geist Sans', sans-serif;
  color: var(--mph-text);
  transition: background 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.mph-trending__item:hover { background: #fff; }

.mph-trending__icon {
  color: #AEAEB2;
  flex-shrink: 0;
  display: flex;
}

.mph-trending__text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mph-trending__arrow {
  color: var(--mph-blue);
  flex-shrink: 0;
  display: flex;
}

/* ── Footer compat ── */
.mph-footer {
  background: #fff;
  border-top: 1px solid #E5E5EA;
  padding: 32px 24px;
  margin-top: 0;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .mph-popular__grid { grid-template-columns: repeat(3, 1fr); }
  .mph-main { grid-template-columns: 1fr 240px; }
}

@media (max-width: 900px) {
  .mph-hero__inner { grid-template-columns: 1fr; }
  .mph-hero__copy { max-width: none; text-align: center; }
  .mph-hero__sub { margin-left: auto; margin-right: auto; }
  .mph-social { justify-content: center; }
  .mph-hero__visual { min-height: 280px; margin-top: 8px; }
  .mph-main { grid-template-columns: 1fr; }
  .mph-popular__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .mph-shell { padding: 12px 12px 32px; }
  .mph-hero { padding: 32px 20px 28px; }
  .mph-chips { padding: 8px 20px 20px; }
  .mph-main { padding: 24px 20px 32px; }
  .mph-chips__row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .mph-chips__row::-webkit-scrollbar { display: none; }
  .mph-popular__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mph-float { display: none; }
  .mph-float--phone,
  .mph-float--laptop,
  .mph-float--headphones { display: block; }
  .mph-float--phone { width: 64px; height: 80px; left: 8%; top: 20px; }
  .mph-float--laptop { width: 90px; height: 58px; left: 40%; }
  .mph-float--headphones { width: 72px; height: 72px; right: 10%; }
  .mph-search-wrap { position: relative; transform: none; left: auto; width: 100%; margin-top: 20px; }
  .mph-hero__visual { min-height: auto; padding-bottom: 0; }
}
