/* 中悦晨企业门户 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #333; background: #f7f8fa; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* 顶部 */
.topbar { background: #1a2b4c; color: #fff; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.logo img { height: 34px; }
.logo .en { font-size: 11px; color: #9fb2d0; font-weight: 400; letter-spacing: 2px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { padding: 6px 14px; border-radius: 4px; font-size: 15px; color: #d5deee; transition: .2s; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.12); }
.cart-link { display: flex; align-items: center; gap: 4px; color: #ffd25a; }

/* 用户区 */
.user-box { display: flex; align-items: center; gap: 10px; margin-left: 14px; }
.user-hello { color: #ffd25a; font-size: 14px; }
.user-link { color: #d5deee; font-size: 14px; padding: 6px 12px; border-radius: 4px; transition: .2s; white-space: nowrap; }
.user-link:hover { color: #fff; background: rgba(255,255,255,.12); }

/* 轮播 */
.hero { position: relative; height: 420px; overflow: hidden; background: #1a2b4c; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; display: flex; align-items: center; background-size: cover; background-position: center; }
.hero .slide.active { opacity: 1; }
.hero .slide .txt { color: #fff; padding: 0 60px; max-width: 640px; }
.hero .slide h1 { font-size: 42px; margin-bottom: 14px; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.hero .slide p { font-size: 18px; line-height: 1.8; color: #e8eef8; }
.hero .dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; }
.hero .dots i.active { background: #fff; }

/* 区块 */
.section { padding: 48px 0; }
.section-title { text-align: center; font-size: 28px; color: #1a2b4c; margin-bottom: 8px; }
.section-sub { text-align: center; color: #999; margin-bottom: 32px; font-size: 14px; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: .25s; cursor: pointer; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.card .img { height: 200px; background: #f0f2f5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px; }
.card .name { font-size: 16px; font-weight: 600; color: #1a2b4c; margin-bottom: 6px; }
.card .desc { font-size: 13px; color: #999; line-height: 1.6; height: 40px; overflow: hidden; }
.card .price { color: #e6452a; font-size: 18px; font-weight: 700; margin-top: 10px; }
.card .price small { font-size: 12px; color: #999; font-weight: 400; }

/* 按钮 */
.btn { display: inline-block; padding: 10px 22px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: .2s; }
.btn-primary { background: #2d6cdf; color: #fff; }
.btn-primary:hover { background: #2054b8; }
.btn-danger { background: #e6452a; color: #fff; }
.btn-ghost { background: transparent; border: 1px solid #2d6cdf; color: #2d6cdf; }
.btn-ghost:hover { background: #2d6cdf; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 相册墙 */
.photos { columns: 4; column-gap: 14px; }
@media (max-width: 900px) { .photos { columns: 2; } }
.photo-item { break-inside: avoid; margin-bottom: 14px; border-radius: 8px; overflow: hidden; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.08); background: #fff; }
.photo-item img { width: 100%; }
.photo-item .cap { padding: 8px 10px; font-size: 13px; color: #666; }

/* 商城 */
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shop-grid { grid-template-columns: 1fr; } }
.shop-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.shop-card .img { height: 220px; background: #f0f2f5; overflow: hidden; }
.shop-card .img img { width: 100%; height: 100%; object-fit: cover; }
.shop-card .body { padding: 14px; }
.shop-card .name { font-size: 15px; font-weight: 600; margin-bottom: 8px; height: 40px; overflow: hidden; }
.shop-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.shop-card .price { color: #e6452a; font-size: 20px; font-weight: 700; }
.shop-card .unit { color: #999; font-size: 12px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 520px; max-width: 94vw; max-height: 90vh; overflow: auto; }
.modal h3 { margin-bottom: 16px; color: #1a2b4c; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-item input, .form-item textarea, .form-item select { width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; outline: none; }
.form-item input:focus, .form-item textarea:focus { border-color: #2d6cdf; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 表格（后台） */
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.table th, .table td { border: 1px solid #eef0f4; padding: 10px 12px; text-align: left; }
.table th { background: #f5f7fb; color: #1a2b4c; white-space: nowrap; }
.table td img { width: 60px; height: 45px; object-fit: cover; border-radius: 4px; }

/* 底部 */
.footer { background: #141f35; color: #a8b4c8; padding: 40px 0 20px; margin-top: 40px; }
.footer .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 700px) { .footer .cols { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.footer p { line-height: 2; font-size: 13px; }
.footer .copy { text-align: center; border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 16px; font-size: 12px; }

/* 通用 */
.mt16 { margin-top: 16px; }
.mb16 { margin-bottom: 16px; }
.empty { text-align: center; color: #bbb; padding: 60px 0; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.tag-green { background: #e8f7ee; color: #1fa356; }
.tag-orange { background: #fdf1e3; color: #d9822b; }
.tag-red { background: #fdecea; color: #e6452a; }
