/* ============================================
   layout.css — 信言方兴商城 公共头部 / 底部（新版）
   头部：两层横向导航（工具条 + sticky 主栏 横向菜单 + 胶囊搜索）
   底部：三段式（服务保障条 + 藏蓝主页脚含橙色招商带 + 版权）
   配色：深藏蓝 #14315F + 亮蓝 #2F6FE0 + 活力橙 #FF7A18
   类名前缀：xy_
   ============================================ */

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

/* ① 工具条（浅色 + 下边线，非渐变） */
.xy_hd_util {
    background: #fff;
    border-bottom: 1px solid var(--xy-line);
    font-size: 12.5px;
    color: var(--xy-text-2);
}
.xy_hd_util_in {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.xy_hd_util_l { display: flex; align-items: center; gap: 20px; min-width: 0; overflow: hidden; flex: 1; }
.xy_hd_util_l span {
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xy_hd_util_l i { color: var(--xy-orange); }
.xy_hd_util_l strong { color: var(--xy-navy); font-weight: 600; }

.xy_hd_util_r { display: flex; align-items: center; flex-shrink: 0; }
.xy_hd_util_r a {
    padding: 0 12px; color: var(--xy-text-2);
    position: relative; white-space: nowrap; line-height: 1; transition: color .18s;
}
.xy_hd_util_r a + a::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 11px; background: var(--xy-line);
}
.xy_hd_util_r a:hover { color: var(--xy-blue); }
.xy_hd_util_r a i { margin-right: 5px; opacity: .8; }
.xy_hd_util_r a.xy_strong {
    color: #fff; background: var(--xy-grad-orange); border-radius: 999px;
    padding: 5px 16px; margin-left: 12px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(255,122,24,.3);
}
.xy_hd_util_r a.xy_strong::before { display: none; }
.xy_hd_util_r a.xy_strong:hover { color: #fff; filter: brightness(1.06); }
.xy_hd_util_r a.xy_strong i { opacity: 1; }

/* ② 主栏（sticky，横向菜单 + 胶囊搜索） */
.xy_hd_bar {
    background: #fff;
    position: sticky; top: 0; z-index: 999;
    border-bottom: 1px solid var(--xy-line);
    transition: box-shadow .25s ease;
}
.xy_hd_bar.is_stuck { box-shadow: 0 6px 20px rgba(18,43,82,.09); }
.xy_hd_bar_in {
    max-width: 1280px; margin: 0 auto; padding: 0 20px;
    height: 74px; display: flex; align-items: center; gap: 26px;
}

.xy_logo { flex-shrink: 0; display: block; }
.xy_logo img { height: 46px; width: auto; display: block; }

/* 横向主菜单 */
.xy_nav { display: flex; align-items: center; gap: 2px; height: 74px; flex: 1; min-width: 0; }
.xy_nav > a,
.xy_nav_drop > a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 16px; height: 74px;
    color: var(--xy-navy); font-size: 15.5px; font-weight: 500;
    position: relative; transition: color .2s; white-space: nowrap;
}
.xy_nav a i { font-size: 13px; }
.xy_nav > a::after,
.xy_nav_drop > a::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 15px;
    height: 3px; background: var(--xy-orange); border-radius: 3px;
    transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
}
.xy_nav > a:hover,
.xy_nav_drop:hover > a { color: var(--xy-blue); }
.xy_nav > a:hover::after,
.xy_nav_drop:hover > a::after { transform: scaleX(1); }
.xy_nav > a.active { color: var(--xy-navy); font-weight: 700; }
.xy_nav > a.active::after { transform: scaleX(1); }

/* 全部商品 下拉 mega */
.xy_nav_drop { position: relative; height: 74px; display: flex; align-items: center; }
.xy_nav_drop > a .fa-angle-down { transition: transform .2s; opacity: .55; font-size: 12px; }
.xy_nav_drop:hover > a .fa-angle-down { transform: rotate(180deg); }
.xy_mega {
    position: absolute; top: 70px; left: 0; min-width: 580px;
    background: #fff; border: 1px solid var(--xy-line); border-radius: 16px;
    box-shadow: 0 20px 48px rgba(18,43,82,.16); padding: 18px;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all .22s ease; z-index: 1001;
}
.xy_nav_drop:hover .xy_mega,
.xy_mega.show { opacity: 1; visibility: visible; transform: translateY(0); }
.xy_mega_grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 22px; }
.xy_mega_head {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 700; color: var(--xy-navy);
    padding: 8px 10px; border-radius: 8px; transition: color .18s;
}
.xy_mega_head i {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--xy-blue-tint); color: var(--xy-blue);
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.xy_mega_head:hover { color: var(--xy-blue); }
.xy_mega_subs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 12px; }
.xy_mega_subs a {
    font-size: 12.5px; color: var(--xy-text-2); background: var(--xy-bg);
    padding: 5px 12px; border-radius: 999px; transition: all .18s;
}
.xy_mega_subs a:hover { background: var(--xy-orange); color: #fff; }
.xy_mega_all {
    margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--xy-line);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 13px; color: var(--xy-blue); font-weight: 600;
}
.xy_mega_all:hover { color: var(--xy-orange); }

