* {
  box-sizing: border-box;
}

.neo-empty[hidden] {
  display: none !important;
}

:root {
  --page-bg: #f3f3f6;
  --text: #131313;
  --muted: #6f747d;
  --soft: #f6f7fb;
  --pink: #ff6b95;
  --pink-dark: #ff4f83;
  --line: rgba(0, 0, 0, .08);
  --shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.neo-page {
  min-height: 100vh;
}

.neo-shell {
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: 14px 18px 20px;
}

.neo-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.neo-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.neo-brand-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), #ffabc2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .06);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.neo-brand-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.neo-brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.neo-brand-copy strong {
  overflow: hidden;
  color: var(--pink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-brand-copy span {
  max-width: 780px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-nav {
  display: flex;
  min-width: 0;
  justify-content: center;
  gap: 4px;
}

.neo-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  color: #666d77;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: .2s ease;
}

.neo-nav-link.is-active,
.neo-nav-link:hover {
  color: #1d1f23;
  background: #fff;
  box-shadow: var(--shadow);
}

.neo-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.neo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.neo-btn-ghost {
  border-color: var(--line);
  background: #fff;
}

.neo-btn-solid {
  color: #fff;
  background: #050505;
}

.neo-main {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 116px);
  padding-top: 14px;
}

.neo-side-card,
.neo-catalog-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.neo-card-head,
.neo-catalog-head {
  padding: 16px 20px;
}

.neo-card-tag {
  display: inline-block;
  color: #6d737c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.neo-card-head h2,
.neo-catalog-title h2 {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.neo-category-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.neo-category-items {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}

.neo-category-group {
  margin: 4px 0 8px;
}

.neo-category-group-head {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 7px 10px;
  border: 0;
  border-radius: 12px;
  color: #4f555d;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  transition: .2s ease;
}

.neo-category-group-head:hover,
.neo-category-group.is-open > .neo-category-group-head {
  background: #fff;
  box-shadow: var(--shadow);
  outline: 1px solid rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

.neo-category-group-icon,
.neo-category-icon,
.neo-product-cover {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ff91ae, #ffcfda);
  font-size: 13px;
  font-weight: 900;
}

.neo-category-group-icon {
  width: 32px;
  height: 32px;
}

.neo-category-group-name,
.neo-category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-category-group-count,
.neo-category-count {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--pink-dark);
  background: rgba(255, 107, 149, .12);
  font-size: 11.5px;
  font-weight: 800;
}

.neo-category-group-items {
  display: grid;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
}

.neo-category-group.is-open .neo-category-group-items {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
}

.neo-category-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-bottom: 2px;
  padding: 7px 10px 7px 24px;
  border: 0;
  border-radius: 12px;
  color: #4f555d;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  transition: .2s ease;
}

.neo-category-item:hover,
.neo-category-item.is-active {
  background: #fff;
  box-shadow: var(--shadow);
  outline: 1px solid rgba(0, 0, 0, .06);
}

.neo-category-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3f3f6 center / cover no-repeat;
  font-size: 0;
}

.neo-category-count {
  color: #686e78;
  background: #f1f2f7;
}

.neo-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.neo-search {
  display: grid;
  width: 380px;
  max-width: 100%;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  padding: 3px;
  border: 2px solid #d9dce5;
  border-radius: 999px;
  background: #fff;
}

.neo-search-icon {
  color: #8a9098;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.neo-search-input {
  min-width: 0;
  padding-right: 10px;
  border: 0;
  outline: 0;
  color: #23262b;
  background: transparent;
  font-size: 12px;
}

.neo-search-input::placeholder {
  color: #a2a7b0;
}

.neo-search-btn {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #050505;
  font-size: 12px;
  font-weight: 800;
}

.neo-table {
  display: flex;
  min-height: 360px;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line);
}

.neo-table-head,
.neo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 62px 86px;
  gap: 7px;
  align-items: center;
}

.neo-table-head {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  color: #666d77;
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.neo-table-body {
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 15px 15px;
  background: #fff;
}

.neo-shop-list {
  display: flex;
  flex-direction: column;
}

.neo-row {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
}

.neo-row:hover {
  background: #fcfcfe;
}

.neo-product-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.neo-product-cover {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #f2f3f8 center / cover no-repeat;
}

.neo-product-copy {
  min-width: 0;
}

.neo-product-copy h3 {
  overflow: hidden;
  margin: 0;
  color: #191b1f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-product-copy p {
  overflow: hidden;
  margin: 3px 0 0;
  color: #9a9fa8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neo-price-main {
  color: #5b2dd1;
  font-size: 12px;
  font-weight: 900;
}

.neo-stock-main {
  color: #57a9ff;
  font-size: 12px;
}

.neo-buy-btn {
  display: inline-flex;
  width: 72px;
  height: 27px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #050505;
  font-size: 11px;
  font-weight: 800;
}

.neo-buy-btn:hover {
  background: var(--pink-dark);
}

.neo-buy-btn.is-disabled,
.neo-buy-btn:disabled {
  cursor: not-allowed;
  background: #c7ccd4;
  opacity: .78;
}

.neo-empty {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #8c929b;
  font-size: 13px;
  text-align: center;
}

.neo-footer {
  padding: 24px 0 8px;
  color: #8d929a;
  font-size: 12px;
  text-align: center;
}

.neo-notice-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  opacity: 0;
  transition: opacity .28s ease, visibility .28s ease;
}

