/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.main-content {
    margin-top: 80px; /* 增加导航栏高度空间 */
    min-height: calc(100vh - 80px);
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 轮播图样式 */
.hero-slide {
    height: 400px;
    display: flex;
    align-items: center;
}

.carousel-item {
    height: 400px;
}

/* 确保轮播图不被导航栏遮挡 */
#heroCarousel {
    margin-top: 0;
}

/* 商品卡片样式 */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image:hover .product-overlay {
    opacity: 1;
}

/* 商品详情页样式 */
.product-image-large img {
    max-height: 500px;
    object-fit: cover;
}

/* 分类卡片样式 */
.category-card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 服务特色样式 */
.feature-icon {
    margin-bottom: 1rem;
}

/* 表单样式 */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* 警告框样式 */
.alert {
    border-radius: 8px;
    border: none;
}

/* 卡片样式 */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    border: none;
}

/* 价格样式 */
.price-tag {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

/* 库存标签样式 */
.stock-badge {
    font-size: 0.9rem;
}

/* 面包屑导航样式 */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* 搜索框样式 */
.search-box {
    max-width: 300px;
}

/* 分页样式 */
.pagination {
    justify-content: center;
}

.page-link {
    color: #007bff;
    border-radius: 8px;
    margin: 0 2px;
}

/* 占位图片样式 */
.placeholder-img {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-slide {
        height: 300px;
        text-align: center;
    }
    
    .carousel-item {
        height: 300px;
    }
    
    .hero-slide h1 {
        font-size: 2rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .feature-icon {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        margin-top: 70px; /* 小屏幕下增加上边距 */
    }
    
    .hero-slide {
        height: 250px;
    }
    
    .carousel-item {
        height: 250px;
    }
    
    .hero-slide h1 {
        font-size: 1.5rem;
    }
    
    .hero-slide .lead {
        font-size: 1rem;
    }
    
    .product-image {
        height: 150px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 管理后台样式 */
.sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.sidebar .nav-link.active {
    background-color: #007bff;
    color: #fff;
}

/* 统计卡片样式 */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0;
}

.stats-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* 表格样式 */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th {
    background-color: #343a40;
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 工具提示样式 */
.tooltip-inner {
    background-color: #343a40;
    color: white;
    border-radius: 8px;
}

/* 徽章样式 */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* 进度条样式 */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* 模态框样式 */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
}

/* 输入组样式 */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

/* 列表组样式 */
.list-group-item {
    border-radius: 8px;
    margin: 2px 0;
    border: 1px solid #dee2e6;
}

.list-group-item.active {
    background-color: #007bff;
    border-color: #007bff;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
} 