/* /{lang}/tool：与其它分类/单页同顶栏与版心 */

.tool-page.cat-page .cat-main {
    display: flex;
    flex-direction: column;
}

.tool-page.cat-page .cat-body.tool-page__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tool-page.cat-page .cat-body__inner.tool-page__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    /* 与 category_page.css .cat-body__inner、筛选页 filter-body-wrap 同宽 */
    max-width: 100%;
    width: var(--cat-max, 1320px);
    margin: 20px auto;
    padding: 0 10px 40px;
    min-height: min(70vh, 640px);
}

.tool-page.cat-page .tool-page__content {
    color: var(--cat-text, #333);
}

.tool-page.cat-page .tool-page__content,
.tool-page.cat-page .tool-page__content * {
    text-transform: none;
}

.tool-page__heading {
    margin: 0 0 20px;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 600;
    text-align: left;
}

.tool-page__empty {
    text-align: center;
    margin: 0;
    color: #888;
}

.tool-page__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 1100px) {
    .tool-page__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .tool-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .tool-page__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tool-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tool-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tool-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    outline: none;
}

.tool-card__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.35);
}

.tool-card__media {
    aspect-ratio: 16 / 10;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tool-card__placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e0e0e0, #f8f8f8);
}

.tool-card__body {
    padding: 16px 18px 20px;
}

.tool-card__title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.tool-card__intro {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 工具详情 /{lang}/tool/{id}.html ---------- */

.tool-page--detail.cat-page .cat-body__inner.tool-page__inner--detail {
    min-height: auto;
}

/* 与 product_detail_page / category_filter 面包屑同结构（未引入 filter 全量样式，在此对齐） */
.tool-page--detail .tool-page__breadcrumb {
    margin-top: 8px;
}

.tool-page--detail .filter-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 40px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.tool-page--detail .filter-breadcrumb__item {
    display: flex;
    align-items: center;
}

.tool-page--detail .filter-breadcrumb__item a {
    color: #333;
    text-decoration: none;
}

.tool-page--detail .filter-breadcrumb__item a:hover {
    text-decoration: none;
}

.tool-page--detail .filter-breadcrumb__sep {
    color: #666;
    font-size: 12px;
    margin: 0 6px;
}

.tool-page--detail .tool-breadcrumb__current {
    color: #333;
    font-weight: 600;
}

/* 与分类筛选白底区、新闻详情等同：占满 .cat-body__inner 版心，不再单独收窄 */
.tool-detail {
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.tool-detail__head {
    margin-bottom: 20px;
}

.tool-detail__title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 600;
    line-height: 1.3;
}

.tool-detail__media {
    margin: 0 0 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f4;
}

.tool-detail__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
}

.tool-detail__body {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

.tool-detail__intro {
    margin: 0;
    word-break: break-word;
}

.tool-detail__article {
    margin-top: 32px;
}

.tool-detail__article .tool-opamp__h2:first-child {
    margin-top: 0;
}

.tool-opamp__lead {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.65;
    color: #444;
}

.tool-opamp__h2 {
    margin: 28px 0 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
}

.tool-opamp__h3 {
    margin: 20px 0 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
}

.tool-opamp__hint {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: #666;
}

.tool-opamp__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .tool-opamp__layout {
        grid-template-columns: 1fr;
    }
}

.tool-opamp__panel {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 20px 20px 24px;
}

.tool-opamp__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

@media (max-width: 560px) {
    .tool-opamp__fields {
        grid-template-columns: 1fr;
    }
}

.tool-opamp__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-opamp__label {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.35;
}

.tool-opamp__input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.tool-opamp__input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.tool-opamp__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 16px;
}

.tool-opamp__btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #bbb;
    background: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}

.tool-opamp__btn--primary {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

.tool-opamp__btn--primary:hover {
    background: #1565c0;
}

.tool-opamp__btn:hover {
    filter: brightness(0.97);
}

.tool-opamp__rail-warn {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    font-size: 0.9rem;
    color: #6d4c41;
}

.tool-opamp__results {
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-opamp__result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.tool-opamp__result-row dt {
    margin: 0;
    font-size: 0.92rem;
    color: #555;
}

.tool-opamp__result-row dd {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1976d2;
}

.tool-opamp__figure {
    margin: 0;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.tool-opamp__figcaption {
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #444;
}

.tool-opamp__svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 240px;
}

.tool-opamp__rfq {
    margin-top: 28px;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f9ff 0%, #fafafa 100%);
    border: 1px solid rgba(25, 118, 210, 0.15);
}

.tool-opamp__link {
    font-weight: 600;
    color: #1976d2;
    text-decoration: none;
}

.tool-opamp__link:hover {
    text-decoration: underline;
}

.tool-opamp__faq {
    margin-top: 28px;
}

.tool-opamp__details {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
}

.tool-opamp__details summary {
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.tool-opamp__details[open] summary {
    margin-bottom: 8px;
}

.tool-opamp__details p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}
