/* =========================================================
   前台 V2 默认主题
   后续换风格，只需要新增 theme/xxx/css/site.css
   ========================================================= */

:root {
    --site-width: 1200px;
    --header-height: 130px;

    --logo-width: 200px;
    --logo-height: 130px;

    --top-banner-width: 1000px;
    --top-banner-height: 130px;

    --slider-width: 1200px;
    --slider-height: 500px;

    --main-green: #65b600;
    --main-green-dark: #4e9700;
    --main-green-light: #eaf7df;

    --text-color: #333;
    --muted-color: #777;
    --border-color: #e5e5e5;
    --body-bg: #f6ffe8;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    color: var(--text-color);
    background: var(--body-bg);
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    border: 0;
    vertical-align: middle;
}

.site-wrap {
    width: var(--site-width);
    margin: 0 auto;
}

/* ================= 顶部 ================= */

.site-header {
    width: var(--site-width);
    height: var(--header-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #fff;
    overflow: hidden;
}

.site-logo {
    width: var(--logo-width);
    height: var(--logo-height);
    flex: 0 0 var(--logo-width);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-logo img {
    width: var(--logo-width);
    height: var(--logo-height);
    object-fit: contain;
    display: block;
}

.site-top-banner {
    width: var(--top-banner-width);
    height: var(--top-banner-height);
    flex: 0 0 var(--top-banner-width);
    overflow: hidden;
}

.site-top-banner img {
    width: var(--top-banner-width);
    height: var(--top-banner-height);
    object-fit: cover;
    display: block;
}

/* ================= 菜单 ================= */

.site-nav-wrap {
    width: 100%;
    background: var(--main-green);
}

.site-nav {
    width: var(--site-width);
    height: 42px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
}

.site-nav-item {
    position: relative;
    min-width: 90px;
}

.site-nav-link {
    display: block;
    height: 42px;
    line-height: 42px;
    padding: 0 18px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
}

.site-nav-item:hover > .site-nav-link,
.site-nav-link.active {
    background: var(--main-green-dark);
}

.site-subnav {
    display: none;
    position: absolute;
    left: 0;
    top: 42px;
    min-width: 150px;
    background: var(--main-green);
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,.18);
}

.site-subnav a {
    display: block;
    height: 38px;
    line-height: 38px;
    padding: 0 16px;
    color: #fff;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,.18);
}

.site-subnav a:hover {
    background: var(--main-green-dark);
}

.site-nav-item:hover .site-subnav {
    display: block;
}

/* ================= 首页轮播 ================= */

.site-slider {
    width: var(--slider-width);
    height: var(--slider-height);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: #eee;
}

.site-slider img {
    width: var(--slider-width);
    height: var(--slider-height);
    object-fit: cover;
    display: block;
}

.site-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 58px;
    line-height: 58px;
    text-align: center;
    font-size: 34px;
    color: #fff;
    background: rgba(0,0,0,.35);
    cursor: pointer;
    user-select: none;
    z-index: 10;
    border-radius: 4px;
}

.site-slider-btn:hover {
    background: rgba(0,0,0,.55);
}

.site-slider-prev {
    left: 14px;
}

.site-slider-next {
    right: 14px;
}

.site-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center;
    z-index: 11;
}

.site-slider-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    background: rgba(255,255,255,.75);
    cursor: pointer;
}

.site-slider-dots span.active {
    background: var(--main-green);
}

/* ================= 主体 ================= */

.site-main {
    width: var(--site-width);
    margin: 0 auto;
    background: #fff;
    padding: 16px 0 24px 0;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    padding: 0 16px;
}

.home-left {
    min-width: 0;
}

.home-right {
    min-width: 0;
}

.module {
    border: 1px solid var(--border-color);
    background: #fff;
    margin-bottom: 16px;
}

.module-title {
    height: 36px;
    line-height: 36px;
    background: var(--main-green);
    color: #fff;
    padding: 0 14px;
    font-weight: bold;
}

.module-body {
    padding: 12px;
    line-height: 1.8;
}

/* ================= 底部 ================= */

.site-footer {
    width: 100%;
    background: var(--main-green);
    color: #fff;
    margin-top: 20px;
}

.site-footer-inner {
    width: var(--site-width);
    margin: 0 auto;
    padding: 18px 0;
    text-align: center;
    line-height: 1.8;
}

