/* 我的订单页面专用样式 */

/* 订单卡片样式 */
.order-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.order-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 订单头部 */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.order-header h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-header small {
    color: var(--text-secondary);
    font-size: 13px;
}

/* 状态标签 */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #e2e3e5;
    color: #383d41;
}

.status-shipped {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* 商品图片容器 */
.cart-image {
    width: 100px;
    height: 100px;
    background: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    overflow: hidden;
}

/* 商品图片 */
.cart-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 订单操作按钮大小统一 */
.btn-primary-custom.btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 0.25rem !important;
}

/* 订单筛选按钮 */
.order-filter-tabs {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.order-filter-tabs .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-filter-tabs .btn {
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.order-filter-tabs .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(255, 105, 0, 0.05);
}

.order-filter-tabs .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.order-filter-tabs .btn.active:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 移动端适配 */
@media (max-width: 576px) {
    .col-md-9 h2 {
        display: none;
    }
    
    /* 移动端订单筛选tabs固定悬浮 */
    .order-filter-tabs {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        z-index: 999;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
    }
    
    .order-filter-tabs .btn-group {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 4px;
    }
    
    .order-filter-tabs .btn {
        flex: 1;
        padding: 8px 4px;
        font-size: 12px;
        border-radius: 0;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        position: relative;
        font-weight: 500;
    }
    
    .order-filter-tabs .btn.active {
        background: transparent;
        color: var(--primary-color);
        border: none;
        font-weight: 600;
    }
    
    .order-filter-tabs .btn.active:hover {
        background: transparent;
        color: #ff6900;
    }
    
    .order-filter-tabs .btn.active::after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    /* 为订单内容添加顶部间距，避免被固定tabs遮挡 */
    .order-filter-tabs + .order-card {
        margin-top: 80px;
    }
    
    .order-card {
        padding: 16px;
        margin-bottom: 16px;
        border: none;
        border-radius: 0;
    }
    
    .order-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .cart-image {
        width: 80px;
        height: 80px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .order-filter-tabs .btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .order-filter-tabs .btn i {
        display: none;
    }
}

/* iPad mini 768px适配 - 订单筛选按钮一行显示 */
@media (max-width: 768px) and (min-width: 768px) {
    .order-filter-tabs .btn {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .order-filter-tabs .btn i {
        display: none;
    }
}

/* iPad Air 820px适配 - 订单筛选按钮一行显示 */
@media (max-width: 820px) and (min-width: 820px) {
    .sidebar-nav {
        padding: 24px 10px;
    }
    
    .order-filter-tabs .btn {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .order-filter-tabs .btn i {
        display: none;
    }
}

/* iPhone SE 375px适配 - 订单筛选tabs特定padding */
@media (max-width: 375px) {
    .order-filter-tabs {
        padding: 12px 5px;
    }
}