/* ============ 基础重置 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: #fbf7f2;
    color: #2b2620;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

ul, li {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 主题色：暖橙系（活力但不刺眼） */
:root {
    --bg-base: #fbf7f2;
    --bg-card: #ffffff;
    --bg-sidebar: #fdf5ec;
    --primary: #ff7a45;
    --primary-deep: #d4380d;
    --primary-soft: #fff2e8;
    --primary-tint: #fff7f0;
    --accent: #fa8c16;
    --accent-glow: rgba(255, 122, 69, 0.28);
    --text-main: #2b2620;
    --text-sub: #6b5d4f;
    --text-light: #a39686;
    --line: #f3e8db;
    --shadow: 0 2px 10px rgba(212, 56, 13, 0.06);
    --shadow-hover: 0 8px 22px rgba(212, 56, 13, 0.16);
    --shadow-logo: 0 4px 14px rgba(212, 56, 13, 0.22);
}

/* ============ 右上广告位 ============ */
.banner {
    position: relative;
    width: 100%;
    height: 170px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd9b3 0%, #ff7a45 100%);
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(212, 56, 13, 0.65) 0%, rgba(255, 122, 69, 0.25) 55%, rgba(255, 122, 69, 0.1) 100%);
}

/* ============ 左上角 logo 位 ============ */
.logo {
    position: absolute;
    left: 14px;
    top: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px 7px 7px;
    /* background: rgba(255, 255, 255, 0.96); */
    border-radius: 22px;
    box-shadow: var(--shadow-logo);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 3;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7a45 0%, #d4380d 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-mark svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-deep);
    letter-spacing: 0.5px;
}

.logo-tag {
    font-size: 9px;
    color: var(--text-light);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-top: 1px;
}

/* ============ 横幅文案 ============ */
.banner-text {
    position: absolute;
    left: 24px;
    bottom: 22px;
    color: #fff;
    z-index: 2;
}

.banner-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(120, 30, 5, 0.35);
}

.banner-sub {
    font-size: 13px;
    opacity: 0.95;
    letter-spacing: 1px;
    text-shadow: 0 1px 4px rgba(120, 30, 5, 0.25);
}

/* ============ 主体容器（横向：左tab顶到底 + 右上广告/下产品）============ */
.container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ============ 左侧险种分类（顶头到最上面）============ */
.sidebar {
    width: 92px;
    flex-shrink: 0;
    height: 100%;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-list {
    padding: 8px 0;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 6px;
    position: relative;
    color: var(--text-sub);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tab-item.active {
    background: var(--bg-card);
    color: var(--primary-deep);
}

.tab-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, #ff7a45 0%, #d4380d 100%);
    border-radius: 0 2px 2px 0;
}

.tab-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
    border-radius: 50%;
    background-size: 18px 18px;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

/* 分类图标 - 几何线条 SVG */
.tab-icon-all {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5d4f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='7' height='7' rx='1.2'/><rect x='14' y='3' width='7' height='7' rx='1.2'/><rect x='3' y='14' width='7' height='7' rx='1.2'/><rect x='14' y='14' width='7' height='7' rx='1.2'/></svg>");
}

.tab-icon-annuity {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5d4f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/></svg>");
}

.tab-icon-critical {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5d4f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>");
}

.tab-icon-children {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5d4f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21v-1a7 7 0 0 1 14 0v1'/></svg>");
}

.tab-icon-accident {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5d4f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2L2 22h20L12 2z'/><path d='M12 9v5'/><circle cx='12' cy='17.5' r='0.6' fill='%236b5d4f'/></svg>");
}

.tab-item.active .tab-icon {
    background-color: var(--primary-soft);
}

/* 激活态图标颜色变为深橙 */
.tab-item.active .tab-icon-all {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4380d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='7' height='7' rx='1.2'/><rect x='14' y='3' width='7' height='7' rx='1.2'/><rect x='3' y='14' width='7' height='7' rx='1.2'/><rect x='14' y='14' width='7' height='7' rx='1.2'/></svg>");
}
.tab-item.active .tab-icon-annuity {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4380d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/></svg>");
}
.tab-item.active .tab-icon-critical {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4380d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/></svg>");
}
.tab-item.active .tab-icon-children {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4380d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21v-1a7 7 0 0 1 14 0v1'/></svg>");
}
.tab-item.active .tab-icon-accident {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4380d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2L2 22h20L12 2z'/><path d='M12 9v5'/><circle cx='12' cy='17.5' r='0.6' fill='%23d4380d'/></svg>");
}

.tab-text {
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
}

/* ============ 右侧内容区（上广告位 / 下精选产品）============ */
.content {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-base);
}

/* 下方精选产品滚动区 */
.content-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 12px 24px;
}

.content-header {
    padding: 4px 4px 12px;
}

.content-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    padding-left: 10px;
}

.content-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #ff7a45 0%, #d4380d 100%);
    border-radius: 2px;
}

.content-tip {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    padding-left: 10px;
}

/* 一行两个网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ============ 产品卡片（上图下文纵向布局）============ */
.product-card {
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    border: 1px solid var(--line);
}

.product-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-hover);
}

/* 顶部封面图 - 全宽 */
.product-cover {
    width: 100%;
    height: 120px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff2e8 0%, #fff7f0 100%);
    overflow: hidden;
    position: relative;
}

.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:active .product-cover img {
    transform: scale(1.05);
}

/* 封面左上角险种角标 */
.cover-badge {
    position: absolute;
    left: 0;
    top: 0;
    padding: 3px 8px 4px;
    font-size: 10px;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ff7a45 0%, #d4380d 100%);
    border-radius: 8px 0 8px 0;
    box-shadow: 0 1px 3px rgba(212, 56, 13, 0.3);
}

/* 下方信息区 */
.product-info {
    flex: 1;
    min-width: 0;
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info-top {
    flex: 1;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 价格区 */
.product-price {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    color: var(--primary-deep);
    font-weight: 600;
    line-height: 1;
}

.price-symbol {
    font-size: 11px;
    margin-right: 1px;
}

.price-num {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.price-unit {
    font-size: 10px;
    color: var(--text-sub);
    font-weight: 400;
    margin-left: 2px;
}

/* 右侧箭头（上图下文布局隐藏）*/
.product-arrow {
    display: none;
}

/* ============ 空状态 ============ */
.empty-tip {
    text-align: center;
    padding: 60px 0;
    color: var(--text-light);
    font-size: 13px;
}

/* ============ 手机适配 ============ */
@media (max-width: 360px) {
    .banner {
        height: 120px;
    }
    .sidebar {
        width: 80px;
    }
    .product-grid {
        gap: 8px;
    }
    .product-cover {
        height: 100px;
    }
    .product-info {
        padding: 8px 8px 10px;
    }
    .product-name {
        font-size: 13px;
    }
    .banner-title {
        font-size: 22px;
    }
    .logo {
        padding: 6px 10px 6px 6px;
    }
    .logo-mark {
        width: 30px;
        height: 30px;
    }
    .logo-name {
        font-size: 13px;
    }
}

@media (min-width: 480px) {
    .banner {
        height: 160px;
    }
    .banner-title {
        font-size: 26px;
    }
}

/* 隐藏滚动条 */
.sidebar::-webkit-scrollbar,
.content-body::-webkit-scrollbar {
    width: 0;
    display: none;
}
