* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
body {
    background-color: #f8faff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 131, 255, 0.15);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.divider {
    height: 3px;
    background: #0083FF;
    box-shadow: 0 3px 10px rgba(0, 131, 255, 0.25);
    width: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #0b2b4a;
    font-weight: 700;
    font-size: 1.4rem;
    white-space: nowrap;
    cursor: pointer;
}
.logo i {
    color: #0083FF;
    font-size: 2rem;
}
.logo span {
    color: #0083FF;
}
.logo .sub {
    font-weight: 400;
    font-size: 0.85rem;
    color: #3a5f7a;
    margin-left: 4px;
}
.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-menu li {
    position: relative;
}
.nav-menu li a {
    text-decoration: none;
    color: #1f2f3f;
    font-weight: 500;
    padding: 6px 0;
    display: inline-block;
    position: relative;
    transition: color 0.3s;
}
.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0083FF;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}
.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    color: #0083FF;
}
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: #1f2f3f;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px 0;
        justify-content: center;
    }
    .logo {
        order: 1;
        margin: 0 auto 8px;
        font-size: 1.2rem;
        width: 100%;
        justify-content: center;
    }
    .logo i {
        font-size: 1.6rem;
    }
    .menu-toggle {
        display: none !important;
    }
    .nav-menu {
        display: flex !important;
        flex-direction: row;
        width: 100%;
        order: 2;
        background: #fff;
        padding: 0 0 12px 0;
        gap: 0;
        border-top: none;
        justify-content: space-around;
    }
    .nav-menu li {
        text-align: center;
        flex: 1;
        position: relative;
    }
    .nav-menu li a {
        display: inline-block;
        padding: 8px 4px;
        font-size: 0.9rem;
        border-bottom: none;
        position: relative;
    }
    .nav-menu li a::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: #0083FF;
        border-radius: 2px;
        transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .nav-menu li a.active::after {
        width: 100%;
    }
    .nav-menu li a.animate::after {
        width: 100% !important;
        transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .divider {
        display: block;
        height: 3px;
        background: #0083FF;
        box-shadow: 0 3px 10px rgba(0, 131, 255, 0.25);
        width: 100%;
        flex-shrink: 0;
    }
}

@media (min-width: 769px) {
    .divider {
        display: block;
    }
}

/* ============================================================
   通用标题
   ============================================================ */
.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0b2b4a;
    margin-bottom: 24px;
    border-left: 6px solid #0083FF;
    padding-left: 16px;
}
.section-title i {
    margin-right: 8px;
}

/* ============================================================
   首页
   ============================================================ */
.hero-section {
    max-width: 1280px;
    margin: 32px auto 20px;
    padding: 0 24px;
    flex: 1;
}
.hero-grid-wrapper {
    max-width: 1280px;
    margin: 0 auto;
}
.home-row {
    width: 100%;
}
.home-row:last-child {
    margin-bottom: 0;
}
.home-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}
.hero-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 80, 160, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 80, 160, 0.12);
}
.hero-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #eef4fa;
}
.hero-card .card-text {
    padding: 20px 22px 24px;
    flex: 1;
}
.hero-card .card-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0b2b4a;
    margin-bottom: 6px;
}
.hero-card .card-text p {
    color: #2f4a62;
    line-height: 1.6;
}
.hero-card .card-text .empty-hint {
    color: #ccc;
    font-style: italic;
}
.empty-home-tip {
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
    background: #fff;
    border-radius: 20px;
    border: 2px dashed #d0ddee;
}
.empty-home-tip i {
    font-size: 4rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 16px;
}
.empty-home-tip p {
    font-size: 1.1rem;
    color: #7f9ab3;
}
.empty-home-tip .sub-tip {
    font-size: 0.9rem;
    color: #b0c4d8;
    margin-top: 8px;
}

/* ============================================================
   前台 - 产品列表
   ============================================================ */
