/* =============================================================================
 * 湖北凰唬科技有限公司 · 前台亮色主题（Obsidian & Antique Gold · 曜石黑金）
 * -----------------------------------------------------------------------------
 * 作用域：仅 .xph-front（前台 body 上由 layout.html 注入）。
 * 后台 admin / 商家 merchant 不引入本文件、无此 class，视觉完全不受影响。
 *
 * 原则：只重写取值，不改任何类名与结构（与 style.css 顶部契约一致）。
 *       先重写设计令牌，再用 .xph-front 前缀覆盖 style.css / home.css /
 *       member.css / terms.css 中的硬编码深色规则。
 * ========================================================================== */

/* ---------------------------------------------------------------------------
 * 1. 亮色设计令牌（前台全部后代自动继承）
 * ------------------------------------------------------------------------ */
.xph-front {
  color-scheme: light;

  /* 底色层：纸白 → 浅蓝灰 */
  --bg-deep:  #ffffff;
  --bg:       #F7FAFF;
  --bg-soft:  #F5F8FC;
  --card:     #FFFFFF;
  --card-hi:  #FFFFFF;

  /* 玻璃面板（亮底上用半透明白） */
  --glass:    rgba(255, 255, 255, .72);
  --glass-hi: rgba(255, 255, 255, .92);

  /* 描边 */
  --border:    #EAE4D8;
  --border-hi: rgba(26,25,23, .55);

  /* 文字 */
  --text:   #1F1D1A;
  --text-2: #57534E;
  --muted:  #8D877D;

  /* 主题色：曜石黑 / 古铜金 */
  --primary:      #1A1917;
  --primary-dark: #0D0C0B;
  --primary-2:    #2E2B26;
  --accent:       #C9A063;
  --accent-dark:  #A67C3D;
  --ok:           #3A362F;
  --err:          #E5484D;
  --warn:         #A67C3D;

  /* 渐变：曜石黑 → 古铜金 */
  --grad-primary: linear-gradient(135deg, #1A1917 0%, #2E2B26 52%, #C9A063 140%);
  --grad-accent:  linear-gradient(135deg, #C9A063 0%, #A67C3D 100%);
  --grad-surface: linear-gradient(160deg, rgba(26,25,23,.06) 0%, rgba(201,160,99,.07) 46%, rgba(255, 255, 255,0) 100%);

  /* 圆角（更亲和） */
  --radius-sm: 12px;
  --radius:    16px;
  --radius-lg: 22px;

  /* 阴影（轻落、柔） */
  --shadow:       0 12px 34px rgba(31,29,26, .10);
  --shadow-soft:  0 4px 18px rgba(31,29,26, .08);
  --glow:         0 0 26px rgba(26,25,23, .30);
  --glow-soft:    0 0 40px rgba(26,25,23, .14);
  --glow-accent:  0 0 26px rgba(201,160,99, .28);
}

/* ---------------------------------------------------------------------------
 * 2. 页面底色与品牌色光斑（替换暗色网格）
 * ------------------------------------------------------------------------ */
body.xph-front {
  color: var(--text);
  background-color: var(--bg);
}
body.xph-front::before {
  background-image:
    radial-gradient(900px 520px at 12% -8%, rgba(26,25,23, .10), transparent 60%),
    radial-gradient(820px 520px at 90% 0%, rgba(46,43,38, .10), transparent 62%),
    radial-gradient(760px 520px at 50% 112%, rgba(201,160,99, .08), transparent 66%);
  background-size: auto;
}

/* 滚动条（亮） */
.xph-front ::-webkit-scrollbar-track { background: #F2EEE6; }
.xph-front ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(26,25,23, .5), rgba(46,43,38, .5));
  border: 2px solid #F2EEE6;
}
.xph-front ::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #1A1917, #2E2B26); }
.xph-front ::selection { background: rgba(26,25,23, .22); color: #1F1D1A; }

/* ---------------------------------------------------------------------------
 * 3. 顶栏 / 页脚（白底 + 柔阴影 + 品牌色描边）
 * ------------------------------------------------------------------------ */
.xph-front .topbar {
  background: rgba(250,248,244, .82);
  border-bottom: 1px solid var(--border);
}
.xph-front .topbar::after {
  background: linear-gradient(90deg, transparent, rgba(26,25,23, .7), rgba(46,43,38, .7), transparent);
  opacity: .6;
}
.xph-front .logo {
  background: linear-gradient(96deg, #1A1917 0%, #2E2B26 60%, #C9A063 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #1A1917;
}
.xph-front .logo::before { display: none; }
.xph-front .logo small { -webkit-text-fill-color: var(--muted); color: var(--muted); }

.xph-front .site-footer {
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F8FC 100%);
  border-top: 1px solid var(--border);
}
.xph-front .site-footer::before {
  background: linear-gradient(90deg, transparent, rgba(26,25,23, .5), rgba(46,43,38, .45), transparent);
}

/* 粘性页脚：内容高度不足时，页脚始终固定在浏览器窗口底部 */
.xph-front {
  display: flex;
  flex-direction: column;
}
.xph-front > .container {
  flex: 1 0 auto;
  width: 100%;
}

/* ---------------------------------------------------------------------------
 * 4. 卡片 / 玻璃面（统一白底）
 * ------------------------------------------------------------------------ */
.xph-front .card,
.xph-front .product,
.xph-front .glass,
.xph-front .stat,
.xph-front .reco-card,
.xph-front .feature,
.xph-front .cat-card,
.xph-front .address-card,
.xph-front .terms-doc,
.xph-front .card-item,
.xph-front .pay-channel,
.xph-front .jump-box,
.xph-front .detail,
.xph-front .member-sidebar {
  background: #FFFFFF;
  border-color: var(--border);
}

/* ---------------------------------------------------------------------------
 * 5. 商品卡 / 详情图集（浅底突出真实商品图）
 * ------------------------------------------------------------------------ */
.xph-front .product .cover { background-color: #F4F1EA; }
.xph-front .product .cover::after { background: linear-gradient(180deg, transparent, rgba(31,29,26, .05)); }
.xph-front .product .cover-ph::after { color: rgba(31,29,26, .28); }

.xph-front .detail .gallery {
  background: radial-gradient(circle at 50% 40%, rgba(46,43,38, .06), transparent 68%), #F5F8FC;
  border-color: var(--border);
}
.xph-front .detail-thumbs .th { background-color: #F4F1EA; border-color: var(--border); }
.xph-front .detail-thumbs .th.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(26,25,23, .5), 0 0 18px rgba(26,25,23, .22);
}

.xph-front .reco-card .thumb { background-color: #F4F1EA; border-color: var(--border); }
.xph-front .reco-card .thumb-ph::before { color: rgba(31,29,26, .26); }

/* ---------------------------------------------------------------------------
 * 6. 表单（亮底）
 * ------------------------------------------------------------------------ */
.xph-front input[type=text],
.xph-front input[type=password],
.xph-front input[type=number],
.xph-front input[type=email],
.xph-front input[type=tel],
.xph-front input[type=search],
.xph-front input[type=date],
.xph-front input[type=url],
.xph-front select,
.xph-front textarea {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text);
}
.xph-front input:hover, .xph-front select:hover, .xph-front textarea:hover { border-color: rgba(31,29,26, .28); }
.xph-front input:focus, .xph-front select:focus, .xph-front textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(26,25,23, .14), var(--glow-soft);
}
.xph-front select option { background: #FFFFFF; color: var(--text); }
.xph-front input::placeholder, .xph-front textarea::placeholder { color: #A49D91; }

/* 首页商品墙搜索条：home.css 用 .goods-search input 覆盖，需要更高 specificity */
.xph-front .goods-search select,
.xph-front .goods-search input[type="text"] {
  background: #FFFFFF;
  border-color: rgba(31,29,26, .18);
  color: var(--text);
}
.xph-front .goods-search select:focus,
.xph-front .goods-search input[type="text"]:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,25,23, .14), var(--glow-soft);
}

/* ---------------------------------------------------------------------------
 * 7. 按钮（亮底 hover 用靛蓝而非暗底白字）
 * ------------------------------------------------------------------------ */
.xph-front .btn { color: var(--text); background: var(--glass-hi); }
.xph-front .btn:hover {
  background: rgba(26,25,23, .10);
  color: #1A1917;
  border-color: var(--border-hi);
}
.xph-front .btn-ghost:hover { background: rgba(26,25,23, .08); }
.xph-front .btn-ghost-light {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(31,29,26, .20);
  color: #1F1D1A;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.xph-front .btn-ghost-light:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  color: #1A1917;
}

/* ---------------------------------------------------------------------------
 * 8. 分类矩阵 / 特色条 hover 柔影
 * ------------------------------------------------------------------------ */
.xph-front .cat-card:hover {
  box-shadow: 0 12px 30px rgba(31,29,26, .10), 0 0 24px color-mix(in srgb, var(--cat-color) 26%, transparent);
}
.xph-front .feature::after,
.xph-front .card::before,
.xph-front .stat::after,
.xph-front .terms-doc::before,
.xph-front .detail::before {
  background: linear-gradient(90deg, transparent, rgba(26,25,23, .5), rgba(46,43,38, .45), transparent);
}

/* ---------------------------------------------------------------------------
 * 9. 标签（亮底可读）
 * ------------------------------------------------------------------------ */
.xph-front .tag-gray   { background: rgba(141,135,125,.10); color: #6B655C; border-color: rgba(141,135,125,.25); }
.xph-front .tag-blue   { background: rgba(46,43,38,.12);  color: #1A1917; border-color: rgba(46,43,38,.32); }
.xph-front .tag-green  { background: rgba(46,43,38,.12);   color: #0D0C0B; border-color: rgba(46,43,38,.30); }
.xph-front .tag-orange { background: rgba(201,160,99,.14);  color: #8A6330; border-color: rgba(201,160,99,.34); }
.xph-front .tag-red    { background: rgba(229, 72, 77,.12);   color: #B4272C; border-color: rgba(229, 72, 77,.32); }
.xph-front .tag-yellow { background: rgba(166,124,61,.14);   color: #967036; border-color: rgba(166,124,61,.32); }

/* 商品详情页内部硬编码深色的亮色覆盖（detail.html 内联样式） */
.xph-front .spec-grid,
.xph-front .shop-line {
  background: #FFFFFF;
  border-color: var(--border);
}
.xph-front .spec-grid .sp { border-bottom-color: var(--border); }
.xph-front .p-tags .t {
  color: #1A1917;
  background: rgba(46,43,38, .12);
  border-color: rgba(46,43,38, .32);
}
.xph-front .p-price-row .save {
  color: #8A6330;
  background: rgba(201,160,99, .14);
  border-color: rgba(201,160,99, .34);
}

/* ---------------------------------------------------------------------------
 * 10. 表格（亮）
 * ------------------------------------------------------------------------ */
.xph-front .table th { background: rgba(46,43,38, .08); color: var(--text); }
.xph-front .table tr:hover td { background: rgba(26,25,23, .05); }

/* 分页 hover（靛蓝） */
.xph-front .pagination li a:hover { color: #1A1917; background: rgba(26,25,23, .12); border-color: var(--border-hi); }

/* ---------------------------------------------------------------------------
 * 11. Toast / 弹层（layer.js，亮底）
 * ------------------------------------------------------------------------ */
.xph-front .layui-layer-msg {
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid var(--border-hi) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}

/* ---------------------------------------------------------------------------
 * 12. Hero 轮播（浅底深字 + 左侧浅色安全区）
 * ------------------------------------------------------------------------ */
.xph-front .hero { background: #F5F8FC; }
.xph-front .hero-viewport { background: #F5F8FC; }
.xph-front .hero-overlay {
  background: linear-gradient(90deg, rgba(250,248,244,.94) 0%, rgba(250,248,244,.82) 32%, rgba(250,248,244,.34) 60%, rgba(250,248,244,0) 84%);
}
.xph-front .hero-overlay::before {
  opacity: .4;
  background-image:
    linear-gradient(rgba(31,29,26,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,29,26,.04) 1px, transparent 1px);
}
.xph-front .hero-overlay::after { background: linear-gradient(180deg, transparent, rgba(250,248,244,.85)); }

.xph-front .hero-title { background: none; -webkit-text-fill-color: #171512; color: #171512; text-shadow: none; }
.xph-front .hero-sub { color: rgba(31,29,26, .72); }
.xph-front .hero-tag {
  color: #1A1917;
  background: rgba(26,25,23, .12);
  border-color: rgba(26,25,23, .40);
  box-shadow: 0 0 18px rgba(26,25,23, .16);
}
.xph-front .hero-tag::before { background: var(--primary); box-shadow: 0 0 10px var(--primary); }

.xph-front .hero-dot { background: rgba(31,29,26, .22); }
.xph-front .hero-dot.is-active { background: var(--grad-primary); box-shadow: 0 0 14px rgba(26,25,23, .55); }

/* ---------------------------------------------------------------------------
 * 13. 会员中心（member.css 硬编码暗色覆盖）
 * ------------------------------------------------------------------------ */
.xph-front .member-sidebar { background: #FFFFFF; }
.xph-front .member-sidebar .sb-title {
  color: #1F1D1A;
  background: linear-gradient(135deg, rgba(26,25,23, .14), rgba(46,43,38, .12));
}
.xph-front .member-sidebar .menu li a:hover {
  background: rgba(26,25,23, .08);
  color: #1A1917;
  border-left-color: rgba(26,25,23, .5);
}
.xph-front .member-sidebar .menu li a.active {
  background: rgba(26,25,23, .12);
  color: #1A1917;
  border-left-color: var(--primary);
  box-shadow: inset 0 0 22px rgba(26,25,23, .08);
}
.xph-front .points-summary {
  color: #1F1D1A;
  background:
    radial-gradient(circle at 82% 18%, rgba(46,43,38, .28), transparent 58%),
    linear-gradient(135deg, rgba(26,25,23, .22) 0%, rgba(46,43,38, .24) 55%, rgba(46,43,38, .26) 100%),
    #FFFFFF;
  border: 1px solid rgba(26,25,23, .3);
  box-shadow: var(--glow-soft), var(--shadow-soft);
}
.xph-front .points-summary .value { text-shadow: 0 0 30px rgba(26,25,23, .4); }
.xph-front .feedback-list .fb-content { background: #F5F8FC; color: var(--text-2); }
.xph-front .feedback-list .fb-reply {
  color: #1A1917;
  background: rgba(26,25,23, .08);
  border-color: rgba(26,25,23, .28);
}
.xph-front .avatar-preview {
  background: #F4F1EA center/cover no-repeat;
  border-color: rgba(26,25,23, .45);
  color: var(--primary);
}

/* 个人中心首页头部信息卡（member/index.html 内联样式硬编码暗色） */
.xph-front .member-header {
  color: var(--text);
  background:
    radial-gradient(circle at 88% 14%, rgba(46,43,38, .18), transparent 58%),
    radial-gradient(circle at 4% 94%, rgba(26,25,23, .12), transparent 54%),
    linear-gradient(135deg, rgba(46,43,38, .10) 0%, rgba(26,25,23, .08) 54%, rgba(201,160,99, .10) 100%),
    #FFFFFF;
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}
.xph-front .member-header::after {
  background-image:
    linear-gradient(rgba(31,29,26, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,29,26, .04) 1px, transparent 1px);
}
.xph-front .member-header .avatar {
  background: #F4F1EA;
  border-color: rgba(26,25,23, .45);
  box-shadow: 0 0 22px rgba(26,25,23, .18);
}
.xph-front .member-header .avatar:not(.has-avatar) {
  color: var(--primary);
  text-shadow: none;
}
.xph-front .member-header .stats .num {
  color: var(--primary);
  text-shadow: none;
}
.xph-front .member-order-quick .head h2::before {
  box-shadow: 0 0 10px rgba(26,25,23, .45);
}
.xph-front .member-order-quick .quick-item:hover {
  background: rgba(26,25,23, .08);
  border-color: rgba(26,25,23, .25);
  color: var(--primary);
  box-shadow: 0 0 22px rgba(26,25,23, .12);
}
.xph-front .member-order-quick .quick-item .icn {
  filter: drop-shadow(0 0 8px rgba(26,25,23, .25));
}
.xph-front .cart-summary {
  border-color: rgba(46,43,38, .25);
  background: rgba(46,43,38, .06);
}
.xph-front .cart-summary .cart-icn {
  filter: drop-shadow(0 0 10px rgba(46,43,38, .30));
}
.xph-front .cart-summary a:hover {
  text-shadow: 0 0 12px rgba(46,43,38, .45);
}
.xph-front .mini-grid .mini-item { background: #FFFFFF; }

/* ---------------------------------------------------------------------------
 * 14. 条款页（terms.css 硬编码暗色覆盖）
 * ------------------------------------------------------------------------ */
.xph-front .terms-head h1 { background: none; -webkit-text-fill-color: #171512; color: #171512; }
.xph-front .terms-warn { color: #6E4E28; background: rgba(201,160,99, .10); border-color: rgba(201,160,99, .30); }
.xph-front .terms-warn em { color: #8A6330; }
.xph-front .terms-doc code { background: rgba(46,43,38, .10); color: #1A1917; }

/* ---------------------------------------------------------------------------
 * 15. 购物车（cart/index.html 内联样式硬编码暗色）
 * ------------------------------------------------------------------------ */
.xph-front .cart-group .gh {
  background: linear-gradient(135deg, rgba(46,43,38, .10), rgba(26,25,23, .06));
}
.xph-front .cart-group .gh .badge {
  color: #1A1917;
  background: rgba(46,43,38, .14);
  border-color: rgba(46,43,38, .32);
}
.xph-front .cart-group .gfoot {
  background: #FFFFFF;
  border-top-color: var(--border);
}
.xph-front .cart-prod .thumb {
  background-color: #FFFFFF;
}

/* ---------------------------------------------------------------------------
 * 16. 二级子分类切换条（日用百货等大类目）
 * ------------------------------------------------------------------------ */
.xph-front .subcat-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 18px; padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.xph-front .subcat-tab {
  display: inline-flex; align-items: center;
  padding: 6px 15px; font-size: 13px; font-weight: 600;
  color: var(--muted); background: rgba(26,25,23, .05);
  border: 1px solid transparent; border-radius: 999px;
  text-decoration: none; transition: all .18s ease;
}
.xph-front .subcat-tab:hover {
  color: #1A1917; background: rgba(26,25,23, .10);
}
.xph-front .subcat-tab.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, #1A1917, #2E2B26);
  box-shadow: 0 4px 12px rgba(26,25,23, .22);
}

/* ---------------------------------------------------------------------------
 * 17. 商品墙两级筛选行（大类 / 子类）
 * ------------------------------------------------------------------------ */
.xph-front .filter-tabs {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.xph-front .filter-tabs .subcat-tabs {
  flex: 1;
  margin: 0;
  align-items: center;
}
.xph-front .filter-label {
  flex: 0 0 40px;
  padding-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
}
/* 窄屏：标签行改为上下堆叠 */
@media (max-width: 640px) {
  .xph-front .filter-tabs { flex-direction: column; gap: 4px; }
  .xph-front .filter-label { flex: none; padding-top: 0; }
}

/* ---------------------------------------------------------------------------
 * 18. 顶部导航「分类信息」重点入口
 * ------------------------------------------------------------------------ */
.xph-front .nav a.nav-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  margin-left: 2px;
  font-weight: 800;
  color: #8A6330;
  background: linear-gradient(135deg, #FBF7EE, #F0DCB8);
  border: 1px solid #C9A063;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(201,160,99, .22);
  transition: all .18s ease;
}
.xph-front .nav a.nav-info::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #C9A063;
  box-shadow: 0 0 0 3px rgba(201,160,99, .18);
}
.xph-front .nav a.nav-info::after { display: none; }
.xph-front .nav a.nav-info:hover {
  color: #7A5730;
  background: linear-gradient(135deg, #F0DCB8, #E0BC85);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(201,160,99, .34);
}

/* 顶部大类导航：当前栏目高亮 */
.xph-front .nav a[data-cid].active {
  color: var(--primary);
  font-weight: 700;
}
.xph-front .nav a[data-cid].active::after {
  transform: scaleX(1);
}

/* 商品区局部刷新：轻量加载态，避免整页闪动 */
.xph-front .goods-section.is-loading {
  position: relative;
  opacity: .55;
  pointer-events: none;
}
.xph-front .goods-section.is-loading::after {
  content: "商品加载中…";
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 24px rgba(13,12,11, .12);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * 19. 信息发布平台导航：四大分类 + 商城入口
 * ------------------------------------------------------------------------ */
.xph-front .nav-info-site a {
  font-weight: 700;
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 999px;
  transition: all .16s ease;
}
.xph-front .nav-info-site a::after { display: none; }
.xph-front .nav-info-site a:hover {
  color: var(--primary);
  background: var(--primary-soft, #F7F1E4);
}
.xph-front .nav-info-site a[data-info-cid].active {
  color: #fff;
  background: var(--primary);
}
.xph-front .btn-mall-entry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #C9A063);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(26,25,23, .22);
  text-decoration: none;
}
.xph-front .btn-mall-entry::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .28);
}
.xph-front .btn-mall-entry:hover {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
}
