/* ============================================
   layout.css — 信莱财商城 公共头部 / 底部（新版）
   头部：标准电商式（顶部细条 + 左logo·居中大搜索·右账户购物车主行 + sticky 分类导航行）
   底部：绿色市集三段式（服务保障条 + 深森林绿主页脚含橙色招商带 + 版权）
   配色：鲜活果绿 #43A047 + 阳光橙 #F5920B + 清新浅绿白 #F5FAF2 + 深森林绿 #1E3A24
   类名前缀：px_ （交互 ID 沿用 xy_hd_bar / zh_mb_* / xy_msearch / zh_feedback_btn 不变）
   ============================================ */

/* ============================================
   公共头部 px_hd
   ============================================ */
.px_hd { position: relative; z-index: 1000; background: #fff; }

/* ① 顶部细条 —— 果绿渐变条 */
.px_top {
    background: var(--px-grad-green);
    color: rgba(255,255,255,.9);
    font-size: 12.5px;
}
.px_top_in {
    max-width: 1280px; margin: 0 auto; padding: 0 20px;
    height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.px_top_l { display: flex; align-items: center; gap: 22px; min-width: 0; overflow: hidden; flex: 1; }
.px_top_ann {
    display: inline-flex; align-items: center; gap: 7px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.px_top_ann i { color: var(--px-orange-light); }
.px_top_r { display: flex; align-items: center; flex-shrink: 0; }
.px_top_r a, .px_top_tel {
    padding: 0 12px; color: rgba(255,255,255,.9);
    position: relative; white-space: nowrap; line-height: 1;
}
.px_top_tel { display: inline-flex; align-items: center; gap: 5px; }
.px_top_tel strong { color: #fff; font-weight: 700; letter-spacing: .3px; }
.px_top_r a { transition: color .18s; }
.px_top_r a + a::before, .px_top_r a::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 11px; background: rgba(255,255,255,.28);
}
.px_top_tel + a::before { background: rgba(255,255,255,.28); }
.px_top_r a:hover { color: #fff; }
.px_top_r a i { margin-right: 5px; opacity: .85; }
.px_top_r a.px_top_join {
    color: var(--px-green-deep); background: #fff; border-radius: 999px;
    padding: 5px 16px; margin-left: 14px; font-weight: 700;
    box-shadow: 0 4px 12px rgba(20,38,26,.16);
}
.px_top_r a.px_top_join::before { display: none; }
.px_top_r a.px_top_join:hover { color: var(--px-orange-deep); }
.px_top_r a.px_top_join i { opacity: 1; color: var(--px-orange); }

/* ② 主行 —— 左 logo + 居中大搜索 + 右账户购物车 */
.px_main {
    background: #fff;
    border-bottom: 1px solid var(--px-line);
    position: relative;
}
.px_main::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 4% 130%, rgba(124,179,66,.12) 0%, transparent 40%),
        radial-gradient(circle at 98% -30%, rgba(245,146,11,.08) 0%, transparent 42%);
    pointer-events: none;
}
.px_main_in {
    max-width: 1280px; margin: 0 auto; padding: 0 20px;
    height: 96px; display: flex; align-items: center; gap: 30px;
    position: relative; z-index: 1;
}

/* logo 左对齐 */
.px_logo { flex: 0 0 auto; display: block; }
.px_logo img { height: 58px; width: auto; display: block; }

/* 汉堡（移动端） */
.px_burger {
    display: none;
    width: 42px; height: 42px; border: none; background: var(--px-green-tint);
    color: var(--px-green-deep); border-radius: 12px; font-size: 18px;
    align-items: center; justify-content: center; flex: 0 0 auto;
}

/* 搜索（桌面大 pill，居中拉伸） */
.px_search {
    flex: 1 1 auto; max-width: 620px; margin: 0 auto;
    position: relative;
    display: flex; align-items: stretch;
    height: 46px;
    border: 2px solid var(--px-green);
    border-radius: 999px; background: #fff;
    transition: box-shadow .2s;
}
.px_search:focus-within { box-shadow: 0 0 0 4px rgba(67,160,71,.14); }
.px_search input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 0 8px 0 22px; font-size: 14px; color: var(--px-ink);
    font-family: inherit; min-width: 0;
}
.px_search input::placeholder { color: var(--px-ink-3); }
.px_search button {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
    padding: 0 26px; border: none; cursor: pointer;
    background: var(--px-grad-orange); color: #fff;
    font-size: 14.5px; font-weight: 600; letter-spacing: 1px;
    margin: 3px; border-radius: 999px; transition: filter .2s;
}
.px_search button:hover { filter: brightness(1.06); }
.px_search button i { font-size: 15px; }
.px_search_hot {
    position: absolute; top: calc(100% + 7px); left: 8px;
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--px-ink-3); white-space: nowrap;
}
.px_search_hot a { color: var(--px-ink-2); transition: color .18s; }
.px_search_hot a:hover { color: var(--px-orange-deep); }