/* ================= 响应式 ================= */

@media (max-width: 1220px) {
    :root {
        --site-width: 100%;
        --top-banner-width: calc(100vw - var(--logo-width));
        --slider-width: 100%;
    }

    .site-wrap,
    .site-header,
    .site-nav,
    .site-main,
    .site-footer-inner {
        width: 100%;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   第71步：统一 V2 首页版心，正文边框与 Banner 完全对齐
   ========================================================= */

/* 统一所有核心版心 */
.site-wrap,
.site-header,
.site-nav,
.site-slider,
.site-main,
.site-footer-inner {
    width: var(--site-width);
    margin-left: auto;
    margin-right: auto;
}

/* 正文主区域本身保持 1200 宽，不再左右缩进 */
.site-main {
    width: var(--site-width);
    padding: 16px 0 24px 0;
    background: #fff;
    box-sizing: border-box;
}

/* 首页正文网格取消左右 padding，让模块外框与 Banner 边线对齐 */
.home-grid {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    box-sizing: border-box;
}

/* 左右内容栏不要再额外缩进 */
.home-left,
.home-right {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 模块外框贴齐 1200 版心左右边界 */
.module {
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

/* 保证滚动 Banner 严格 1200 */
.site-slider {
    width: var(--site-width);
    height: var(--slider-height);
    margin: 0 auto;
}

/* 底部内部内容也严格 1200 */
.site-footer-inner {
    width: var(--site-width);
    box-sizing: border-box;
}

/* 小屏幕时保持响应式 */
@media (max-width: 1220px) {
    .site-wrap,
    .site-header,
    .site-nav,
    .site-slider,
    .site-main,
    .site-footer-inner {
        width: 100%;
    }

    .home-grid {
        grid-template-columns: 1fr;
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* =========================================================
   第75.1步：栏目页两种展示样式
   article = 文章列表式
   product = 产品展示式
   ========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 0;
    padding: 0;
}

.product-card {
    border: 1px solid var(--border-color);
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

.product-card-img {
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    overflow: hidden;
}

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

.product-card-title {
    padding: 10px 12px;
    line-height: 1.6;
    min-height: 48px;
    font-size: 14px;
    color: var(--text-color);
}

.product-card-title a:hover {
    color: var(--main-green-dark);
}

.product-card-date {
    padding: 0 12px 12px 12px;
    color: var(--muted-color);
    font-size: 12px;
}

@media (max-width: 1220px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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


/* =========================================================
   第75.2步：V2 产品详情页样式
   ========================================================= */

.product-detail-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    padding: 28px 32px;
    box-sizing: border-box;
}

.product-detail-cover {
    border: 1px solid var(--border-color);
    background: #fafafa;
    padding: 10px;
}

.product-detail-cover img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
}

.product-detail-info {
    min-width: 0;
}

.product-detail-info-title {
    font-size: 24px;
    line-height: 1.5;
    font-weight: bold;
    color: #222;
    margin-bottom: 12px;
}

.product-detail-meta {
    color: var(--muted-color);
    font-size: 13px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}

.product-detail-content {
    line-height: 2;
    font-size: 15px;
}

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

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        padding: 18px;
    }
}


/* =========================================================
   第79步：春绿风格
   说明：当前 V2 模板设为“春绿”，框架颜色沿用旧模板绿色体系
   ========================================================= */

:root {
    --site-width: 1200px;
    --header-height: 130px;

    --logo-width: 200px;
    --logo-height: 130px;

    --top-banner-width: 1000px;
    --top-banner-height: 130px;

    --slider-width: 1200px;
    --slider-height: 500px;

    --main-green: #65b600;
    --main-green-dark: #4e9700;
    --main-green-light: #eaf7df;

    --text-color: #333;
    --muted-color: #777;
    --border-color: #d6e8c4;
    --body-bg: #f6ffe8;
}

body {
    background: var(--body-bg) !important;
}

.site-nav-wrap,
.site-footer,
.module-title,
.column-sidebar-title,
.column-content-title {
    background: var(--main-green) !important;
}

.site-nav-item:hover > .site-nav-link,
.site-nav-link.active,
.site-subnav a:hover,
.detail-back a:hover {
    background: var(--main-green-dark) !important;
}

.site-main,
.module,
.column-content,
.column-sidebar,
.detail-panel,
.product-card {
    border-color: var(--border-color) !important;
}
