/* ============================================================
   首页 V1 - 经典商务展示型（嘉轴承运 品牌视觉）
   配色：浅绿头部 #166534 / 工具条 #0F3D2E / 促销条 #1E7A4E
        琥珀金按钮 #D97706 · 白色内容区
   类名前缀 i1-（独立页面，不影响搜索页 s2- 与其他首页版本）
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #fff;
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: #333;
}

.i1-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部工具条样式已抽离到 /static/common/utility.css（公共组件） */

/* 主头栏/促销条样式已抽离到 /static/common/header.css（公共组件） */

/* ---------- Hero 大横幅 ---------- */
.i1-hero {
    background: linear-gradient(135deg, #166534 0%, #1E7A4E 55%, #2E8B57 100%);
    overflow: hidden;
}
.i1-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 56px;
    padding-bottom: 56px;
    gap: 40px;
}
.i1-hero-text { max-width: 560px; }
.i1-hero-tag {
    display: inline-block;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.3);
    color: #FDE68A;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: .5px;
}
.i1-hero-title {
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 12px;
}
.i1-hero-sub { font-size: 16px; color: rgba(255,255,255,.85); line-height: 1.7; margin-bottom: 26px; }
.i1-hero-btns { display: flex; gap: 14px; }
.i1-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: all .15s;
}
.i1-btn-gold { background: #D97706; color: #fff; box-shadow: 0 3px 10px rgba(217,119,6,.4); }
.i1-btn-gold:hover { background: #B45309; }
.i1-btn-ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.i1-btn-ghost:hover { background: rgba(255,255,255,.12); }

/* 轴承视觉（banner 右侧结构图 + 中心型号）
   图：/static/about/image/exported_image.svg（400×400 白底轴承剖面图）
   用 border-radius 把白方底裁成圆牌，避免压在绿色 banner 上突兀。
   调大小 → 改 .i1-bearing-fig / .i1-bearing-img 的 width、height；
   调位置 → 改 .i1-hero-visual 的 margin（如 margin-right 让它离边更远）。 */
.i1-hero-visual { flex-shrink: 0; }
.i1-bearing-fig {
    position: relative;
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.i1-bearing-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
/* 型号 6319 叠在轴承图心：图中心是白色内圈，故文字用品牌深绿而非白色 */
.i1-bearing-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #166534;
}

/* ---------- 区块通用 ---------- */
.i1-section { padding: 44px 0; }
.i1-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.i1-section-title {
    font-size: 24px;
    font-weight: 800;
    color: #14532D;
    position: relative;
    padding-left: 14px;
}
.i1-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: #D97706;
}
.i1-section-more { font-size: 14px; color: #2E8B57; text-decoration: none; }
.i1-section-more:hover { color: #15803D; text-decoration: underline; }

/* ---------- 产品分类 4 大类 ---------- */
.i1-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.i1-cat-card {
    display: block;
    text-align: center;
    background: #F7FBF8;
    border: 1px solid #E3E6EA;
    border-radius: 10px;
    padding: 30px 16px 26px;
    text-decoration: none;
    transition: all .18s;
}
.i1-cat-card:hover {
    border-color: #166534;
    background: #fff;
    box-shadow: 0 8px 24px rgba(22,101,52,.12);
    transform: translateY(-4px);
}
/* 分类图标：SVG 线条图（stroke 围形）用 CSS mask 渲染，
   形状来自行内变量 --ico，颜色来自 --cat-color（由 app.js 随机注入），
   未注入时回退品牌深绿。改大小 → 改 width/height。 */
.i1-cat-ico {
    display: block;
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    background-color: var(--cat-color, #166534);
    -webkit-mask: var(--ico) no-repeat center / contain;
    mask: var(--ico) no-repeat center / contain;
    transition: transform .18s;
}
.i1-cat-card:hover .i1-cat-ico { transform: scale(1.1); }
.i1-cat-card strong { display: block; font-size: 16px; font-weight: 800; color: #14532D; }
.i1-cat-card small { display: block; font-size: 12px; color: #888; margin-top: 6px; line-height: 1.5; }
/* 分类与热销之间收紧间距（顶部仍留标准 44px） */
.i1-cat-section { padding: 44px 0 0; }

/* ---------- 促销产品表格（列结构与搜索页列表一致） ---------- */
.i1-table {
    border: 1px solid #E3E6EA;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.i1-tr {
    display: grid;
    grid-template-columns: 92px 1fr 90px 62px 62px 104px 68px 118px;
    align-items: center;
    column-gap: 6px;
}
.i1-tr-head { background: #F0F6F2; border-bottom: 1px solid #DCE8E1; }
.i1-tr-head .i1-td { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #14532D; }
.i1-td {
    padding: 12px 8px;
    font-size: 13px;
    border-bottom: 1px solid #F0F2F1;
    min-width: 0;
}
.i1-item:last-child .i1-td { border-bottom: none; }
.i1-item:hover { background: #F7FBF8; }
/* 单元格内容垂直居中；产地·包装列纵向排两行 */
/* 主行各单元格等高（价格/产地两列内容两行时，其余列仍拉伸等高，下边线齐平） */
.i1-item {
    align-items: stretch; /* 覆盖 .i1-tr 的 center */
}
.i1-item .i1-td {
    display: flex;
    align-items: center;
}
.i1-item .i1-td-origin {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
/* 数量列（库存）内容统一居中：真实库存数字、「--」占位符、无货都居中显示 */
.i1-td-stock {
    justify-content: center;
    text-align: center;
}
.i1-origin-line { font-size: 13px; color: #333; line-height: 1.3; }
.i1-origin-sub { font-size: 11px; color: #999; margin-top: 2px; line-height: 1.3; }
.i1-dot {
    display: inline-block;
    width: 3px;
    height: 15px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}
.i1-item-title { font-size: 15px; font-weight: 700; color: #14532D; text-decoration: none; white-space: nowrap; }
.i1-item-title:hover { color: #D97706; text-decoration: underline; }
/* 型号超过 26 字符时换行显示 */
.i1-item-title.i1-model-long {
    white-space: normal;
    word-break: break-all;
    max-width: 100%;
}
.i1-item-desc { font-size: 12px; color: #888; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i1-stock { color: #16A34A; font-weight: 700; font-size: 14px; }
.i1-stock-out { color: #B91C1C; font-weight: 700; font-size: 13px; }
.i1-future { color: #2E8B57; font-weight: 700; font-size: 14px; }
.i1-price-now { color: #C9820A; font-weight: 800; font-size: 15px; white-space: nowrap; }
.i1-price-old { color: #999; text-decoration: line-through; font-size: 12px; margin-left: 4px; }
/* 会员 V 徽章（有折扣时紧跟划线原价；title 展示具体折扣） */
.i1-price-tag { display: inline-flex; align-items: center; justify-content: center; flex: none; margin-left: 6px; width: 16px; height: 16px; padding: 0; border-radius: 50%; background: linear-gradient(135deg, #F5C97B, #C9820A); color: #fff; font-size: 10px; font-weight: 800; line-height: 1; box-shadow: 0 1px 2px rgba(201, 130, 10, .35); white-space: nowrap; }
.i1-qty {
    width: 52px;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 6px 4px;
    text-align: center;
    font-size: 13px;
    color: #333;
    outline: none;
}
.i1-cart-btn {
    background: #D97706;
    color: #fff;
    border: none;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.i1-cart-btn:hover { background: #B45309; }
.i1-check-btn {
    background: #fff;
    color: #2E8B57;
    border: 1px solid #2E8B57;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s;
}
.i1-check-btn:hover { background: #F0F9F4; }

/* ---------- 数据统计（顶部浅色） ---------- */
.i1-stats-top { background: #EAF6F0; }
.i1-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-top: 34px;
    padding-bottom: 34px;
    text-align: center;
    gap: 16px;
}
.i1-stat strong { display: block; font-size: 32px; font-weight: 800; color: #166534; }
.i1-stat span { font-size: 14px; color: #555; }

/* ---------- 品牌墙 ---------- */
/* 合作品牌整体上移 26px，底部间距不变 */

.i1-brand-wall {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #E3E6EA;
    border-radius: 10px;
    padding: 22px 30px;
    background: #fff;
    flex-wrap: wrap;
    gap: 12px;
}
.i1-brand-item { font-size: 24px; font-weight: 800; letter-spacing: 2px; opacity: .75; }

/* ---------- 页脚（与 /search 页保持一致） ---------- */
/* 页脚已抽离到 /static/common/footer.css（.util-footer 系列），删除原 i1-footer/i1-fbenefits 等样式 */

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .i1-hero-inner { flex-direction: column; text-align: center; }
    .i1-hero-btns { justify-content: center; }
    .i1-stats-grid, .i1-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .i1-table { overflow-x: auto; }
    .i1-tr { min-width: 760px; }
    .i1-brand-wall { justify-content: center; }
}

/* ---------- 加购成功提示弹框（继续购物 / 去购物车） ---------- */
.i1-tip { position: fixed; inset: 0; z-index: 999; display: none; }
.i1-tip.on { display: block; }
.i1-tip-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 22, .45);
    backdrop-filter: blur(2px);
}
.i1-tip-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    padding: 26px 24px 22px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.i1-tip-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #2E8B57;
    color: #fff;
    font-size: 28px;
    line-height: 54px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(46, 139, 87, .3);
}
.i1-tip-title { font-size: 17px; font-weight: 700; color: #0F3D2E; margin: 0 0 6px; }
.i1-tip-desc { font-size: 13px; color: #6B7F73; margin: 0 0 18px; word-break: break-all; }
.i1-tip-ops { display: flex; gap: 10px; }
.i1-tip-btn {
    flex: 1;
    height: 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .15s;
}
.i1-tip-continue { background: #fff; color: #33423A; border: 1px solid #CBDCD0; }
.i1-tip-continue:hover { border-color: #2E8B57; color: #2E8B57; }
.i1-tip-checkout {
    background: #D97706;
    color: #fff;
    box-shadow: 0 3px 10px rgba(217, 119, 6, .3);
}
.i1-tip-checkout:hover { background: #B45309; }
