/* 有鲜生活 · 静态站补充样式（购物车 / 搜索 / 提示） */
:root {
  --xy-primary: #266bf9;
  --xy-primary-dark: #1a55d0;
  --xy-border: #ebebeb;
  --xy-text: #3a3a3a;
  --xy-muted: #969696;
  --xy-danger: #e34d4d;
}

/* ---------- 全局提示 ---------- */
.xy-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 99999;
  padding: 12px 26px;
  border-radius: 30px;
  background: rgba(38, 107, 249, .96);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  max-width: 80vw;
  box-shadow: 0 8px 24px rgba(38, 107, 249, .28);
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}
.xy-toast.show { opacity: 1; transform: translate(-50%, 0); }
.xy-toast.error { background: rgba(227, 77, 77, .96); box-shadow: 0 8px 24px rgba(227, 77, 77, .26); }

/* ---------- 购物车角标 ---------- */
.header-action-btn-cart { position: relative; }
.xy-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--xy-primary);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  align-items: center;
  justify-content: center;
}

/* ---------- 登录态 ---------- */
.xy-logout {
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, .3);
  font-size: 12px;
  opacity: .8;
}
.xy-logout:hover { opacity: 1; }

/* ---------- 商品卡店铺名 ---------- */
.product .content .xy-shop {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--xy-muted);
}

