/* 全局样式 */
:root {
    /* 颜色变量 */
    --primary-color: #1a6de4;
    --primary-dark: #0d56c2;
    --primary-light: #e8f1ff;
    --secondary-color: #333333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #eaeaea;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --black: #000000;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* 过渡效果 */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* 圆角 */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* 字体 */
    --font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--light-color);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: var(--font-size-md);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-small {
    padding: 8px 20px;
    font-size: var(--font-size-sm);
}

/* 头部样式 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo样式 */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 12px;
}

.logo-text h1 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: var(--font-size-xs);
    color: var(--gray-color);
    display: block;
}

/* 导航样式 */
.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: var(--font-size-md);
    padding: 5px 0;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--secondary-color);
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    padding-top: 80px;
    color: var(--white);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-3xl);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    margin-bottom: 30px;
    color: var(--primary-light);
}

.hero-description {
    font-size: var(--font-size-lg);
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 区域样式 */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: var(--font-size-2xl);
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-description {
    font-size: var(--font-size-md);
    color: var(--gray-color);
    max-width: 700px;
    margin: 20px auto 0;
}

/* 服务网格 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: var(--font-size-lg);
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: var(--light-color);
    padding: 20px 0;
    margin-top: 70px;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb-content a {
    color: var(--gray-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-content a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--gray-color);
}

/* 联系表单 */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3 {
    font-size: var(--font-size-xl);
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    background-color: var(--primary-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-md);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 109, 228, 0.1);
}

/* 页脚样式 */
.footer {
    background-color: #222222;
    color: #aaaaaa;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--white);
    font-size: var(--font-size-lg);
    margin-bottom: 20px;
}

.footer-logo {
    /* display: flex; */
    flex-direction: column;
    gap: 15px;
}

.footer-logo-img {
    height: 50px;
    width: auto;
}

.footer-logo-text h3 {
    color: var(--white);
    font-size: var(--font-size-lg);
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaaaaa;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444444;
    font-size: var(--font-size-sm);
    color: #888888;
}

.beian {
    margin-top: 10px;
}

/* 加载动画 */
.loading-spinner {
    text-align: center;
    padding: 50px;
    color: var(--gray-color);
}

.loading-spinner i {
    font-size: 40px;
    margin-bottom: 20px;
}













/* 调试样式 */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.no-products i {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 48px;
}

.no-products h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 24px;
}

.no-products p {
    color: #868e96;
    font-size: 16px;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 100px 20px;
}

.error-message i {
    color: #ffc107;
    margin-bottom: 30px;
    font-size: 60px;
}

.error-message h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 28px;
}

.error-message p {
    color: #868e96;
    margin-bottom: 30px;
    font-size: 18px;
}

/* 加载状态 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 产品网格占位符 */
.product-grid-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
    height: 400px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}












/* 管理页面特有样式 - 添加到style.css末尾 */

.admin-container {
    min-height: 100vh;
    background-color: #f5f7fa;
    padding-top: 80px;
}

.admin-header {
    background: linear-gradient(135deg, #1a6de4 0%, #0d56c2 100%);
    color: white;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.admin-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.admin-content {
    padding: 0 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-nav {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 12px 28px;
    background: none;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.admin-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.admin-panel {
    display: none;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.admin-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.panel-header h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin: 0;
}

.panel-actions {
    display: flex;
    gap: 15px;
}

/* 表格样式 */
.products-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.products-table th {
    background: var(--light-color);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.products-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.product-image-cell {
    width: 100px;
}

.product-image-preview {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.product-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn.edit {
    background: var(--primary-light);
    color: var(--primary-color);
}

.action-btn.edit:hover {
    background: var(--primary-color);
    color: var(--white);
}

.action-btn.delete {
    background: #ffe8e8;
    color: #dc3545;
}

.action-btn.delete:hover {
    background: #dc3545;
    color: var(--white);
}

/* JSON编辑器 */
.json-editor {
    width: 100%;
    height: 500px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    resize: vertical;
    background: var(--light-color);
}

.json-editor:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 109, 228, 0.1);
}