* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif; font-size: 14px; color: #333; background: #fff; line-height: 1.6; }
a { text-decoration: none; color: #333; }
a:hover { color: #c00; }
ul, ol { list-style: none; }
img { max-width: 100%; border: none; display: block; }
.container { width: 1200px; margin: 0 auto; }

/* 顶部导航 */
.site-header { background: #fff; border-bottom: 1px solid #eee; }
.header-inner { width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { font-size: 26px; font-weight: bold; color: #333; display: flex; align-items: center; }
.logo a { color: #333; display: flex; align-items: center; }
.logo .logo-img { height: 52px; width: auto; border-radius: 10px; display: block; transform: rotate(-8deg); box-shadow: 0 3px 10px rgba(0,0,0,.15); transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease; }
.logo span { position: relative; z-index: 1; }
.logo a:hover .logo-img { transform: rotate(0deg) scale(1.08); box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.main-nav ul { display: flex; gap: 10px; }
.main-nav li a { display: block; padding: 8px 24px; font-size: 16px; color: #333; border-radius: 20px; transition: all 0.3s; }
.main-nav li a:hover, .main-nav li a.active { background: #333; color: #fff; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; width: 24px; height: 3px; background: #333; margin: 4px 0; }

/* 主体布局 */
.site-main { width: 1200px; margin: 20px auto; display: flex; gap: 20px; }
.sidebar { width: 220px; flex-shrink: 0; }
.main-content { flex: 1; min-width: 0; }

/* 侧边栏模块 */
.sidebar-box { margin-bottom: 20px; border: 1px solid #eee; }
.sidebar-title { background: #333; color: #fff; padding: 10px 15px; font-size: 16px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
.sidebar-title a { color: #fff; font-size: 13px; font-weight: normal; }
.sidebar-list li { border-bottom: 1px dashed #ddd; }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list li a { display: block; padding: 10px 15px; font-size: 14px; color: #333; transition: all 0.3s; }
.sidebar-list li a:hover { background: #f5f5f5; color: #c00; padding-left: 20px; }
.sidebar-list li a.active { color: #c00; font-weight: bold; }

/* 横幅 */
.banner { position: relative; margin-bottom: 20px; overflow: hidden; width: 100%; }
.banner img { width: 100%; height: 320px; object-fit: cover; display: block; }
.banner-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,180,180,0.85); color: #fff; padding: 12px 40px; font-size: 24px; font-weight: bold; white-space: nowrap; }

/* 区块标题 */
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.section-title h2 { font-size: 18px; color: #333; }
.section-title .more { font-size: 14px; color: #666; }
.section-title .more:hover { color: #c00; }

/* 产品网格 */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.product-card { border: 1px solid #eee; padding: 10px; transition: all 0.3s; background: #fff; min-width: 0; }
.product-card:hover { border-color: #c00; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.product-card .product-img { width: 204px; height: 180px; margin: 0 auto 10px; overflow: hidden; background: #f5f5f5; border: 1px solid #ddd; }
.product-card .product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-card .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999; font-size: 14px; }
.product-card h3 { font-size: 14px; color: #333; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card h3 .product-id { color: #999; font-size: 12px; font-weight: normal; }
.product-card .price { color: #c00; font-size: 16px; font-weight: bold; margin-bottom: 4px; }
.product-card .market-price { color: #999; font-size: 12px; text-decoration: line-through; margin-bottom: 10px; }
.product-card .btn-buy { display: block; width: 100%; padding: 8px; background: #333; color: #fff; text-align: center; font-size: 14px; border: none; cursor: pointer; transition: background 0.3s; }
.product-card .btn-buy:hover { background: #c00; }

/* 产品详情 */
.breadcrumb { padding: 10px 0; margin-bottom: 15px; font-size: 13px; color: #666; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #c00; }
.detail-layout { display: flex; gap: 30px; }
.detail-gallery { width: 400px; flex-shrink: 0; }
.main-image { width: 400px; height: 400px; border: 1px solid #eee; overflow: hidden; margin-bottom: 10px; background: #f5f5f5; }
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.main-image .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999; }
.thumb-list { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-item { width: 70px; height: 70px; border: 2px solid #eee; cursor: pointer; overflow: hidden; }
.thumb-item:hover { border-color: #c00; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-info h1 { font-size: 24px; color: #333; margin-bottom: 15px; }
.detail-id { color: #999; font-size: 14px; margin-bottom: 10px; }
.detail-price { color: #c00; font-size: 28px; font-weight: bold; margin-bottom: 15px; }
.detail-cat { color: #666; margin-bottom: 20px; }
.detail-content { border-top: 1px solid #eee; padding-top: 20px; }
.detail-content h3 { font-size: 18px; margin-bottom: 15px; color: #333; }
.detail-content p { color: #666; line-height: 1.8; }

/* 分页 */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 30px; }
.pagination a { display: inline-block; padding: 6px 12px; border: 1px solid #ddd; color: #333; font-size: 14px; }
.pagination a:hover, .pagination a.active { background: #333; color: #fff; border-color: #333; }

/* 页面标题 */
.page-header { background: #f5f5f5; padding: 30px 0; margin-bottom: 20px; }
.page-header h1 { font-size: 24px; color: #333; }

/* 关于/联系页面 */
.about-content, .contact-content { background: #fff; padding: 30px; border: 1px solid #eee; }
.about-content h2, .contact-content h2 { font-size: 20px; margin-bottom: 20px; color: #333; }
.about-content p, .contact-content p { margin-bottom: 15px; color: #666; line-height: 1.8; }
.about-content ul { margin-left: 20px; margin-bottom: 20px; }
.about-content li { margin-bottom: 8px; color: #666; list-style: disc; }
.contact-item { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px dashed #eee; }
.contact-item:last-child { border-bottom: none; }
.contact-item h3 { font-size: 16px; color: #333; margin-bottom: 8px; }

/* 新闻列表 */
.news-list li { padding: 12px 0; border-bottom: 1px dashed #eee; display: flex; justify-content: space-between; align-items: center; }
.news-list li:last-child { border-bottom: none; }
.news-list li a { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.news-list li a:hover { color: #c00; }
.news-list li .date { color: #999; font-size: 12px; margin-left: 15px; flex-shrink: 0; }
.news-detail { background: #fff; padding: 30px; border: 1px solid #eee; }
.news-detail h1 { font-size: 24px; color: #333; margin-bottom: 15px; text-align: center; }
.news-detail .news-meta { text-align: center; color: #999; font-size: 13px; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.news-detail .news-body { color: #666; line-height: 1.8; }

/* 后台样式 */
.admin-body { background: #f5f5f5; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 200px; background: #333; color: #fff; flex-shrink: 0; }
.admin-logo { padding: 20px; font-size: 18px; font-weight: bold; border-bottom: 1px solid #444; }
.admin-logo a { color: #fff; }
.admin-nav ul { padding: 10px 0; }
.admin-nav li a { display: block; padding: 12px 20px; color: #ccc; font-size: 14px; transition: all 0.3s; }
.admin-nav li a:hover { background: #444; color: #fff; }
.admin-content { flex: 1; padding: 20px; min-width: 0; }
.admin-page { background: #fff; padding: 20px; border-radius: 4px; }
.admin-page h1 { font-size: 20px; margin-bottom: 20px; color: #333; }
.page-title-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.btn { display: inline-block; padding: 8px 20px; background: #333; color: #fff; border: none; cursor: pointer; font-size: 14px; border-radius: 4px; transition: background 0.3s; }
.btn:hover { background: #c00; color: #fff; }
.btn-sm { display: inline-block; padding: 4px 10px; background: #333; color: #fff; font-size: 12px; border-radius: 3px; margin-right: 5px; }
.btn-sm:hover { background: #c00; color: #fff; }
.btn-danger { background: #c00; }
.btn-danger:hover { background: #900; }
.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.admin-table th, .admin-table td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
.admin-table th { background: #f5f5f5; font-weight: bold; color: #333; }
.admin-form .form-group { margin-bottom: 15px; }
.admin-form label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; font-size: 14px; }
.admin-form input[type="text"], .admin-form input[type="number"], .admin-form select, .admin-form textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; font-family: inherit; }
.admin-form textarea { resize: vertical; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .form-group { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #f5f5f5; padding: 20px; border-radius: 4px; text-align: center; }
.stat-card h3 { font-size: 14px; color: #666; margin-bottom: 10px; }
.stat-num { font-size: 32px; font-weight: bold; color: #333; }
.admin-actions { display: flex; gap: 10px; }
.image-manage { margin-top: 30px; padding-top: 30px; border-top: 1px solid #eee; }
.image-manage h2 { font-size: 18px; margin-bottom: 20px; color: #333; }
.upload-form { background: #f5f5f5; padding: 20px; border-radius: 4px; margin-bottom: 20px; }
.upload-form .tips { color: #999; font-size: 12px; margin-top: 10px; }
.image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.image-item { border: 1px solid #eee; padding: 10px; text-align: center; }
.image-wrap { position: relative; width: 100%; height: 150px; overflow: hidden; margin-bottom: 10px; background: #f5f5f5; }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.main-tag { position: absolute; top: 5px; left: 5px; background: #c00; color: #fff; padding: 2px 8px; font-size: 12px; border-radius: 3px; }
.image-actions { display: flex; gap: 5px; justify-content: center; }
.no-data { text-align: center; color: #999; padding: 30px; grid-column: 1 / -1; }

/* 登录页 */
.login-body { background: #f5f5f5; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 360px; }
.login-box h2 { text-align: center; margin-bottom: 30px; color: #333; }
.login-box .form-group { margin-bottom: 20px; }
.login-box label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; }
.login-box input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.login-box .btn { width: 100%; padding: 12px; font-size: 16px; }
.error-msg { background: #fef0f0; color: #c00; padding: 10px; border-radius: 4px; margin-bottom: 20px; text-align: center; font-size: 14px; }

/* 底部 */
.site-footer { background: #333; color: #ccc; padding: 30px 0; margin-top: 40px; }
.footer-inner { width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-info h3 { color: #fff; font-size: 16px; margin-bottom: 15px; }
.footer-info p { margin-bottom: 8px; font-size: 13px; color: #999; }
.footer-bottom { width: 1200px; margin: 20px auto 0; padding-top: 20px; border-top: 1px solid #444; text-align: center; font-size: 12px; color: #666; }
.footer-bottom p { margin-bottom: 5px; }

/* 响应式 */
@media (max-width: 1200px) {
    .container, .header-inner, .site-main, .footer-inner, .footer-bottom { width: 100%; padding: 0 15px; }
}
@media (max-width: 768px) {
    .header-inner { height: 60px; flex-wrap: wrap; }
    .logo { font-size: 20px; }
    .logo .logo-img { height: 40px; transform: rotate(-6deg); }
    .menu-toggle { display: block; }
    .main-nav { width: 100%; display: none; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li a { padding: 12px 15px; border-radius: 0; }
    .site-main { flex-direction: column; }
    .main-content { order: 1; }
    .sidebar { order: 2; width: 100%; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { flex-direction: column; }
    .detail-gallery { width: 100%; }
    .main-image { width: 100%; height: 300px; }
    .stats-grid { grid-template-columns: 1fr; }
    .image-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .banner-text { font-size: 16px; padding: 8px 20px; }
}


/* 管理员入口 */
.admin-entry { text-align: center; margin: 40px 0 20px; padding: 20px 0; border-top: 1px solid #eee; }
.admin-link { display: inline-block; padding: 8px 30px; background: #f5f5f5; color: #999; font-size: 13px; border-radius: 4px; transition: all 0.3s; }
.admin-link:hover { background: #333; color: #fff; }


/* footer 管理员入口 */
.admin-entry-link { color: #666; font-size: 12px; margin-left: 15px; text-decoration: none; transition: color 0.3s; }
.admin-entry-link:hover { color: #fff; text-decoration: underline; }
.admin-msg { background: #e8f5e9; color: #2e7d32; padding: 10px 15px; margin-bottom: 15px; border-radius: 4px; }
.admin-subtitle { margin: 20px 0 10px; font-size: 16px; color: #333; }
.banner-list { display: flex; flex-wrap: wrap; gap: 15px; margin: 10px 0 20px; }
.banner-item { border: 1px solid #eee; padding: 10px; text-align: center; background: #fafafa; border-radius: 4px; }
.banner-item img { width: 240px; height: 64px; object-fit: cover; display: block; margin-bottom: 8px; border: 1px solid #ddd; background: #fff; }
.banner-item-name { font-size: 12px; color: #888; margin-bottom: 8px; word-break: break-all; }
.radio-label { display: inline-block; margin-right: 20px; font-weight: normal; cursor: pointer; }
.btn-danger { background: #e53935; color: #fff; padding: 6px 14px; border-radius: 4px; text-decoration: none; display: inline-block; font-size: 13px; }
.btn-danger:hover { background: #c62828; color: #fff; }

/* ===== 手机端响应式补充（不影响电脑端 1200px 固定布局） ===== */
@media (max-width: 768px) {
    .header-inner { width: 100% !important; padding: 0 10px !important; height: auto !important; min-height: 56px !important; box-sizing: border-box !important; }
    .main-nav.open { background: #fff; border-top: 1px solid #eee; }
    .main-nav.open ul { padding-bottom: 10px; }
    .main-nav.open li a { border-bottom: 1px dashed #eee; }
    .site-main { width: 100% !important; margin: 10px auto !important; flex-direction: column !important; gap: 10px !important; padding: 0 10px !important; box-sizing: border-box !important; }
    .sidebar { width: 100% !important; }
    .banner { height: 200px !important; margin-bottom: 10px !important; }
    .banner-text { font-size: 14px !important; padding: 6px 14px !important; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .product-card { padding: 8px !important; }
    .product-card .product-img { width: 100% !important; height: 0 !important; padding-top: 88.235% !important; position: relative !important; }
    .product-card .product-img img { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; }
    .product-card h3 { font-size: 13px !important; }
    .section-title h2 { font-size: 16px !important; }
    .footer-inner, .footer-bottom { width: 100% !important; padding: 0 15px !important; box-sizing: border-box !important; }
}

/* 富文本内容展示（后台编辑器产出） */
.detail-content-body, .news-body, .about-content { line-height: 1.9; }
.detail-content-body img, .news-body img, .about-content img { max-width: 100%; border-radius: 6px; }
.detail-content-body video, .news-body video, .about-content video { max-width: 100%; border-radius: 8px; background: #000; }
.detail-content-body table, .news-body table, .about-content table { border-collapse: collapse; max-width: 100%; }
.detail-content-body td, .detail-content-body th, .news-body td, .news-body th, .about-content td, .about-content th { border: 1px solid #ccc; padding: 6px 10px; }

.pagination .page-ellipsis { padding: 5px 10px; color: #999; }

/* 微信二维码 */
.footer-contact { display: flex; align-items: center; gap: 18px; }
.footer-contact .contact-text { flex: 1; min-width: 0; }
.footer-contact .contact-text p { margin-bottom: 8px; word-break: break-all; }
.footer-contact .contact-qr img { width: 110px; height: 110px; object-fit: contain; background: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 10px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.15); flex-shrink: 0; }
.wechat-qr-big img { max-width: 200px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px; background: #fff; }