/* ---------- 空状态 ---------- */
.xy-empty,
.xy-empty-cart {
  padding: 60px 20px;
  text-align: center;
  color: var(--xy-muted);
}
.xy-empty-cart i { font-size: 52px; color: #d8d8d8; display: block; margin-bottom: 16px; }
.xy-empty-cart p { margin: 0 0 20px; font-size: 15px; }

/* ---------- 按钮 ---------- */
.xy-btn {
  display: inline-block;
  padding: 11px 30px;
  border: 1px solid var(--xy-primary);
  border-radius: 30px;
  background: var(--xy-primary);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: all .2s ease;
}
.xy-btn:hover { background: var(--xy-primary-dark); border-color: var(--xy-primary-dark); color: #fff; }
.xy-btn.ghost { background: transparent; color: var(--xy-text); border-color: var(--xy-border); }
.xy-btn.ghost:hover { background: #f7f7f7; color: var(--xy-primary); border-color: var(--xy-primary); }

/* ---------- 购物车 ---------- */
.xy-cart-wrap { border: 1px solid var(--xy-border); border-radius: 6px; background: #fff; }
.xy-cart-table { width: 100%; border-collapse: collapse; }
.xy-cart-table th {
  padding: 16px 18px;
  border-bottom: 1px solid var(--xy-border);
  background: #fafafa;
  color: var(--xy-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.xy-cart-table th:nth-child(2),
.xy-cart-table th:nth-child(3),
.xy-cart-table th:nth-child(4) { text-align: center; }
.xy-cart-table td {
  padding: 18px;
  border-bottom: 1px solid #f2f2f2;
  vertical-align: middle;
  font-size: 14px;
  color: var(--xy-text);
}
.xy-cell-goods { display: flex; align-items: center; gap: 16px; }
.xy-thumb { flex: 0 0 78px; width: 78px; height: 78px; border: 1px solid var(--xy-border); border-radius: 6px; overflow: hidden; }
.xy-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xy-goods-info { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.xy-goods-name { color: var(--xy-text); line-height: 1.5; }
.xy-goods-name:hover { color: var(--xy-primary); }
.xy-goods-shop { font-size: 12px; color: var(--xy-muted); }
.xy-cell-price, .xy-cell-qty, .xy-cell-sub { text-align: center; }
.xy-cell-sub { color: var(--xy-primary); font-weight: 600; }
.xy-cell-del button {
  width: 30px; height: 30px;
  border: 1px solid var(--xy-border);
  border-radius: 50%;
  background: #fff;
  color: var(--xy-muted);
  cursor: pointer;
  transition: all .2s ease;
}
.xy-cell-del button:hover { border-color: var(--xy-danger); color: var(--xy-danger); }

.xy-qty { display: inline-flex; align-items: center; border: 1px solid var(--xy-border); border-radius: 4px; overflow: hidden; }
.xy-qty button {
  width: 32px; height: 34px;
  border: 0; background: #fafafa;
  font-size: 16px; color: var(--xy-text);
  cursor: pointer;
}
.xy-qty button:hover { background: #f0f0f0; color: var(--xy-primary); }
.xy-qty input {
  width: 48px; height: 34px;
  border: 0; border-left: 1px solid var(--xy-border); border-right: 1px solid var(--xy-border);
  text-align: center; font-size: 14px; color: var(--xy-text); outline: none;
}

.xy-cart-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px;
}
.xy-cart-actions { display: flex; gap: 12px; }
.xy-cart-total { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--xy-muted); }
.xy-cart-total strong { color: var(--xy-text); }
.xy-total-price strong { color: var(--xy-danger); font-size: 22px; font-weight: 600; }

/* ---------- 搜索页 ---------- */
.xy-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 34px;
  max-width: 620px;
}
.xy-search-bar input {
  flex: 1;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--xy-border);
  border-radius: 30px;
  font-size: 14px;
  color: var(--xy-text);
  outline: none;
  transition: border-color .2s ease;
}
.xy-search-bar input:focus { border-color: var(--xy-primary); }
.xy-search-meta { margin-bottom: 26px; font-size: 14px; color: var(--xy-muted); }
.xy-search-meta strong { color: var(--xy-primary); font-weight: 600; }

/* ---------- 内容型页面（入驻 / 资讯 / 协议） ---------- */
.xy-page-bg { background: #f6f7f9; }
.xy-card {
  max-width: 1080px;
  margin: 0 auto;
  padding: 52px 56px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(17, 24, 39, .05);
}
.xy-article {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 15px;
  line-height: 1.9;
  color: var(--xy-text);
  text-align: left;
}
.xy-article h3 { margin: 34px 0 14px; font-size: 20px; color: #2d2d2d; }
.xy-article h3:first-child { margin-top: 0; }
.xy-article p { margin: 0 0 14px; color: #525252; }
.xy-article ul { margin: 0 0 16px; padding-left: 22px; list-style: disc outside; }
.xy-article ul li { list-style: disc outside; }
.xy-article li { margin-bottom: 8px; color: #525252; }
.xy-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 26px 0; }
.xy-step { padding: 24px 22px; border: 1px solid var(--xy-border); border-radius: 8px; background: #fff; }
.xy-step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 12px;
  border-radius: 50%; background: rgba(38, 107, 249, .1);
  color: var(--xy-primary); font-size: 14px; font-weight: 600;
}
.xy-step h4 { margin: 0 0 8px; font-size: 15px; color: #2d2d2d; }
.xy-step p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--xy-muted); }
.xy-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 26px 0; }
.xy-contact div { padding: 20px 22px; border-radius: 8px; background: #fafafa; }
.xy-contact span { display: block; font-size: 12px; color: var(--xy-muted); margin-bottom: 6px; }
.xy-contact strong { font-size: 16px; color: #2d2d2d; font-weight: 600; }

@media (max-width: 767px) {
  .header-logo img { max-width: 170px !important; height: auto !important; }

  .xy-cart-wrap { border: 0; background: transparent; }
  .xy-cart-table { table-layout: auto; }
  .xy-cart-table thead { display: none; }
  .xy-cart-table, .xy-cart-table tbody, .xy-cart-table tr, .xy-cart-table td { display: block; width: 100%; }
  .xy-cart-table tr {
    position: relative;
    margin-bottom: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
  }
  .xy-cart-table td { padding: 0; border: 0; text-align: left !important; }
  .xy-cell-goods { display: flex !important; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
  .xy-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 6px; }
  .xy-thumb img { width: 64px; height: 64px; object-fit: cover; }
  .xy-goods-info { max-width: none; min-width: 0; padding-right: 24px; }
  .xy-goods-name { display: block; font-size: 13px; line-height: 1.5; white-space: normal; word-break: break-word; }
  .xy-goods-shop { font-size: 11px; }
  .xy-cell-price { display: none !important; }
  .xy-cell-qty { width: auto !important; margin-bottom: 8px; }
  .xy-cell-sub { display: block !important; width: auto !important; text-align: right !important; font-size: 15px; }
  .xy-cell-sub::before { content: "小计："; color: var(--xy-muted); font-weight: 400; font-size: 13px; }
  .xy-cell-del { position: absolute; top: 12px; right: 10px; width: auto !important; }
  .xy-cell-del button { width: 26px; height: 26px; border: 0; }
  .xy-cart-footer { flex-direction: column; align-items: stretch; gap: 14px; padding: 6px 0 0; }
  .xy-cart-actions { justify-content: space-between; gap: 10px; }
  .xy-cart-actions .xy-btn { flex: 1; padding: 10px 8px; text-align: center; font-size: 13px; }
  .xy-cart-total { justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .xy-total-price strong { font-size: 18px; }
  .xy-card { padding: 26px 18px; border-radius: 8px; }
  .xy-article { font-size: 14px; }
  .xy-article h3 { font-size: 17px; margin: 26px 0 12px; }
  .xy-search-bar { max-width: none; }
  .xy-search-bar input { height: 44px; font-size: 13px; }
}

/* ---------- 移动端横向溢出兜底 ---------- */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .main-wrapper, .container, .row { max-width: 100%; }
  .xy-cart-wrap, .xy-cart-table, .xy-cart-table tr, .xy-cart-table td,
  .xy-cart-footer, .xy-cart-actions, .xy-goods-info { box-sizing: border-box; max-width: 100%; }
  .xy-goods-info { flex: 1 1 auto; overflow: hidden; }
  .xy-goods-name { overflow-wrap: anywhere; }
  .xy-cell-qty { display: block !important; }
  .xy-cart-total .xy-btn { flex: 0 0 auto; }
}

/* ---------- 移动端模板细节修正 ---------- */
@media (max-width: 767px) {
  .slider-height { height: 430px !important; }
  .hero-slide-item .hero-slide-content h2 { font-size: 26px !important; }
  .hero-slide-item .show-case { display: none !important; }
  .product-tab-nav {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .product-tab-nav::-webkit-scrollbar { display: none; }
  .product-tab-nav .nav-item { flex: 0 0 auto; }
  .product-tab-nav .nav-link { white-space: nowrap; padding: 8px 14px; font-size: 13px; }
  .breadcrumb-area { padding: 34px 0 !important; }
  .breadcrumb-title { font-size: 24px !important; }
}

/* ---------- 移动端商品网格（2 列） ---------- */
@media (max-width: 767px) {
  .row.mb-n-30px > [class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .product .thumb img,
  .product .thumb .hover-image {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover;
    display: block;
  }
  .product .content { padding: 10px 6px !important; }
  .product .content h5.title { font-size: 12.5px !important; line-height: 1.45; margin-bottom: 6px; }
  .product .content h5.title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product .content .xy-shop { font-size: 11px !important; }
  .product .content .price .new { font-size: 14px !important; }
  .product .actions { display: none !important; }
  .product .badges .new { font-size: 10px; padding: 1px 6px; }
}


/* ---------- 登录 / 注册 ---------- */
.login-form-container {
  padding: 52px 46px;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 6px 26px rgba(0, 0, 0, .06);
}
.login-form-container .login-register-form input[type="text"],
.login-form-container .login-register-form input[type="password"] {
  height: 48px !important;
  margin-bottom: 18px;
  border-radius: 6px;
  border-color: #e6e6e6;
  font-size: 14px;
}
.login-form-container .login-register-form input[type="text"]:focus,
.login-form-container .login-register-form input[type="password"]:focus { border-color: var(--xy-primary); }
.login-form-container .login-register-form .button-box { margin-top: 6px; }
.login-form-container .login-register-form .button-box button {
  width: 100%;
  display: block;
  background-color: var(--xy-primary) !important;
  color: #fff !important;
  padding: 14px 30px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: none;
}
.login-form-container .login-register-form .button-box button:hover {
  background-color: var(--xy-primary-dark) !important;
  color: #fff !important;
}
.login-form-container .login-register-form .login-toggle-btn { padding: 0 0 16px; font-size: 13px; color: #767676; }
.login-form-container .login-register-form .login-toggle-btn a { color: var(--xy-primary); font-size: 13px; }
.xy-auth-note {
  margin: 18px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #9b9b9b;
  text-align: center;
}
@media (max-width: 767px) {
  .login-form-container { padding: 32px 20px; }
}






/* ---------- 404 页面 ---------- */
.xy-404 { text-align: center; padding: 70px 30px 64px; }
.xy-404-code {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--xy-primary);
  opacity: .16;
  margin-bottom: 6px;
}
.xy-404-title { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif; font-size: 26px; font-weight: 600; color: #2d2d2d; margin: 0 0 14px; }
.xy-404-text { font-size: 15px; color: #767676; margin-bottom: 30px; }
.xy-404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.xy-404-actions .xy-btn { min-width: 132px; text-align: center; }
.xy-404-tip { font-size: 13px; color: #9a9a9a; }
.xy-404-tip a { color: var(--xy-primary); }

@media (max-width: 767px) {
  .xy-404 { padding: 46px 18px 44px; }
  .xy-404-code { font-size: 68px; }
  .xy-404-title { font-size: 20px; }
  .xy-404-text { font-size: 13.5px; margin-bottom: 24px; }
  .xy-404-actions .xy-btn { flex: 1 1 40%; min-width: 0; padding: 11px 12px; font-size: 13px; }
}
