/* Products & Services page */

.ps-hero {
    position: relative;
    margin-top: 132px;
    height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ps-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.ps-hero-overlay {
    position: absolute;
    inset: 0;
    background-image:url(../images/cp-bg.jpg);
  	background-size: 100% 100%;
}

.ps-hero-content {
    position: relative;
    z-index: 2;
    color: var(--dark);
}

.ps-hero-content h1 {
    font-size: 54px;
    font-weight: 700;
    color:var(--dark);
}

.ps-hero-content p {
    margin-top: 18px;
    font-size: 18px;
    color: #333;
    width: 650px;
}

/* ============ Breadcrumb + Tabs - same row (breadcrumb left / tabs right) ============ */
.ps-subbar {
    background: var(--white);
    border-bottom: 1px solid #eee;
}

.ps-subbar-inner {
    height: 60px;
    line-height: 60px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

.ps-breadcrumb {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #666;
    flex-shrink: 0;
}

.ps-breadcrumb i { margin-right: 8px; }
.ps-breadcrumb a { color: #333; }
.ps-breadcrumb a:hover { color: var(--primary); }
.ps-breadcrumb span { margin: 0 8px; }
.ps-breadcrumb .current { color: var(--primary); }

.ps-tabs {
    display: none;
    /* display: flex; */
    align-items: stretch;
    flex-shrink: 0;
}

.ps-tab-btn {
    padding: 18px 28px;
    font-size: 15px;
    color: #666;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.ps-tab-btn:hover { color: var(--primary); }
.ps-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.ps-content { display: none; }
.ps-content.active { display: block; }

/* ===== Product overview: the page's landing list =====
   The page now opens on a grid of product cards - one per second-level channel
   of "Products & Services" - instead of dropping the visitor straight into a
   product. Clicking a card swaps in that product's .ps-content block.
   The .ps-tabs buttons STAY in the DOM (css keeps them display:none) on
   purpose: js/main.js keys its deep-link logic off .ps-tab-btn and reads the
   label off it, so deleting them would break TAB_RULES and the breadcrumb. */
.ps-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.ps-product-card {
    display: block;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.ps-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.ps-product-card img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.ps-product-card h4 {
    padding: 22px 20px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #333;
    transition: var(--transition);
}

.ps-product-card:hover h4 { color: var(--primary); }

/* Back-to-list control. It lives in the subbar and is revealed only while a
   product is open. js toggles the [hidden] attribute rather than using :has()
   so that the deep-link path - which goes through js/main.js, not this page's
   own click handler - stays in sync as well. */
.ps-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    margin-left: auto;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: none;
    border: 1px solid var(--primary);
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.ps-back-btn[hidden] { display: none; }
.ps-back-btn:hover { background: var(--primary); color: #fff; }

/* Section crumb in the product breadcrumb. While a product is open it behaves
   as a link back to the list; on the list itself it IS the current page, so it
   takes the accent colour and stops being clickable. */
.ps-breadcrumb .ps-crumb-list { color: #333; }
.ps-breadcrumb .ps-crumb-list:hover { color: var(--primary); }
.ps-breadcrumb .ps-crumb-list.is-current {
    color: var(--primary);
    pointer-events: none;
}

/* Section common */
.ps-section { padding: 70px 0; }
.ps-section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: #000;
    margin-bottom: 44px;
}

/* Product detail */
.ps-product-detail { padding: 60px 0; background: var(--white); }
.ps-product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.ps-product-info h2 {
    font-size: 36px;
    color: #000;
    margin-bottom: 8px;
}

.ps-product-info .sub {
    font-size: 18px;
    color: #666;
    margin-bottom: 24px;
}

.ps-product-info p {
    font-size: 18px;
    color: #333;
    line-height: 1.9;
}

.ps-product-img img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 4px;
}

/* ============ Core Application Areas - 4 cards per row (green card ~50%, the rest ~1/6 each) ============ */
.ps-applications { background: #faf6f3; }

.ps-app-grid {
    display: grid;
    grid-template-columns: 3.33fr 1fr 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

/* ============ Diisopropylamine - 5 cards (green card ~50%, four ~1/8 each) ============ */
.ps-app-grid--5 { grid-template-columns: 2.6fr 1fr 1fr 1fr 1fr; gap: 16px; }

/* 5 列时侧卡只剩约 13.6% 宽，.ps-app-card 有 overflow:hidden，长单词会被裁掉；
   只在桌面档补偿，≤992px 交给下面的 .ps-app-grid 媒体规则接管。
   :not(.is-wide) 是必要的：悬停展开的卡同时带 .side 和 .is-wide，若不排除，
   本组规则（3 个类）会盖掉 .ps-app-card.is-wide（2 个类）的 46px 内边距和
   17px 字号，展开态反而比收拢态更挤。 */
@media (min-width: 993px) {
    .ps-app-grid--5 .ps-app-card.side:not(.is-wide) { padding: 72px 12px; }
    .ps-app-grid--5 .ps-app-card.side:not(.is-wide) h4 { font-size: 17px; }
    .ps-app-grid--5 .ps-app-card.side:not(.is-wide) p { font-size: 15px; line-height: 1.9; overflow-wrap: break-word; }
}

.ps-app-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 480px;
    padding: 72px 20px;
    text-align: center;
}

.ps-app-card .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.ps-app-card .overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.overlay-box{
  	display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.overlay-box img{
  	margin-bottom:15px;
}

.ps-app-card > *:not(.bg):not(.overlay) { position: relative; z-index: 2; }

.ps-app-card.ps-app-green { padding: 72px 46px; text-align: left; }
.ps-app-card.ps-app-green .overlay { ; background-image: url(../images/cp01.jpg); background-size: cover;}
.ps-app-card.ps-app-blue .overlay { background-image: url(../images/cp02.jpg); background-size: cover; }
.ps-app-card.ps-app-orange .overlay { background-image: url(../images/cp03.jpg); background-size: cover; }
.ps-app-card.ps-app-darkblue .overlay { background-image: url(../images/cp04.jpg); background-size: cover; }

/* Rounded square icon */
.ps-app-card i {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
    background: rgba(255,255,255,0.18);
    color: var(--white);
}

.ps-app-card h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 18px;
}

.ps-app-card p {
    font-size: 18px;
    line-height: 2;
    opacity: 0.96;
}

/* The green card's description sits in a narrow left column, leaving the background image on the right */
.ps-app-card.ps-app-green p {
    font-size: 18px;
    line-height: 2.1;
    max-width: 340px;
}

/* ============ Specifications - header row and first column: green background, white text; data rows alternate light green ============ */
.ps-specs { background: #fff; }

.ps-specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
    font-size: 18px;
}

.ps-specs-table th {
    background: var(--primary);
    color: var(--white);
    padding: 20px 14px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
}

.ps-specs-table td {
    padding: 20px 14px;
    text-align: center;
    color: #1a1a1a;
    background: #faf6f3;
}

.ps-specs-table td:first-child {
    background: var(--primary);
    color: var(--white);
    font-weight: 500;
}

.ps-specs-table tbody tr:nth-child(odd) td:not(:first-child) {
    background: #c6e192;
}

/* Manuals */
.ps-manuals {
    background: var(--primary);
    color: var(--white);
    text-align: center;
}

.ps-manuals h2 {
    font-size: 36px;
    margin-bottom: 28px;
}

.ps-manual-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.ps-manual-card {
    background: var(--white);
    color: #1a1a1a;
    padding: 18px 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.ps-manual-card:hover {
    transform: translateY(-4px);
    color: var(--primary);
}

.ps-manual-card i { font-size: 26px; color: var(--primary); }

/* Industries */
.ps-industries { background: var(--white); }
.ps-industry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ps-industry-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.ps-industry-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}

.ps-industry-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.ps-industry-card .info { padding: 20px; text-align: center; }
.ps-industry-card h4 { font-size: 20px; margin-bottom: 8px; color: #333; font-weight: 500; }
.ps-industry-card p { font-size: 18px; color: #666;text-align: left; }
.ps-product-card .card-btn-box{
    padding: 10px;
    display: none;
}
.ps-product-card .card-btn{
    margin: 0 auto;
    width: 150px;
    height: 48px;
    line-height: 48px;
    background: #49aa3d;
    text-align: center;
    color: #fff;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 992px) {
    .ps-product-card .card-btn{
        font-size: 16px;
    }
    .ps-hero-overlay{
        background-size: cover;
        background-position: 55% center;
    }
    .ps-hero { margin-top: 64px; height: auto; padding: 60px 0; }
    /* 移动端 hero 文案一律左对齐（客户要求，中英文一致）。
       .ps-hero 是 flex 容器，内容块作为 flex item 时 width:auto 会收缩成 fit-content、
       再被 .container 的 margin:0 auto 居中（中文短标题时左侧就空一大片）；
       这里显式铺满一行并清掉左右 auto 外边距，桌面不受影响（规则只在 ≤992 生效）。 */
    .ps-hero .ps-hero-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }
    .ps-hero-content h1 { font-size: 28px; }
    .ps-hero-content p { width: auto; font-size: 16px; }

    /* 移动端面包屑与「返回列表」按钮纵向堆叠：必须放开基础规则的固定
       高度与行高（height:60px / line-height:60px），否则内容会溢出这个
       60px 的盒子、压到下面的产品标题上。 */
    /* 选择器带上 .ps-subbar 是为了压过 common.css 里 .container 的 padding 简写
       （同特异性、源序在后）。左右 20px 必须保留，与 .container 的横向内边距一致。 */
    .ps-subbar .ps-subbar-inner {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        /* 移动端面包屑条统一尺寸：14px 字号 + 1.5 行高 = 21px 行盒，上下各 12px padding，
           加 1px 下边框 = 46px，与 about / contact / news / policy / rd 完全一致。
           左右 20px 必须保留，与 .container 的横向内边距一致。 */
        line-height: 1.5;
        padding: 12px 20px 12px;
        gap: 8px;
    }
    /* 只在 .ps-breadcrumb 上对齐字号/行高，不单独加 padding —— 上下留白由
       .ps-subbar-inner 统一提供，避免两层 padding 叠加把条高做高。 */
    .ps-breadcrumb {
        padding: 0;
        flex-wrap: wrap;       /* 低分辨率下「Products & Services」允许换行，不再挤出容器 */
        row-gap: 4px;
        font-size: 14px;
        line-height: 1.5;
    }
    .ps-back-btn {
        margin-left: 0;        /* 纵向排列时不能靠 auto 推右，否则会溢出 */
        align-self: flex-start;
    }
    .ps-tabs { justify-content: flex-start; overflow-x: auto; }
    .ps-tab-btn { padding: 14px 20px; font-size: 16px; }

    .ps-product-row { grid-template-columns: 1fr; }
    .ps-product-img img { height: 280px; }

    .ps-app-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .ps-app-card { min-height: 300px; padding: 28px 24px; }

    .ps-industry-grid { grid-template-columns: repeat(2, 1fr); }
    .ps-product-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    /* 移动端统一：副标题 16px、段落/内容 16px（补齐无覆盖、会继承 PC 18px 的规则） */
    .ps-product-info .sub { font-size: 16px; }
    .ps-product-info p { font-size: 16px; }
    .ps-industry-card p { font-size: 16px; }
    /* 四档字号：规格表 16、表头 16、下载按钮 16 */
    .ps-specs-table { font-size: 16px; }
    .ps-specs-table th { font-size: 16px; }
    .ps-manual-card { font-size: 16px; }
    /* 577-992 区间防继承 PC 大字号：区块标题 20、图标 20 */
    .ps-section-title { font-size: 20px; }
    .ps-product-info h2 { font-size: 20px; }
    .ps-manuals h2 { font-size: 20px; }
    .ps-app-card i { font-size: 20px; }
    .ps-manual-card i { font-size: 20px; }
    .ps-product-card h4{
        display: none;
    }
    .ps-product-card .card-btn-box{
        display: block;
    }
}

@media (max-width: 576px) {
    .ps-hero-overlay{
        background-size: cover;
        background-position: 55% center;
    }
    .ps-product-card h4{
        display: none;
    }
    .ps-product-card .card-btn-box{
        display: block;
    }
    .ps-product-card .card-btn{
        font-size: 16px;
    }
    .ps-hero-content h1 { font-size: 28px; }
    .ps-hero-content p { font-size: 16px; }

    .ps-breadcrumb { font-size: 14px; }
    .ps-breadcrumb span { margin: 0 6px; }

    .ps-section { padding: 50px 0; }
    .ps-section-title { font-size: 20px; margin-bottom: 30px; }

    .ps-app-grid { grid-template-columns: 1fr; }
    .ps-app-card { min-height: 240px; }

    .ps-specs-table { font-size: 16px; border-spacing: 3px; }
    .ps-specs-table th, .ps-specs-table td { padding: 12px 6px; }
    /* A 4-column table does not fit on narrow screens: switch to block-level horizontal scrolling so the page does not break */
    .ps-specs-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .ps-manual-grid { flex-direction: column; align-items: center; }
    .ps-industry-grid { grid-template-columns: 1fr; }
    .ps-product-grid { grid-template-columns: 1fr; gap: 18px; }
    .ps-product-card img { height: 200px; }
}
