/* ========== 顶部固定区域 ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ========== 顶部标题栏 ========== */
.topbar-title {
    width: 1200px;
    margin: 0 auto;
    height: 45px;
    color: #059e53;
    font-size: 30px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    font-weight: bold;
    line-height: 45px;
}
.topbar-title .smtext1 {
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.smtext2 {
    font-size: 12px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}

/* ========== 搜索栏 ========== */
.search-bar {
    background: #059e53;
    padding: 0 0 5px 0;
    margin-bottom: 5px;
}
.search-bar-inner {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.search-label {
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    color: #333;
    white-space: nowrap;
}
.search-form-inline {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    max-width: 500px;
}
.search-select {
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 3px 0 0 3px;
    outline: none;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    color: #333;
    background: #fafafa;
    cursor: pointer;
}
.search-select:focus {
    border-color: #059e53;
    background: #f0faf6;
}
.search-input-inline {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 0;
    outline: none;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.search-input-inline:focus {
    border-color: #059e53;
    background: #f0faf6;
}
.search-btn-inline {
    height: 36px;
    padding: 0 24px;
    background: #059e53;
    border: 1px solid #059e53;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.search-btn-inline:hover { background: #047a40; }
.search-bar-link {
    color: #059e53;
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
    margin-left: auto;
}
.search-bar-link:hover { text-decoration: underline; color: #047a40; }

/* ========== 主内容区域 ========== */
.main-content {
    width: 1200px;
    margin: 0 auto;
    padding: 5px 0;
    min-height: 500px;
}

/* ========== 45大类标签栏（三行×15个） ========== */
.fldh {
    width: 1200px;
    overflow: hidden;
    background: #e0fff0;
    border: 1px solid #059e53;
    padding: 4px 0px;
    border-radius: 4px;
    line-height:24px;
    margin: 0 auto;
}
.fldh-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}
.fldh-link {
    display: block;
    width: 80px;
    text-align: center;
    padding: 4px 0;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.fldh-link:hover { color: #c00000; text-decoration: underline; }
.fldh-link.active { color: #059e53; font-weight: bold; }

/* ========== 分类卡片 ========== */
.selector-layout {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    scroll-margin-top: 230px;
}

/* 左侧：群组列表 */
.group-list {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid #ddd;
    background: #fafafa;
    position: sticky;
    top: 230px;
    align-self: flex-start;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}
.group-list-title {
    padding: 12px 15px;
    background: #059e53;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    position: sticky;
    top: 0;
    z-index: 2;
}
.group-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.group-item:hover {
    background: #e8f0ff;
}
.group-item.active {
    background: #07bd64;
    color: #fff;
}
.group-item .group-main-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
}
.group-item.active .group-main-link { color: #fff; }
.group-item .group-code {
    color: #059e53;
    font-weight: bold;
    flex-shrink: 0;
}
.group-item.active .group-code { color: #ffcc00; }
.group-item .group-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.group-item .group-count {
    flex-shrink: 0;
    font-size: 12px;
    color: #999;
}
.group-item.active .group-count { color: #a8c4e8; }

/* 右侧：商品列表 */
.goods-list {
    flex: 1;
    padding: 15px 20px;
}
.goods-list-title {
    font-size: 16px;
    font-weight: bold;
    color: #059e53;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0fff0;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}

/* 商品选择项 */
.goods-section {
    margin-bottom: 20px;
}
.goods-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #e0fff0;
    margin-bottom: 8px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
/* 商品段落样式（与 simiaotmclass/pages/class_detail.php 对齐） */
.goods-paragraph {
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 33px;
    margin: 8px 0;
    padding: 0 8px;
}
.goods-paragraph:empty { display: none; }

/* 子群组标题（一、二、三...） */
.sub-group-title {
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    color: #059e53;
    font-weight: bold;
    margin: 14px 0 4px;
    padding: 0 8px;
    border-left: 3px solid #059e53;
}

/* C编号商品段落 */
.unnormal-items {
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    color: #c00000;
    line-height: 33px;
    margin: 8px 0;
    padding: 6px 8px;
    background: #fff5ee;
    border-left: 3px solid #e0fff0;
}

/* 商品项（段落内内联，root 风格） */
.goods-item {
    display: inline;
    cursor: pointer;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    color: #333;
    padding: 1px 2px;
    border-radius: 2px;
    transition: background 0.1s;
}
.goods-item:hover {
    background: #fff3cc;
}
.goods-item.selected {
    background: #059e53;
    color: #fff;
}
.goods-item.selected::before {
    content: '✓';
    margin-right: 3px;
    font-weight: bold;
}
.goods-item.selected font,
.goods-item.selected .item-code { color: #ffcc00; }
.goods-item.unnormal { color: #c00000; }
.goods-item.unnormal:hover { background: #fff0e0; }
.goods-item.unnormal.selected { background: #c00000; color: #fff; }

/* ========== 商品项（chip 模式 - 用于 goods-items 区块） ========== */
.goods-items {
    line-height: 38px;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.goods-item-chip {
    display: inline-block;
    font-size: 16px;
    padding: 3px 8px;
    margin: 2px 4px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    transition: all 0.15s;
    background: #fff;
    color: #333;
}
.goods-item-chip:hover { border-color: #059e53; background: #e8f0ff; }
.goods-item-chip.selected { background: #059e53; color: #fff; border-color: #059e53; }
.goods-item-chip .item-code { color: #c00000; margin-left: 4px; font-size: 16px; }
.goods-item-chip.selected .item-code { color: #ffcc00; }
.goods-item-chip.unnormal { background: #fff5ee; border-color: #e0fff0; color: #c00000; }
.goods-item-chip.unnormal .item-code { color: #e0fff0; }
.goods-item-chip.unnormal.selected { background: #c00000; color: #fff; }

/* ========== root 风格段落样式（与 simiaotmclass/assets/css/main.css 对齐） ========== */
.sbflnr {
    padding: 8px 12px;
    line-height: 32px;
    font-size: 16px;
}
.sbflnr p {
    margin: 6px 0;
    line-height: 33px;
    word-break: break-all;
}
.sbflcnipa {
    margin: 10px 0 6px;
    padding-top: 8px;
    border-top: 1px dashed #d2e1f1;
}
.sbflcnipa h5 {
    font-size: 16px;
    font-weight: bold;
    color: #dc143c;
    margin-bottom: 4px;
}
.sbflcnipa p {
    font-size: 16px;
    color: #555;
    line-height: 33px;
    word-break: break-all;
}

/* ========== 已选小类浮窗 ========== */
.cart-btn {
    position: fixed;
    right: 30px;
    bottom: 80px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #059e53;
    color: #fff;
    text-align: center;
    line-height: 60px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    display: none;
}
.cart-btn.show { display: block; }
.cart-btn .cart-num {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #c00;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 22px;
}

/* 弹出层 */
.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}
.dialog-overlay.show { display: block; }
.dialog-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    max-width: 90%;
    max-height: 80vh;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 2001;
    overflow: hidden;
}
.dialog-header {
    padding: 15px 20px;
    background: #059e53;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dialog-header .close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #a8c4e8;
    line-height: 1;
}
.dialog-header .close-btn:hover { color: #fff; }
.dialog-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}
.dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}
.dialog-footer .btn {
    padding: 8px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    margin-left: 10px;
}
.btn-copy {
    background: #059e53;
    color: #fff;
}
.btn-copy:hover { background: #047a40; }
.btn-close {
    background: #999;
    color: #fff;
}
.btn-close:hover { background: #777; }

/* 已选列表 */
.selected-cls {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.selected-cls-header {
    padding: 10px 15px;
    background: #f5f5f5;
    font-weight: bold;
    color: #059e53;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    display: flex;
    justify-content: space-between;
}
.selected-cls-header .cls-actions {
    font-size: 12px;
    font-weight: normal;
}
.selected-cls-header .cls-actions a {
    margin-left: 10px;
    color: #059e53;
    cursor: pointer;
    text-decoration: none;
}
.selected-cls-header .cls-actions a:hover { text-decoration: underline; }
.selected-cls-body {
    padding: 10px 15px;
    line-height: 28px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    font-size: 16px;
}
.selected-item {
    display: inline-block;
    padding: 2px 8px;
    background: #059e53;
    color: #fff;
    border-radius: 3px;
    margin: 2px 4px;
    font-size: 16px;
    cursor: pointer;
}
.selected-item:hover {
    background: #c00;
}
.selected-item .s-code { color: #ffcc00; margin-left: 3px; }

/* ========== 搜索结果页 ========== */
.search-result {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.search-result-header {
    padding: 12px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    color: #333;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.search-result-header strong { color: #e0fff0; }
.search-table {
    width: 100%;
    border-collapse: collapse;
}
.search-table th {
    background: #f5f5f5;
    padding: 10px 15px;
    text-align: left;
    font-weight: bold;
    color: #666;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.search-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.search-table tr:hover td { background: #f8f8ff; }
.search-table .cls-link {
    color: #059e53;
    font-weight: bold;
    text-decoration: none;
}
.search-table .cls-link:hover { color: #e0fff0; }
.search-table .item-name {
    cursor: pointer;
    color: #333;
}
.search-table .item-name:hover { color: #e0fff0; }
.search-table .item-name.selected { color: #059e53; font-weight: bold; }
.search-table .code-col { color: #c00000; font-size: 16px; white-space: nowrap; }

/* ========== 搜索结果页（大类外框） ========== */
.search-group-block {
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    background: #fff;
}
.search-group-block:last-child {
    border-bottom: none;
}
.search-group-title {
    padding: 8px 15px 8px 2.5em;
    font-size: 16px;
    font-weight: bold;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    background: #fbfbfb;
    border-bottom: 1px solid #ebebeb;
}
.search-result-info {
    padding: 12px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    color: #333;
}
.search-cls-frame {
    border: 2px solid #059e53;
    border-radius: 6px;
    margin-bottom: 20px;
    background: #fff;
    overflow: hidden;
}
.search-cls-frame-title {
    padding: 10px 15px;
    background: #059e53;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.search-cls-block {
    border: 1px solid #d2e1f1;
    margin-bottom: 10px;
    background: #fff;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
}
.search-cls-title {
    padding: 10px 15px;
    border-bottom: 1px solid #ebebeb;
    background: #fbfbfb;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.sbflnr2 {
    padding: 10px 15px 10px 2.5em;
    font-size: 16px;
    line-height: 32px;
    color: #333;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    word-break: break-all;
}
.search-item {
    cursor: pointer;
    padding: 1px 3px;
    border-radius: 3px;
    transition: background 0.15s;
}
.search-item:hover {
    background: #e0fff0;
}
.search-item.selected {
    background: #059e53;
    color: #fff;
}
.search-item.selected::before {
    content: '✓';
    margin-right: 3px;
    font-weight: bold;
}
.search-item.selected .s-code {
    color: #a8c4e8;
}
.search-item .s-code {
    color: #c00000;
    font-size: 16px;
}
.search-pager {
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

/* ========== 空结果 ========== */
.empty-result {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.empty-result .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}
.empty-result p { font-size: 16px; }

/* ========== 提示信息 ========== */
.tip-bar {
    padding: 8px 15px;
    background: #fff8e6;
    border: 1px solid #e0fff0;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #b8f0d8;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.tip-bar strong { color: #c00; }

/* ========== 首页两栏布局 ========== */
.cls-block {
    width: 100%;
    border: 1px solid #d2e1f1;
    margin-bottom: 12px;
    scroll-margin-top: 230px;
    background: #fff;
}
.cls-title {
    padding: 10px 15px;
    border-bottom: 1px solid #ebebeb;
    background: #fbfbfb;
    line-height: 34px;
}
.cls-title a {
    text-decoration: none;
    color: #059e53;
    font-size: 16px;
    font-weight: bold;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.cls-title a:hover {
    color: #c00000;
}
.cls-body {
    display: flex;
    padding: 10px;
}
.cls-left {
    width: 60%;
    padding: 10px;
    font-size: 16px;
    line-height: 34px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.cls-left a {
    color: #059e53;
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
}
.cls-left a:hover {
    color: #c00000;
}
.cls-right {
    width: 40%;
    padding: 10px;
    color: #666;
    font-size: 16px;
    line-height: 30px;
    border-left: 1px solid #eee;
}
.cls-notes {
    margin-bottom: 10px;
}
.cls-notes b {
    color: #059e53;
    font-size: 16px;
}
.cls-tip a {
    color: #059e53;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}
.cls-tip a:hover { text-decoration: underline; }
.cls-datasource {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.cls-comment-section {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}
.cls-comment-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}
.cls-comment-item {
    padding-left: 8px;
    color: #888;
}

/* ========== 底部 ========== */
.footer {
    width:100%;
    background: #059e53;
    color: #fff;
    padding: 3px 0;
    margin-top: 5px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
}
.footer-inner {
    width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.footer-links {
    margin-bottom: 0px;
}
.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 1px;
    font-size: 12px;
}
.footer-links a:hover { color: #fff; }
.footer-copy {
    font-size: 12px;
    line-height: 14px;
    color: #fff;
}
