:root {
  --mypro-primary: #ff7ab6;
  --mypro-primary-deep: #ff5e9c;
  --mypro-accent: #7da0ff;
  --mypro-success: #2cd3a9;
  --mypro-text: #2f3045;
  --mypro-muted: #7a8194;
  --mypro-card: rgba(255, 255, 255, 0.85);
  --mypro-border: rgba(255, 255, 255, 0.6);
  --mypro-shadow: 0 18px 48px rgba(255, 111, 169, 0.15);
}

body.mypro-body {
  --bg-image: var(--mypro-bg, none);
  margin: 0;
  min-height: 100vh;
  color: var(--mypro-text);
  font-family: "Manrope", "Segoe UI Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body.mypro-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 111, 169, 0.14), transparent 30%),
    radial-gradient(circle at 85% 22%, rgba(125, 160, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #f8f7ff 0%, #f4f1ff 35%, #ffffff 80%);
  z-index: -2;
}

body.mypro-body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-image) center/cover no-repeat;
  opacity: var(--bg-opacity, 0);
  z-index: -3;
  transition: opacity 0.3s ease;
}

.mypro-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.mypro-shell[data-box="90"] {
  max-width: 90%;
}

.glass {
  background: var(--mypro-card);
  border: 1px solid var(--mypro-border);
  border-radius: 22px;
  box-shadow: var(--mypro-shadow);
  backdrop-filter: blur(14px);
}

.mypro-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  row-gap: 10px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--mypro-text);
}

.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(255, 111, 169, 0.18), rgba(125, 160, 255, 0.12));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(255, 111, 169, 0.18);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  color: var(--mypro-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 14px;
  color: var(--mypro-muted);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--mypro-primary);
  background: rgba(255, 111, 169, 0.12);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(120deg, var(--mypro-primary), var(--mypro-primary-deep));
  box-shadow: 0 10px 24px rgba(255, 111, 169, 0.25);
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-cta .ghost-btn,
.nav-cta .solid-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 14px;
  padding: 8px 14px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
}

.ghost-btn {
  color: var(--mypro-primary);
  border-color: rgba(255, 111, 169, 0.4);
  background: rgba(255, 255, 255, 0.7);
}

.solid-btn {
  background: linear-gradient(115deg, var(--mypro-primary), var(--mypro-primary-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 111, 169, 0.28);
}

.nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
}

.nav-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-username {
  font-weight: 700;
}

.nav-balance {
  color: var(--mypro-muted);
  font-size: 12px;
}

.nav-user-menu {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
  z-index: 9;
}

.nav-user:hover .nav-user-menu {
  opacity: 1;
  pointer-events: auto;
}

.nav-user-menu a {
  color: var(--mypro-text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.nav-user-menu a:hover {
  background: rgba(255, 111, 169, 0.08);
}

.mypro-footer {
  padding: 26px 0 36px;
  text-align: center;
  color: var(--mypro-muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-text {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed rgba(0, 0, 0, 0.05);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}

.badge.soft {
  background: rgba(125, 160, 255, 0.1);
  color: #4b63e0;
}

.stock-danger {
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.35);
}

.stock-warn {
  background: linear-gradient(135deg, #ffa502, #ffb733);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(255, 165, 2, 0.35);
}

.stock-safe {
  background: linear-gradient(135deg, #26de81, #20bf6b);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(38, 222, 129, 0.35);
}

.ghost-btn,
.solid-btn,
.buy-btn {
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buy-btn {
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--mypro-primary), var(--mypro-primary-deep));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 111, 169, 0.25);
}

.buy-btn:active {
  transform: translateY(1px);
}

@media (max-width: 1024px) {
  .nav-inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .mypro-shell {
    padding: 0 20px;
  }

  .nav-inner {
    gap: 12px;
  }

  .brand-avatar {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .nav-links {
    width: 100%;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .nav-cta .ghost-btn,
  .nav-cta .solid-btn {
    padding: 8px 12px;
  }

  .brand-sub {
    display: none;
  }

  .nav-link {
    padding: 6px 10px;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* navbar (统一默认样式) */
.navbar-acg {
  background: #fff;
  border-bottom: 1px solid #f1f2f5;
}

.navbar-acg .brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.navbar-acg .brand-title {
  color: #57b894;
  font-weight: 800;
  font-size: 18px;
}

.navbar-acg .nav-link {
  color: #6c757d;
  font-weight: 700;
  padding: 6px 10px;
  background: transparent;
  border-radius: 10px;
  border: none;
  margin-right: 10px;
}

.navbar-acg .nav-link.active {
  color: #57b894;
}

.navbar-acg .btn {
  border-radius: 12px;
}

.simple-nav .navbar-collapse {
  background: #fff;
}

.simple-nav .nav-link {
  color: #2f3045;
}

.simple-nav .navbar-toggler {
  border-color: #e2e2e2;
}

.nav-auth .btn {
  white-space: nowrap;
}

.nav-auth {
  flex-shrink: 0;
}

.nav-avatar-sm {
  width: 30px;
  height: 30px;
  object-fit: cover;
}

.user-info-box {
  position: relative;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8eef5;
  box-shadow: 0 8px 20px rgba(87, 184, 148, 0.12);
  color: #2f3045;
}

.nav-user-btn:hover {
  background: #f7fbf9;
  color: #2f3045;
}

.nav-user-btn:focus {
  box-shadow: 0 0 0 0.15rem rgba(87, 184, 148, 0.18);
}

.nav-user-btn.dropdown-toggle::after {
  display: none;
}

.nav-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  min-width: 0;
}

.nav-username {
  font-weight: 800;
  font-size: 14px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-balance {
  color: #6c757d;
  font-size: 12px;
  white-space: nowrap;
}

.user-dropdown-menu {
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #edf1f6;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.user-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #2f3045;
  font-weight: 600;
}

.user-dropdown-menu .dropdown-item:hover {
  background: #f5fbf8;
  color: #2f3045;
}

.user-dropdown-menu .dropdown-item i {
  color: #57b894;
}

.user-dropdown-menu .dropdown-item.text-danger i {
  color: #e63946;
}

.user-dropdown-menu .dropdown-divider {
  margin: 6px 0;
}

.nav-wrap {
  flex-wrap: nowrap;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flex-spacer {
  flex: 1 1 auto;
}

@media (max-width: 992px) {
  .nav-wrap {
    width: auto;
  }

  .nav-auth {
    margin-right: 6px;
  }

  .nav-user-btn {
    padding: 6px 8px;
  }

  .nav-username {
    max-width: 140px;
  }

  .navbar-toggler {
    margin-left: 4px;
  }

  .flex-spacer {
    display: none;
  }
}

@media (max-width: 576px) {
  .nav-user-btn {
    gap: 6px;
  }

  .nav-balance {
    display: none;
  }
}

/* 强制隐藏移动菜单在桌面版 */
@media (min-width: 992px) {
  .navbar-collapse.d-lg-none {
    display: none !important;
  }
}

.product-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.product-pagination .page-info {
  font-size: 14px;
  color: #6b7280;
}

.product-pagination .page-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f9fafb, #eef2ff);
  color: #374151;
  transition: all .2s ease;
}

.product-pagination .page-btn:hover:not(:disabled) {
  border-color: #9aa7ff;
  color: #111827;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.product-pagination .page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-pagination.hide {
  display: none;
}