/* 右侧工具：胶囊搜索 + 购物车 */
.xy_hd_tools { display: flex; align-items: center; gap: 14px; flex-shrink: 0; margin-left: auto; }
.xy_search {
    display: flex; align-items: stretch; height: 42px; width: 264px;
    border: 1.5px solid var(--xy-navy); border-radius: 999px; overflow: hidden;
    background: #fff; transition: box-shadow .2s;
}
.xy_search:focus-within { box-shadow: 0 0 0 4px rgba(47,111,224,.12); }
.xy_search input {
    flex: 1; border: none; outline: none; padding: 0 16px;
    font-size: 13.5px; color: var(--xy-text); background: transparent;
    font-family: inherit; min-width: 0;
}
.xy_search input::placeholder { color: var(--xy-text-3); }
.xy_search button {
    flex-shrink: 0; width: 56px; border: none; background: var(--xy-grad-orange);
    color: #fff; font-size: 15px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: filter .2s;
}
.xy_search button:hover { filter: brightness(1.06); }

.xy_cart {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    padding: 0 20px; height: 42px; border-radius: 999px;
    background: var(--xy-navy); color: #fff; font-size: 13.5px; font-weight: 600;
    transition: all .2s;
}
.xy_cart i { font-size: 15px; }
.xy_cart:hover { color: #fff; background: var(--xy-blue); box-shadow: 0 6px 16px rgba(47,111,224,.32); }
.xy_cart_badge {
    position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px;
    padding: 0 6px; background: var(--xy-orange); 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;
}

/* 移动端汉堡 + 搜索图标 */
.xy_hd_mb {
    display: none; background: transparent; border: none; color: var(--xy-navy);
    font-size: 22px; width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0;
}
.xy_hd_mb:hover { background: var(--xy-bg); color: var(--xy-blue); }
.xy_hd_msearch {
    display: none; width: 42px; height: 42px; border-radius: 50%;
    background: var(--xy-bg); color: var(--xy-navy); border: none; font-size: 16px; cursor: pointer;
}
.xy_hd_msearch:hover { background: var(--xy-blue); color: #fff; }

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

/* ① 服务保障条（白卡 + 橙图标） */
.xy_ft_assure { background: linear-gradient(180deg, var(--xy-bg) 0%, #fff 100%); border-top: 1px solid var(--xy-line); }
.xy_ft_assure_in {
    max-width: 1280px; margin: 0 auto; padding: 30px 20px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.xy_ft_assure_item {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    background: #fff; border: 1px solid var(--xy-line); border-radius: 12px;
    transition: all .25s ease;
}
.xy_ft_assure_item:hover { border-color: transparent; box-shadow: 0 12px 28px rgba(18,43,82,.1); transform: translateY(-3px); }
.xy_ft_assure_ic {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    background: var(--xy-orange-tint); color: var(--xy-orange);
    display: inline-flex; align-items: center; justify-content: center; font-size: 21px;
    transition: all .25s;
}
.xy_ft_assure_item:hover .xy_ft_assure_ic { background: var(--xy-grad-orange); color: #fff; }
.xy_ft_assure_tx { line-height: 1.4; }
.xy_ft_assure_tx strong { display: block; font-size: 15px; color: var(--xy-navy); font-weight: 700; }
.xy_ft_assure_tx small { font-size: 12px; color: var(--xy-text-3); }

/* ② 主页脚（藏蓝底） */
.xy_ft_main { background: var(--xy-navy); position: relative; }

/* 橙色招商 CTA 细带 */
.xy_ft_cta { background: var(--xy-grad-orange); }
.xy_ft_cta_in {
    max-width: 1280px; margin: 0 auto; padding: 22px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.xy_ft_cta_tx { color: #fff; }
.xy_ft_cta_tx strong { font-size: 21px; font-weight: 700; display: block; line-height: 1.3; }
.xy_ft_cta_tx span { font-size: 13px; opacity: .92; }
.xy_ft_cta_btns { display: flex; gap: 12px; flex-shrink: 0; }
.xy_ft_cta_btns a {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px;
    border-radius: 999px; font-size: 14px; font-weight: 600; transition: all .2s; white-space: nowrap;
}
.xy_ft_cta_main { background: #fff; color: var(--xy-orange-deep); }
.xy_ft_cta_main:hover { color: var(--xy-orange-deep); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.xy_ft_cta_ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.55); }
.xy_ft_cta_ghost:hover { background: rgba(255,255,255,.26); color: #fff; }

.xy_ft_main_in {
    max-width: 1280px; margin: 0 auto; padding: 52px 20px 40px;
    display: grid; grid-template-columns: 1.4fr 2fr; gap: 60px; align-items: flex-start;
}
.xy_ft_logo img { height: 42px; width: auto; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 16px; }
.xy_ft_desc { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.95; margin-bottom: 20px; }
.xy_ft_hot {
    display: inline-flex; align-items: center; gap: 14px; padding: 14px 20px;
    background: rgba(255,122,24,.1); border: 1px solid rgba(255,122,24,.32); border-radius: 12px;
}
.xy_ft_hot_ic {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: var(--xy-grad-orange); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.xy_ft_hot_tx { line-height: 1.3; }
.xy_ft_hot_tx small { font-size: 12px; color: rgba(255,255,255,.6); display: block; letter-spacing: 1px; }
.xy_ft_hot_tx strong { font-size: 21px; color: #fff; font-family: "Arial", sans-serif; }

.xy_ft_cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.xy_ft_col h4 { font-size: 15px; color: #fff; margin-bottom: 18px; padding-bottom: 12px; position: relative; letter-spacing: .5px; }
.xy_ft_col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--xy-orange); }
.xy_ft_col ul { display: flex; flex-direction: column; gap: 11px; }
.xy_ft_col a,
.xy_ft_col .xy_ft_li {
    font-size: 13px; color: rgba(255,255,255,.58);
    display: inline-flex; align-items: center; gap: 7px; transition: all .2s; line-height: 1.6;
}
.xy_ft_col a:hover { color: var(--xy-orange); transform: translateX(3px); }
.xy_ft_col a i,
.xy_ft_col .xy_ft_li i { color: var(--xy-orange); width: 14px; text-align: center; font-size: 12px; }

.xy_ft_qr { text-align: center; }
.xy_ft_qr img { width: 96px; height: 96px; object-fit: cover; background: #fff; padding: 6px; border-radius: 8px; }
.xy_ft_qr p { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 8px; }

/* ③ 版权 */
.xy_ft_copy { background: var(--xy-navy-deep); font-size: 12.5px; color: rgba(255,255,255,.5); }
.xy_ft_copy_in {
    max-width: 1280px; margin: 0 auto; padding: 18px 20px;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 24px; text-align: center;
}
.xy_ft_copy a { color: rgba(255,255,255,.55); display: inline-flex; align-items: center; gap: 4px; transition: color .2s; }
.xy_ft_copy a:hover { color: var(--xy-orange); }
.xy_ft_copy a i { color: var(--xy-orange); }
.xy_ft_copy_pwd { color: rgba(255,255,255,.4); letter-spacing: .5px; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1199px) {
    .xy_nav > a, .xy_nav_drop > a { padding: 0 12px; font-size: 14.5px; }
    .xy_search { width: 200px; }
    .xy_ft_main_in { gap: 36px; }
}

@media (max-width: 991px) {
    .xy_hd_util_l { display: none; }
    .xy_nav { display: none; }
    .xy_search { display: none; }
    .xy_hd_mb { display: inline-flex; align-items: center; justify-content: center; }
    .xy_hd_msearch { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
    .xy_hd_bar_in { height: 64px; gap: 12px; }
    .xy_ft_assure_in { grid-template-columns: repeat(2, 1fr); }
    .xy_ft_main_in { grid-template-columns: 1fr; gap: 40px; padding: 44px 20px 32px; }
}

@media (max-width: 767px) {
    .xy_hd_util { display: none; }
    .xy_hd_bar_in { height: 58px; gap: 8px; padding: 0 14px; }
    .xy_logo img { height: 34px; }
    .xy_cart span { display: none; }
    .xy_cart { padding: 0 12px; }
    .xy_ft_assure_in { grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px 16px; }
    .xy_ft_assure_item { padding: 12px 14px; gap: 10px; }
    .xy_ft_assure_ic { width: 40px; height: 40px; font-size: 18px; }
    .xy_ft_cta_in { flex-direction: column; align-items: flex-start; padding: 20px 16px; }
    .xy_ft_cta_tx strong { font-size: 18px; }
    .xy_ft_cta_btns { width: 100%; }
    .xy_ft_main_in { gap: 32px; padding: 36px 16px 26px; }
    .xy_ft_cols { grid-template-columns: 1fr 1fr; gap: 22px; }
    .xy_ft_copy_in { flex-direction: column; gap: 6px; padding: 16px; }
}
