/* ============ 门户前台样式（铭鼎科技） ============ */
:root {
    --md-primary: #4361ee;
    --md-primary-dark: #324bc4;
    --md-primary-soft: rgba(67, 97, 238, .08);
    --md-ink: #1f2733;
    --md-sub: #6b7785;
    --md-line: #e8ecf2;
    --md-bg: #f5f7fb;
    --md-radius: 14px;
    --md-shadow: 0 6px 24px rgba(31, 39, 51, .08);
    --md-shadow-hover: 0 14px 40px rgba(67, 97, 238, .18);
}

body {
    background: var(--md-bg);
    color: var(--md-ink);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* 顶部 Hero */
.portal-hero {
    background: linear-gradient(135deg, #4361ee 0%, #5b73f0 45%, #7c5cf0 100%);
    color: #fff;
    padding: 58px 0 64px;
    position: relative;
    overflow: hidden;
}
.portal-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, .12);
    border-radius: 50%;
}
.portal-hero::before {
    content: "";
    position: absolute;
    left: -60px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
}
.portal-hero .container { position: relative; z-index: 2; }
.portal-hero h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: .5px;
}
.portal-hero p {
    font-size: 15px;
    opacity: .92;
    margin: 0 0 26px;
    max-width: 560px;
}
.portal-search {
    display: flex;
    max-width: 620px;
    background: #fff;
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--md-shadow);
}
.portal-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 20px;
    font-size: 15px;
    background: transparent;
    color: var(--md-ink);
}
.portal-search button {
    border: none;
    background: var(--md-primary);
    color: #fff;
    padding: 11px 30px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.portal-search button:hover { background: var(--md-primary-dark); }

/* 主体布局 */
.portal-main { padding: 30px 0 50px; }
.portal-resultbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--md-sub);
    font-size: 14px;
}
.portal-kw {
    background: var(--md-primary-soft);
    color: var(--md-primary);
    padding: 3px 12px;
    border-radius: 999px;
}
.portal-kw a { color: var(--md-primary); margin-left: 6px; text-decoration: none; }

