/**
 * H5 全站 — 对齐 bird-niao-pc-source（Montblanc 白底黑字、直角）
 */
@import url('/css/brand-tokens.css');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bn-bg);
  color: var(--bn-text);
}

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

img {
  max-width: 100%;
  vertical-align: middle;
}

.bn-page {
  min-height: 100vh;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.bn-page-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--bn-border-light);
}

/* —— 登录 / 注册（对齐 Login.vue） —— */
.bn-login-page {
  display: flex;
  justify-content: center;
  padding: 24px 20px 48px;
  background: var(--bn-bg);
}

.bn-login-container {
  width: 100%;
  max-width: 420px;
}

.bn-login-header {
  text-align: center;
  margin-bottom: 28px;
}

.bn-login-header .logo-text {
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--bn-text);
  font-weight: 500;
  line-height: 1.35;
}

.bn-login-subtitle {
  font-size: 13px;
  color: var(--bn-text-muted);
  margin-top: 8px;
}

.bn-login-tabs {
  display: flex;
  border-bottom: 1px solid var(--bn-border);
  margin-bottom: 24px;
}

.bn-login-tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--bn-text-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.bn-login-tabs button.active {
  color: var(--bn-text);
  border-bottom-color: var(--bn-gold);
  font-weight: 500;
}

.bn-form-group {
  margin-bottom: 20px;
}

.bn-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--bn-text-muted);
}

.bn-form-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--bn-border);
  font-size: 14px;
  background: var(--bn-bg);
  border-radius: var(--bn-radius);
}

.bn-form-group input:focus {
  outline: none;
  border-color: var(--bn-text);
}

.bn-code-row {
  display: flex;
  gap: 12px;
}

.bn-code-row input {
  flex: 1;
}

.bn-btn-send-code {
  flex-shrink: 0;
  width: 110px;
  height: 44px;
  border: 1px solid var(--bn-border);
  background: var(--bn-bg-soft);
  font-size: 13px;
  color: var(--bn-text-muted);
  cursor: pointer;
}

.bn-btn-send-code:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bn-btn-primary {
  width: 100%;
  height: 48px;
  border: none;
  background: var(--bn-gold);
  color: #fff;
  font-size: 14px;
  letter-spacing: 4px;
  cursor: pointer;
  border-radius: var(--bn-radius);
}

.bn-btn-primary:disabled {
  opacity: 0.6;
}

.bn-btn-outline {
  height: 48px;
  border: 1px solid var(--bn-gold);
  background: var(--bn-bg);
  color: var(--bn-gold);
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--bn-radius);
}

.bn-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
}

.bn-form-options a {
  color: var(--bn-text-muted);
  text-decoration: underline;
}

.bn-error {
  color: #c0392b;
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  min-height: 20px;
}

.bn-login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--bn-border-light);
  font-size: 13px;
  color: var(--bn-text-muted);
}

.bn-login-footer a {
  text-decoration: underline;
  color: var(--bn-text);
}

/* —— 购物车（对齐 Cart.vue 移动端） —— */
.bn-cart-page {
  background: var(--bn-bg-soft);
}

.bn-cart-list {
  padding: 12px 16px;
}

.bn-cart-item {
  display: flex;
  gap: 12px;
  background: var(--bn-bg-card);
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--bn-border-light);
}

.bn-cart-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  background: var(--bn-bg-soft);
  flex-shrink: 0;
}

.bn-cart-item .name {
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bn-cart-item .spec {
  font-size: 12px;
  color: var(--bn-text-soft);
  margin-top: 4px;
}

.bn-cart-item .price {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
}

.bn-cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bn-bg);
  border-top: 1px solid var(--bn-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

.bn-cart-bar .checkout {
  padding: 12px 28px;
  background: var(--bn-gold);
  color: #fff;
  border: none;
  font-size: 14px;
  letter-spacing: 2px;
}

/* —— 商品详情 —— */
.bn-product-page {
  background: var(--bn-bg);
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.bn-product-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bn-bg-soft);
}

.bn-product-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
}

.bn-product-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--bn-border);
  flex-shrink: 0;
}

