* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 确保所有列表项没有默认标记 */
ul, ol {
    list-style: none;
}

/* 确保导航菜单项没有点标记 */
.nav-menu li {
    list-style-type: none;
}

.nav-menu li::before {
    display: none;
    content: none;
}

/* ========== 导航栏样式 ========== */
nav {
    background-color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo 样式 */
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e67e22;
    white-space: nowrap;
}

/* 左侧导航菜单 */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    flex: 1;
    margin-left: 2rem;
}

.nav-menu li {
    list-style: none;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    display: block;
    position: relative;
}

.nav-menu li a:hover {
    color: #e67e22;
}

.nav-menu li a.active {
    color: #e67e22;
}

.nav-menu li a.admin-link {
    background-color: #e67e22;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: white;
}

.nav-menu li a.admin-link:hover {
    background-color: #d35400;
    color: white;
}

/* 右侧语言切换器 */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: #e67e22;
    border-color: #e67e22;
}

/* 登出按钮（后台用） */
.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.logout-btn:hover {
    background: #c0392b;
}

/* 汉堡菜单 - 默认隐藏 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 主要内容 */
main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 卡片样式 */
.story-card,
.mission-card,
.vision-card,
.product-card,
.inquiry-card,
.contact-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.story-card h2,
.mission-card h2,
.vision-card h2,
.product-card h2,
.inquiry-card h2,
.contact-card h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-left: 4px solid #e67e22;
    padding-left: 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #e67e22;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin-right: 0.5rem;
}

.btn:hover {
    background-color: #d35400;
}

.btn-primary {
    background-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #229954;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 2px rgba(230,126,34,0.1);
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-price {
    color: #e67e22;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* 提示消息 */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.loading:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}
/* ========== 移动端响应式设计 ========== */

/* 基础响应式设置 */
* {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
}

/* 移动端导航栏 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .logo {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-menu li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* 语言切换器移动端样式 */
    .language-switcher {
        margin: 0 auto;
        justify-content: center;
    }
    
    .lang-btn {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* 移动端英雄区域 */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
}

/* 移动端容器 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
}

/* 移动端卡片样式 */
@media (max-width: 768px) {
    .story-card,
    .mission-card,
    .vision-card,
    .product-card,
    .inquiry-card,
    .contact-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .story-card h2,
    .mission-card h2,
    .vision-card h2 {
        font-size: 1.2rem;
    }
    
    .story-card p,
    .mission-card p,
    .vision-card p {
        font-size: 0.9rem;
    }
}

/* 移动端产品网格 */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .product-description {
        font-size: 0.85rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* 移动端产品详情页 */
@media (max-width: 768px) {
    .product-detail-card > div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .product-gallery .main-image {
        height: 250px;
    }
    
    .thumbnail-container {
        justify-content: center;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
}

/* 移动端联系我们页面 */
@media (max-width: 768px) {
    .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.5rem !important;
    }
    
    .contact-info h2,
    .contact-form h2 {
        font-size: 1.2rem;
    }
    
    .contact-info p {
        font-size: 0.9rem;
        word-break: break-word;
    }
}

/* 移动端用户交流页面 */
@media (max-width: 768px) {
    .inquiry-form-card {
        padding: 1rem !important;
    }
    
    .inquiry-card {
        padding: 1rem !important;
    }
    
    .inquiry-card > div:first-child {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .inquiry-card strong {
        font-size: 0.9rem;
    }
    
    .inquiry-card p {
        font-size: 0.85rem;
    }
}

/* 移动端表格（后台管理） */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* 移动端模态框 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }
    
    .modal-content h3 {
        font-size: 1.2rem;
    }
    
    .language-tabs {
        flex-wrap: wrap;
    }
    
    .lang-tab,
    .edit-lang-tab {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .image-grid {
        justify-content: center;
    }
    
    .image-card {
        width: 80px;
        height: 80px;
    }
}

/* 移动端表单 */
@media (max-width: 768px) {
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .btn,
    .form-actions a.btn {
        width: 100%;
        text-align: center;
    }
}

/* 移动端上传区域 */
@media (max-width: 768px) {
    .upload-section {
        padding: 1rem;
    }
    
    .upload-section h4 {
        font-size: 1rem;
    }
    
    .upload-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
    button, 
    .btn,
    [onclick] {
        cursor: pointer;
        min-height: 44px;
    }
}

/* 移动端页脚 */
@media (max-width: 768px) {
    footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* 小屏手机优化 (<=480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.85rem;
    }
    
    .product-title {
        font-size: 0.95rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .language-switcher .lang-btn {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    button, 
    .btn,
    .lang-btn,
    .product-card {
        cursor: default;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    button:active,
    .btn:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* 防止iOS缩放 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    font-size: 16px !important;
}