/* =============================================================================
 * 湖北凰唬科技有限公司 · 前台品牌焕新增强层 (Brand Refresh)
 * -----------------------------------------------------------------------------
 * 设计语言：科技蓝紫 · 珊瑚橙 —— 现代、克制、专业的商业采购平台
 * 作用域：仅 .xph-front（前台），在 front-theme.css 之后加载
 * 原则：只增强视觉，不改动任何既有类名与结构；纯 CSS，无 JS 依赖
 * ========================================================================== */

/* ---------------------------------------------------------------------------
 * 1. 品牌 Logo：几何「凰唬」标识 + 工艺级字标
 * ------------------------------------------------------------------------ */
.xph-front .topbar .logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .5px;
  gap: 11px;
  background: none;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
}
.xph-front .topbar .logo:hover { -webkit-text-fill-color: var(--primary); color: var(--primary); }
.xph-front .topbar .logo { position: relative; }
.xph-front .topbar .logo::before {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, #2E2B26 0%, #1A1917 58%, #141310 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255,.38), 0 4px 12px rgba(26,25,23,.30);
  position: relative;
}
/* 方块内嵌的「凰唬」菱形符号 */
.xph-front .topbar .logo::after {
  content: "";
  position: absolute;
  left: 9.5px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border-radius: 3px;
  background: #FFFFFF;
  box-shadow: inset -3px -3px 0 rgba(26,25,23,.28);
  transform: rotate(45deg);
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * 2. 顶栏：更干净的悬浮质感 + 品牌色呼吸底线
 * ------------------------------------------------------------------------ */
.xph-front .topbar {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 1px 0 rgba(26,25,23,.06), 0 8px 30px rgba(31,29,26,.05);
}
.xph-front .topbar::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, #1A1917 25%, #3A362F 50%, #C9A063 78%, transparent);
  opacity: .85;
  animation: lc-flow 8s linear infinite;
  background-size: 200% 100%;
}
@keyframes lc-flow { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

.xph-front .topbar .nav a {
  font-weight: 600;
  transition: color .18s ease;
}
.xph-front .topbar .nav a:hover,
.xph-front .topbar .nav a.active { color: var(--primary); }

/* 主按钮：更饱满的深海蓝渐变 */
.xph-front .btn-primary,
.xph-front .btn-accent {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 5px 16px rgba(26,25,23,.22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.xph-front .btn-primary:hover,
.xph-front .btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(26,25,23,.30);
  filter: saturate(1.06);
}

/* ---------------------------------------------------------------------------
 * 顶栏入口按钮：浅蓝底 + 深蓝字（与「商家入驻」一致的清晰浅底风格）
 * 关键：hover 也保持浅底深字，不使用渐变/白字/位移，避免文字发虚
 * ------------------------------------------------------------------------ */
.xph-front .btn-merchant-manage,
.xph-front .btn-mall-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.5;
  color: #1A1917;
  -webkit-text-fill-color: #1A1917;
  background: #F7F1E4;
  border: 1px solid rgba(26,25,23,.32);
  box-shadow: none;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.xph-front .btn-merchant-manage:hover,
.xph-front .btn-mall-entry:hover {
  color: #1A1917;
  -webkit-text-fill-color: #1A1917;
  background: #EFE2C6;
  border-color: #1A1917;
  transform: none;
  filter: none;
  box-shadow: none;
}
/* 仅保留小圆点，不使用加号方块，避免挤压文字 */
.xph-front .btn-mall-entry::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1A1917;
  box-shadow: none;
}
.xph-front .btn-merchant-manage::before {
  content: none;
  display: none;
}

/* ---------------------------------------------------------------------------
 * 3. Hero：更清晰的视觉层级与柔和修饰
 * ------------------------------------------------------------------------ */
.xph-front .hero { border-bottom: 1px solid rgba(26,25,23,.08); }
.xph-front .hero-title {
  font-weight: 800;
  letter-spacing: -.5px;
}
.xph-front .hero-tag {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .6px;
}
.xph-front .hero-dot.is-active { border-radius: 3px; width: 26px; }

/* ---------------------------------------------------------------------------
 * 4. 区块标题：精致的竖向标识 + 轻量分隔
 * ------------------------------------------------------------------------ */
.xph-front .section-head h2 {
  font-weight: 800;
  letter-spacing: 0;
}
.xph-front .section-head h2::before {
  width: 5px;
  height: 22px;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(26,25,23,.30);
}

/* ---------------------------------------------------------------------------
 * 5. 分类卡：立体悬停 + 顶部色条常显（弱化 → 悬停增强）
 * ------------------------------------------------------------------------ */
.xph-front .cat-card {
  border-radius: 18px;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), box-shadow .26s ease, border-color .26s ease;
}
.xph-front .cat-card::before {
  transform: scaleX(.35);
  opacity: .75;
  height: 3px;
  border-radius: 0 0 3px 3px;
}
.xph-front .cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(31,29,26,.12), 0 0 30px color-mix(in srgb, var(--cat-color) 26%, transparent);
}
.xph-front .cat-card:hover::before { transform: scaleX(1); opacity: 1; }
.xph-front .cat-icon { border-radius: 16px; }

