/* ===========================================================================
 * SYHUO 门户模板 (portal) 样式
 * 设计：实拍大图 + 纯色品牌块，无渐变、无荧光、克制留白
 * 品牌橙 #ff6700 / 深炭灰 #2c2c2c / 价格红 #e4393c / 背景 #f5f6f8
 * =========================================================================== */

body {
    background: #f5f6f8;
    font-size: 14px;
    color: #333;
}

/* 容器：宽版 1400px，移动端自适应收缩 */
.portal-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ---------------------------------------------------------------------------
 * Hero 大横幅：左侧橙色品牌块 + 右侧实拍图（与线上版一致，图片按比例驱动高度）
 * ------------------------------------------------------------------------- */
.portal-hero {
    display: flex;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    background: #ff6700;
    min-height: 420px;
}
.portal-hero-left {
    width: 440px;
    flex-shrink: 0;
    background: #ff6700;
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.portal-hero-title {
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 1px;
}
.portal-hero-sub {
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    margin-top: 14px;
    line-height: 1.6;
}
/* Banner 内搜索框已下线（2026-09-14 搜索重构·原则1：全站找东西只认顶栏一个框），换成直达词 chips */
.portal-hero-words {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}
.portal-hero-words-label {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .75);
    margin-right: 2px;
}
.portal-hero-words a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 13px;
    transition: background .15s, color .15s;
}
.portal-hero-words a:hover {
    background: #fff;
    color: #ff6700;
    text-decoration: none;
}
.portal-hero-right {
    flex: 1;
    position: relative;
    min-width: 0;
}
/* 绝对定位铺满右栏：flex 行内 img height:100% 存在循环 sizing 会退回 intrinsic 高度，
   导致图片比左侧品牌块矮时底部留白 */
.portal-hero-right img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.portal-hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.portal-hero-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
}
.portal-hero-dots span.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------------------
 * 分类快捷入口：6 个实拍缩略图卡片
 * ------------------------------------------------------------------------- */
.portal-cats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 24px;
}
.portal-cat-card {
    display: block;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ececec;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s;
}
.portal-cat-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    transform: translateY(-3px);
}
.portal-cat-img {
    height: 108px;
    overflow: hidden;
}
.portal-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.portal-cat-card:hover .portal-cat-img img {
    transform: scale(1.05);
}
.portal-cat-label {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.portal-cat-label .cat-tag {
    display: inline-block;
    width: 6px;
    height: 14px;
    border-radius: 2px;
    background: #ff6700;
    flex-shrink: 0;
}
.portal-cat-label .cat-desc {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

/* ---------------------------------------------------------------------------
 * 区块标题栏：深炭灰底（与页脚同色系）
 * ------------------------------------------------------------------------- */
.portal-section-head {
    background: #2c2c2c;
    color: #fff;
    padding: 13px 22px;
    border-radius: 8px 8px 0 0;
    margin-top: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.portal-section-head h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.portal-section-head h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: #ff6700;
    border-radius: 2px;
}
.portal-section-head .more {
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    text-decoration: none;
}
.portal-section-head .more:hover {
    color: #ff6700;
}

/* ---------------------------------------------------------------------------
 * 商品网格：4 列实拍卡片
 * ------------------------------------------------------------------------- */
.portal-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 16px;
}
.portal-prod-card {
    display: block;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ececec;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s;
}
.portal-prod-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    transform: translateY(-3px);
}
.portal-prod-img {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}
.portal-prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.portal-prod-card:hover .portal-prod-img img {
    transform: scale(1.04);
}
.portal-prod-img .prod-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e4393c;
    color: #fff;
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 4px;
}
.portal-prod-info {
    padding: 12px 14px 16px;
}
.portal-prod-name {
    font-size: 14px;
    color: #333;
    line-height: 1.45;
    height: 41px;
    overflow: hidden;
}
.portal-prod-price {
    margin-top: 8px;
    color: #e4393c;
    font-size: 21px;
    font-weight: 700;
}
.portal-prod-price em {
    font-style: normal;
    font-size: 13px;
    margin-right: 1px;
}
.portal-prod-price .orig {
    color: #999;
    font-size: 13px;
    font-weight: 400;
    text-decoration: line-through;
    margin-left: 7px;
}
.portal-prod-sales {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* ---------------------------------------------------------------------------
 * 响应式：平板 3/2 列，手机 2 列 + Hero 竖排
 * ------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .portal-products {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 991.98px) {
    .portal-cats {
        grid-template-columns: repeat(3, 1fr);
    }
    .portal-products {
        grid-template-columns: repeat(2, 1fr);
    }
    .portal-hero {
        flex-direction: column;
        min-height: 0;
    }
    .portal-hero-left {
        width: 100%;
        padding: 36px 26px;
    }
    .portal-hero-title {
        font-size: 26px;
    }
    /* 竖排时 flex:1 的 basis:0% 会压掉 height，必须 flex:none 才能定高 */
    .portal-hero-right {
        flex: none;
        height: 240px;
    }
}
@media (max-width: 575.98px) {
    .portal-cats {
        grid-template-columns: repeat(2, 1fr);
    }
    .portal-hero-title {
        font-size: 22px;
    }
    /* 直达词在手机上按触控下限 44px 放大点击区（原搜索框的 44px 规则同源于此纪律） */
    .portal-hero-words a {
        min-height: 44px;
        padding: 0 16px;
    }
    .portal-prod-img {
        height: 160px;
    }
}

/* ---------------------------------------------------------------------------
 * A3+A4 首屏：全宽品牌图窗横幅在上、全宽在线下单表单在下（与线上版一致）
 * ------------------------------------------------------------------------- */
.portal-hero-col {
    margin-top: 20px;
}
/* 首屏分组容器（图窗横幅 + 在线下单两列）：本身不画任何东西，只用 flow-root 建 BFC，
   让子列的 margin-top 留在容器内部、不冒到容器外面跟头部间距做外边距合并 */
.portal-first-screen {
    display: flow-root;
}
.portal-hero-col .portal-hero {
    margin-top: 0;
}
.portal-order-col {
    margin-top: 24px;
}
.portal-order-col .portal-section-head {
    margin-top: 0;
}
/* 图窗轮播分支：圆角卡片化融入页面（组件自身 margin:0 !important，间距由外层给） */
.portal-hero-col .hero-section {
    min-height: 480px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}
@media (max-width: 991.98px) {
    .portal-hero-col .hero-section {
        min-height: 400px;
    }
}
@media (max-width: 575.98px) {
    .portal-hero-col .hero-section {
        min-height: 340px;
        padding: 36px 18px;
    }
}

/* A5 金刚区：图标卡（跑腿/家政等无实拍图频道补位，与图卡同节奏） */
.portal-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff8a2a, #ff6700);
}
.portal-cat-icon i {
    font-size: 44px;
    color: rgba(255, 255, 255, .92);
}

/* A6 限时推荐：倒计时条（暖色白字，配深色楼层头） */
.portal-flash-timer {
    margin-left: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #ffd9bf;
    letter-spacing: .5px;
}
.portal-flash-timer i {
    margin-right: 4px;
}