/* 右侧账户 / 购物车 */
.px_main_r { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; margin-left: auto; }
.px_act {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px;
    background: var(--px-green-tint); color: var(--px-green-deep);
    font-size: 13px; font-weight: 600; line-height: 1; transition: all .2s;
}
.px_act i { color: var(--px-green); font-size: 14px; transition: color .2s; }
.px_act:hover { background: var(--px-green); color: #fff; }
.px_act:hover i { color: #fff; }
.px_cart {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px 10px 18px; border-radius: 999px;
    background: var(--px-grad-orange); color: #fff;
    font-size: 13px; font-weight: 700; line-height: 1;
    box-shadow: var(--px-shadow-orange); transition: filter .2s;
}
.px_cart i { color: #fff; font-size: 15px; }
.px_cart:hover { color: #fff; filter: brightness(1.06); }
.px_cart_badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 20px; height: 20px; padding: 0 6px;
    background: var(--px-green-deep); color: #fff;
    border-radius: 20px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; line-height: 1; font-style: normal;
}
.px_msearch {
    display: none;
    width: 42px; height: 42px; border: none; background: var(--px-green-tint);
    color: var(--px-green-deep); border-radius: 12px; font-size: 16px;
    align-items: center; justify-content: center;
}

/* ③ 导航行 —— sticky（左「全部商品分类」mega + 横排导航 + 右入驻） */
.px_nav {
    position: sticky; top: 0; z-index: 900;
    background: #fff;
    border-bottom: 1px solid var(--px-line);
    transition: box-shadow .25s;
}
.px_nav.is_stuck { box-shadow: 0 6px 22px rgba(30,58,36,.10); }
.px_nav_in {
    max-width: 1280px; margin: 0 auto; padding: 0 20px;
    height: 50px; display: flex; align-items: center; gap: 8px;
    position: relative;
}

/* 全部商品分类 按钮 + Mega */
.px_allcat { position: relative; flex: 0 0 auto; align-self: stretch; }
.px_allcat_btn {
    height: 100%; display: inline-flex; align-items: center; gap: 9px;
    padding: 0 20px; border: none; cursor: pointer;
    background: var(--px-grad-green); color: #fff;
    font-size: 14.5px; font-weight: 600; font-family: inherit;
}
.px_allcat_btn .px_allcat_ar { font-size: 11px; transition: transform .25s; }
.px_allcat:hover .px_allcat_btn .px_allcat_ar { transform: rotate(180deg); }
.px_mega {
    position: absolute; top: 100%; left: 0;
    width: min(940px, 92vw);
    background: #fff; border: 1px solid var(--px-line);
    border-radius: 0 0 16px 16px; box-shadow: var(--px-shadow-lg);
    padding: 22px; z-index: 80;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s, transform .2s;
}
.px_allcat:hover .px_mega { opacity: 1; visibility: visible; transform: translateY(0); }
.px_mega_grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 22px; }
.px_mega_col { padding: 4px 0; }
.px_mega_head {
    display: flex; align-items: center; gap: 9px;
    font-size: 14.5px; font-weight: 700; color: var(--px-green-deep);
    padding-bottom: 8px; margin-bottom: 7px; border-bottom: 1px dashed var(--px-line);
}
.px_mega_head i {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    background: var(--px-green-tint); color: var(--px-green);
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.px_mega_head:hover { color: var(--px-orange-deep); }
.px_mega_subs { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.px_mega_subs a {
    font-size: 12.5px; color: var(--px-ink-2); padding: 3px 10px;
    border-radius: 999px; background: var(--px-cream-2); transition: all .18s;
}
.px_mega_subs a:hover { background: var(--px-orange-tint); color: var(--px-orange-deep); }
.px_mega_all {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--px-line);
    color: var(--px-green); font-size: 13.5px; font-weight: 600;
}
.px_mega_all:hover { color: var(--px-orange-deep); }
.px_mega_all i { transition: transform .2s; }
.px_mega_all:hover i { transform: translateX(4px); }

/* 横排导航 */
.px_nav_menu { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.px_nav_menu > a {
    display: inline-flex; align-items: center;
    padding: 0 16px; height: 50px; line-height: 50px;
    color: var(--px-ink); font-size: 15px; font-weight: 500;
    position: relative; white-space: nowrap; transition: color .2s;
}
.px_nav_menu > a::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 9px;
    height: 2px; border-radius: 2px; background: var(--px-orange);
    transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.px_nav_menu > a:hover, .px_nav_menu > a.active { color: var(--px-green-deep); }
.px_nav_menu > a:hover::after, .px_nav_menu > a.active::after { transform: scaleX(1); }

/* 商家入驻按钮（导航行右端） */
.px_nav_cta {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px;
    border: 1.5px solid var(--px-orange); color: var(--px-orange-deep);
    font-size: 13px; font-weight: 700; transition: all .2s;
}
.px_nav_cta i { color: var(--px-orange); transition: color .2s; }
.px_nav_cta:hover { background: var(--px-orange); border-color: var(--px-orange); color: #fff; }
.px_nav_cta:hover i { color: #fff; }

/* ============================================
   公共底部
   ============================================ */

/* ① 服务保障条 */
.px_ft_assure {
    background: #fff;
    border-top: 1px solid var(--px-line);
    border-bottom: 1px solid var(--px-line);
}
.px_ft_assure_in {
    max-width: 1280px; margin: 0 auto; padding: 26px 20px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.px_ft_assure_item { display: flex; align-items: center; gap: 14px; justify-content: center; }
.px_ft_assure_ic {
    width: 50px; height: 50px; flex-shrink: 0; border-radius: 14px;
    background: var(--px-green-tint); color: var(--px-green);
    display: inline-flex; align-items: center; justify-content: center; font-size: 21px;
}
.px_ft_assure_item:nth-child(even) .px_ft_assure_ic { background: var(--px-orange-tint); color: var(--px-orange); }
.px_ft_assure_tx { display: flex; flex-direction: column; line-height: 1.4; }
.px_ft_assure_tx strong { font-size: 15px; color: var(--px-green-deep); font-weight: 700; }
.px_ft_assure_tx small { font-size: 12px; color: var(--px-ink-3); }

/* ② 主页脚 —— 深森林绿 */
.px_ft_main {
    background: var(--px-grad-forest);
    color: rgba(255,255,255,.78);
    position: relative; overflow: hidden;
}
.px_ft_main::before {
    content: '\f06c'; /* leaf */
    font-family: 'Font Awesome 5 Free'; font-weight: 900;
    position: absolute; right: -30px; bottom: -40px;
    font-size: 260px; color: rgba(255,255,255,.035);
    pointer-events: none; line-height: 1;
}

/* 橙色招商细带 */
.px_ft_cta { background: var(--px-grad-orange); position: relative; z-index: 1; }
.px_ft_cta_in {
    max-width: 1280px; margin: 0 auto; padding: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.px_ft_cta_tx { display: flex; flex-direction: column; gap: 3px; }
.px_ft_cta_tx strong { font-size: 18px; color: #fff; font-weight: 700; }
.px_ft_cta_tx span { font-size: 13px; color: rgba(255,255,255,.9); }
.px_ft_cta_btns { display: flex; gap: 12px; flex-shrink: 0; }
.px_ft_cta_main, .px_ft_cta_ghost {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 700; transition: all .2s;
}
.px_ft_cta_main { background: #fff; color: var(--px-orange-deep); }
.px_ft_cta_main:hover { color: var(--px-orange-deep); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.16); }
.px_ft_cta_ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.px_ft_cta_ghost:hover { background: rgba(255,255,255,.26); color: #fff; }

.px_ft_main_in {
    max-width: 1280px; margin: 0 auto; padding: 48px 20px 40px;
    display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px;
    position: relative; z-index: 1;
}
.px_ft_logo { margin-bottom: 18px; }
.px_ft_logo img { height: 54px; width: auto; filter: brightness(0) invert(1) opacity(.92); }
.px_ft_desc { font-size: 13px; line-height: 1.9; color: rgba(255,255,255,.6); margin-bottom: 22px; max-width: 440px; }
.px_ft_hot { display: inline-flex; align-items: center; gap: 12px; }
.px_ft_hot_ic {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: rgba(255,255,255,.1); color: var(--px-orange-light);
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.px_ft_hot_tx { display: flex; flex-direction: column; line-height: 1.3; }
.px_ft_hot_tx small { font-size: 11.5px; color: rgba(255,255,255,.55); }
.px_ft_hot_tx strong { font-size: 20px; color: #fff; font-weight: 700; letter-spacing: .5px; }

.px_ft_cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.px_ft_col h4 {
    font-size: 15px; color: #fff; font-weight: 600; margin-bottom: 18px;
    padding-bottom: 12px; position: relative;
}
.px_ft_col h4::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 28px; height: 2px; border-radius: 2px; background: var(--px-orange);
}
.px_ft_col ul { display: flex; flex-direction: column; gap: 11px; }
.px_ft_col li a, .px_ft_col li .px_ft_li {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: rgba(255,255,255,.62); transition: color .18s;
}
.px_ft_col li a i, .px_ft_col li .px_ft_li i { font-size: 11px; color: rgba(255,255,255,.4); }
.px_ft_col li a:hover { color: #fff; }
.px_ft_col li a:hover i { color: var(--px-orange-light); }

/* ③ 版权区 */
.px_ft_copy {
    background: var(--px-forest-deep);
    color: rgba(255,255,255,.5);
    font-size: 12.5px;
}
.px_ft_copy_in {
    max-width: 1280px; margin: 0 auto; padding: 16px 20px;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 18px;
}
.px_ft_copy_in a { color: rgba(255,255,255,.5); transition: color .18s; }
.px_ft_copy_in a:hover { color: var(--px-orange-light); }
.px_ft_copy_pwd { color: rgba(255,255,255,.32); }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 992px) {
    .px_nav { display: none; }
    .px_search { display: none; }
    .px_act { display: none; }
    .px_burger { display: inline-flex; }
    .px_msearch { display: inline-flex; }
    .px_main_in { height: 68px; gap: 12px; }
    .px_logo img { height: 44px; }
    .px_top_ann { font-size: 12px; }
    .px_ft_main_in { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .px_top_r a:not(.px_top_join):not(#zh_feedback_btn), .px_top_tel { display: none; }
    .px_ft_assure_in { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
    .px_ft_cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
    .px_ft_cta_in { flex-direction: column; align-items: flex-start; }
    .px_ft_cta_btns { width: 100%; }
    .px_ft_cta_main, .px_ft_cta_ghost { flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
    .px_top_in { padding: 0 14px; }
    .px_main_in { padding: 0 14px; gap: 10px; }
    .px_logo img { height: 40px; }
    .px_act span { display: none; }
    .px_cart span { display: none; }
    .px_cart { padding: 10px 14px; }
    .px_ft_cols { grid-template-columns: 1fr; }
    .px_ft_assure_item { justify-content: flex-start; }
}
