/* ============================================================
   zhifanyemao.cn - 首页（gx_ 前缀）
   分类菜单 + 轮播 + 侧栏 / 热销榜 / 分类楼层 / 双栏 / 商品网格
   ============================================================ */

/* ---------- ① 舞台区：左菜单 + 轮播 + 右侧栏 ---------- */
.gx_stage {
    display: grid;
    grid-template-columns: 218px 1fr 250px;
    gap: 14px;
    margin: 18px 0 var(--zh-section-gap);
    align-items: stretch;
}

.gx_catmenu {
    background: var(--zh-bg-card);
    border: 1px solid var(--zh-border);
    border-radius: var(--zh-radius-md);
    overflow: hidden;
}
.gx_catmenu_hd {
    display: flex; align-items: center; gap: 9px;
    height: 44px; padding: 0 16px;
    background: var(--zh-primary); color: #fff;
    font-size: 14.5px; font-weight: 600;
}
.gx_catmenu ul { margin: 0; padding: 6px 0; list-style: none; }
.gx_catmenu a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; font-size: 14px; color: var(--zh-text-secondary);
    transition: all .18s;
}
.gx_catmenu a i:first-child { width: 17px; text-align: center; color: var(--zh-text-tertiary); font-size: 14px; }
.gx_catmenu a span { flex: 1; }
.gx_catmenu a em { font-style: normal; color: var(--zh-text-disabled); font-size: 12px; }
.gx_catmenu a:hover { background: var(--zh-primary-light); color: var(--zh-primary); padding-left: 20px; }
.gx_catmenu a:hover i:first-child, .gx_catmenu a:hover em { color: var(--zh-primary); }

