/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* 表单样式 */
.form-control, .form-select {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 表格样式 */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
}

.table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a {
    color: rgba(255, 255, 255, 0.75);
}

footer a:hover {
    color: white;
    text-decoration: none;
}

.social-icons a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.25rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* 轮播图样式 */
.carousel {
    margin-bottom: 2rem;
}

.carousel-caption {
    bottom: 3rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}

/* 特色产品卡片 */
.featured-card {
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
}

/* 面包屑导航 */
.breadcrumb {
    padding: 0.75rem 1rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

/* 产品详情页 */
.product-gallery {
    margin-bottom: 1rem;
}

.product-thumbnail {
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-thumbnail:hover {
    opacity: 0.7;
}

/* 购物车页面 */
.cart-table th {
    white-space: nowrap;
}

.cart-actions .btn {
    margin-right: 0.5rem;
}

/* 联系我们表单 */
.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 后台管理特定样式 */
.admin-sidebar {
    min-height: 100vh;
    background-color: var(--dark-color);
    padding-top: 1rem;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-main {
    padding: 2rem;
}

.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* 消息提示 */
.alert {
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

/* 富文本编辑器调整 */
.note-editor.note-frame {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.note-editor.note-frame .note-toolbar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ced4da;
    border-radius: 0.25rem 0.25rem 0 0;
}

.note-editor.note-frame .note-statusbar {
    background-color: #f8f9fa;
    border-top: 1px solid #ced4da;
    border-radius: 0 0 0.25rem 0.25rem;
}
.article-preview {
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制显示3行 */
    -webkit-box-orient: vertical;
}

/* 确保富文本内容显示正常 */
.article-preview p,
.article-preview ul,
.article-preview ol {
    margin-bottom: 0.5rem;
}

.article-preview img {
    max-width: 100%;
    height: auto;
}

