/* 复刻站点外壳样式：FastAdmin 原生响应式布局（PC / 平板 / 手机自适应） */

.cms-body {
    margin: 0;
    background: #fff;
}

/* ---------------- 页头 ---------------- */
.cms-header {
    position: relative;
    z-index: 999;
    width: 100%;
    background: #1b2a41;
    color: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
}

.cms-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cms-brand {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    line-height: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cms-brand img {
    max-height: 44px;
    width: auto;
    display: block;
}

/* ---------------- 导航 ---------------- */
.cms-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.cms-menu,
.cms-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cms-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.cms-menu > .cms-menu-item {
    position: relative;
}

.cms-menu > .cms-menu-item > a {
    display: block;
    padding: 0 14px;
    line-height: 64px;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.cms-menu > .cms-menu-item > a:hover,
.cms-menu > .cms-menu-item.is-open > a {
    background: rgba(255, 255, 255, .12);
}

.cms-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #22344f;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    display: none;
}

.cms-submenu a {
    display: block;
    padding: 10px 16px;
    color: #e8eef7;
    font-size: 14px;
    text-decoration: none;
}

.cms-submenu a:hover {
    background: rgba(255, 255, 255, .12);
}

@media (min-width: 993px) {
    .cms-menu-item.has-children:hover > .cms-submenu {
        display: block;
    }
}

/* 汉堡按钮 */
.cms-nav-toggle {
    display: none;
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.cms-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
}

.cms-nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.cms-nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.cms-nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- 主体 ---------------- */
/* Divi 的固定导航会给 #page-container 加顶部内边距；本站页头非固定，故归零 */
.cms-body #page-container {
    padding-top: 0 !important;
}

.cms-main {
    width: 100%;
    overflow-x: hidden;
}

.cms-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

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

.cms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px 56px;
}

/* ---------------- 分类列表 ---------------- */
.cms-cat-title {
    font-size: 28px;
    margin: 0 0 12px;
    color: #1b2a41;
}

.cms-cat-desc {
    color: #5a6b80;
    margin-bottom: 24px;
}

.cms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.cms-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
}

.cms-card:hover {
    box-shadow: 0 10px 26px rgba(20, 40, 70, .12);
    transform: translateY(-2px);
}

.cms-card-media {
    aspect-ratio: 4 / 3;
    background: #f2f5f9;
    overflow: hidden;
}

.cms-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cms-card-body {
    padding: 16px;
}

.cms-card-title {
    font-size: 17px;
    margin: 0 0 8px;
    color: #1b2a41;
    line-height: 1.35;
}

.cms-card-excerpt {
    font-size: 14px;
    color: #66788d;
    margin: 0 0 10px;
}

.cms-card-price {
    font-weight: 700;
    color: #c8102e;
}

.cms-empty {
    color: #66788d;
}

/* ---------------- 页脚 ---------------- */
.cms-footer {
    background: #16222f;
    color: #b9c6d6;
    padding: 24px 16px;
}

.cms-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 992px) {
    .cms-nav-toggle {
        display: block;
    }

    .cms-brand {
        font-size: 16px;
        line-height: 56px;
        max-width: calc(100% - 56px);
    }

    .cms-header-inner {
        min-height: 56px;
    }

    .cms-nav {
        flex: 1 1 100%;
        display: none;
    }

    .cms-nav.is-open {
        display: block;
    }

    .cms-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-bottom: 12px;
    }

    .cms-menu > .cms-menu-item > a {
        line-height: 46px;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    .cms-submenu {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(0, 0, 0, .18);
        min-width: 0;
    }

    .cms-menu-item.has-children.is-open > .cms-submenu {
        display: block;
    }

    .cms-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .cms-grid {
        grid-template-columns: 1fr;
    }

    .cms-cat-title {
        font-size: 22px;
    }
}