.gx_banner {
    position: relative;
    border-radius: var(--zh-radius-md);
    overflow: hidden;
    min-height: 360px;
    background: var(--zh-bg-muted);
}
.gx_slides, .gx_slide { position: absolute; inset: 0; }
.gx_slide {
    background-size: cover; background-position: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .6s ease, visibility .6s;
    display: flex; align-items: center;
}
.gx_slide.on { opacity: 1; visibility: visible; pointer-events: auto; }
.gx_slide::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15,23,42,.72) 0%, rgba(15,23,42,.35) 45%, rgba(15,23,42,0) 70%);
}
.gx_slide_copy { position: relative; z-index: 1; padding: 0 48px; max-width: 62%; }
.gx_slide_copy h2 { margin: 0 0 12px; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.3; }
.gx_slide_copy p { margin: 0 0 22px; font-size: 14.5px; color: rgba(255,255,255,.8); line-height: 1.7; }
.gx_slide_btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 26px;
    background: var(--zh-accent); color: #fff; font-size: 14.5px; font-weight: 700;
    border-radius: 999px; transition: background .2s, transform .2s;
}
.gx_slide_btn:hover { background: var(--zh-accent-dark); color: #fff; transform: translateY(-2px); }
.gx_dots { position: absolute; left: 48px; bottom: 22px; z-index: 2; display: flex; gap: 8px; }
.gx_dots span {
    width: 24px; height: 4px; border-radius: 4px; cursor: pointer;
    background: rgba(255,255,255,.4); transition: background .2s, width .2s;
}
.gx_dots span.on { background: var(--zh-accent); width: 34px; }

.gx_stage_side { display: flex; flex-direction: column; gap: 14px; }
.gx_user_card {
    background: var(--zh-bg-card); border: 1px solid var(--zh-border);
    border-radius: var(--zh-radius-md); padding: 18px 16px;
}
.gx_uc_top { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.gx_uc_top i { font-size: 36px; color: var(--zh-primary); }
.gx_uc_top b { display: block; font-size: 14.5px; color: var(--zh-text-primary); }
.gx_uc_top span { font-size: 12px; color: var(--zh-text-tertiary); }
.gx_uc_btns { display: flex; gap: 9px; }
.gx_uc_btns a {
    flex: 1; height: 34px; display: flex; align-items: center; justify-content: center;
    background: var(--zh-primary); color: #fff; font-size: 13px; font-weight: 600;
    border-radius: 999px; transition: opacity .2s;
}
.gx_uc_btns a.alt { background: var(--zh-bg-light); color: var(--zh-text-secondary); }
.gx_uc_btns a:hover { opacity: .88; color: #fff; }
.gx_uc_btns a.alt:hover { color: var(--zh-primary); }

.gx_side_box {
    flex: 1;
    background: var(--zh-bg-card); border: 1px solid var(--zh-border);
    border-radius: var(--zh-radius-md); padding: 16px;
    display: flex; flex-direction: column;
}
.gx_side_box h4 {
    margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--zh-text-primary);
    display: flex; align-items: center; gap: 8px;
}
.gx_side_box h4 i { color: var(--zh-accent); font-size: 13px; }
.gx_notice { margin: 0; padding: 0; list-style: none; flex: 1; }
.gx_notice li {
    position: relative; padding-left: 12px; margin-bottom: 11px;
    font-size: 12.5px; line-height: 1.7; color: var(--zh-text-muted);
}
.gx_notice li::before {
    content: ""; position: absolute; left: 0; top: 8px;
    width: 4px; height: 4px; border-radius: 50%; background: var(--zh-accent);
}
.gx_side_join {
    margin-top: 10px; height: 36px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--zh-primary-light); color: var(--zh-primary);
    font-size: 13px; font-weight: 600; border-radius: 999px;
}
.gx_side_join:hover { background: var(--zh-primary); color: #fff; }

/* ---------- 通用区块头 ---------- */
.gx_sec { margin-bottom: var(--zh-section-gap); }
.gx_sec_last { margin-bottom: 0; }
.gx_sec_hd {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px; gap: 14px;
}
.gx_sec_hd h2 {
    margin: 0; display: flex; align-items: center; gap: 11px;
    font-size: 21px; font-weight: 800; color: var(--zh-text-primary);
}
.gx_bar { width: 4px; height: 20px; border-radius: 3px; background: var(--zh-accent); flex: none; }
.gx_sec_en { font-size: 12px; letter-spacing: 2px; color: var(--zh-text-disabled); font-weight: 600; }
.gx_more { font-size: 13px; color: var(--zh-text-muted); }
.gx_more:hover { color: var(--zh-primary); }

/* ---------- 商品卡 ---------- */
.gx_grid { display: grid; gap: 14px; }
.gx_grid6 { grid-template-columns: repeat(6, 1fr); }
.gx_pcard {
    display: block; background: var(--zh-bg-card);
    border: 1px solid var(--zh-border); border-radius: var(--zh-radius-md);
    overflow: hidden; transition: all .22s;
}
.gx_pcard:hover { border-color: var(--zh-primary); box-shadow: var(--zh-shadow-hover); transform: translateY(-3px); }
.gx_pcard_img { position: relative; aspect-ratio: 1 / 1; background: var(--zh-bg-light); overflow: hidden; }
.gx_pcard_img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gx_pcard:hover .gx_pcard_img img { transform: scale(1.05); }
.gx_pcard_tag {
    position: absolute; left: 8px; top: 8px; z-index: 1;
    padding: 2px 9px; border-radius: 999px;
    background: var(--zh-accent); color: #fff; font-size: 11px; font-weight: 600;
}
.gx_pcard_b { padding: 11px 12px 13px; }
.gx_pcard_b h4 {
    margin: 0 0 8px; font-size: 13px; font-weight: 500; line-height: 1.55;
    color: var(--zh-text-primary); height: 40px; overflow: hidden;
}
.gx_pcard_price { font-size: 16px; font-weight: 800; color: var(--zh-price); }

/* ---------- ② 热销榜 ---------- */
.gx_rank {
    display: grid; grid-template-columns: 210px 1fr; gap: 0;
    margin-bottom: var(--zh-section-gap);
    border: 1px solid var(--zh-border); border-radius: var(--zh-radius-md);
    overflow: hidden; background: var(--zh-bg-card);
}
.gx_rank_side {
    padding: 28px 24px;
    background: linear-gradient(160deg, var(--zh-primary) 0%, var(--zh-primary-dark) 100%);
    color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.gx_rank_tag {
    align-self: flex-start; padding: 3px 11px; margin-bottom: 14px;
    background: var(--zh-accent); border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 1px;
}
.gx_rank_side h2 { margin: 0 0 10px; font-size: 26px; font-weight: 800; line-height: 1.25; }
.gx_rank_side p { margin: 0 0 20px; font-size: 12.5px; color: rgba(255,255,255,.65); }
.gx_rank_side a { font-size: 13px; color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.gx_rank_side a:hover { color: var(--zh-accent); }

.gx_rank_list { display: grid; grid-template-columns: repeat(4, 1fr); }
.gx_rank_item {
    display: flex; align-items: center; gap: 11px;
    padding: 16px 14px;
    border-right: 1px solid var(--zh-border); border-bottom: 1px solid var(--zh-border);
    transition: background .2s;
}
.gx_rank_item:nth-child(4n) { border-right: 0; }
.gx_rank_item:nth-child(n+5) { border-bottom: 0; }
.gx_rank_item:hover { background: var(--zh-primary-light); }
.gx_rank_no {
    flex: none; width: 21px; height: 21px;
    display: flex; align-items: center; justify-content: center;
    background: var(--zh-bg-muted); color: var(--zh-text-muted);
    font-size: 11.5px; font-weight: 800; border-radius: 6px;
}
.gx_rank_no.top { background: var(--zh-accent); color: #fff; }
.gx_rank_img { flex: none; width: 58px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--zh-bg-light); }
.gx_rank_img img { width: 100%; height: 100%; object-fit: cover; }
.gx_rank_txt { min-width: 0; flex: 1; }
.gx_rank_txt h4 {
    margin: 0 0 6px; font-size: 12.5px; font-weight: 500; line-height: 1.5;
    color: var(--zh-text-primary); overflow: hidden;
}
.gx_rank_price { font-size: 14px; font-weight: 800; color: var(--zh-price); }

/* ---------- ③ 分类楼层 ---------- */
.gx_floor {
    display: grid; grid-template-columns: 210px 1fr; gap: 14px;
    margin-bottom: var(--zh-section-gap);
}
.gx_floor_side {
    border-radius: var(--zh-radius-md); padding: 26px 22px;
    display: flex; flex-direction: column; justify-content: center;
    color: #fff;
}
.gx_floor_c0 { background: linear-gradient(155deg, #1D4ED8 0%, #1638A8 100%); }
.gx_floor_c1 { background: linear-gradient(155deg, #0EA5E9 0%, #0369A1 100%); }
.gx_floor_c2 { background: linear-gradient(155deg, #F97316 0%, #C2560C 100%); }
.gx_floor_c3 { background: linear-gradient(155deg, #7C3AED 0%, #5B21B6 100%); }
.gx_floor_side i { font-size: 30px; margin-bottom: 14px; opacity: .9; }
.gx_floor_side h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.gx_floor_side p { margin: 0 0 20px; font-size: 12.5px; color: rgba(255,255,255,.7); }
.gx_floor_side a {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 18px;
    background: rgba(255,255,255,.18); color: #fff;
    font-size: 13px; font-weight: 600; border-radius: 999px;
    transition: background .2s;
}
.gx_floor_side a:hover { background: rgba(255,255,255,.3); color: #fff; }
.gx_floor_grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

/* ---------- ⑤ 双栏：闲置信息 + 商家 ---------- */
.gx_two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: var(--zh-section-gap); }
.gx_two_col {
    background: var(--zh-bg-card); border: 1px solid var(--zh-border);
    border-radius: var(--zh-radius-md); padding: 20px;
}
.gx_two_col .gx_sec_hd { margin-bottom: 14px; }
.gx_two_col .gx_sec_hd h2 { font-size: 17px; }
.gx_two_col .gx_bar { height: 16px; }

.gx_infolist { margin: 0; padding: 0; list-style: none; }
.gx_infolist li { border-bottom: 1px dashed var(--zh-border); }
.gx_infolist li:last-child { border-bottom: 0; }
.gx_infolist a { display: flex; align-items: center; gap: 10px; padding: 11px 2px; transition: padding .2s; }
.gx_infolist a:hover { padding-left: 6px; }
.gx_info_dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--zh-accent); }
.gx_info_t { flex: 1; min-width: 0; font-size: 13.5px; color: var(--zh-text-secondary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gx_infolist a:hover .gx_info_t { color: var(--zh-primary); }
.gx_info_m { flex: none; font-size: 12px; color: var(--zh-text-disabled); }

.gx_brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gx_brand {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 14px 8px; border: 1px solid var(--zh-border);
    border-radius: var(--zh-radius-sm); transition: all .2s;
}
.gx_brand:hover { border-color: var(--zh-primary); background: var(--zh-primary-light); }
.gx_brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.gx_brand span { font-size: 12px; color: var(--zh-text-muted); text-align: center; line-height: 1.4; }
.gx_brand:hover span { color: var(--zh-primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
    .gx_stage { grid-template-columns: 190px 1fr; }
    .gx_stage_side { display: none; }
    .gx_grid6, .gx_floor_grid { grid-template-columns: repeat(4, 1fr); }
    .gx_rank_list { grid-template-columns: repeat(2, 1fr); }
    .gx_rank_item:nth-child(4n) { border-right: 1px solid var(--zh-border); }
    .gx_rank_item:nth-child(2n) { border-right: 0; }
    .gx_rank_item:nth-child(n+5) { border-bottom: 1px solid var(--zh-border); }
}
@media (max-width: 992px) {
    .gx_stage { grid-template-columns: 1fr; }
    .gx_catmenu { display: none; }
    .gx_banner { min-height: 260px; }
    .gx_slide_copy { padding: 0 28px; max-width: 80%; }
    .gx_slide_copy h2 { font-size: 22px; }
    .gx_rank, .gx_floor { grid-template-columns: 1fr; }
    .gx_rank_side, .gx_floor_side { padding: 20px; }
    .gx_rank_side h2 { font-size: 20px; }
    .gx_rank_side br { display: none; }
    .gx_two { grid-template-columns: 1fr; gap: 18px; }
    .gx_grid6, .gx_floor_grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .gx_grid6, .gx_floor_grid { grid-template-columns: repeat(2, 1fr); }
    .gx_rank_list { grid-template-columns: 1fr; }
    .gx_rank_item { border-right: 0 !important; }
    .gx_brands { grid-template-columns: repeat(3, 1fr); }
    .gx_banner { min-height: 200px; }
    .gx_slide_copy h2 { font-size: 18px; }
    .gx_slide_copy p { font-size: 12.5px; margin-bottom: 14px; }
    .gx_dots { left: 28px; bottom: 14px; }
}

/* 轮播右对齐变体（图片留白在右侧时使用） */
.gx_slide_r { justify-content: flex-end; }
.gx_slide_r::before {
    background: linear-gradient(270deg, rgba(15,23,42,.72) 0%, rgba(15,23,42,.35) 45%, rgba(15,23,42,0) 70%);
}
.gx_slide_r .gx_slide_copy { text-align: right; }
.gx_slide_r .gx_slide_btn { flex-direction: row-reverse; }
.gx_dots { left: 50%; transform: translateX(-50%); }
@media (max-width: 640px) {
    .gx_dots { left: 50%; }
}