.products-section {
    max-width: 1280px;
    margin: 32px auto 20px;
    padding: 0 24px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 80, 160, 0.12);
}
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #eef4fa;
}
.product-card .product-info {
    padding: 16px 20px 20px;
}
.product-card .product-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0b2b4a;
    margin-bottom: 4px;
}
.product-card .product-info p {
    color: #5b7a95;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   前台 - 产品详情
   ============================================================ */
.product-detail-section {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 24px;
}
.product-detail .detail-header {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.product-detail .detail-cover {
    flex: 0 0 400px;
}
.product-detail .detail-cover img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    background: #eef4fa;
}
.product-detail .detail-info {
    flex: 1;
}
.product-detail .detail-info h1 {
    font-size: 1.8rem;
    color: #0b2b4a;
    margin-bottom: 12px;
}
.product-detail .detail-info .desc {
    color: #2f4a62;
    line-height: 1.8;
    font-size: 1rem;
}
.product-detail .gallery-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0b2b4a;
    margin: 24px 0 16px;
}
.product-detail .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.product-detail .gallery-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef4fa;
}

/* ============================================================
   前台 - 新闻列表（L形布局）
   ============================================================ */
.news-section {
    max-width: 1280px;
    margin: 32px auto 20px;
    padding: 0 24px;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 80, 160, 0.12);
}
.news-card .news-image {
    flex: 0 0 45%;
    max-width: 45%;
    overflow: hidden;
    background: #eef4fa;
    min-height: 180px;
}
.news-card .news-image img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}
.news-card .news-image .no-image {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4fa;
    color: #aaa;
    font-size: 0.85rem;
}
.news-card .news-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    min-width: 0;
}
.news-card .news-content .news-date {
    font-size: 0.75rem;
    color: #0083FF;
    background: #e6f0ff;
    padding: 2px 12px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.news-card .news-content h3 {
    font-size: 1.05rem;
    color: #0b2b4a;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.news-card .news-content p {
    color: #5b7a95;
    font-size: 0.88rem;
    line-height: 1.6;
    flex: 1;
}

/* ============================================================
   前台 - 新闻详情
   ============================================================ */
.news-detail-section {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 24px;
}
.news-detail {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.news-detail-header {
    border-bottom: 2px solid #eef4fa;
    padding-bottom: 20px;
    margin-bottom: 24px;
}
.news-detail-header .news-date {
    display: inline-block;
    font-size: 0.85rem;
    color: #0083FF;
    background: #e6f0ff;
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.news-detail-header h1 {
    font-size: 1.8rem;
    color: #0b2b4a;
}
.news-detail-cover {
    margin-bottom: 24px;
}
.news-detail-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef4fa;
}
.news-detail-content {
    color: #2f4a62;
    line-height: 1.9;
    font-size: 1.05rem;
}
.news-detail-content p {
    margin-bottom: 16px;
}
.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
    display: block;
}

/* ============================================================
   前台 - 联系我们
   ============================================================ */
.contact-section {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 24px;
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.contact-item i {
    font-size: 1.4rem;
    color: #0083FF;
    width: 32px;
    margin-top: 2px;
}
.contact-item strong {
    display: block;
    color: #0b2b4a;
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.contact-item p {
    color: #5b7a95;
    font-size: 0.95rem;
}
.contact-form-wrapper .form-group {
    margin-bottom: 16px;
}
.contact-form-wrapper .form-group label {
    display: block;
    font-weight: 500;
    color: #0b2b4a;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.contact-form-wrapper .form-group input,
.contact-form-wrapper .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e3ecf5;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #fafcff;
}
.contact-form-wrapper .form-group input:focus,
.contact-form-wrapper .form-group textarea:focus {
    border-color: #0083FF;
    outline: none;
    background: #fff;
}

/* ============================================================
   按钮
   ============================================================ */
.btn-primary {
    background: #0083FF;
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: #0066cc;
}
.btn-success {
    background: #27ae60;
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.btn-success:hover {
    background: #1e8449;
    color: #fff;
}
.btn-danger {
    background: #e74c3c;
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid #0083FF;
    color: #0083FF;
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}
.btn-outline:hover {
    background: #0083FF;
    color: #fff;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background: #f8faff;
    color: #5b7a95;
    margin-top: auto;
    padding: 24px 0 32px;
    padding-bottom: 70px;  /* 新增：为底部横幅留出空间 */
    flex-shrink: 0;
    border-top: 1px solid #e3ecf5;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    color: #5b7a95;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #0083FF;
}

/* ============================================================
   ============================================================
   后台管理 - 导航
   ============================================================
   ============================================================ */
.admin-nav {
    background: #0083FF;
    color: #fff;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,131,255,0.25);
}
.admin-nav .brand {
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-nav .nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}
.admin-nav .nav-links li {
    color: #fff;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    font-weight: 400;
    cursor: pointer;
}
.admin-nav .nav-links li:hover,
.admin-nav .nav-links li.active {
    border-bottom-color: #fff;
    font-weight: 500;
}
.divider-admin {
    height: 3px;
    background: #0a5fb0;
    box-shadow: 0 2px 8px rgba(0,80,180,0.3);
}
.admin-container {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 24px;
}
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.toolbar h2 {
    font-weight: 500;
    color: #0b2b4a;
    font-size: 1.3rem;
}

/* ============================================================
   后台管理 - 首页布局编辑
   ============================================================ */
.row-editor {
    background: #fff;
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #eef4fa;
}
.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.row-header select {
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid #d0ddee;
    background: #fff;
    font-size: 0.9rem;
}
.row-cols {
    display: grid;
    gap: 16px;
}
.row-cols.cols-1 { grid-template-columns: 1fr; }
.row-cols.cols-2 { grid-template-columns: 1fr 1fr; }
.row-cols.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.row-cols.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.col-item {
    background: #f8faff;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #e3ecf5;
}
.col-item .preview-img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 12px;
    background: #eef4fa;
    display: block;
}
.col-item input,
.col-item textarea {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #d0ddee;
    border-radius: 30px;
    margin-top: 6px;
    font-size: 0.9rem;
}
.col-item textarea {
    border-radius: 16px;
    min-height: 60px;
    resize: vertical;
}

.type-toggle-group {
    display: inline-flex;
    gap: 4px;
    background: #eef4fa;
    border-radius: 30px;
    padding: 3px;
}
.type-toggle-btn {
    padding: 5px 18px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s;
    background: transparent;
    color: #5b7a95;
    white-space: nowrap;
}
.type-toggle-btn.active {
    background: #0083FF;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,131,255,0.3);
}
.type-toggle-btn:hover:not(.active) {
    background: rgba(0,131,255,0.1);
}
.col-item .col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.custom-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #0083FF;
    color: #fff !important;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    text-decoration: none;
}
.custom-upload:hover {
    background: #0066cc;
    color: #fff !important;
}
.custom-upload input[type="file"] {
    display: none;
}

.file-status {
    font-size: 0.75rem;
    color: #27ae60;
    margin-left: 6px;
}
.empty-img-placeholder {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4fa;
    border-radius: 12px;
    color: #aaa;
    font-size: 0.85rem;
}

.status-msg {
    padding: 12px 20px;
    border-radius: 30px;
    margin-top: 12px;
    display: none;
    font-weight: 500;
}
.status-msg.success { display: block; background: #e8f5e9; color: #2e7d32; }
.status-msg.error { display: block; background: #ffebee; color: #c62828; }
.status-msg.loading { display: block; background: #e3f2fd; color: #0d47a1; }

/* ============================================================
   后台管理 - 编辑表单
   ============================================================ */
.edit-form {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid #eef4fa;
}
.edit-form .form-group {
    margin-bottom: 20px;
}
.edit-form .form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: #0b2b4a;
    font-size: 0.95rem;
}
.edit-form .form-group label .required {
    color: #e74c3c;
}
.edit-form .form-control {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e3ecf5;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #fafcff;
}
.edit-form .form-control:focus {
    border-color: #0083FF;
    outline: none;
    background: #fff;
}
.edit-form textarea.form-control {
    border-radius: 12px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}
.edit-form .form-control[readonly] {
    background: #f0f2f5;
    cursor: not-allowed;
}

.edit-form .image-upload-area {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.edit-form .image-upload-area .current-image {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e3ecf5;
    background: #f8faff;
    flex-shrink: 0;
}
.edit-form .image-upload-area .current-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
}
.edit-form .image-upload-area .current-image .no-image {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.8rem;
    background: #f8faff;
}
.edit-form .image-upload-area .upload-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.gallery-grid-admin .gallery-item {
    position: relative;
    border: 2px solid #e3ecf5;
    border-radius: 12px;
    overflow: hidden;
    background: #f8faff;
}
.gallery-grid-admin .gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.gallery-grid-admin .gallery-item .btn-danger {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 10px;
    font-size: 0.7rem;
    border-radius: 20px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-box h3 {
    font-size: 1.2rem;
    color: #0b2b4a;
    margin-bottom: 16px;
}
.modal-box .form-group {
    margin-bottom: 16px;
}
.modal-box .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: #0b2b4a;
}
.modal-box .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e3ecf5;
    border-radius: 12px;
    font-size: 1rem;
}
.modal-box .form-group input:focus {
    border-color: #0083FF;
    outline: none;
}
.modal-box .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ============================================================
   ============================================================
   后台管理 - 产品管理
   ============================================================
   ============================================================ */
#tabProducts .product-grid-admin {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
#tabProducts .product-grid-admin .product-card-admin {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef4fa;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
#tabProducts .product-grid-admin .product-card-admin:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 80, 160, 0.12);
}
#tabProducts .product-grid-admin .product-card-admin img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #eef4fa;
    flex-shrink: 0;
}
#tabProducts .product-grid-admin .product-card-admin .info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#tabProducts .product-grid-admin .product-card-admin .info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #0b2b4a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#tabProducts .product-grid-admin .product-card-admin .info p {
    font-size: 0.85rem;
    color: #5b7a95;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 8px;
    word-break: break-word;
}
#tabProducts .product-grid-admin .product-card-admin .info .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ============================================================
   ============================================================
   后台管理 - 新闻管理（4列，与产品管理一致）
   ============================================================
   ============================================================ */