.neo-notice-layer.is-visible {
  visibility: visible;
  opacity: 1;
}

.neo-notice-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .32);
  backdrop-filter: blur(6px);
}

.neo-notice-dialog,
.neo-buy-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 24px));
  transform: translate(-50%, calc(-50% + 18px)) scale(.96);
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
  transition: transform .34s cubic-bezier(.22, 1, .36, 1);
}

.neo-buy-dialog {
  width: min(520px, calc(100vw - 24px));
}

.neo-notice-layer.is-visible .neo-notice-dialog,
.neo-notice-layer.is-visible .neo-buy-dialog {
  transform: translate(-50%, -50%) scale(1);
}

.neo-notice-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #555b64;
  background: #f3f3f6;
  font-size: 24px;
  line-height: 1;
}

.neo-notice-header,
.neo-buy-body {
  padding: 26px 28px 18px;
}

.neo-notice-header {
  border-bottom: 1px solid var(--line);
}

.neo-notice-header h3,
.neo-buy-body h3 {
  margin: 8px 0 0;
  font-size: 25px;
  font-weight: 900;
}

.neo-notice-body {
  max-height: 78vh;
  overflow-y: auto;
  padding: 24px 28px 30px;
  color: #2d3137;
  font-size: 14px;
  line-height: 1.8;
}

.neo-notice-body h4 {
  margin: 18px 0 6px;
  font-size: 15px;
}

.neo-notice-body p {
  margin: 0 0 10px;
}

.buy-description {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.buy-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border-radius: 16px;
  color: var(--muted);
  background: var(--soft);
  font-size: 13px;
}

.buy-summary strong {
  color: var(--pink-dark);
  font-size: 16px;
}

.neo-buy-body label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #535a64;
  font-size: 13px;
  font-weight: 700;
}

.neo-buy-body input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 10px;
  outline: 0;
  color: #1a1d22;
  background: #fff;
}

.neo-buy-body input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 107, 149, .12);
}

.pay-title {
  margin-top: 20px;
  color: #535a64;
  font-size: 13px;
  font-weight: 800;
}

.pay-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.pay-button {
  min-height: 40px;
  border: 1px solid rgba(255, 107, 149, .28);
  border-radius: 10px;
  color: var(--pink-dark);
  background: rgba(255, 107, 149, .06);
  font-size: 12px;
  font-weight: 800;
}

.pay-button:hover {
  color: #fff;
  background: var(--pink);
}

@media (max-width: 1200px) {
  .neo-main {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .neo-brand-copy span {
    max-width: 360px;
  }
}

@media (max-width: 900px) {
  .neo-shell {
    padding: 8px 8px 18px;
  }

  .neo-topbar {
    grid-template-columns: 1fr auto;
    border-radius: 22px;
  }

  .neo-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: 3;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .neo-nav-link {
    flex: 1;
    justify-content: center;
    padding: 9px 5px;
    font-size: 13px;
  }

  .neo-user-actions {
    gap: 5px;
  }

  .neo-btn {
    padding: 8px 10px;
  }

  .neo-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .neo-side-card,
  .neo-catalog-card {
    width: 100%;
  }

  .neo-side-card {
    max-height: 330px;
  }

  .neo-category-items {
    max-height: 240px;
  }

  .neo-catalog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .neo-search {
    width: 100%;
  }

  .neo-table-head {
    grid-template-columns: minmax(0, 1fr) 74px 58px;
  }

  .neo-table-head .neo-col-action {
    display: none;
  }

  .neo-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product product"
      "price stock"
      "action action";
    gap: 8px;
    padding: 11px 12px;
  }

  .neo-col-product {
    grid-area: product;
  }

  .neo-col-price {
    grid-area: price;
  }

  .neo-col-stock {
    grid-area: stock;
    text-align: right;
  }

  .neo-col-action {
    grid-area: action;
  }

  .neo-buy-btn {
    width: 88px;
    height: 33px;
    font-size: 13px;
  }

  .neo-notice-dialog,
  .neo-buy-dialog {
    border-radius: 20px;
  }

  .neo-notice-body {
    max-height: 70vh;
  }

  .pay-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .neo-brand-copy strong {
    max-width: 150px;
    font-size: 16px;
  }

  .neo-brand-copy span {
    max-width: 150px;
    font-size: 10px;
  }

  .neo-user-actions .neo-btn {
    font-size: 11px;
  }

  .neo-notice-header,
  .neo-buy-body {
    padding: 22px 18px 16px;
  }

  .neo-notice-body {
    padding: 18px;
    font-size: 13px;
  }
}