/* ---------------------------------------------------------------------------
 * 6. 商品卡：更利落的悬停抬升 + 封面轻微缩放
 * ------------------------------------------------------------------------ */
.xph-front .product {
  border-radius: 16px;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease;
}
.xph-front .product:hover {
  transform: translateY(-6px);
  border-color: rgba(26,25,23,.40);
  box-shadow: 0 18px 44px rgba(31,29,26,.14);
}
.xph-front .product .cover {
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.xph-front .product:hover .cover { transform: scale(1.045); }
.xph-front .product .price { font-weight: 800; letter-spacing: -.3px; }

/* ---------------------------------------------------------------------------
 * 7. 卡片入场动画：首屏元素轻量渐入，提升精致感
 * ------------------------------------------------------------------------ */
@keyframes lc-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.xph-front .cat-grid .cat-card { animation: lc-rise .5s both; }
.xph-front .cat-grid .cat-card:nth-child(1) { animation-delay: .04s; }
.xph-front .cat-grid .cat-card:nth-child(2) { animation-delay: .08s; }
.xph-front .cat-grid .cat-card:nth-child(3) { animation-delay: .12s; }
.xph-front .cat-grid .cat-card:nth-child(4) { animation-delay: .16s; }
.xph-front .cat-grid .cat-card:nth-child(5) { animation-delay: .20s; }
.xph-front .grid-4 .product { animation: lc-rise .5s both; }
.xph-front .grid-4 .product:nth-child(1) { animation-delay: .05s; }
.xph-front .grid-4 .product:nth-child(2) { animation-delay: .10s; }
.xph-front .grid-4 .product:nth-child(3) { animation-delay: .15s; }
.xph-front .grid-4 .product:nth-child(4) { animation-delay: .20s; }
.xph-front .grid-4 .product:nth-child(n+5) { animation-delay: .24s; }

/* ---------------------------------------------------------------------------
 * 8. 页脚：品牌收尾更沉稳
 * ------------------------------------------------------------------------ */
.xph-front .site-footer {
  border-top: 1px solid rgba(26,25,23,.10);
}
.xph-front .footer-logo {
  font-weight: 800;
  letter-spacing: .3px;
}
.xph-front .site-footer .footer-bottom {
  border-top: 1px solid rgba(31,29,26,.06);
}

/* ---------------------------------------------------------------------------
 * 9. 细节：选中态、滚动条与光标反馈统一品牌色
 * ------------------------------------------------------------------------ */
.xph-front ::selection { background: rgba(26,25,23,.20); }
.xph-front .muted { color: var(--muted); }

/* 尊重「减少动画」系统偏好 */
@media (prefers-reduced-motion: reduce) {
  .xph-front .cat-grid .cat-card,
  .xph-front .grid-4 .product { animation: none; }
  .xph-front .topbar::after { animation: none; }
}

/* ---------------------------------------------------------------------------
 * 10. 信息平台顶部分类导航：选中态改浅底深字，避免深底白字发虚
 * ------------------------------------------------------------------------ */
.xph-front .nav-info-site a {
  font-size: 13.5px;
  font-weight: 700;
  padding: 6px 14px;
  color: #57534E;
  -webkit-text-fill-color: #57534E;
  transition: color .16s ease, background .16s ease;
}
.xph-front .nav-info-site a:hover {
  color: #1A1917;
  -webkit-text-fill-color: #1A1917;
  background: #F7F1E4;
}
.xph-front .nav-info-site a[data-info-cid].active {
  color: #1A1917;
  -webkit-text-fill-color: #1A1917;
  background: #F7F1E4;
  box-shadow: inset 0 -2px 0 #1A1917;
}

/* ---------------------------------------------------------------------------
 * 11. 顶栏导航防换行：新增「电子产品」后收紧间距，保持单行
 * ------------------------------------------------------------------------ */
.xph-front .topbar .inner { gap: 16px; }
.xph-front .topbar .nav {
  gap: 15px;
  flex: 1 1 auto;
  min-width: 0;
}
.xph-front .topbar .nav a {
  white-space: nowrap;
  flex-shrink: 0;
}
.xph-front .topbar .right {
  flex-shrink: 0;
  gap: 10px;
}
.xph-front .topbar .logo {
  font-size: 17px;
  flex-shrink: 0;
}
/* 中等屏：进一步收紧；小屏隐藏次要项，保留核心导航 */
@media (max-width: 1180px) {
  .xph-front .topbar .nav { gap: 11px; }
  .xph-front .topbar .nav a { font-size: 13.5px; }
  .xph-front .topbar .right { gap: 8px; font-size: 12.5px; }
}
@media (max-width: 960px) {
  .xph-front .topbar .nav a { font-size: 13px; }
  .xph-front .topbar .right a:not(.btn) { display: none; }
}

/* =============================================================================
 * 9. 顶部导航重构（Navigation Redesign）
 * -----------------------------------------------------------------------------
 * 设计目标：干净、克制、专业。精简 Logo 双行字标、菜单当前项指示条、
 *          右侧功能入口分级呈现，去掉流动彩线与突兀的药丸强调。
 * 作用域：仅 .xph-front（前台），置于文件末尾以高优先级覆盖前述规则。
 * ========================================================================== */

/* --- 顶栏本体：纯净白底 + 细描边 --- */
.xph-front .topbar {
  background: #FFFFFF !important;
  border-bottom: 1px solid #EAE4D8 !important;
  box-shadow: 0 2px 16px rgba(31,29,26, .045) !important;
}
.xph-front .topbar::after { display: none !important; }
.xph-front .topbar .inner {
  height: 68px !important;
  gap: 30px !important;
  max-width: 1320px !important;
}

/* --- Logo：品牌图标 + 公司全称（单行） --- */
.xph-front .topbar .logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 11px !important;
  flex-shrink: 0 !important;
  background: none !important;
  -webkit-text-fill-color: #1F1D1A !important;
  color: #1F1D1A !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: .3px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
.xph-front .topbar .logo::before {
  content: "" !important;
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, #2E2B26 0%, #1A1917 58%, #141310 100%) !important;
  box-shadow: 0 4px 12px rgba(26,25,23, .28), inset 0 1px 0 rgba(255,255,255,.35) !important;
  position: relative !important;
}
.xph-front .topbar .logo::after {
  content: "" !important;
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  width: 12px !important;
  height: 12px !important;
  margin-top: -6px !important;
  border-radius: 3px !important;
  background: #FFFFFF !important;
  transform: rotate(45deg) !important;
  box-shadow: none !important;
  pointer-events: none !important;
}
/* --- 主导航菜单 --- */
.xph-front .topbar .nav {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.xph-front .topbar .nav a {
  position: relative !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #57534E !important;
  padding: 24px 0 !important;
  white-space: nowrap !important;
  transition: color .18s ease !important;
}
.xph-front .topbar .nav a::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 2px !important;
  border-radius: 2px 2px 0 0 !important;
  background: #1A1917 !important;
  transform: scaleX(0) !important;
  transform-origin: center !important;
  transition: transform .2s ease !important;
}
.xph-front .topbar .nav a:hover,
.xph-front .topbar .nav a.active,
.xph-front .topbar .nav a[data-cid].active {
  color: #1A1917 !important;
  font-weight: 600 !important;
}
.xph-front .topbar .nav a:hover::after,
.xph-front .topbar .nav a.active::after,
.xph-front .topbar .nav a[data-cid].active::after {
  transform: scaleX(1) !important;
}

/* --- 信息发布：低调的强调样式（去橙色药丸） --- */
.xph-front .topbar .nav a.nav-info,
.xph-front .nav a.nav-info {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #1A1917 !important;
  background: #F7F1E4 !important;
  border: 1px solid #EFE2C6 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  -webkit-text-fill-color: #1A1917 !important;
  transition: background .16s ease, border-color .16s ease !important;
}
.xph-front .nav a.nav-info::before {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #2E2B26 !important;
  box-shadow: none !important;
}
.xph-front .nav a.nav-info::after { display: none !important; }
.xph-front .nav a.nav-info:hover {
  color: #0D0C0B !important;
  -webkit-text-fill-color: #0D0C0B !important;
  background: #EFE2C6 !important;
  border-color: #E8D3A9 !important;
  transform: none !important;
  box-shadow: none !important;
}

/* --- 右侧功能区：分级呈现 --- */
.xph-front .topbar .right {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex-shrink: 0 !important;
  font-size: 13px !important;
}
.xph-front .topbar .right a {
  color: #6B655C !important;
  font-size: 12.5px !important;
  white-space: nowrap !important;
  transition: color .16s ease !important;
}
.xph-front .topbar .right a:hover { color: #1A1917 !important; }

/* 次要文字入口弱化 */
.xph-front .topbar .right a[href*="help"],
.xph-front .topbar .right a[href*="cart"] { color: #8D877D !important; }

/* 商家入驻：主 CTA 实心按钮 */
.xph-front .topbar .right .btn-primary {
  background: #1A1917 !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border: 1px solid #1A1917 !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(26,25,23, .22) !important;
}
.xph-front .topbar .right .btn-primary:hover {
  background: #0D0C0B !important;
  border-color: #0D0C0B !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(26,25,23, .3) !important;
}

/* 商家管理：次级描边按钮 */
.xph-front .topbar .right .btn-merchant-manage {
  background: #FFFFFF !important;
  color: #1A1917 !important;
  -webkit-text-fill-color: #1A1917 !important;
  border: 1px solid #E8D3A9 !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.xph-front .topbar .right .btn-merchant-manage:hover {
  background: #F7F1E4 !important;
  border-color: #3A362F !important;
  transform: none !important;
  box-shadow: none !important;
}

/* --- 响应式 --- */
@media (max-width: 1200px) {
  .xph-front .topbar .inner { gap: 20px !important; }
  .xph-front .topbar .nav { gap: 16px !important; }
  .xph-front .topbar .nav a { font-size: 13px !important; }
  .xph-front .topbar .right { gap: 10px !important; }
}
@media (max-width: 980px) {
  .xph-front .topbar .nav a { font-size: 12.5px !important; padding: 20px 0 !important; }
  .xph-front .topbar .right a:not(.btn) { display: none !important; }
}