#tabNews .news-grid-admin {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
#tabNews .news-grid-admin .product-card-admin {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef4fa;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
#tabNews .news-grid-admin .product-card-admin:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 80, 160, 0.12);
}
#tabNews .news-grid-admin .product-card-admin img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #eef4fa;
    flex-shrink: 0;
}
#tabNews .news-grid-admin .product-card-admin .info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#tabNews .news-grid-admin .product-card-admin .info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #0b2b4a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#tabNews .news-grid-admin .product-card-admin .info .news-date {
    font-size: 0.8rem;
    color: #0083FF;
    display: block;
    margin-bottom: 4px;
}
#tabNews .news-grid-admin .product-card-admin .info p {
    font-size: 0.85rem;
    color: #5b7a95;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 8px;
    word-break: break-word;
}
#tabNews .news-grid-admin .product-card-admin .info .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ============================================================
   响应式
   ============================================================ */

/* 前台 - 1024px */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid { grid-template-columns: 1fr 1fr; }
    #tabProducts .product-grid-admin { grid-template-columns: repeat(3, 1fr); }
    #tabNews .news-grid-admin { grid-template-columns: repeat(3, 1fr); }
}

/* 前台 - 768px */
@media (max-width: 768px) {
    .home-grid { gap: 16px; }
    .hero-card img { height: 160px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .product-card img { height: 160px; }
    .news-grid { grid-template-columns: 1fr; gap: 16px; }
    .news-card .news-image { flex: 0 0 40%; max-width: 40%; min-height: 140px; }
    .news-card .news-image img { min-height: 140px; }
    .news-card .news-image .no-image { min-height: 140px; }
    .news-card .news-content { padding: 12px 16px; }
    .news-card .news-content h3 { font-size: 0.95rem; }
    .news-card .news-content p { font-size: 0.82rem; }
    .product-detail .detail-cover { flex: 0 0 100%; }
    .product-detail .detail-cover img { height: 220px; }
    .contact-wrapper { grid-template-columns: 1fr; padding: 24px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
    .empty-home-tip { padding: 50px 20px; }
    .empty-home-tip i { font-size: 3rem; }
    .news-detail { padding: 24px; }
    .news-detail-header h1 { font-size: 1.4rem; }
    .news-detail-content { font-size: 0.95rem; }

    /* 后台 - 产品管理 2列 */
    #tabProducts .product-grid-admin { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    #tabProducts .product-grid-admin .product-card-admin img { height: 120px; }
    #tabNews .news-grid-admin { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    #tabNews .news-grid-admin .product-card-admin img { height: 120px; }

    /* 后台 - 布局行 */
    .row-cols.cols-2,
    .row-cols.cols-3,
    .row-cols.cols-4 { grid-template-columns: 1fr !important; }
    .row-header { flex-direction: column; align-items: stretch; }
    .admin-nav { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 8px; }
    .admin-nav .nav-links { gap: 16px; flex-wrap: wrap; }
    .edit-form .image-upload-area .current-image img,
    .edit-form .image-upload-area .current-image .no-image {
        width: 80px;
        height: 80px;
    }
}

/* 前台 - 480px */
@media (max-width: 480px) {
    .home-grid { gap: 12px; }
    .hero-card img { height: 120px; }
    .hero-card .card-text { padding: 12px 14px 16px; }
    .hero-card .card-text h3 { font-size: 1rem; }
    .hero-card .card-text p { font-size: 0.85rem; }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-card img { height: 120px; }
    .product-card .product-info { padding: 10px 12px 14px; }
    .product-card .product-info h3 { font-size: 0.9rem; }
    .product-card .product-info p { font-size: 0.8rem; -webkit-line-clamp: 1; }
    .news-card .news-image { flex: 0 0 35%; max-width: 35%; min-height: 120px; }
    .news-card .news-image img { min-height: 120px; }
    .news-card .news-image .no-image { min-height: 120px; }
    .news-card .news-content { padding: 10px 12px; }
    .news-card .news-content h3 { font-size: 0.85rem; }
    .news-card .news-content p { font-size: 0.75rem; }
    .product-detail .detail-cover img { height: 180px; }
    .product-detail .detail-info h1 { font-size: 1.4rem; }
    .product-detail .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-detail .gallery-grid img { height: 120px; }
    .contact-wrapper { padding: 16px; }
    .contact-item i { font-size: 1.2rem; width: 24px; }
    .section-title { font-size: 1.3rem; padding-left: 12px; }
    .empty-home-tip { padding: 30px 16px; }
    .empty-home-tip i { font-size: 2.5rem; }
    .empty-home-tip p { font-size: 0.95rem; }
    .news-detail { padding: 16px; }
    .news-detail-header h1 { font-size: 1.2rem; }
    .news-detail-content { font-size: 0.9rem; }

    /* 后台 - 产品管理 2列（小屏保持2列） */
    #tabProducts .product-grid-admin { grid-template-columns: 1fr 1fr; gap: 10px; }
    #tabProducts .product-grid-admin .product-card-admin img { height: 100px; }
    #tabNews .news-grid-admin { grid-template-columns: 1fr 1fr; gap: 10px; }
    #tabNews .news-grid-admin .product-card-admin img { height: 100px; }
}
/* ===== 视频播放器样式 ===== */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    margin: 16px 0;
    border-radius: 12px;
    background: #000;
}
.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}
.video-wrapper video {
    object-fit: contain;
}

/* ===== 可点击图片（放大查看） ===== */
.clickable-image {
    cursor: pointer;
    transition: opacity 0.2s;
}
.clickable-image:hover {
    opacity: 0.9;
}

/* ===== 图片查看器遮罩动画 ===== */
#imageViewerOverlay {
    animation: imageViewerFadeIn 0.25s ease;
}
@keyframes imageViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* ============================================================
   首页卡片 - 图片无描述时无留白
   ============================================================ */
.hero-card .card-text:empty {
    display: none;
}
.hero-card img {
    display: block;
    width: 100%;
}