.bn-product-thumbs img.active {
  border-color: var(--bn-text);
}

.bn-product-info {
  padding: 16px;
}

.bn-product-info h1 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 12px;
}

.bn-product-price {
  font-size: 20px;
  margin-bottom: 12px;
}

.bn-product-price .orig {
  font-size: 14px;
  color: var(--bn-text-soft);
  text-decoration: line-through;
  margin-left: 8px;
}

.bn-product-desc-block {
  padding: 16px;
  border-top: 8px solid var(--bn-bg-soft);
}

.bn-product-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 10px;
  background: var(--bn-bg);
  border-top: 1px solid var(--bn-border);
  z-index: 100;
}

.bn-product-bar button {
  flex: 1;
  height: 48px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.bn-product-bar .btn-cart {
  background: var(--bn-bg);
  border: 1px solid var(--bn-gold) !important;
  color: var(--bn-gold);
}

.bn-product-bar .btn-buy {
  background: var(--bn-gold);
  color: #fff;
}

/* —— 分类列表（对齐 PC Category.vue） —— */
.bn-category-page {
  background: var(--bn-bg);
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0));
  min-height: 50vh;
}

.bn-breadcrumb {
  font-size: 12px;
  color: var(--bn-text-soft);
  margin-bottom: 12px;
  line-height: 1.5;
}

.bn-breadcrumb a {
  color: var(--bn-text-soft);
  text-decoration: none;
}

.bn-breadcrumb a:active {
  color: var(--bn-gold);
}

.bn-breadcrumb .sep {
  margin: 0 6px;
  color: var(--bn-border);
}

.bn-breadcrumb .current {
  color: var(--bn-text-muted);
}

.bn-category-title {
  font-family: var(--bn-font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  color: var(--bn-text);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bn-gold);
  display: inline-block;
}

.bn-category-state {
  text-align: center;
  padding: 60px 16px;
  color: var(--bn-text-soft);
  font-size: 14px;
}

.bn-category-state.is-hidden {
  display: none;
}

.bn-product-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.bn-product-list.is-hidden {
  display: none;
}

/* 分类 / 搜索商品卡片 */
.bn-product-list .bn-product-card {
  display: flex;
  flex-direction: column;
  background: var(--bn-bg-card);
  border: none;
  overflow: visible;
}

.bn-product-list .bn-product-media {
  position: relative;
  background: var(--bn-bg-soft);
  overflow: hidden;
}

.bn-product-list .bn-product-image-link {
  position: relative;
  display: block;
  text-decoration: none;
}

.bn-product-list .bn-product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--bn-bg-soft);
  display: block;
  vertical-align: top;
}

.bn-product-list .bn-product-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 28px;
  height: 28px;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none !important;
  outline: none;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  color: #bdbdbd;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bn-product-list .bn-product-fav::before,
.bn-product-list .bn-product-fav::after {
  display: none !important;
}

.bn-product-list .bn-product-fav svg.fav-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  overflow: visible;
}

.bn-product-list .bn-product-fav .fav-path {
  transition: fill 0.2s, stroke 0.2s;
  transform: none;
  transform-origin: center;
}

.bn-product-list .bn-product-fav.is-active {
  color: #bdbdbd;
}

.bn-product-list .bn-product-fav.is-active .fav-path {
  fill: currentColor;
  stroke: currentColor;
}

