/* ============================================================
   煜晟商城 · 首页样式
   依赖 layouts/app.blade.php 中的 --zh-* 令牌（深蓝金点主题）
   ============================================================ */

/* 首页通栏：取消主布局 container 的内边距 */
.zh_main > .container { padding: 0; max-width: 100%; }

/* ---------- 通用 ---------- */
.ys_btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 24px; border-radius: var(--zh-radius-sm);
    background: var(--zh-primary); color: #fff; font-size: 15px; font-weight: 600;
    border: 1.5px solid var(--zh-primary); white-space: nowrap; transition: background .2s, border-color .2s, color .2s;
}
.ys_btn:hover { background: var(--zh-primary-dark); border-color: var(--zh-primary-dark); color: #fff; }
.ys_btn_ghost { background: #fff; color: var(--zh-primary); }
.ys_btn_ghost:hover { background: var(--zh-primary-light); color: var(--zh-primary-dark); border-color: var(--zh-primary); }
.ys_btn_gold { background: var(--zh-accent); border-color: var(--zh-accent); color: #3B2A06; }
.ys_btn_gold:hover { background: #E5951A; border-color: #E5951A; color: #3B2A06; }
.ys_btn_block { display: flex; width: 100%; }

.ys_sec { padding: 44px 0; }
.ys_sec_tint { background: #fff; }
.ys_head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.ys_head h2 { font-size: 22px; font-weight: 800; color: var(--zh-text-primary); margin: 0; position: relative; padding-left: 14px; }
.ys_head h2::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: var(--zh-accent); }
.ys_head .sub { font-size: 13px; color: var(--zh-text-tertiary); }
.ys_head .more { margin-left: auto; font-size: 13.5px; color: var(--zh-text-secondary); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ys_head .more:hover { color: var(--zh-primary); }

/* ---------- 商品卡 ---------- */
.ys_card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--zh-border);
    border-radius: var(--zh-radius-md); overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s; min-width: 0;
}
.ys_card:hover { border-color: #BFD0F6; box-shadow: var(--zh-shadow-hover); transform: translateY(-2px); }
.ys_card_img { position: relative; aspect-ratio: 1 / 1; background: #F8FAFC; overflow: hidden; }
.ys_card_img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; display: block; }
.ys_card_body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ys_card_name {
    font-size: 13.5px; color: var(--zh-text-primary); line-height: 1.5; height: 3em; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.ys_card_price { margin-top: auto; font-size: 18px; font-weight: 800; color: var(--zh-price); line-height: 1; display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.ys_card_price small { font-size: 12px; font-weight: 700; }
.ys_card_price s { font-size: 12px; font-weight: 400; color: var(--zh-text-disabled); margin-left: 6px; }
.ys_new { position: absolute; top: 8px; left: 8px; z-index: 1; font-size: 11px; font-weight: 700; color: #3B2A06; background: var(--zh-accent); padding: 2px 8px; border-radius: var(--zh-radius-xs); }

.ys_grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ys_grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ys_grid6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }

/* ---------- ① 插画横幅 ---------- */
.ys_hero { background: linear-gradient(180deg, #E8EFFE 0%, var(--zh-bg) 100%); padding: 26px 0 72px; }
.ys_slider { position: relative; background: #fff; border-radius: var(--zh-radius-xl); box-shadow: var(--zh-shadow-md); overflow: hidden; }
.ys_slide { display: none; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); min-height: 400px; }
.ys_slide.on { display: grid; animation: ysFade .5s ease; }
@keyframes ysFade { from { opacity: .3; } to { opacity: 1; } }
.ys_slide_txt { padding: 52px 48px 60px 56px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.ys_slide_tag { font-size: 13px; font-weight: 600; color: var(--zh-primary); background: var(--zh-primary-light); padding: 5px 12px; border-radius: var(--zh-radius-pill); }
.ys_slide_h { font-size: 38px; font-weight: 800; color: var(--zh-text-primary); margin: 18px 0 12px; letter-spacing: 1px; line-height: 1.25; }
.ys_slide_txt p { font-size: 15px; color: var(--zh-text-secondary); line-height: 1.85; margin: 0; max-width: 430px; }
.ys_slide_btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ys_slide_img { position: relative; min-height: 0; }
.ys_slide_img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ys_dots { position: absolute; left: 56px; bottom: 26px; display: flex; gap: 8px; }
.ys_dot { width: 26px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: #CBD5E1; cursor: pointer; }
.ys_dot.on { background: var(--zh-primary); width: 40px; }

/* ---------- ② 入口卡 ---------- */
.ys_entries { margin-top: -46px; position: relative; z-index: 2; }
.ys_entries_grid {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: #fff;
    border-radius: var(--zh-radius-lg); box-shadow: var(--zh-shadow-md); overflow: hidden;
}
.ys_entry { display: flex; align-items: center; gap: 12px; padding: 20px 18px; min-width: 0; transition: background .2s; }
.ys_entry + .ys_entry { border-left: 1px solid var(--zh-border); }
.ys_entry:hover { background: var(--zh-primary-light); }
.ys_entry .ico { width: 44px; height: 44px; border-radius: var(--zh-radius-md); background: var(--zh-primary-light); color: var(--zh-primary); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ys_entry .ico.gold { background: #FEF3DC; color: #B45309; }
.ys_entry .txt { display: flex; flex-direction: column; min-width: 0; }
.ys_entry b { font-size: 15px; color: var(--zh-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ys_entry small { font-size: 12.5px; color: var(--zh-text-tertiary); white-space: nowrap; }

/* ---------- ③ 双栏 ---------- */
.ys_duo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ys_aside { display: flex; flex-direction: column; gap: 16px; }
.ys_member { background: #fff; border: 1px solid var(--zh-border); border-radius: var(--zh-radius-md); padding: 22px 20px; text-align: center; }
.ys_member img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--zh-primary-light); }
.ys_member .hi { font-size: 15px; font-weight: 700; color: var(--zh-text-primary); margin-top: 10px; overflow-wrap: anywhere; }
.ys_member .sub { font-size: 12.5px; color: var(--zh-text-tertiary); margin-top: 4px; }
.ys_member_btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ys_member_btns .ys_btn { height: 38px; padding: 0 12px; font-size: 14px; }
.ys_notice { background: #fff; border: 1px solid var(--zh-border); border-radius: var(--zh-radius-md); padding: 16px 18px 10px; }
.ys_notice_head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ys_notice_head h3 { font-size: 15px; font-weight: 700; margin: 0; color: var(--zh-text-primary); }
.ys_notice_head h3 i { color: var(--zh-accent); margin-right: 4px; }
.ys_notice_head a { font-size: 12.5px; color: var(--zh-text-tertiary); }
.ys_notice ul { margin: 0; padding: 0; }
.ys_notice li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--zh-border); }
.ys_notice li:first-child { border-top: 0; }
.ys_notice li a { flex: 1; min-width: 0; font-size: 13px; color: var(--zh-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ys_notice li a:hover { color: var(--zh-primary); }
.ys_notice time { font-size: 12px; color: var(--zh-text-tertiary); flex-shrink: 0; }

/* ---------- ④ 分类楼层 ---------- */
.ys_floor { padding: 36px 0; }
.ys_floor.alt { background: #fff; }
.ys_floor_head {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 16px;
    background: linear-gradient(90deg, var(--zh-primary-light) 0%, rgba(238,243,255,0) 75%); border-radius: var(--zh-radius-md);
}
.ys_floor_head .ico { width: 38px; height: 38px; border-radius: 50%; background: var(--zh-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.ys_floor_head h2 { font-size: 20px; font-weight: 800; margin: 0; color: var(--zh-text-primary); white-space: nowrap; }
.ys_floor_head .chips { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ys_floor_head .chips a { font-size: 12.5px; padding: 3px 10px; border-radius: var(--zh-radius-pill); background: #fff; color: var(--zh-text-secondary); border: 1px solid var(--zh-border); }
.ys_floor_head .more { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--zh-primary); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- ⑤ 闲置信息 ---------- */
.ys_infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ys_info { display: flex; gap: 16px; background: var(--zh-bg); border: 1px solid var(--zh-border); border-radius: var(--zh-radius-md); padding: 12px; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.ys_info:hover { border-color: #BFD0F6; box-shadow: var(--zh-shadow-md); background: #fff; }
.ys_info_img { width: 132px; height: 99px; border-radius: var(--zh-radius-sm); overflow: hidden; flex-shrink: 0; background: #E2E8F0; }
.ys_info_img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ys_info_body { min-width: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ys_info_body h3 {
    font-size: 15px; font-weight: 700; color: var(--zh-text-primary); margin: 0; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.ys_info_body .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--zh-text-tertiary); margin-top: auto; }
.ys_info_body .meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys_info_body .meta i, .ys_info_body .phone i { margin-right: 5px; }
.ys_info_body .phone { font-size: 13px; font-weight: 600; color: var(--zh-primary-dark); }
.ys_cta {
    margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 24px 30px; border-radius: var(--zh-radius-lg); background: linear-gradient(110deg, var(--zh-primary-dark) 0%, var(--zh-primary) 100%); color: #fff;
}
.ys_cta h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; color: #fff; }
.ys_cta p { margin: 0; font-size: 14px; color: rgba(255,255,255,.85); }

/* ---------- ⑦ 入驻商家 ---------- */
.ys_merchants { padding: 40px 0 52px; }
.ys_merchants_row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: center; background: #fff; border: 1px solid var(--zh-border); border-radius: var(--zh-radius-lg); padding: 28px 30px; }
.ys_merchants_txt h2 { font-size: 22px; font-weight: 800; margin: 0 0 8px; color: var(--zh-text-primary); }
.ys_merchants_txt p { font-size: 13.5px; color: var(--zh-text-secondary); margin: 0 0 18px; line-height: 1.7; }
.ys_merchants_list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ys_m { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--zh-border); border-radius: var(--zh-radius-md); min-width: 0; }
.ys_m:hover { border-color: var(--zh-primary); }
.ys_m img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ys_m span { font-size: 14px; color: var(--zh-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
    .ys_grid6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ys_grid6 > :nth-child(n+5) { display: none; }
    .ys_entries_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ys_entry:nth-child(4) { border-left: 0; }
    .ys_entry:nth-child(n+4) { border-top: 1px solid var(--zh-border); }
    .ys_slide_h { font-size: 32px; }
}
@media (max-width: 991px) {
    .ys_duo { grid-template-columns: minmax(0, 1fr); }
    .ys_aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ys_slide { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .ys_slide_img { order: -1; aspect-ratio: 16 / 9; }
    .ys_slide_txt { padding: 26px 26px 52px; }
    .ys_dots { left: 26px; bottom: 20px; }
    .ys_grid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ys_grid5 > :nth-child(n+7) { display: none; }
    .ys_infos { grid-template-columns: minmax(0, 1fr); }
    .ys_merchants_row { grid-template-columns: minmax(0, 1fr); }
    .ys_merchants_list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ys_hero { padding: 14px 0 58px; }
    .ys_slide_h { font-size: 24px; margin: 12px 0 8px; }
    .ys_slide_txt p { font-size: 14px; }
    .ys_slide_btns { margin-top: 18px; }
    .ys_btn { height: 40px; padding: 0 18px; font-size: 14px; }
    .ys_entries_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ys_entry { padding: 14px 12px; gap: 10px; }
    .ys_entry .ico { width: 38px; height: 38px; font-size: 16px; }
    .ys_entry:nth-child(n) { border-left: 0; border-top: 1px solid var(--zh-border); }
    .ys_entry:nth-child(-n+2) { border-top: 0; }
    .ys_entry:nth-child(even) { border-left: 1px solid var(--zh-border); }
    .ys_aside { grid-template-columns: minmax(0, 1fr); }
    .ys_grid4, .ys_grid5, .ys_grid6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    /* 手机上每块只留 6 件，免得页面过长 */
    .ys_grid4 > :nth-child(n+7), .ys_grid5 > :nth-child(n+7) { display: none; }
    .ys_grid6 > :nth-child(n+5) { display: flex; }
    .ys_sec { padding: 30px 0; }
    .ys_floor { padding: 26px 0; }
    .ys_floor_head { padding: 10px 12px; gap: 10px; }
    .ys_floor_head h2 { font-size: 17px; }
    .ys_head h2 { font-size: 19px; }
    .ys_head .sub { display: none; }
    .ys_info_img { width: 104px; height: 78px; }
    .ys_cta { flex-direction: column; align-items: flex-start; padding: 20px; }
    .ys_merchants_row { padding: 20px; }
}
