/* ============================================================
   AllSort modern skin (mainstream e-commerce category overview)
   Scoped under body#category. Pure ASCII. Chinese via unicode.
   ============================================================ */
#category .as-modern,
#category .as-modern * { box-sizing: border-box; }

/* ---------- page tab ---------- */
#category > div.w {
    width: 1600px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}
#category #tab-link {
    height: auto;
    padding: 0;
    margin: 18px 0 16px;
    border-bottom: 1px solid #e5e5e5;
    overflow: visible;
    background: none;
    text-align: center;
}
#category #tab-link li {
    display: inline-block !important;
    float: none !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 26px 0 0 !important;
    background: none !important;
    line-height: 40px !important;
    font-size: 15px;
    font-weight: normal !important;
}
#category #tab-link li a {
    display: inline-block !important;
    float: none !important;
    height: 40px !important;
    padding: 0 2px !important;
    background: none !important;
    line-height: 40px !important;
    color: #666;
}
#category #tab-link li a:hover { color: #e1251b; }
#category #tab-link li:last-child { margin-right: 0 !important; }
#category #tab-link li.curr { background: none; }
#category #tab-link li.curr a {
    color: #e1251b;
    font-weight: 600;
    border-bottom: 2px solid #e1251b;
}

/* ---------- main container ---------- */
#category .main.as-modern {
    width: 1225px;
    margin: 10px auto 24px;
    padding: 16px;
    background: #f5f5f5;
    overflow: hidden;
}
#category .main.as-modern .cate_list { width: 100%; }
#category .as-modern #protal_list > .item_row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
}
/* legacy empty row breakers: hide so they never render blank cards */
#category .as-modern #protal_list .item_row:empty { display: none; }

/* ---------- JS masonry (natural heights, no gaps, shortest column) ---------- */
#category .as-modern #protal_list > .item_row.as-masonry {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}
#category .as-modern #protal_list > .item_row.as-masonry .masonry-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#category .as-modern #protal_list > .item_row.as-masonry .item {
    width: auto;
    margin: 0;
}

/* ---------- first-level card ---------- */
#category .as-modern .item {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .2s ease, transform .2s ease;
}
#category .as-modern .item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
}

/* card header */
#category .as-modern .item_hd {
    position: relative;
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 22px;
    border-bottom: 1px solid #f0f0f0;
}
#category .as-modern .item_hd::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    margin-right: 10px;
    border-radius: 2px;
    background: #e1251b;
}
#category .as-modern .item_hd h3 {
    font: 600 18px/1.2 "Microsoft YaHei", Arial, sans-serif;
    margin: 0;
}
#category .as-modern .item_hd h3 a { color: #333; }
#category .as-modern .item_hd h3 a:hover { color: #e1251b; }
#category .as-modern .item_hd .icon_line { display: none; }
#category .as-modern .item_hd .as-more {
    margin-left: auto;
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}
#category .as-modern .item_hd .as-more::after {
    content: "\67e5\770b\5168\90e8 >";
}
#category .as-modern .item_hd .as-more:hover { color: #e1251b; }

/* ---------- card body ---------- */
#category .as-modern .item_bd { padding: 6px 22px 14px; }
#category .as-modern .item_bd dl {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    margin: 0;
    border: 1px solid transparent;
    border-top: 1px dashed #eee;
    border-radius: 4px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
#category .as-modern .item_bd dl:first-child { border-top: 0; }
#category .as-modern .item_bd dl:hover {
    background: #fdf2f2;
    border-color: #e1251b;
    border-top-color: #e1251b;
    box-shadow: 0 0 0 1px rgba(225,37,27,.15);
}
#category .as-modern .item_bd dl:first-child:hover { border-top-color: #e1251b; }
#category .as-modern .item_bd dt {
    flex: 0 0 108px;
    width: 108px;
    padding: 2px 12px 0 0;
    font: 600 13px/20px "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    text-align: left;
}
#category .as-modern .item_bd dd {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
    line-height: 24px;
}
#category .as-modern .item_bd dd a {
    display: inline-block;
    margin: 0 18px 4px 0;
    color: #666;
    font-size: 13px;
    line-height: 20px;
    transition: color .15s ease;
}
#category .as-modern .item_bd dd a:hover { color: #e1251b; }
#category .as-modern .item_bd dd .pipe { display: none; }

/* ---------- width alignment ---------- */
#category.wrap_1280 .main.as-modern { width: 1225px; }
#category.wrap_1600 .main.as-modern { width: 1600px; }