.bn-product-list .bn-product-tag {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 2px;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.bn-product-list .bn-product-body {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 10px 4px 12px;
}

.bn-product-list .bn-product-name {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
  color: var(--bn-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bn-product-list .bn-product-price {
  font-size: 14px;
  color: var(--bn-gold-hover);
  margin: 0;
}

/* —— 商品详情规格 —— */
.bn-spec-block {
  margin-bottom: 16px;
}

.bn-spec-label {
  font-size: 13px;
  color: var(--bn-text-muted);
  margin-bottom: 8px;
}

.bn-spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-spec-chip {
  min-width: 40px;
  padding: 8px 14px;
  border: 1px solid var(--bn-border);
  background: var(--bn-bg);
  font-size: 13px;
  color: var(--bn-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bn-spec-chip-image {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid var(--bn-border-light);
}

.bn-spec-chip.active {
  border-color: var(--bn-gold);
  background: var(--bn-gold-soft);
}

.bn-spec-chip:disabled {
  opacity: 0.35;
}

.bn-spec-selected {
  font-size: 12px;
  color: var(--bn-text-muted);
  margin-bottom: 12px;
}

.bn-spec-hint {
  font-size: 12px;
  color: #c00;
  margin-bottom: 12px;
}

/* —— 搜索 —— */
.bn-search-fixed {
  position: fixed;
  top: var(--bn-h5-header-h, 52px);
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--bn-bg);
  border-bottom: 1px solid var(--bn-border-light);
}

.bn-search-input-wrap {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--bn-border);
}

.bn-search-input-wrap input {
  flex: 1;
  border: none;
  font-size: 16px;
  padding: 10px 0;
  background: transparent;
}

.bn-search-input-wrap input:focus {
  outline: none;
}

.bn-search-content {
  padding-top: calc(var(--bn-h5-header-h, 52px) + 56px);
  padding-left: 16px;
  padding-right: 16px;
}

/* —— 用户中心 —— */
.bn-user-hero {
  background: var(--bn-bg-soft);
  padding: 24px 16px;
  text-align: center;
}

.bn-user-menu {
  margin: 12px 16px;
  background: var(--bn-bg-card);
  border: 1px solid var(--bn-border-light);
}

.bn-user-menu a,
.bn-user-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
  border: none;
  background: none;
  border-bottom: 1px solid var(--bn-border-light);
  font-size: 14px;
  color: var(--bn-text);
  text-align: left;
  cursor: pointer;
}

.bn-user-menu a:last-child,
.bn-user-menu button:last-child {
  border-bottom: none;
}

/* —— 页脚（对齐 SiteFooter.vue 移动端） —— */
.bn-site-footer {
  background: var(--bn-bg);
  border-top: 1px solid var(--bn-border);
  margin-top: 48px;
  padding: 40px 16px 24px;
  font-family: var(--bn-font-sans);
}

.bn-site-footer .footer-grid {
  margin-bottom: 24px;
}

.bn-site-footer .footer-col-brand {
  padding-bottom: 20px;
}

.bn-site-footer .footer-cols-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 12px;
  align-items: start;
}

.bn-site-footer .footer-cols-row .footer-col h4 {
  margin-bottom: 8px;
  font-size: 10px;
}

.bn-site-footer .footer-cols-row .footer-col a {
  font-size: 10px;
}

.bn-site-footer .footer-cols-row li {
  margin-bottom: 4px;
}

.bn-site-footer .footer-brand {
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.bn-site-footer .footer-desc {
  font-size: 11px;
  color: var(--bn-text-soft);
  line-height: 1.6;
}

.bn-site-footer h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bn-footer-heading);
  margin-bottom: 12px;
}

.bn-site-footer ul {
  list-style: none;
}

.bn-site-footer li {
  margin-bottom: 6px;
}

.bn-site-footer a {
  font-size: 11px;
  color: var(--bn-text-muted);
}

.bn-site-footer .footer-bottom {
  padding-top: 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--bn-border-light);
  text-align: center;
  font-size: 11px;
  color: var(--bn-text-soft);
  line-height: 1.6;
}

.bn-site-footer .footer-copy {
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  color: var(--bn-text-soft);
}

.bn-site-footer .footer-legal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  font-size: 10px;
  color: var(--bn-text-muted);
}

.bn-site-footer .footer-legal-row span,
.bn-site-footer .footer-legal-row a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--bn-text-muted);
  text-decoration: none;
}

.bn-site-footer .footer-legal-sep {
  color: var(--bn-text-faint);
  user-select: none;
}

.bn-site-footer .footer-ic-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.bn-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.bn-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.bn-loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.bn-loading-mask.show {
  display: flex;
}

.bn-spinner {
  display: block;
  width: auto;
  height: auto;
}

.hidden {
  display: none !important;
}
