/* eShop Theme Styles - 虚拟商城主题样式 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

.main-content {
    min-height: calc(100vh - 200px);
}

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

/* 轮播图 */
.hero-slide {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

.category-icon {
    font-size: 3rem;
}

/* 商品卡片 */
.product-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

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

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

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

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.1rem;
}

/* 商品详情页 */
.product-detail-image {
    border-radius: 8px;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: auto;
}

.product-meta {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 购物车 */
.cart-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.quantity-input {
    width: 80px;
    text-align: center;
}

/* 订单 */
.order-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #d1ecf1; color: #0c5460; }
.status-processing { background: #d4edda; color: #155724; }
.status-shipped { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-refunded { background: #e2e3e5; color: #383d41; }

/* 钱包 */
.wallet-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.wallet-balance {
    font-size: 2.5rem;
    font-weight: bold;
}

.coin-balance {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* 后台管理样式 */
.admin-dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.admin-dashboard-card.border-left-success {
    border-left-color: var(--success-color);
}

.admin-dashboard-card.border-left-info {
    border-left-color: #17a2b8;
}

.admin-dashboard-card.border-left-warning {
    border-left-color: var(--warning-color);
}

/* 响应式 */
@media (max-width: 768px) {
    .product-image-wrapper {
        height: 150px;
    }
    
    .wallet-balance {
        font-size: 2rem;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.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); }
}
