/* ============================================================
   Roadpreme — IE 10 / IE 11 兼容补丁
   ------------------------------------------------------------
   说明：
   1) 本文件被所有浏览器加载，但全部规则都包在
      “-ms-high-contrast” 媒体查询里，只有 IE10/IE11 会命中，
      Chrome / Firefox / Safari / Edge 一律忽略。
   2) IE 不支持 CSS 变量、CSS Grid、flex 的 gap、object-fit、
      position:sticky、inset 等特性，这里统一给出等价实现：
      - Grid   -> flexbox(-ms-flexbox) + 百分比宽度/外边距
      - gap    -> 子元素 margin
      - sticky -> 保持静态定位
   3) 保留未加前缀的 flex 属性，方便在 Chrome 中模拟验证布局。
   ============================================================ */

@media screen and (-ms-high-contrast: none), screen and (-ms-high-contrast: active) {

    /* ============ 一、颜色/边框/图片硬兜底（不依赖渐变与变量） ============ */

    /* 顶部横幅、CTA：IE 若丢弃渐变时用纯色，保证白字可读 */
    .page-hero {
        background: #e87722;
    }
    .cta-band {
        background: #ef8435;
    }

    /* 所有按钮：明确底色 + 明确描边，杜绝"白底白字" */
    .btn-orange,
    .btn-quote,
    .form-card button[type=submit],
    .search-page-form button {
        background: #e87722;
        color: #ffffff;
        border: 1px solid #cf6514;
        text-align: center;
    }
    .btn-light {
        background: #ffffff;
        color: #062a49;
        border: 1px solid #c2cfdc;
    }
    .btn-ghost {
        background: transparent;
        color: #ffffff;
        border: 1px solid #ffffff;
    }
    .btn-outline {
        background: #ffffff;
        color: #062a49;
        border: 1px solid #062a49;
    }

    /* 卡片/表单/图片框：边框加深（IE 没有柔和的阴影过渡，浅边线会"消失"） */
    .product-card,
    .quality-card,
    .category-card,
    .form-card,
    .gallery-main,
    .gallery-item,
    .side-box,
    .article-card,
    .news-item {
        border-color: #aebdcc !important;
    }
    .product-card {
        border: 1px solid #aebdcc;
    }
    .product-card:hover {
        border-color: #8fa4b8;
        box-shadow: 0 4px 12px rgba(6, 42, 73, .14);
    }

    /* ============ 二、详情页图片列宽约束（修 IE10 百分比 flex-basis 失效） ============ */
    .product-detail > .product-gallery {
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: 47%;
        max-width: 47%;
        overflow: hidden;
    }
    .gallery-main {
        display: block;             /* 不用 flex，避免 IE 把图片按原始尺寸拉伸 */
        height: 440px;
        min-height: 0;
        padding: 0;
        line-height: 440px;         /* 图片垂直居中 */
        text-align: center;
        overflow: hidden;
    }
    .gallery-main img {
        display: inline-block;
        width: auto;
        height: auto;
        max-width: 420px;           /* 图片最大 420×420，方图即 420 见方 */
        max-height: 420px;
        vertical-align: middle;
    }
    .gallery-item img {
        max-width: 100%;
        width: auto;
    }

    /* ============ 三、表单文字对比度 ============ */
    .form-item input[type=text],
    .form-item input[type=email],
    .form-item input[type=tel],
    .form-item input[type=number],
    .form-item input[type=date],
    .form-item textarea,
    .form-item select {
        background: #ffffff;
        color: #1c2733;
        border: 1px solid #b0bccb;
    }
    .form-item label,
    .form-radios label.inline {
        color: #062a49;
    }
    .form-tip {
        color: #4d5c6b;
    }

/* ---------------- 顶部条 ---------------- */
.topbar-inner {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

/* ---------------- 页头 ---------------- */
.header-inner {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
}
.logo {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}
.main-nav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    margin-left: 32px;          /* 代替 gap:32px */
}
.main-nav a {
    margin-left: 26px;          /* 代替 gap:26px */
}
.main-nav a:first-child {
    margin-left: 0;
}
.header-tools {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
}
.header-tools .search-mini,
.header-tools .btn-quote {
    margin-left: 12px;
}
.search-mini {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
}
.btn-quote,
.btn-light,
.btn-ghost,
.btn-outline {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* ---------------- Hero ---------------- */
.hero {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
}
.hero-actions {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.hero-actions a {
    margin: 0 14px 14px 0;
}
.hero-points {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.hero-points span {
    margin-right: 28px;
}

/* ---------------- 四宫格特性条（grid -> flex） ---------------- */
.feature-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    background: #ffffff;
    -ms-transform: translateY(-46px);
    transform: translateY(-46px);
}
.feature-item {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 25%;
    width: 25%;
    box-sizing: border-box;
    margin-left: -1px;
    border-left: 1px solid #dfe5ec;
    border-bottom: 1px solid #dfe5ec;
}
.feature-item:first-child {
    border-left: 0;
}

/* ---------------- 通用栏目标题 ---------------- */
.section-head {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: end;
    align-items: flex-end;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

/* ---------------- 产品网格（3 栏 / 间距 20px） ---------------- */
.product-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: stretch;
    align-items: stretch;       /* 同一行卡片等高 */
}
.product-grid > .product-card {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 31.2%;
    margin: 0 2.7% 26px 0;
}
.product-grid > .product-card:nth-child(3n) {
    margin-right: 0;
}
.product-card {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
}
.product-thumb,
.gallery-main,
.gallery-item {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}
/* IE 无 object-fit，改用等比显示 */
.product-thumb img,
.gallery-main img,
.gallery-item img {
    width: auto;
    max-width: 100%;
    max-height: 100%;
}
/* 注意：样式表里 .product-body 有 align-items:start（原本给 Grid 用），
   IE 忽略 Grid 但会保留该值，竖排时必须改回 stretch 否则内容不撑满 */
.product-body {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    -ms-flex-align: stretch;
    align-items: stretch;
}
.product-desc {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}
.product-foot {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

/* ---------------- 分类大图（首页 images/style.css） ---------------- */
.site-header {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
}
nav ul {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
nav ul li {
    margin-left: 30px;          /* 代替 gap:30px */
}
nav ul li:first-child {
    margin-left: 0;
}
.hero-banner {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: end;
    align-items: flex-end;
    -ms-flex-pack: center;
    justify-content: center;
}
.category-section {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
}
.category-section > .category-text,
.category-section > .category-image {
    -ms-flex: 0 0 47%;
    flex: 0 0 47%;
    width: 47%;
    min-width: 0;
}
/* 偶数列左右交替 */
.category-section:nth-child(even) .category-text {
    -ms-flex-order: 2;
    order: 2;
}
.category-section:nth-child(even) .category-image {
    -ms-flex-order: 1;
    order: 1;
}
.category-image {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}
/* IE 无 object-fit：改为等比缩放 */
.product-img-link img {
    height: auto;
    max-height: 250px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}
.product-info {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* ---------------- 关于 / 数据 ---------------- */
.about-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
}
.about-grid > .about-media {
    -ms-flex: 0 0 47%;
    flex: 0 0 47%;
    width: 47%;
    margin-right: 6%;
}
.about-grid > .about-text {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}
.about-stats {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.about-stats > * {
    margin-right: 34px;
}
.check-list {
    display: block;
}
.check-list li {
    margin-bottom: 10px;
}

/* ---------------- 品质 / 新闻 / 卡片区 ---------------- */
.quality-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.quality-grid > .quality-card {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 31.2%;
    margin: 0 2.7% 26px 0;
}
.quality-grid > .quality-card:nth-child(3n) {
    margin-right: 0;
}
.news-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.news-list {
    display: block;
}
.news-item {
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 18px;
}
.news-date {
    -ms-flex: 0 0 56px;
    flex: 0 0 56px;
    margin-right: 22px;
}
.news-aside {
    display: block;
}
.aside-contact {
    display: block;
}
.aside-contact > * {
    margin-bottom: 14px;
}

/* ---------------- 列表 / 详情双栏 ---------------- */
.content-layout,
.article-layout,
.form-layout {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: start;
    align-items: flex-start;
}
.content-layout > .content-main,
.article-layout > .article-detail,
.form-layout > .form-card {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}
.content-layout > .sidebar,
.article-layout > .sidebar {
    -ms-flex: 0 0 320px;
    flex: 0 0 320px;
    width: 320px;
    margin-left: 50px;
}
.form-layout > .form-aside {
    -ms-flex: 0 0 330px;
    flex: 0 0 330px;
    width: 330px;
    margin-left: 48px;
}
.post-list {
    display: block;
}
.post-item {
    display: -ms-flexbox;
    display: flex;
}
.post-date {
    -ms-flex: 0 0 76px;
    flex: 0 0 76px;
    margin-right: 26px;
}
.sidebar {
    display: block;
}
.side-box,
.side-cta {
    margin-bottom: 22px;
}
.side-cats li,
.side-latest li {
    display: block;
}

/* 分页 */
.pagelist ul {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: center;
    align-items: center;
}
.pagelist li {
    margin-right: 8px;
}
.pagelist li a,
.pagelist li.current {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* ---------------- 文章详情 ---------------- */
.article-meta {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.article-meta span {
    margin-right: 18px;
}
.prev-next {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.prev-next > a,
.prev-next > span {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 47.5%;
    box-sizing: border-box;
}
.prev-next > a:first-child,
.prev-next > span:first-child {
    margin-right: 5%;
}

/* ---------------- 产品详情 ---------------- */
.product-detail {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: start;
    align-items: flex-start;
}
.product-detail > .product-gallery {
    -ms-flex: 0 0 47%;
    flex: 0 0 47%;
    width: 47%;
    position: static;           /* IE 不支持 sticky */
}
.product-detail > .product-info {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 5%;
}
.detail-gallery {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.detail-gallery > .gallery-item {
    margin: 0 10px 10px 0;
}
.price-row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: baseline;
    align-items: baseline;
}
.price-big {
    margin-right: 14px;
}
.product-actions {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.product-actions > * {
    margin: 0 12px 12px 0;
}
.product-assurance {
    display: block;
}
.product-assurance > span {
    display: block;
    margin-bottom: 8px;
}
.product-body.container {
    display: block;             /* 详情页下半部分单列即可 */
}

/* ---------------- 分类封面 ---------------- */
.category-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.category-grid > .category-card {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 31.2%;
    margin: 0 2.7% 26px 0;
}
.category-grid > .category-card:nth-child(3n) {
    margin-right: 0;
}

/* ---------------- 搜索 / 表单 ---------------- */
.search-page-form {
    display: -ms-flexbox;
    display: flex;
}
.search-page-form input {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}
.form-radios {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.form-radios label {
    margin: 0 18px 6px 0;
}
.step-list {
    display: block;
}
.step-list > li {
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 16px;
}
.step-list > li > span {
    -ms-flex: 0 0 26px;
    flex: 0 0 26px;
    margin-right: 14px;
}
.filter-note {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-pack: justify;
    justify-content: space-between;
}
.subcat-nav > a {
    margin: 0 10px 10px 0;      /* 代替内联 gap:10px */
}

/* ---------------- CTA / 页脚 ---------------- */
.cta-inner {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.cta-actions {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.cta-actions > * {
    margin: 0 12px 12px 0;
}
.footer-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.footer-grid > .footer-brand {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 22%;
}
.footer-grid > .footer-col {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 15.2%;
}
.footer-grid > .footer-col:last-child {
    width: 19%;
}
.footer-grid > div {
    margin-right: 3%;
    margin-bottom: 26px;        /* 代替 Grid 的行间距 */
}
.footer-grid > div:last-child {
    margin-right: 0;
}
/* 页脚换成白字透明版 logo，IE 里不再需要垫白底 */
.footer-bottom-inner {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

/* ---------------- 首页/其它页的分页条 ---------------- */
.product_pages {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}
.product_pages li {
    margin-right: 8px;
}
.footer-nav {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-pack: center;
    justify-content: center;
}
.footer-nav a {
    margin: 0 15px;
}

}

/* ---------------- 响应式断点（IE10/11 同样生效，用组合条件避免 @media 嵌套） ---------------- */
@media screen and (-ms-high-contrast: none) and (max-width: 1024px),
       screen and (-ms-high-contrast: active) and (max-width: 1024px) {
    .feature-item {
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        width: 50%;
    }
    .product-grid > .product-card,
    .quality-grid > .quality-card,
    .category-grid > .category-card {
        width: 47.5%;
        margin-right: 4.5%;
    }
    .product-grid > .product-card:nth-child(3n),
    .quality-grid > .quality-card:nth-child(3n),
    .category-grid > .category-card:nth-child(3n) {
        margin-right: 4.5%;
    }
    .product-grid > .product-card:nth-child(2n),
    .quality-grid > .quality-card:nth-child(2n),
    .category-grid > .category-card:nth-child(2n) {
        margin-right: 0;
    }
    .about-grid,
    .product-detail,
    .content-layout,
    .article-layout,
    .form-layout {
        display: block;
    }
    .about-grid > .about-media,
    .product-detail > .product-gallery {
        width: 100%;
        margin: 0 0 34px;
    }
    .product-detail > .product-info {
        width: 100%;
        margin-left: 0;
    }
    .content-layout > .sidebar,
    .article-layout > .sidebar,
    .form-layout > .form-aside {
        width: 100%;
        margin: 34px 0 0;
    }
    .footer-grid > .footer-brand,
    .footer-grid > .footer-col,
    .footer-grid > .footer-col:last-child {
        width: 30.33%;
        margin-right: 3%;
    }
}

@media screen and (-ms-high-contrast: none) and (max-width: 720px),
       screen and (-ms-high-contrast: active) and (max-width: 720px) {
    .header-inner {
        display: block;
    }
    .main-nav {
        display: none;
        margin-left: 0;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav a {
        display: block;
        margin-left: 0;
    }
    .product-grid > .product-card,
    .quality-grid > .quality-card,
    .category-grid > .category-card {
        width: 100%;
        margin: 0 0 18px;
    }
    .section-head {
        display: block;
    }
    .category-section {
        display: block;
        padding: 30px 5%;
    }
    .category-section > .category-text,
    .category-section > .category-image {
        width: 100%;
    }
    .category-section > .category-image {
        margin-top: 18px;
    }
    nav ul {
        justify-content: center;
    }
    nav ul li {
        margin: 0 14px;
    }
    .hero-banner {
        height: 360px;
        display: block;
        padding-top: 240px;
    }
    .hero-text {
        font-size: 24px;
        text-align: center;
    }
    .footer-grid > .footer-brand,
    .footer-grid > .footer-col,
    .footer-grid > .footer-col:last-child {
        width: 43%;
        margin-right: 6%;
    }
}
