/* 内页共用组件样式：供 tailwind 模板使用（产品/服务/新闻/FAQ 等） */

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    word-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

/* 阴影卡片 */
.primary-shadow {
    box-shadow: 0 4px 20px rgba(29, 94, 93, .10);
}

/* 面包屑 */
.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "\f105";            /* fa-chevron-right */
    font-family: FontAwesome;
    margin: 0 .6rem;
    color: #9ca3af;
    font-size: .8em;
}

.breadcrumb-item:last-child > a,
.breadcrumb-item > span {
    color: #6b7280;
}

.breadcrumb-item a {
    color: #1d5e5d;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* 富文本内容（后台编辑器输出的表格/图片/列表） */
.rich-content,
.table-container,
.page-service-content {
    color: #374151;
    line-height: 1.9;
}

.rich-content table,
.table-container table,
.page-service-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: .95rem;
}

.rich-content th,
.rich-content td,
.table-container th,
.table-container td,
.page-service-content th,
.page-service-content td {
    border: 1px solid #e5e7eb;
    padding: .6rem .8rem;
    text-align: left;
    vertical-align: top;
}

.rich-content th,
.table-container th,
.page-service-content th {
    background: #f3f4f6;
    font-weight: 600;
    color: #1d5e5d;
    white-space: nowrap;
}

.rich-content img,
.table-container img,
.page-service-content img {
    height: auto;
    margin: .8rem 0;
}

.rich-content ul,
.page-service-content ul {
    list-style: disc;
    padding-left: 1.6rem;
    margin: .8rem 0;
}

.rich-content ol,
.page-service-content ol {
    list-style: decimal;
    padding-left: 1.6rem;
    margin: .8rem 0;
}

.rich-content h3,
.page-service-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d5e5d;
    margin: 1.4rem 0 .6rem;
}

/* 产品参数表 */
.product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.product-table th,
.product-table td {
    border: 1px solid #e5e7eb;
    padding: .65rem .8rem;
    text-align: left;
}

.product-table th {
    font-weight: 600;
    color: #1d5e5d;
}

.product-table td {
    word-break: break-word;
}

/* 参数表：左标题右数值 */
.attr-table th {
    width: 34%;
    background: #f9fafb;
    color: #203147;
    white-space: normal;
}

@media (max-width: 767px) {

    /* 小屏把带 data-label 的表格转为纵向卡片 */
    .product-table thead {
        display: none;
    }

    .product-table tr {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: .5rem;
        margin-bottom: .6rem;
        padding: .2rem .6rem;
    }

    .product-table td,
    .product-table th {
        display: block;
        border: 0;
        border-bottom: 1px dashed #e5e7eb;
        text-align: left;
    }

    .product-table td:last-child {
        border-bottom: 0;
    }

    .product-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #6b7280;
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .02em;
    }
}

/* 快捷导航（详情页锚点条） */
.sticky-nav {
    top: 4.5rem;
    z-index: 40;
}

.page-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.page-nav::-webkit-scrollbar {
    display: none;
}

.page-nav ul {
    display: flex;
    gap: .5rem;
    white-space: nowrap;
}

.page-nav li a {
    display: inline-block;
    padding: .45rem .9rem;
    border-radius: 9999px;
    font-size: .9rem;
    color: #374151;
    transition: .2s;
}

.page-nav li a:hover,
.page-nav li a.active {
    background: #1d5e5d;
    color: #fff;
}

/* FAQ 折叠 */
.faq-item {
    border-radius: .5rem;
    overflow: hidden;
}

.faq-question i {
    transition: transform .25s;
}

.faq-answer {
    line-height: 1.9;
}

/* 侧栏手风琴 */
.accordion-content {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height .3s ease;
}

.accordion-item.collapsed .accordion-content {
    max-height: 0;
}

.accordion-arrow {
    transition: transform .25s;
}

.accordion-item.collapsed .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-header a:hover {
    color: #1d5e5d;
}

.sidebar-container .sticky {
    position: sticky;
    top: 5rem;
}

/* 详情页产品头部 */
.service-image img {
    width: 100%;
    border-radius: .5rem;
    background: #fff;
}

/* 产品图切换 */
.gthumb {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: .35rem;
    cursor: pointer;
    padding: .2rem;
}

.gthumb.active,
.gthumb:hover {
    border-color: #1d5e5d;
}

/* 规格/价格选择 */
.spec-option {
    cursor: pointer;
}

.spec-option input:checked + span,
.spec-option.active {
    color: #1d5e5d;
    font-weight: 600;
}

.price-main {
    color: #ef4444;
    font-weight: 700;
}

/* 固定头部高度与首屏间距 */
.pt-18 {
    padding-top: 4.5rem;
}

/* 顶部下拉导航 */
#navbar .container > .flex {
    min-height: 4.5rem;
}

#navbar nav {
    align-items: center;
}

.desktop-dropdown {
    position: relative;
}

.desktop-dropdown > a {
    display: flex;
    align-items: center;
    height: 4.5rem;
}

.desktop-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 13rem;
    padding: .5rem;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: .5rem;
    box-shadow: 0 16px 36px rgba(32, 49, 71, .14);
    z-index: 60;
}

.desktop-dropdown-content > a {
    display: block;
    padding: .45rem .75rem;
    border-radius: .375rem;
    font-size: .92rem;
    color: #374151;
    white-space: nowrap;
}

.desktop-dropdown-content > a:hover {
    background: #e8f5ed;
    color: #1d5e5d;
}

.desktop-dropdown.multicolumn > .desktop-dropdown-content {
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    transform: none;
    min-width: 0;
    padding: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 .5rem .5rem;
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
}

.desktop-dropdown:hover > .desktop-dropdown-content,
.desktop-dropdown:focus-within > .desktop-dropdown-content {
    display: block;
}

.dropdown-arrow {
    transition: transform .2s;
}

.desktop-dropdown:hover .dropdown-arrow,
.mobile-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.submenu-list {
    min-width: 12rem;
}

.submenu-list a {
    display: block;
    padding: .35rem .5rem;
    font-size: .9rem;
    color: #4b5563;
    border-radius: .25rem;
}

.submenu-list a:hover {
    background: #e8f5ed;
    color: #1d5e5d;
}

/* 移动端菜单 */
#mobile-menu {
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
}

.mobile-dropdown-content {
    display: none;
}

.mobile-dropdown.open .mobile-dropdown-content {
    display: block;
}

/* 表格容器横向滚动 */
.table-container {
    overflow-x: auto;
}

/* 数量/输入框统一外观 */
.product-table input,
.product-table select {
    max-width: 100%;
}

/* 打印时隐藏导航与按钮区 */
@media print {

    .sticky-nav,
    .breadcrumb,
    .sidebar-container {
        display: none !important;
    }
}
