/* ============================================================
   商城独立壳样式（-74）：仿淘宝/京东电商风格，与主站透明风分开
   主色：#ff4400（橙红）
   ============================================================ */

/* ---- 基础 ---- */
.mall-body { margin: 0; background: #f4f4f4; color: #333; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.mall-body a { color: inherit; text-decoration: none; }
.mall-body a:hover { color: #ff4400; }
.mall-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.mall-main { min-height: 55vh; padding: 18px 0 40px; }

/* ---- 顶条 ---- */
.mall-topbar { background: #f7f7f7; border-bottom: 1px solid #e9e9e9; font-size: 12px; color: #888; }
.mall-topbar-in { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.mall-topbar-links { display: flex; gap: 16px; }
.mall-topbar-links a { color: #666; }
.mall-topbar-links a:hover { color: #ff4400; }
.mall-topbar-user { color: #ff4400; font-weight: 600; }

/* ---- 头部区 ---- */
.mall-header-main { display: flex; align-items: center; gap: 32px; padding: 22px 16px; background: #fff; }
.mall-header { background: #fff; }
.mall-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mall-logo-badge { font-size: 30px; }
.mall-logo-text { font-size: 26px; font-weight: 800; color: #ff4400; letter-spacing: 1px; }
.mall-search { flex: 1; display: flex; max-width: 560px; margin: 0 auto; border: 2px solid #ff4400; border-radius: 4px; overflow: hidden; background: #fff; }
.mall-search input { flex: 1; border: 0; outline: none; padding: 10px 14px; font-size: 14px; color: #333; }
.mall-search button { border: 0; background: #ff4400; color: #fff; font-size: 15px; padding: 0 34px; cursor: pointer; letter-spacing: 2px; }
.mall-search button:hover { background: #e63e00; }
.mall-cart-btn { position: relative; display: flex; align-items: center; gap: 6px; border: 2px solid #ff4400; color: #ff4400 !important; border-radius: 4px; padding: 8px 18px; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.mall-cart-btn:hover { background: #fff3ef; }
.mall-cart-num { position: absolute; top: -8px; right: -8px; background: #ff4400; color: #fff; border-radius: 10px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 11px; padding: 0 4px; }

/* ---- 分类导航条 ---- */
.mall-catnav { background: #fff; border-bottom: 2px solid #ff4400; }
.mall-catnav-in { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.mall-catnav-in a { display: flex; align-items: center; gap: 5px; padding: 11px 18px; font-size: 15px; color: #333; white-space: nowrap; font-weight: 500; }
.mall-catnav-in a:hover { color: #ff4400; background: #fff7f4; }
.mall-catnav-in a.active { color: #ff4400; font-weight: 700; }
.mall-catnav-all { background: #ff4400; color: #fff !important; font-weight: 700 !important; }
.mall-catnav-all:hover { background: #e63e00 !important; }

/* ---- 轮播 Banner ---- */
.mall-banner { position: relative; border-radius: 10px; overflow: hidden; height: 320px; margin-bottom: 18px; background: #fff; }
.mall-banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.mall-banner-slide.on { opacity: 1; }
.mall-banner-slide a { display: block; width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.mall-banner-title { display: inline-block; margin: 0 0 26px 34px; background: rgba(0,0,0,.55); color: #fff; padding: 8px 18px; border-radius: 6px; font-size: 18px; }
.mall-banner-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.mall-banner-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; }
.mall-banner-dots i.on { background: #ff4400; }

/* ---- 金刚区（分类九宫格） ---- */
.mall-kingkong { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 24px; }
.mall-kingkong a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 8px; }
.mall-kingkong a:hover { background: #fff7f4; }
.mall-kingkong-ico { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: #fff1ea; border-radius: 14px; }
.mall-kingkong-name { font-size: 13px; color: #444; }

/* ---- 楼层 ---- */
.mall-floor { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 24px; }
.mall-floor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mall-floor-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0; }
.mall-floor-title::before { content: ""; width: 4px; height: 20px; background: #ff4400; border-radius: 2px; }
.mall-floor-more { font-size: 13px; color: #999; }
.mall-floor-more:hover { color: #ff4400; }
.mall-floor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ---- 商品卡片（通用） ---- */
.mall-gcard { background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden; transition: all .2s; display: block; }
.mall-gcard:hover { box-shadow: 0 6px 18px rgba(255,68,0,.13); transform: translateY(-3px); }
.mall-gcard-thumb { width: 100%; aspect-ratio: 1/1; background: #fafafa; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mall-gcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mall-gcard-noimg { color: #ccc; font-size: 13px; }
.mall-gcard-info { padding: 10px 12px 12px; }
.mall-gcard-name { font-size: 14px; color: #333; margin: 0 0 8px; height: 40px; line-height: 20px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mall-gcard-meta { display: flex; align-items: baseline; gap: 8px; }
.mall-gcard-price { color: #ff4400; font-size: 18px; font-weight: 700; }
.mall-gcard-price::before { content: "¥"; font-size: 13px; }
.mall-gcard-op { color: #ff4400; font-size: 13px; border: 1px solid #ff4400; border-radius: 4px; padding: 4px 12px; margin-left: auto; }
.mall-gcard-op:hover { background: #ff4400; color: #fff !important; }
.mall-gcard-sales { color: #aaa; font-size: 12px; }

/* ---- 商品流 ---- */
.mall-stream-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 14px; }
.mall-stream-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0; }
.mall-stream-title::before { content: ""; width: 4px; height: 20px; background: #ff4400; border-radius: 2px; }
.mall-stream { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mall-empty { background: #fff; border-radius: 10px; padding: 60px 0; text-align: center; color: #999; }

/* ---- 分页 ---- */
.mall-pager { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.mall-pager a, .mall-pager span { padding: 7px 14px; background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; font-size: 13px; color: #555; }
.mall-pager span.cur { background: #ff4400; border-color: #ff4400; color: #fff; }
.mall-pager a:hover { border-color: #ff4400; color: #ff4400; }

/* ---- 三栏主区（-75 淘宝式） ---- */
.mall-hero { display: grid; grid-template-columns: 200px 1fr 250px; gap: 14px; margin-bottom: 20px; }

/* 左：分类竖排菜单 */
.mall-sidenav { background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; overflow: visible; padding-bottom: 6px; }
/* 菜单行固定38px高，11行=418px，限高420px 精确容纳（-84） */
.mall-sidenav-list { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.mall-sidenav-list::-webkit-scrollbar { display: none; }
.mall-center { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 340px; }
.mall-sidenav-head { background: #ff4400; color: #fff; font-size: 15px; font-weight: 700; padding: 12px 16px; border-radius: 10px 10px 0 0; }
.mall-sidenav-item { position: relative; }
.mall-sidenav-item > a { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; box-sizing: border-box; font-size: 14px; color: #333; }
.mall-sidenav-item > a:hover { background: #fff7f4; color: #ff4400; }
.mall-sidenav-item .ico { width: 20px; text-align: center; }
.mall-sidenav-item .name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mall-sidenav-item .arrow { color: #c0c4cc; font-size: 16px; }
.mall-sidenav-sub { display: none; position: absolute; left: 100%; top: 0; min-width: 400px; background: #fff; border: 1px solid #ffd9cb; border-radius: 0 8px 8px 8px; box-shadow: 0 6px 20px rgba(0,0,0,.1); padding: 14px 16px; z-index: 30; }
.mall-sidenav-item:hover .mall-sidenav-sub { display: block; }
.mall-sidenav-item:hover > a { background: #fff7f4; color: #ff4400; border-left: 2px solid #ff4400; }
.mall-sidenav-sub a { display: inline-block; font-size: 13px; color: #555; background: #f7f7f7; border-radius: 4px; padding: 6px 12px; margin: 3px 4px 3px 0; }
.mall-sidenav-sub a:hover { background: #ff4400; color: #fff; }

/* 中：4×2 统一网格（轮播占2格高1行 + 6张同尺寸卡片，-81） */
.mall-center { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 340px; }
.mall-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 10px; flex: 1; }
.mall-grid .mall-banner { grid-column: span 2; height: 100%; min-height: 0; margin-bottom: 0; }
.mall-banner-empty { display: flex; align-items: center; justify-content: center; color: #ff4400; font-size: 13px; background: var(--mw-brand-soft, #fff1ea); border: 1px dashed #ffb394; }
.mall-cell { background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; min-width: 0; }
.mall-cell:hover { box-shadow: 0 5px 14px rgba(255,68,0,.12); transform: translateY(-2px); }
.mall-cell-thumb { flex: 1; min-height: 0; border-radius: 6px; background: #fafafa; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 7px; }
.mall-cell-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mall-cell-name { font-size: 12px; color: #444; height: 18px; line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mall-cell-price { color: #ff4400; font-weight: 700; font-size: 14px; margin-top: 3px; }
.mall-cell-empty { border: 1.5px dashed #ddd; background: #fafafa; color: #bbb; font-size: 12px; align-items: center; justify-content: center; text-align: center; padding: 10px 6px; }

/* ---- 中窄屏（900-1200px）：隐藏左侧分类菜单（顶部选项排有分类），两栏布局 ---- */
@media (max-width: 1150px) {
    .mall-sidenav { display: none; }
    .mall-hero { grid-template-columns: 1fr 240px; }
}

/* 右：登录卡+推荐位（-80 等高填充） */
.mall-rightcol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mall-logincard { background: #fff; border: 1px solid #ffd9cb; border-radius: 10px; padding: 16px; flex: none; }
.mall-rpromo { flex: 1; min-height: 88px; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0; }
.mall-rpromo:hover { box-shadow: 0 5px 14px rgba(255,68,0,.12); }
.mall-rpromo-thumb { width: 56px; height: 56px; flex: none; border-radius: 8px; background: #fff1ea; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.mall-rpromo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mall-rpromo-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mall-rpromo-name { font-size: 13px; color: #333; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mall-rpromo-price { color: #ff4400; font-weight: 700; font-size: 15px; }
.mall-rpromo-empty { color: #aaa; font-size: 12px; background: #fafafa; border: 1px dashed #ddd; justify-content: center; text-align: center; }
.mall-logincard-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.mall-logincard .fi { width: 100%; box-sizing: border-box; height: 38px; border: 1px solid #e5e5e5; border-radius: 6px; padding: 0 12px; font-size: 14px; margin-bottom: 8px; outline: none; }
.mall-logincard .fi:focus { border-color: #ff4400; }
.mall-logincard .cap-row { display: flex; gap: 8px; }
.mall-logincard .cap-row .fi { flex: 1; margin-bottom: 10px; }
.mall-logincard .cap-img { width: 96px; height: 40px; border-radius: 6px; border: 1px solid #e5e5e5; cursor: pointer; object-fit: cover; }
.mall-logincard .go { width: 100%; height: 42px; border: 0; border-radius: 6px; background: #ff4400; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; letter-spacing: 4px; }
.mall-logincard .go:hover { background: #e63e00; }
.mall-logincard .reg { display: block; text-align: center; font-size: 12px; color: #999; margin-top: 10px; }
.mall-logincard .reg:hover { color: #ff4400; }
.mall-logincard-msg { display: none; font-size: 12px; color: #e4393c; margin-top: 8px; min-height: 16px; }
.mall-logincard-msg.show { display: block; }
.mall-logincard-user { text-align: center; }
.mall-logincard-user .avatar { width: 64px; height: 64px; border-radius: 50%; background: #ff4400; color: #fff; font-size: 26px; font-weight: 700; line-height: 64px; margin: 6px auto 10px; }
.mall-logincard-user .nick { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.mall-logincard-user .lnk { display: flex; justify-content: space-around; }
.mall-logincard-user .lnk a { font-size: 13px; color: #666; background: #f7f7f7; border-radius: 6px; padding: 8px 12px; }
.mall-logincard-user .lnk a:hover { background: #fff1ea; color: #ff4400; }

/* 分类按钮条（主区下方） */
.mall-catbar { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #f0f0f0; border-left: 4px solid #ff4400; border-radius: 8px; padding: 8px 12px; margin-bottom: 20px; overflow-x: auto; }
.mall-catbar a { display: flex; align-items: center; gap: 4px; flex: none; font-size: 14px; color: #333; border: 1px solid #eee; border-radius: 6px; padding: 7px 14px; white-space: nowrap; }
.mall-catbar a:hover { border-color: #ff4400; color: #ff4400; background: #fff7f4; }
.mall-catbar .mall-catbar-all { background: #ff4400; border-color: #ff4400; color: #fff; font-weight: 700; }
.mall-catbar .mall-catbar-all:hover { background: #e63e00; color: #fff; }
.mall-catbar .ico { font-size: 14px; }

/* 顶部选项排（PC/手机都显示，-76 按用户要求） */
.mall-m-chips { display: flex; gap: 8px; overflow-x: auto; background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.mall-m-chips a { flex: none; font-size: 13px; color: #555; border: 1px solid #eee; border-radius: 14px; padding: 6px 14px; }
.mall-m-chips a.on { background: #ff4400; border-color: #ff4400; color: #fff; font-weight: 600; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .mall-hero { grid-template-columns: 1fr; }
    .mall-sidenav { display: none; }
    .mall-logincard { display: none; }
    .mall-center { min-height: 0; }
    .mall-grid { flex: none; grid-template-rows: none; }
    .mall-rightcol { flex-direction: row; }
    .mall-rpromo { min-height: 0; }
    .mall-rpromo-empty { display: none; }
    .mall-m-chips { display: flex; }
    .mall-stream { grid-template-columns: repeat(2, 1fr); }
    .mall-grid { grid-template-columns: repeat(2, 1fr); }
    .mall-grid .mall-banner { min-height: 170px; }
    .mall-cell-thumb { flex: none; height: 120px; }
    .mall-cell-empty { display: none; }
    .mall-header-main { flex-wrap: wrap; gap: 12px; }
    .mall-search { order: 3; flex-basis: 100%; max-width: none; }
    .mall-banner { height: 180px; }
    .mall-kingkong { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
    .mall-topbar-welcome { display: none; }
    .mall-logo-text { font-size: 20px; }
    .mall-stream, .mall-floor-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mall-z4row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 页内标题条（列表/详情页面包屑） ---- */
.mall-crumb { font-size: 13px; color: #999; padding: 0 0 14px; }
.mall-crumb a { color: #999; }
.mall-crumb a:hover { color: #ff4400; }

/* ---- 店铺页头部：无背景图时用橙色渐变兜底（磨砂卡片浮于其上） ---- */
.mall-body .kf-shop-header:not([style*="background-image"]) { background: linear-gradient(135deg, #ff7a50, #ff4400); }
.mall-body .kf-shop-header { color: #fff; }
.mall-body .kf-shop-header .kf-shop-name, .mall-body .kf-shop-header h1 { color: #fff; }

/* ---- 底部 ---- */
.mall-footer { background: #fff; border-top: 1px solid #eee; padding: 28px 0 24px; margin-top: 20px; }
.mall-footer-service { display: flex; justify-content: space-around; padding-bottom: 20px; border-bottom: 1px solid #f2f2f2; font-size: 15px; color: #555; font-weight: 600; }
.mall-footer-service span { color: #ff4400; margin-right: 6px; }
.mall-footer-nav { display: flex; justify-content: center; gap: 28px; padding: 18px 0 6px; font-size: 13px; color: #666; }
.mall-footer-copy { text-align: center; font-size: 12px; color: #aaa; margin: 8px 0 0; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .mall-kingkong { grid-template-columns: repeat(4, 1fr); }
    .mall-stream, .mall-floor-grid { grid-template-columns: repeat(2, 1fr); }
    .mall-header-main { flex-wrap: wrap; gap: 12px; }
    .mall-search { order: 3; flex-basis: 100%; max-width: none; }
    .mall-banner { height: 180px; }
}
@media (max-width: 560px) {
    .mall-topbar-welcome { display: none; }
    .mall-logo-text { font-size: 20px; }
    .mall-kingkong { grid-template-columns: repeat(3, 1fr); }
    .mall-stream, .mall-floor-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