/* 分类侧栏 */
.portal-cat { border: none; box-shadow: var(--md-shadow); border-radius: var(--md-radius); overflow: hidden; }
.portal-cat .panel-heading {
    background: #fff;
    font-weight: 700;
    border-bottom: 1px solid var(--md-line);
    padding: 14px 16px;
}
.portal-cat .list-group-item {
    border: none;
    border-bottom: 1px solid var(--md-line);
    padding: 0;
}
.portal-cat .list-group-item > a {
    display: block;
    padding: 12px 16px;
    color: var(--md-ink);
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.portal-cat .list-group-item > a:hover { background: var(--md-primary-soft); color: var(--md-primary); }
.portal-cat .list-group-item.active > a { background: var(--md-primary); color: #fff; font-weight: 600; }
.portal-cat-sub { list-style: none; margin: 0; padding: 0 0 6px 14px; background: #fafbfe; }
.portal-cat-sub li > a { padding: 8px 16px; font-size: 13px; color: var(--md-sub); }
.portal-cat-sub li.active > a { color: var(--md-primary); font-weight: 600; }

/* 产品卡片网格 */
.portal-grid { margin: 0 -10px; }
.portal-card {
    background: #fff;
    border-radius: var(--md-radius);
    box-shadow: var(--md-shadow);
    margin: 10px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    height: calc(100% - 20px);
}
.portal-card:hover { transform: translateY(-4px); box-shadow: var(--md-shadow-hover); }
.portal-card-img {
    display: block;
    height: 160px;
    background: linear-gradient(135deg, #f3f6ff, #eef1f8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.portal-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 14px;
}
.portal-card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.portal-card-title { font-size: 16px; margin: 0 0 4px; font-weight: 700; }
.portal-card-title a { color: var(--md-ink); text-decoration: none; }
.portal-card-title a:hover { color: var(--md-primary); }
.portal-card-en { font-size: 12px; color: var(--md-sub); margin: 0 0 8px; height: 18px; overflow: hidden; }
.portal-card-meta { font-size: 12px; color: var(--md-sub); margin: 0 0 6px; }
.portal-card-price { font-size: 15px; color: var(--md-primary); font-weight: 700; margin: 0 0 14px; }
.portal-card-actions { margin-top: auto; display: flex; gap: 8px; }
.portal-card-actions .btn { flex: 1; border-radius: 8px; }
.portal-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
}
.portal-badge.hot { background: #fff1e6; color: #e8590c; }
.portal-badge.new { background: #e6fcf5; color: #0ca678; }

/* 分页 */
.portal-pager { margin-top: 26px; text-align: center; }
.portal-pager .pagination { margin: 0; }
.portal-pager .pagination > li > a,
.portal-pager .pagination > li > span {
    border: none;
    margin: 0 3px;
    border-radius: 8px;
    color: var(--md-ink);
}
.portal-pager .pagination > .active > a { background: var(--md-primary); color: #fff; }

/* ============ 产品详情 ============ */
.portal-detail { background: #fff; border-radius: var(--md-radius); box-shadow: var(--md-shadow); padding: 26px; margin-bottom: 24px; }
.portal-breadcrumb { font-size: 13px; color: var(--md-sub); margin-bottom: 18px; }
.portal-breadcrumb a { color: var(--md-sub); text-decoration: none; }
.portal-breadcrumb a:hover { color: var(--md-primary); }
.portal-detail-head { display: flex; gap: 26px; flex-wrap: wrap; }
.portal-detail-img {
    width: 220px;
    height: 220px;
    flex: 0 0 220px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f3f6ff, #eef1f8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.portal-detail-img img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 16px; }
.portal-detail-info { flex: 1; min-width: 240px; }
.portal-detail-info h1 { font-size: 24px; margin: 0 0 6px; }
.portal-detail-en { color: var(--md-sub); margin: 0 0 14px; }
.portal-tags { margin-bottom: 16px; }
.portal-prop-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.portal-prop-table td { padding: 9px 12px; border-bottom: 1px solid var(--md-line); font-size: 14px; vertical-align: top; }
.portal-prop-table td:first-child { color: var(--md-sub); width: 130px; background: #fafbfe; }
.portal-detail-actions { margin-top: 22px; display: flex; gap: 12px; }
.portal-detail-actions .btn { padding: 10px 28px; border-radius: 10px; font-weight: 600; }
.portal-section { background: #fff; border-radius: var(--md-radius); box-shadow: var(--md-shadow); padding: 22px 26px; margin-bottom: 24px; }
.portal-section h2 { font-size: 18px; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--md-primary); }

/* 同类推荐 */
.portal-related { display: flex; gap: 14px; flex-wrap: wrap; }
.portal-related-item {
    width: calc(25% - 11px);
    min-width: 150px;
    border: 1px solid var(--md-line);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--md-ink);
    transition: box-shadow .2s, transform .2s;
}
.portal-related-item:hover { box-shadow: var(--md-shadow-hover); transform: translateY(-3px); }
.portal-related-item img { width: 100%; height: 110px; object-fit: contain; background: #f3f6ff; padding: 10px; }
.portal-related-item .t { padding: 10px 12px; font-size: 13px; }
.portal-related-item .t b { display: block; font-weight: 600; margin-bottom: 2px; }

/* ============ 询价表单 ============ */
.portal-form-wrap { max-width: 720px; margin: 0 auto; background: #fff; border-radius: var(--md-radius); box-shadow: var(--md-shadow); padding: 30px 34px; }
.portal-form-wrap h1 { font-size: 22px; margin: 0 0 6px; }
.portal-form-wrap .sub { color: var(--md-sub); margin: 0 0 24px; font-size: 14px; }
.portal-form .form-group { margin-bottom: 18px; }
.portal-form label { font-weight: 600; font-size: 14px; margin-bottom: 6px; display: block; }
.portal-form label .req { color: #e03131; margin-left: 3px; }
.portal-form .form-control {
    border: 1px solid var(--md-line);
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.portal-form .form-control:focus { border-color: var(--md-primary); box-shadow: 0 0 0 3px var(--md-primary-soft); outline: none; }
.portal-form .help { font-size: 12px; color: var(--md-sub); margin-top: 5px; }
.portal-form .row { display: flex; gap: 16px; }
.portal-form .row > div { flex: 1; }
.portal-form .btn-submit {
    background: var(--md-primary);
    color: #fff;
    border: none;
    padding: 12px 0;
    width: 100%;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background .2s;
}
.portal-form .btn-submit:hover { background: var(--md-primary-dark); }
.portal-picked {
    background: var(--md-primary-soft);
    border: 1px solid #d6defb;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}
.portal-picked img { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; }
.portal-picked b { color: var(--md-primary); }

/* 成功提示 */
.portal-success { text-align: center; padding: 40px 20px; }
.portal-success .icon { font-size: 56px; color: #0ca678; }
.portal-success h2 { margin: 16px 0 8px; }
.portal-success p { color: var(--md-sub); margin: 0 0 22px; }

@media (max-width: 767px) {
    .portal-hero { padding: 38px 0 44px; }
    .portal-hero h1 { font-size: 23px; }
    .portal-search { flex-direction: column; border-radius: 16px; padding: 10px; }
    .portal-search input { padding: 10px 14px; }
    .portal-search button { width: 100%; margin-top: 8px; }
    .portal-detail-img { width: 100%; height: 200px; flex: none; }
    .portal-form .row { flex-direction: column; gap: 0; }
    .portal-related-item { width: calc(50% - 7px); }
}
